本文整理汇总了PHP中gcms::pregReplace方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::pregReplace方法的具体用法?PHP gcms::pregReplace怎么用?PHP gcms::pregReplace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::pregReplace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// หน้าค้นหา
$canonical = WEB_URL . '/index.php?module=search&q=' . urlencode($search);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, '{LNG_SEARCH}', '{LNG_SEARCH}', $breadcrumb);
// แสดงผล
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODULE}/', '/{SEARCH}/', '/{RESULT}/', '/{LIST}/', '/{SPLITPAGE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = WEB_URL;
$replace[] = $module;
$replace[] = $search;
$replace[] = sizeof($list) == 0 ? '' : sprintf($lng['ALL_SEARCH'], $start + 1, $end, $rows, $search, number_format($time_end - $time_start, 4));
if ($search == '') {
$replace[] = $lng['LNG_SEARCH_TIP'];
} elseif (sizeof($list) == 0) {
$replace[] = sprintf($lng['LNG_SEARCH_NOT_FOUND'], $search) . $lng['LNG_SEARCH_TIP'];
} else {
$replace[] = gcms::HighlightSearch(implode("\n", $list), $search);
}
$replace[] = $splitpage;
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('search', 'search', 'search'));
// title, keywords, description
$title = ($search == '' ? "" : "{$search} - ") . $lng['LNG_SEARCH'];
$keywords = "{$title} {$keywords}";
$description = "{$title} {$description}";
}
示例2: preg_match
// inint
include '../bin/inint.php';
// โมดูลที่ต้องการ
preg_match('/^([a-z]+)-(.*)$/', $_GET['module'], $match);
$content = array();
if (is_file(ROOT_PATH . "modules/{$match['1']}/print_{$match['2']}.php")) {
// สถานะของ member และ admin
$isMember = gcms::isMember();
$isAdmin = gcms::isAdmin();
$canAdmin = $_SESSION['login']['admin_access'] == 1;
// ป้องกันการเรียกหน้าเพจโดยตรง
DEFINE('MAIN_INIT', 'admin');
// โหลดโมดูลสำหรับพิมพ์
include ROOT_PATH . "modules/{$match['1']}/print_{$match['2']}.php";
}
if (sizeof($content) == 0) {
header("HTTP/1.0 404 Not Found");
header("Status: 404 Not Found");
} else {
echo '<!DOCTYPE html>';
echo '<html lang=' . LANGUAGE . ' dir=ltr>';
echo '<head>';
echo '<title>' . $title . '</title>';
echo '<meta charset=utf-8>';
echo '<link rel=stylesheet href=' . WEB_URL . '/' . SKIN . '/print.css>';
echo '</head>';
echo '<body>';
echo gcms::pregReplace('/{(LNG_[A-Z0-9_]+)}/e', OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng', implode("\n", $content));
echo '</body>';
echo '</html>';
}
示例3: header
<?php
// modal.php
header("content-type: text/html; charset=UTF-8");
// inint
include dirname(__FILE__) . '/bin/inint.php';
// ตรวจสอบ referer
if (gcms::isReferer() && preg_match('/^([a-z]+)$/', $_POST['module'], $match)) {
if (is_file(ROOT_PATH . SKIN . "{$match['1']}.html")) {
$patt = array('/{(LNG_[A-Z0-9_]+)}/e', '/{SKIN}/', '/{WEBURL}/', '/{TITLE}/', '/{DESCRIPTION}/', '/{LANGUAGE}/');
$replace = array(OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng', SKIN, WEB_URL, $config['web_title'], $config['web_description'], LANGUAGE);
echo gcms::pregReplace($patt, $replace, gcms::loadfile(ROOT_PATH . SKIN . "{$match['1']}.html"));
} else {
echo '<div class=error>' . $lng['PAGE_NOT_FOUND'] . '</div>';
}
}
示例4: array
<?php
// modules/member/forgot.php
if (defined('MAIN_INIT')) {
// title
$title = $lng['LNG_FORGOT_TITLE'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('forgot'), $lng['LNG_FORGOT_TITLE'], $lng['LNG_FORGOT_TITLE'], $breadcrumb);
if (isset($config['custom_forgot']) && is_file(ROOT_PATH . $config['custom_forgot'])) {
// custom register form
include ROOT_PATH . $config['custom_forgot'];
} else {
// แสดงฟอร์ม member/forgotfrm.html
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODAL}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = WEB_URL;
$replace[] = gcms::getVars($_POST, 'action', '') == 'modal' ? 'true' : 'false';
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'forgotfrm'));
}
// เลือกเมนู
$menu = 'forgot';
}
示例5: array
// title
$title = $lng['LNG_REGISTER_TITLE'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('register'), $lng['LNG_REGISTER_TITLE'], $lng['LNG_REGISTER_TITLE'], $breadcrumb);
if (isset($config['custom_register']) && is_file(ROOT_PATH . $config['custom_register'])) {
// custom register form
include ROOT_PATH . $config['custom_register'];
} else {
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
// แสดงฟอร์ม registerfrm.html
$patt = array('/{BREADCRUMS}/', '/<PHONE>(.*)<\\/PHONE>/isu', '/<IDCARD>(.*)<\\/IDCARD>/isu', '/<INVITE>(.*)<\\/INVITE>/isu', '/{(LNG_[A-Z0-9_]+)}/e', '/{ANTISPAM}/', '/{WEBURL}/', '/{MODAL}/', '/{INVITE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = empty($config['member_phone']) ? '' : '\\1';
$replace[] = empty($config['member_idcard']) ? '' : '\\1';
$replace[] = empty($config['member_invitation']) ? '' : '\\1';
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $register_antispamchar;
$replace[] = WEB_URL;
$replace[] = gcms::getVars($_POST, 'action', '') != 'modal' ? 'false' : 'true';
$replace[] = gcms::getVars($_COOKIE, PREFIX . '_invite', '');
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'registerfrm'));
}
}
示例6: array
$content = '<div class=error>' . $title . '</div>';
} else {
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
// title
$title = $lng['LNG_SENDMAIL_TITLE'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// แสดงผล member/sendmail.html
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{TITLE}/', '/{SENDER}/', '/{RECIEVER}/', '/{RECIEVERID}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $title;
$replace[] = $isMember ? $_SESSION['login']['email'] : '';
$replace[] = implode(',', $emails);
$replace[] = implode(',', $ids);
$replace[] = $register_antispamchar;
$replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'sendmail'));
// เลือกเมนู
$menu = 'sendmail';
}
} else {
$title = $lng['LNG_NOT_LOGIN'];
$content = '<div class=error>' . $title . '</div>';
}
示例7: strip_tags
$replace[] = strip_tags($title);
$replace[] = $config['web_title'];
if (isset($login_result)) {
$name = trim("{$login_result['pname']} {$login_result['fname']} {$login_result['lname']}");
$name = $name == '' ? $login_result['displayname'] : $name;
$replace[] = $name == '' ? $login_result['email'] : $name;
$replace[] = $login_result['id'];
} else {
$replace[] = '';
$replace[] = 0;
}
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = VERSION;
$replace[] = LANGUAGE;
$replace[] = $config['admin_skin'];
$replace[] = WEB_URL;
if (isset($input)) {
$replace[] = $input == 'login_email' ? 'autofocus' : '';
$replace[] = $input == 'login_password' ? 'autofocus' : '';
} else {
$replace[] = '';
$replace[] = '';
}
$replace[] = DATA_URL;
$replace[] = OLD_PHP ? 'gcms::adminURL(array(2 => \'$2\'))' : 'gcms::adminURL';
$replace[] = gcms::getVars($_GET, 'src', '');
$replace[] = $login_remember == 1 ? 'checked' : '';
$replace[] = $login_email;
$replace[] = $login_password;
echo gcms::pregReplace($patt, $replace, gcms::loadfile(ROOT_PATH . "admin/skin/{$config['admin_skin']}/index.html"));
}
示例8: unset
$categories[$item['category_id']] = "<option value={$item['category_id']}{$sel}>" . gcms::ser2Str($item, 'topic') . "</option>";
}
}
if (sizeof($categories) > 1) {
unset($categories[0]);
}
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
// แสดงผล
$patt = array('/{BREADCRUMS}/', '/<MEMBER>(.*)<\\/MEMBER>/s', '/<UPLOAD>(.*)<\\/UPLOAD>/s', '/{CATEGORIES}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{LOGIN_PASSWORD}/', '/{LOGIN_EMAIL}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{SIZE}/', '/{TYPE}/', '/{MODULEID}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = $isMember ? '' : '$1';
$replace[] = $index['img_upload_type'] == '' ? '' : '$1';
$replace[] = implode("\n", $categories);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $login['password'];
$replace[] = $login['email'];
$replace[] = $register_antispamchar;
$replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
$replace[] = $index['img_upload_size'];
$replace[] = empty($index['img_upload_type']) ? ' ' : $index['img_upload_type'];
$replace[] = $index['module_id'];
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate($index['module'], 'board', 'write'));
// title
$title = $lng['LNG_BOARD_NEW'] . ' ' . $install_modules[$index['module']]['menu_text'];
// เลือกเมนู
$menu = empty($install_modules[$index['module']]['alias']) ? $index['module'] : $install_modules[$index['module']]['alias'];
}
}
示例9: array
$db->edit(DB_USER, $user['id'], $newuser);
$patt = array('/%DISPLAYNAME%/', '/%WEBTITLE%/', '/%WEBURL%/');
$replace[] = $user['displayname'] == '' ? $user['email'] : $user['displayname'];
$replace[] = strip_tags($config['web_title']);
$replace[] = WEB_URL;
$title = preg_replace($patt, $replace, $lng['ACTIVATE_NEWREGISTER_HEADER']);
$detail = preg_replace($patt, $replace, $lng['ACTIVATE_NEWREGISTER_DETAIL']);
}
} else {
$title = $lng['ACTIVATE_TITLE'];
$detail = $lng['ACTIVATE_ERROR'];
}
// แสดงผล
$main_patt = array();
$main_replace = array();
$main_patt[] = '/{(LNG_[A-Z0-9_]+)}/e';
$main_replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$main_patt[] = '/{VERSION}/';
$main_replace[] = VERSION;
$main_patt[] = '/{WEBTITLE}/';
$main_replace[] = strip_tags($config['web_title']);
$main_patt[] = '/{WEBDESCRIPTION}/';
$main_replace[] = strip_tags($config['web_description']);
$main_patt[] = '/{WEBURL}/';
$main_replace[] = WEB_URL;
$main_patt[] = '/{TITLE}/';
$main_replace[] = $title;
$main_patt[] = '/{CONTENT}/';
$main_replace[] = $detail;
echo gcms::pregReplace($main_patt, $main_replace, file_get_contents(ROOT_PATH . SKIN . 'member/activate.html'));
示例10: elseif
if ($template == '') {
$template = gcms::loadtemplate('member', 'member', 'loginfrm');
}
$content = gcms::pregReplace($patt, $replace, $template);
}
} elseif (!empty($config['custom_member']) && is_file(ROOT_PATH . $config['custom_member'])) {
// custom member form
include_once ROOT_PATH . $config['custom_member'];
} else {
// กรอบข้อมูลสมาชิก
$patt = array('/{BREADCRUMS}/', '/{WEBTITLE}/', '/{SUBTITLE}/', '/{WEBURL}/', '/{DISPLAYNAME}/', '/{ID}/', '/{STATUS}/', '/{ADMIN}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{FACEBOOK}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = $config['web_title'];
$replace[] = $error == '' ? $config['web_description'] : '<span class=error>' . $error . '</span>';
$replace[] = WEB_URL;
$replace[] = empty($login_result['displayname']) ? $login_result['email'] : $login_result['displayname'];
$replace[] = $login_result['id'];
$replace[] = $login_result['status'];
$replace[] = isset($login_result['admin_access']) && ($login_result['admin_access'] == 1 || $_SESSION['login']['status'] == 1) ? 'admin' : ' hidden';
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = empty($config['facebook']['appId']) ? 'hidden' : 'facebook';
$template = gcms::loadtemplate('member', 'member', 'member');
if ($template == '') {
$template = gcms::loadtemplate('member', 'member', 'memberfrm');
}
$content = gcms::pregReplace($patt, $replace, $template);
}
// เลือกเมนู
$menu = 'login';
}
示例11: rawurlencode
// คืนค่าเนื้อหา
$ret['menu'] = rawurlencode($menu);
$ret['title'] = rawurlencode(strip_tags($title));
// เตรียมข้อมูลสำหรับใส่ใน template
$main_patt = array();
$main_patt['/{URL}/'] = $canonical;
$main_patt['/{XURL}/'] = rawurlencode($canonical);
$main_patt['/{WIDGET_([A-Z]+)(([\\s_])(.*))?}/e'] = OLD_PHP ? 'gcms::getWidgets(array(1=>\'$1\',3=>\'$3\',4=>\'$4\'))' : 'gcms::getWidgets';
$main_patt['/{(LNG_[A-Z0-9_]+)}/e'] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$main_patt['/{SKIN}/'] = SKIN;
$main_patt['/{WEBURL}/'] = WEB_URL;
$main_patt['/{LANGUAGE}/'] = LANGUAGE;
$main_patt['/{WEBTITLE}/'] = strip_tags($config['web_title']);
// ตัวแปรหลังจากแสดงผลแล้ว
$main_patt = array_merge($main_patt, $custom_patt);
// แสดงผล
$ret['content'] = rawurlencode(gcms::pregReplace(array_keys($main_patt), array_values($main_patt), $content));
if (isset($_POST['to'])) {
$ret['to'] = rawurlencode($_POST['to']);
}
// บันทึก useronline
include ROOT_PATH . 'useronline.php';
// อัปเดท pagesview
$db->query("UPDATE `" . DB_COUNTER . "` SET `pages_view`=`pages_view`+1,`time`='{$mmktime}' WHERE `date`='" . date('Y-m-d', $mmktime) . "' LIMIT 1");
// คืนค่า เวลาที่ใช้ไป
$ret['db_elapsed'] = sprintf('%.3f', microtime(true) - BEGIN_TIME);
$ret['db_quries'] = $db->query_count();
}
// คืนค่า JSON
echo gcms::array2json($ret);
}
示例12: elseif
} elseif ($result['displayname'] != '') {
$u[] = $result['displayname'];
} else {
$u[] = $result['email'];
}
$replace[] = implode(' ', $u);
if (is_file(ROOT_PATH . 'modules/pm/send.php')) {
$replace[] = '<a class=icon-email-sent title="{LNG_PM_SEND_TITLE}" href="index.php?module=pm-send&to=' . $result['id'] . '"> </a>';
} else {
$replace[] = '<a class=icon-email-sent title="{LNG_MAIL_TO}" href="index.php?module=sendmail&to=' . $result['id'] . '"> </a>';
}
$replace[] = in_array($result['sex'], array_keys($lng['SEX'])) ? $result['sex'] : 'u';
$replace[] = gcms::mktime2date($result['create_date'], 'd M Y');
$replace[] = $result['website'] == '' ? '-' : "<a href=\"http://{$result['website']}\" target=_blank>{$result['website']}</a>";
$replace[] = number_format($result['visited']);
$replace[] = $result['fb'] == 1 ? 'icon-facebook' : '';
$replace[] = gcms::mktime2date($result['lastvisited'], 'd M Y');
$replace[] = $result['post'];
$replace[] = $result['reply'];
$replace[] = $config['member_status'][(int) $result['status']];
$replace[] = $result['point'];
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'view'));
} else {
$title = $lng['LNG_ID_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
}
} else {
$title = $lng['LNG_DATA_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
}
示例13: foreach
foreach ($datas as $item) {
$replace = array();
$replace[] = $item['color'];
$replace[] = gcms::getUrl($index['module'], '', 0, 0, "id={$item['id']}");
$replace[] = $item['topic'];
$replace[] = $item['description'];
preg_match('/^(([0-9]+):([0-9]+)):[0-9]+$/', $item['t'], $m);
$replace[] = $m[1];
$calendar[] = preg_replace($patt, $replace, $skin);
}
// แสดงผล
$patt = array('/{BREADCRUMS}/', '/{LIST}/', '/{TOPIC}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{YEAR}/', '/{MONTH}/', '/{DATE}/', '/{URL}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = implode('', $calendar);
$replace[] = $index['topic'];
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = (int) $match[1] + $lng['YEAR_OFFSET'];
$replace[] = $lng['MONTH_SHORT'][(int) $match[2] - 1];
$replace[] = (int) $match[3];
$replace[] = $canonical;
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate($index['module'], 'event', 'day'));
// title,keywords,description
$title = $index['topic'];
$keywords = $index['keywords'];
$description = $index['detail'];
}
} else {
$title = $lng['LNG_DATA_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
}
示例14: strip_tags
$meta['og:title'] = '<meta property="og:title" content="' . $title . '">';
$meta['og:site_name'] = '<meta property="og:site_name" content="' . strip_tags($config['web_title']) . '">';
$meta['og:type'] = '<meta property="og:type" content="article">';
$main_patt['/{URL}/'] = $canonical;
$main_patt['/{XURL}/'] = rawurlencode($canonical);
$main_patt['/{META}/'] = implode("\n", $meta);
// javascript
$main_patt['/{SCRIPT}/'] = implode("\n", $script);
// เวลาประมวลผล
$main_patt['/{ELAPSED}/'] = sprintf('%.3f', microtime(true) - BEGIN_TIME);
// จำนวน query
$main_patt['/{QURIES}/'] = $db->query_count();
// path ของ tempalate
$main_patt['/{SKIN}/'] = SKIN;
// ภาษาที่เลือก
$main_patt['/{LANGUAGE}/'] = LANGUAGE;
// URL ของเว็บไซต์
$main_patt['/{WEBURL}/'] = WEB_URL;
// URL ของ datas/
$main_patt['/{DATAURL}/'] = DATA_URL;
// ชื่อเว็บ
$main_patt['/{WEBTITLE}/'] = $config['web_title'];
$main_patt['/{SITENAME}/'] = strip_tags($config['web_title']);
// คำอธิบายย่อของเว็บ
$main_patt['/{WEBDESCRIPTION}/'] = $config['web_description'];
// ตัวแปรหลังจากแสดงผลแล้ว
$main_patt = array_merge($main_patt, $custom_patt);
// แสดงผล
echo gcms::pregReplace(array_keys($main_patt), array_values($main_patt), gcms::loadtemplate('index', '', 'index'));
}
}
示例15: header
<?php
// widgets/tags/view.php
header("content-type: text/html; charset=UTF-8");
// inint
include '../../bin/inint.php';
// referer
if (gcms::isReferer()) {
list($action, $id) = explode('-', $_POST['id']);
$tag = $db->getRec(DB_TAGS, $id);
if ($tag) {
$patt = array('/{(LNG_[A-Z0-9_]+)}/e', '/{TAG}/', '/{COUNT}/');
$replace = array();
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $tag['tag'];
$replace[] = number_format($tag['count']);
echo gcms::pregReplace($patt, $replace, gcms::loadfile('tags.tpl'));
}
}