diff --git a/index.php b/index.php index ecd7dd9f..a206587a 100644 --- a/index.php +++ b/index.php @@ -238,6 +238,7 @@ if($config['backward_support']) { $layout_header = template_header(); $layout_name = $template_path; $news_content = ''; + $tickers_content = ''; $subtopic = PAGE; $main_content = ''; diff --git a/system/compat.php b/system/compat.php new file mode 100644 index 00000000..78d9a79d --- /dev/null +++ b/system/compat.php @@ -0,0 +1,64 @@ + + * @copyright 2017 MyAAC + * @version 0.6.6 + * @link http://my-aac.org + */ +defined('MYAAC') or die('Direct access not allowed!'); + +function check_name($name, &$errors = '') { + if(Validator::characterName($name)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function check_account_id($id, &$errors = '') { + if(Validator::accountId($id)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function check_account_name($name, &$errors = '') { + if(Validator::accountName($name)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function check_name_new_char($name, &$errors = '') { + if(Validator::newCharacterName($name)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function check_rank_name($name, &$errors = '') { + if(Validator::rankName($name)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function check_guild_name($name, &$errors = '') { + if(Validator::guildName($name)) + return true; + + $errors = Validator::getLastError(); + return false; +} + +function news_place() { + return tickers(); +} +?> \ No newline at end of file diff --git a/system/functions.php b/system/functions.php index 05a9131a..1db91627 100644 --- a/system/functions.php +++ b/system/functions.php @@ -9,6 +9,7 @@ * @link http://my-aac.org */ defined('MYAAC') or die('Direct access not allowed!'); + function success($message, $return = false) { if($return) return '
' . $message . '
'; @@ -411,42 +412,16 @@ function short_text($text, $limit) return $text; } -function news_place() +function tickers() { - global $template_path, $news_content; - - $news = ''; - if(PAGE == 'news') - { - //add tickers to site - without it tickers will not be showed - if(isset($news_content)) - $news .= $news_content; - - //featured article -/* $news .= ''.$code.' |
'.$quote.' |
\\1
',
+// '#\[align=(.*?)\](.*?)\[/align\]#si' => ($xhtml ? ''.$code.' |
'.$quote.' |
\\1
',
-// '#\[align=(.*?)\](.*?)\[/align\]#si' => ($xhtml ? 'Tickers | +||
![]() |
+ {{ ticker.date|date("j M Y") }} | +{{ ticker.body|raw }} | +