本文整理汇总了PHP中fusion_get_locale函数的典型用法代码示例。如果您正苦于以下问题:PHP fusion_get_locale函数的具体用法?PHP fusion_get_locale怎么用?PHP fusion_get_locale使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fusion_get_locale函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_mood_message
public function get_mood_message()
{
// whether any user has reacted to this post
$locale = fusion_get_locale("", FORUM_ADMIN_LOCALE);
$locale += fusion_get_locale("", FORUM_LOCALE);
$last_datestamp = array();
$mood_description = array();
$mood_cache = $this->cache_mood();
$response_query = "SELECT pn.*, u.user_id, u.user_name, u.user_avatar, u.user_status\n FROM " . DB_POST_NOTIFY . " pn\n LEFT JOIN " . DB_USERS . " u ON pn.notify_sender = u.user_id\n WHERE post_id='" . $this->post_id . "' GROUP BY pn.notify_mood_id ORDER BY pn.notify_mood_id ASC, pn.post_id ASC";
$response_result = dbquery($response_query);
if (dbrows($response_result)) {
while ($m_data = dbarray($response_result)) {
$user_output = "<a class='mood_sender' href='" . FUSION_REQUEST . "#post_" . $this->post_id . "'>\n" . profile_link($m_data['user_id'], $m_data['user_name'], $m_data['user_status'], "", FALSE) . "</a>";
if (fusion_get_userdata('user_id') == $m_data['notify_sender']) {
$user_output = $locale['you'];
}
$reply_sender[$m_data['notify_mood_id']][] = $user_output;
// The pairing errors are when `notify_mood_id` is illegally inserted or deleted
// To code fallback on empty
$last_datestamp[$m_data['notify_mood_id']] = $m_data['notify_datestamp'];
$icon = isset($mood_cache[$m_data['notify_mood_id']]['mood_icon']) ? $mood_cache[$m_data['notify_mood_id']]['mood_icon'] : "fa fa-question fa-fw";
$mood_icon[$m_data['notify_mood_id']] = "<i class='{$icon}'></i>";
$description = isset($mood_cache[$m_data['notify_mood_id']]['mood_description']) ? $mood_cache[$m_data['notify_mood_id']]['mood_description'] : $locale['forum_0529'];
$mood_description[$m_data['notify_mood_id']] = $description;
}
$output_message = "";
foreach ($mood_description as $mood_id => $mood_output) {
$senders = implode(", ", $reply_sender[$mood_id]);
$output_message .= sprintf($locale['forum_0528'], $mood_icon[$mood_id], $senders, $mood_output, timer($last_datestamp[$mood_id])) . "\n <br/>";
}
return (string) $output_message;
}
}
示例2: setLocale
private static function setLocale()
{
self::$locale = fusion_get_locale("", FORUM_ADMIN_LOCALE);
self::$locale += fusion_get_locale("", SETTINGS_LOCALE);
self::$locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
self::$locale += fusion_get_locale("", FORUM_RANKS_LOCALE);
}
示例3: __construct
public function __construct()
{
if (empty(self::$locale)) {
$locale = fusion_get_locale('', LOCALE . LOCALESET . "admin/errors.php");
$locale += fusion_get_locale('', LOCALE . LOCALESET . "errors.php");
self::$locale += $locale;
}
$this->error_status = filter_input(INPUT_POST, 'error_status', FILTER_VALIDATE_INT, array('min_range' => 0, 'max_range' => 2));
$this->posted_error_id = filter_input(INPUT_POST, 'error_id', FILTER_VALIDATE_INT);
$this->delete_status = filter_input(INPUT_POST, 'delete_status', FILTER_VALIDATE_INT, array('min_range' => 0, 'max_range' => 2));
$this->rowstart = filter_input(INPUT_GET, 'rowstart', FILTER_VALIDATE_INT) ?: 0;
$this->error_id = filter_input(INPUT_GET, 'error_id', FILTER_VALIDATE_INT);
if (isnum($this->error_status) && $this->posted_error_id) {
dbquery("UPDATE " . DB_ERRORS . " SET error_status='" . $this->error_status . "' WHERE error_id='" . $this->posted_error_id . "'");
redirect(FUSION_REQUEST);
}
if (isset($_POST['delete_entries']) && isnum($this->delete_status)) {
dbquery("DELETE FROM " . DB_ERRORS . " WHERE error_status='" . $_POST['delete_status'] . "'");
$source_redirection_path = preg_replace("~" . fusion_get_settings("site_path") . "~", "", FUSION_REQUEST, 1);
redirect(fusion_get_settings("siteurl") . $source_redirection_path);
}
$result = dbquery("SELECT * FROM " . DB_ERRORS . " ORDER BY error_timestamp DESC LIMIT " . $this->rowstart . ",20");
while ($data = dbarray($result)) {
$this->errors[$data['error_id']] = $data;
}
$this->rows = $this->errors ? dbcount('(error_id)', DB_ERRORS) : 0;
}
示例4: set_filterInfo
public function set_filterInfo()
{
$locale = fusion_get_locale("", FORUM_LOCALE);
$time = isset($_GET['time']) ? $_GET['time'] : '';
$type = isset($_GET['type']) ? $_GET['type'] : '';
$sort = isset($_GET['sort']) ? $_GET['sort'] : '';
$order = isset($_GET['order']) ? $_GET['order'] : '';
$timeCol = '';
$typeCol = '';
if ($time) {
$time_array = array('today' => strtotime('today'), '2days' => strtotime('-2 days'), '1week' => strtotime('-1 week'), '2week' => strtotime('-2 weeks'), '1month' => strtotime('-2 months'), '2month' => strtotime('-2 months'), '3month' => strtotime('-2 months'), '6month' => strtotime('-6 months'), '1year' => strtotime('-1 year'));
$time_stop = $time_array['today'];
foreach ($time_array as $key => $value) {
if ($time == $key) {
$time_stop = prev($time_array);
break;
}
}
if ($time !== 'today') {
$start_time = intval($time_array[$time]);
$end_time = time();
$timeCol = "AND ((p1.post_datestamp BETWEEN '{$start_time}' AND '{$end_time}') OR (t.thread_lastpost BETWEEN '{$start_time}' AND '{$end_time}'))";
} else {
$timeCol = "AND (p1.post_datestamp >= " . intval($time_array[$time]) . " OR t.thread_lastpost >= " . intval($time_stop) . " )";
}
}
if ($type) {
$type_array = array('all' => '', 'discussions' => "AND (a1.attach_name IS NULL or a1.attach_name='') AND (a2.attach_name IS NULL or a2.attach_name='') AND (forum_poll_title IS NULL or forum_poll_title='')", 'attachments' => "AND a1.attach_name !='' OR a2.attach_name !='' AND (forum_poll_title IS NULL or forum_poll_title='')", 'poll' => "AND (a1.attach_name IS NULL or a1.attach_name='') AND (a2.attach_name IS NULL or a2.attach_name='') AND forum_poll_title !=''", 'solved' => "AND t.thread_answered = '1'", 'unsolved' => "AND t.thread_answered = '0'");
$typeCol = $type_array[$type];
}
$sortCol = "ORDER BY t.thread_lastpost ";
$orderCol = 'DESC';
if ($sort) {
$sort_array = array('author' => 't.thread_author', 'time' => 't.thread_lastpost', 'subject' => 't.thread_subject', 'reply' => 't.thread_postcount', 'view' => 't.thread_views');
$sortCol = "ORDER BY " . $sort_array[$sort] . " ";
}
if ($order) {
$order_array = array('ascending' => 'ASC', 'descending' => 'DESC');
$orderCol = $order_array[$order];
}
$this->filter_sql = array('condition' => $timeCol . $typeCol, 'order' => $sortCol . $orderCol);
// Filter Links
$timeExt = isset($_GET['time']) ? "&time=" . $time : '';
$typeExt = isset($_GET['type']) ? "&type=" . $type : '';
$sortExt = isset($_GET['sort']) ? "&sort=" . $sort : '';
$orderExt = isset($_GET['order']) ? "&order=" . $order : '';
$baseLink = clean_request("", array("time", "type", "sort", "order"), FALSE);
if (isset($_GET['viewforum']) && isset($_GET['forum_id'])) {
$baseLink = INFUSIONS . 'forum/index.php?viewforum&forum_id=' . $_GET['forum_id'] . '' . (isset($_GET['parent_id']) ? '&parent_id=' . $_GET['parent_id'] . '' : '');
}
$timeLink = $baseLink . $typeExt . $sortExt . $orderExt;
$this->filter_info['time'] = array($locale['forum_3006'] => $baseLink, $locale['forum_3007'] => $timeLink . '&time=today', $locale['forum_3008'] => $timeLink . '&time=2days', $locale['forum_3009'] => $timeLink . '&time=1week', $locale['forum_3010'] => $timeLink . '&time=2week', $locale['forum_3011'] => $timeLink . '&time=1month', $locale['forum_3012'] => $timeLink . '&time=2month', $locale['forum_3013'] => $timeLink . '&time=3month', $locale['forum_3014'] => $timeLink . '&time=6month', $locale['forum_3015'] => $timeLink . '&time=1year');
$typeLink = $baseLink . $timeExt . $sortExt . $orderExt;
$this->filter_info['type'] = array($locale['forum_3000'] => $typeLink . '&type=all', $locale['forum_3001'] => $typeLink . '&type=discussions', $locale['forum_3002'] => $typeLink . '&type=attachments', $locale['forum_3003'] => $typeLink . '&type=poll', $locale['forum_3004'] => $typeLink . '&type=solved', $locale['forum_3005'] => $typeLink . '&type=unsolved');
$sortLink = $baseLink . $timeExt . $typeExt . $orderExt;
$this->filter_info['sort'] = array($locale['forum_3016'] => $sortLink . '&sort=author', $locale['forum_3017'] => $sortLink . '&sort=time', $locale['forum_3018'] => $sortLink . '&sort=subject', $locale['forum_3019'] => $sortLink . '&sort=reply', $locale['forum_3020'] => $sortLink . '&sort=view');
$orderLink = $baseLink . $timeExt . $typeExt . $sortExt;
$this->filter_info['order'] = array($locale['forum_3021'] => $orderLink . '&order=descending', $locale['forum_3022'] => $orderLink . '&order=ascending');
}
示例5: __construct
public function __construct()
{
global $admin_pages, $aidlink;
$this->admin_pages = $admin_pages;
$this->locale = fusion_get_locale('', LOCALE . LOCALESET . "admin/main.php");
$this->admin_sections = array(0 => $GLOBALS['locale']['ac00'], 1 => $GLOBALS['locale']['ac01'], 2 => $GLOBALS['locale']['ac02'], 3 => $GLOBALS['locale']['ac03'], 4 => $GLOBALS['locale']['ac04'], 5 => $GLOBALS['locale']['ac05']);
$this->current_page = self::_currentPage();
// Dashboard breadcrumb
add_breadcrumb(array('link' => ADMIN . 'index.php' . $aidlink . '&pagenum=0', 'title' => $GLOBALS['locale']['ac10']));
$acTab = isset($_GET['pagenum']) && isnum($_GET['pagenum']) ? $_GET['pagenum'] : $this->_isActive();
if ($acTab != 0 && $acTab <= 5) {
add_breadcrumb(array('link' => ADMIN . $aidlink . "&pagenum=" . $acTab, 'title' => $GLOBALS['locale']['ac0' . $acTab]));
}
}
示例6: display_error_page
function display_error_page($data)
{
$locale = fusion_get_locale();
$text = $data['title'];
$image = $data['image'];
opentable($text);
echo "<table class='table table-responsive' width='100%' style='text-center'>";
echo "<tr>";
echo "<td width='30%' align='center'><img class='img-responsive' src='" . $image . "' alt='" . $text . "' border='0'></td>";
echo "<td style='font-size:16px;color:red' align='center'>" . $text . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td colspan='2' align='center'><b><a class='button' href='" . BASEDIR . "index.php'>" . $locale['errret'] . "</a></b></td>";
echo "</tr>";
echo "</table>";
closetable();
}
示例7: get_Currency
static function get_Currency($currency_code = NULL)
{
$locale = fusion_get_locale("", LOCALE . LOCALESET . 'currency.php');
if (empty(self::$currency_list)) {
foreach (self::getCountryResource() as $object) {
if ($object->name->common !== 'Antarctica') {
if ($currency_code == $object->currency[0]) {
break;
}
$currency_symbol = isset($locale['currency_symbol'][$object->currency[0]]) ? $locale['currency_symbol'][$object->currency[0]] : "\$";
self::$currency_list[$object->currency[0]] = $locale['currency'][$object->currency[0]] . " (" . $currency_symbol . ")";
}
}
}
if ($currency_code !== NULL) {
return isset(self::$currency_list[$currency_code]) ? self::$currency_list[$currency_code] : $locale['na'];
} else {
return array_filter(self::$currency_list);
}
}
示例8: author
+--------------------------------------------------------+
| Filename: infusion.php
| Author: J.Falk (Falk)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
die("Access Denied");
}
$locale = fusion_get_locale("", LOCALE . LOCALESET . "setup.php");
// Infusion general information
$inf_title = $locale['weblinks']['title'];
$inf_description = $locale['weblinks']['description'];
$inf_version = "1.00";
$inf_developer = "PHP Fusion Development Team";
$inf_email = "info@php-fusion.co.uk";
$inf_weburl = "https://www.php-fusion.co.uk";
$inf_folder = "weblinks";
$inf_image = "weblink.png";
// Multilanguage table for Administration
$inf_mlt[] = array("title" => $locale['weblinks']['title'], "rights" => "WL");
// Create tables
$inf_newtable[] = DB_WEBLINKS . " (\n\tweblink_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,\n\tweblink_name VARCHAR(100) NOT NULL DEFAULT '',\n\tweblink_description TEXT NOT NULL,\n\tweblink_url VARCHAR(200) NOT NULL DEFAULT '',\n\tweblink_cat MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_visibility TINYINT(4) NOT NULL DEFAULT '0',\n\tweblink_count SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',\n\tPRIMARY KEY(weblink_id),\n\tKEY weblink_datestamp (weblink_datestamp),\n\tKEY weblink_count (weblink_count)\n) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";
$inf_newtable[] = DB_WEBLINK_CATS . " (\n\tweblink_cat_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,\n\tweblink_cat_parent MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',\n\tweblink_cat_name VARCHAR(100) NOT NULL DEFAULT '',\n\tweblink_cat_description TEXT NOT NULL,\n\tweblink_cat_sorting VARCHAR(50) NOT NULL DEFAULT 'weblink_name ASC',\n\tweblink_cat_language VARCHAR(50) NOT NULL DEFAULT '" . LANGUAGE . "',\n\tPRIMARY KEY(weblink_cat_id)\n) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";
// Settings
示例9: mod_renew_thread
/**
* Moderator Action - Renew Thread
* Modal pop up confirmation of thread being `renewed`
*/
private function mod_renew_thread()
{
$locale = fusion_get_locale();
if (iMOD) {
$result = dbquery("SELECT p.post_id, p.post_author, p.post_datestamp, f.forum_id, f.forum_cat\n\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " t ON p.thread_id=t.thread_id\n\t\t\t\t\tINNER JOIN " . DB_FORUMS . " f on f.forum_id = t.forum_id\n\t\t\t\t\tWHERE p.thread_id='" . intval($this->thread_id) . "' AND t.thread_hidden=0 AND p.post_hidden=0\n\t\t\t\t\tORDER BY p.post_id DESC LIMIT 1\n\t\t\t\t\t");
if (dbrows($result) > 0) {
$data = dbarray($result);
dbquery("UPDATE " . DB_FORUM_POSTS . " SET post_datestamp='" . time() . "' WHERE post_id='" . $data['post_id'] . "'");
dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $data['post_id'] . "', thread_lastuser='" . $data['post_author'] . "' WHERE thread_id='" . intval($this->thread_id) . "'");
dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_lastuser='" . $data['post_author'] . "' WHERE forum_id='" . $this->forum_id . "'");
ob_start();
echo openmodal('renew', $locale['forum_0758'], array('class' => 'modal-center', 'static' => 1));
echo "<div style='text-align:center'><br />\n" . $locale['forum_0759'] . "<br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/index.php?viewforum&forum_id=" . $this->forum_id . "&parent_id=" . $this->parent_id . "'>" . $locale['forum_0702'] . "</a><br /><br />\n";
echo "<a href='" . INFUSIONS . "forum/index.php'>" . $locale['forum_0703'] . "</a><br /><br /></div>\n";
echo closemodal();
add_to_footer(ob_get_contents());
ob_end_clean();
} else {
redirect(INFUSIONS . "forum/index.php");
}
}
}
示例10: author
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once file_exists('maincore.php') ? 'maincore.php' : __DIR__ . "/../../maincore.php";
if (!db_exists(DB_DOWNLOADS)) {
redirect(BASEDIR . "error.php?code=404");
}
require_once THEMES . "templates/header.php";
require_once INCLUDES . "infusions_include.php";
if (file_exists(INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php")) {
$locale += fusion_get_locale("", INFUSIONS . "downloads/locale/" . LOCALESET . "downloads.php");
} else {
$locale += fusion_get_locale("", INFUSIONS . "downloads/locale/English/downloads.php");
}
include INFUSIONS . "downloads/templates/downloads.php";
require_once INFUSIONS . "downloads/classes/Functions.php";
$dl_settings = get_settings("downloads");
if (!isset($_GET['download_id']) && !isset($_GET['cat_id'])) {
add_to_title($locale['global_200'] . \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name"));
}
add_breadcrumb(array('link' => INFUSIONS . 'downloads/downloads.php', 'title' => \PHPFusion\SiteLinks::get_current_SiteLinks("", "link_name")));
$result = NULL;
if (isset($_GET['file_id']) && isnum($_GET['file_id'])) {
$res = 0;
$data = dbarray(dbquery("SELECT download_url, download_file, download_cat, download_visibility FROM " . DB_DOWNLOADS . " WHERE download_id='" . intval($_GET['file_id']) . "'"));
if (checkgroup($data['download_visibility'])) {
$result = dbquery("UPDATE " . DB_DOWNLOADS . " SET download_count=download_count+1 WHERE download_id='" . intval($_GET['file_id']) . "'");
if (!empty($data['download_file']) && file_exists(DOWNLOADS . 'files/' . $data['download_file'])) {
示例11: __construct
public function __construct()
{
$this->addBreadCrumb(array('link' => BASEDIR . 'index.php', 'title' => fusion_get_locale('home', LOCALE . LOCALESET . "global.php"), 'class' => 'home-link crumb'));
}
示例12: get_forum
/**
* Get the forum structure
*
* @param bool $forum_id
* @param bool $branch_id
*
* @return array
*/
public static function get_forum($forum_id = FALSE, $branch_id = FALSE)
{
// only need to fetch child.
$forum_settings = self::get_forum_settings();
$userdata = fusion_get_userdata();
$locale = fusion_get_locale("", FORUM_LOCALE);
$index = array();
// define what a row is
$row = array('forum_new_status' => '', 'last_post' => '', 'forum_icon' => '', 'forum_icon_lg' => '', 'forum_moderators' => '', 'forum_link' => array('link' => '', 'title' => ''), 'forum_description' => '', 'forum_postcount_word' => '', 'forum_threadcount_word' => '');
$query = dbquery("\n\t\t\t\tSELECT tf.forum_id, tf.forum_cat, tf.forum_branch, tf.forum_name, tf.forum_description, tf.forum_image,\n\t\t\t\ttf.forum_type, tf.forum_mods, tf.forum_threadcount, tf.forum_postcount, tf.forum_order, tf.forum_lastuser, tf.forum_access, tf.forum_lastpost, tf.forum_lastpostid,\n\t\t\t\tt.thread_id, t.thread_lastpost, t.thread_lastpostid, t.thread_subject, p.post_message,\n\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\tFROM " . DB_FORUMS . " tf\n\t\t\t\tLEFT JOIN " . DB_FORUM_THREADS . " t ON tf.forum_lastpostid = t.thread_lastpostid\n\t\t\t\tLEFT JOIN " . DB_FORUM_POSTS . " p ON p.thread_id = t.thread_id AND p.post_id = t.thread_lastpostid\n\t\t\t\tLEFT JOIN " . DB_USERS . " u ON tf.forum_lastuser = u.user_id\n\t\t\t\t" . (multilang_table("FO") ? "WHERE forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('tf.forum_access') . "\n\t\t\t\t" . ($forum_id && $branch_id ? "AND tf.forum_id = '" . intval($forum_id) . "' or tf.forum_cat = '" . intval($forum_id) . "' OR tf.forum_branch = '" . intval($branch_id) . "'" : '') . "\n\t\t\t\tGROUP BY tf.forum_id ORDER BY tf.forum_cat ASC, tf.forum_order ASC, t.thread_lastpost DESC\n\t\t");
while ($data = dbarray($query) and checkgroup($data['forum_access'])) {
// Calculate Forum New Status
$newStatus = "";
$forum_match = "\\|" . $data['forum_lastpost'] . "\\|" . $data['forum_id'];
$last_visited = isset($userdata['user_lastvisit']) && isnum($userdata['user_lastvisit']) ? $userdata['user_lastvisit'] : time();
if ($data['forum_lastpost'] > $last_visited) {
if (iMEMBER && ($data['forum_lastuser'] !== $userdata['user_id'] || !preg_match("({$forum_match}\\.|{$forum_match}\$)", $userdata['user_threads']))) {
$newStatus = "<span class='forum-new-icon'><i title='" . $locale['forum_0260'] . "' class='" . self::get_forumIcons('new') . "'></i></span>";
}
}
// Calculate lastpost information
$lastPostInfo = array();
if ($data['forum_lastpostid']) {
$last_post = array('avatar' => '', 'avatar_src' => $data['user_avatar'] && file_exists(IMAGES . 'avatars/' . $data['user_avatar']) && !is_dir(IMAGES . 'avatars/' . $data['user_avatar']) ? IMAGES . 'avatars/' . $data['user_avatar'] : '', 'message' => fusion_first_words(parseubb(parsesmileys($data['post_message'])), 10), 'profile_link' => profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status']), 'time' => timer($data['forum_lastpost']), 'date' => showdate("forumdate", $data['forum_lastpost']), 'thread_link' => INFUSIONS . "forum/viewthread.php?forum_id=" . $data['forum_id'] . "&thread_id=" . $data['thread_id'], 'post_link' => INFUSIONS . "forum/viewthread.php?forum_id=" . $data['forum_id'] . "&thread_id=" . $data['thread_id'] . "&pid=" . $data['thread_lastpostid'] . "#post_" . $data['thread_lastpostid']);
if ($forum_settings['forum_last_post_avatar']) {
$last_post['avatar'] = display_avatar($data, '30px', '', '', 'img-rounded');
}
$lastPostInfo = $last_post;
}
/**
* Default system icons - why do i need this? Why not let themers decide?
*/
switch ($data['forum_type']) {
case '1':
$forum_icon = "<i class='" . self::get_forumIcons('forum') . " fa-fw m-r-10'></i>";
$forum_icon_lg = "<i class='" . self::get_forumIcons('forum') . " fa-3x fa-fw m-r-10'></i>";
break;
case '2':
$forum_icon = "<i class='" . self::get_forumIcons('thread') . " fa-fw m-r-10'></i>";
$forum_icon_lg = "<i class='" . self::get_forumIcons('thread') . " fa-3x fa-fw m-r-10'></i>";
break;
case '3':
$forum_icon = "<i class='" . self::get_forumIcons('link') . " fa-fw m-r-10'></i>";
$forum_icon_lg = "<i class='" . self::get_forumIcons('link') . " fa-3x fa-fw m-r-10'></i>";
break;
case '4':
$forum_icon = "<i class='" . self::get_forumIcons('question') . " fa-fw m-r-10'></i>";
$forum_icon_lg = "<i class='" . self::get_forumIcons('question') . " fa-3x fa-fw m-r-10'></i>";
break;
default:
$forum_icon = "";
$forum_icon_lg = "";
}
$mod = new Moderator();
$row = array_merge($row, $data, array("forum_moderators" => $mod::parse_forum_mods($data['forum_mods']), "forum_new_status" => $newStatus, "forum_link" => array("link" => INFUSIONS . "forum/index.php?viewforum&forum_id=" . $data['forum_id'] . "&parent_id=" . $data['forum_cat'], "title" => $data['forum_name']), "forum_description" => nl2br(parseubb($data['forum_description'])), "forum_postcount_word" => format_word($data['forum_postcount'], $locale['fmt_post']), "forum_threadcount_word" => format_word($data['forum_threadcount'], $locale['fmt_thread']), "last_post" => $lastPostInfo, "forum_icon" => $forum_icon, "forum_icon_lg" => $forum_icon_lg));
$data["forum_image"] = $data['forum_image'] && file_exists(FORUM . "images/" . $data['forum_image']) ? $data['forum_image'] : "";
$thisref =& $refs[$data['forum_id']];
$thisref = $row;
if ($data['forum_cat'] == 0) {
$index[0][$data['forum_id']] =& $thisref;
} else {
$refs[$data['forum_cat']]['child'][$data['forum_id']] =& $thisref;
}
}
return (array) $index;
}
示例13: render_news_item
/**
* News Item Page Template
* @param $info
*/
function render_news_item($info)
{
global $aidlink;
$locale = fusion_get_locale();
$news_settings = get_settings('news');
$data = $info['news_item'];
add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>");
add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />");
add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>");
add_to_footer('<script type="text/javascript">
$(document).ready(function() {
$(".news-image-overlay").colorbox({
transition: "elasic",
height:"100%",
width:"100%",
maxWidth:"98%",
maxHeight:"98%",
scrolling:false,
overlayClose:true,
close:false,
photo:true,
onComplete: function(result) {
$("#colorbox").live("click", function(){
$(this).unbind("click");
$.fn.colorbox.close();
});
},
onLoad: function () {
}
});
});
</script>');
opentable($locale['news_0004']);
echo render_breadcrumbs();
echo "<!--news_pre_readmore-->";
echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n";
echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n";
echo "<div class='news_news text-dark m-t-20 m-b-20'>\n";
if ($data['news_image_src']) {
echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>";
} elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) {
echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n </a>";
}
echo $data['news_news'];
echo "</div>\n";
echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n";
echo "<div style='clear:both;'></div>\n";
echo "<div class='well m-t-5 text-center'>\n";
echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n";
echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n";
echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>";
echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : '';
echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : '';
echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>";
echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&action=edit&section=news_form&news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : "";
echo "</div>";
echo "<!--news_sub_readmore-->";
echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : "";
if ($data['page_count'] > 0) {
echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&") . "\n</div>\n";
}
if ($data['news_allow_comments']) {
echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
}
if ($data['news_allow_ratings']) {
echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n";
}
echo "</article>\n";
closetable();
}
示例14: member_nav
function member_nav($second = "", $third = "")
{
global $aidlink;
$locale = fusion_get_locale();
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
echo "<td class='tbl2'>\n";
echo "<a href='" . FUSION_SELF . $aidlink . "'>" . $locale['susp115'] . "</a>\n";
if ($second && ($second = explode("|", $second))) {
echo " > <a href='" . $second[0] . "'>" . $second[1] . "</a>\n";
}
if ($third && ($third = explode("|", $third))) {
echo " > <a href='" . $third[0] . "'>" . $third[1] . "</a>\n";
}
echo "</td>\n</tr>\n</table>\n";
echo "<div style='margin:5px'></div>\n";
}
示例15: fusion_get_userdata
/**
* Get a user own data
*
* @param $key - The column of one user information
* @return array|null
*/
function fusion_get_userdata($key = NULL)
{
global $userdata;
$userdata += array("user_id" => 0, "user_name" => fusion_get_locale("user_guest", LOCALE . LOCALESET . "global.php"), "user_status" => 1, "user_level" => 0, "user_rights" => "", "user_groups" => "", "user_theme" => fusion_get_settings("theme"));
return $key === NULL ? $userdata : (isset($userdata[$key]) ? $userdata[$key] : $userdata);
}