/**
  * Section that lists all games and individual game stats
  */
 public function actionGames()
 {
     $sHelper = new Steam_Helper_Steam();
     $gameId = $this->_input->filterSingle('game_id', XenForo_Input::UINT);
     if ($gameId) {
         $userModel = XenForo_Model::create('XenForo_Model_User');
         $sHelper = new Steam_Helper_Steam();
         $users = $sHelper->getGameOwners($gameId);
         $owners = array();
         $hours = 0;
         foreach ($users as $user) {
             $u = $userModel->getUserById($user['user_id']);
             $user['avatar_url'] = XenForo_Template_Helper_Core::callHelper('avatar', array($u, 's', null, true));
             $owners[] = $user;
             $hours += $user['hours'];
         }
         if (count($owners) == 0) {
             $hoursAvgMath = 0;
         } else {
             $hoursAvgMath = round($hours / count($owners));
         }
         $viewParams = array('count' => count($owners), 'game' => $sHelper->getGameInfo($gameId), 'users' => $owners, 'hours' => $hours, 'hoursAvg' => $hoursAvgMath);
         $template = 'steam_stats_game_view';
     } else {
         $steamModel = new Steam_Model_Steam();
         $gamesPerPage = 25;
         $page = $this->_input->filterSingle('page', XenForo_Input::UINT);
         $viewParams = array('page' => $page, 'totalGames' => $sHelper->getAvailableGamesCount(), 'gamesPerPage' => $gamesPerPage, 'games' => $steamModel->getAvailableGames(array('perPage' => $gamesPerPage, 'page' => $page)));
         $template = 'steam_stats_games';
     }
     return $this->responseView('XenForo_ViewAdmin_Steam_Games', $template, $viewParams);
 }
示例#2
0
文件: Tag.php 项目: Sywooch/forums
 public function actionEdit()
 {
     $id = $this->_input->filterSingle('tag_id', XenForo_Input::UINT);
     $tag = $this->_getTagOrError($id);
     if ($this->isConfirmedPost()) {
         $dwInput = $this->_input->filter(array('tag_text' => XenForo_Input::STRING, 'tag_title' => XenForo_Input::STRING, 'tag_description' => XenForo_Input::STRING, 'is_staff' => XenForo_Input::UINT));
         $dw = $this->_getTagDataWriter();
         $dw->setExistingData($id);
         $dw->bulkSet($dwInput);
         // process link target_type
         // since 1.8
         $link = $this->_input->filterSingle('link', XenForo_Input::STRING);
         if (!empty($link)) {
             $existingLink = $this->_getTagModel()->getTagLink($tag);
             if ($link != $existingLink) {
                 $dw->bulkSet(array('target_type' => 'link', 'target_id' => 0, 'target_data' => array('link' => $link)));
             }
         } else {
             $dw->bulkSet(array('target_type' => '', 'target_id' => 0, 'target_data' => array()));
         }
         $dw->save();
         return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildAdminLink('xentag-tags') . '#' . XenForo_Template_Helper_Core::callHelper('listitemid', array($tag['tag_id'])));
     } else {
         $viewParams = array('tag' => $tag, 'tagLink' => $this->_getTagModel()->getTagLink($tag));
         return $this->responseView('Tinhte_XenTag_ViewAdmin_Tag_Edit', 'tinhte_xentag_tag_edit', $viewParams);
     }
 }
示例#3
0
 public static function helperSnippet($string, $maxLength = 0, array $options = array())
 {
     // TODO: smart stripping of tags with options
     $string = self::stripTag('ismemberofusergroup', $string);
     $string = self::stripTag('isnotmemberofusergroup', $string);
     $string = self::stripTag('isuserid', $string);
     $string = self::stripTag('isusername', $string);
     $string = self::stripTag('isnotuserid', $string);
     $string = self::stripTag('isnotusername', $string);
     $visitor = XenForo_Visitor::getInstance();
     /* @var $userModel XenForo_Model_User */
     $userModel = XenForo_Model::create('XenForo_Model_User');
     if (!$userModel->isMemberOfUserGroup($visitor->toArray(), 1)) {
         $string = self::stripTag('guest', $string);
     } else {
         $string = self::stripTag('notguest', $string);
     }
     if (!$userModel->isMemberOfUserGroup($visitor->toArray(), 2)) {
         $string = self::stripTag('registered', $string);
     } else {
         $string = self::stripTag('notregistered', $string);
     }
     if (!$userModel->isMemberOfUserGroup($visitor->toArray(), 3)) {
         $string = self::stripTag('admin', $string);
     } else {
         $string = self::stripTag('notadmin', $string);
     }
     if (!$userModel->isMemberOfUserGroup($visitor->toArray(), 4)) {
         $string = self::stripTag('mod', $string);
     } else {
         $string = self::stripTag('notmod', $string);
     }
     return XenForo_Template_Helper_Core::callHelper('th_usergroupbbcodes_snippet', array($string, $maxLength, $options));
 }
示例#4
0
 public function renderJson()
 {
     $results = array();
     foreach ($this->_params['users'] as $user) {
         $results[$user['username']] = array('avatar' => XenForo_Template_Helper_Core::callHelper('avatar', array($user, 's')), 'username' => htmlspecialchars($user['username']));
     }
     return array('results' => $results);
 }
示例#5
0
 /**
  *
  * @see XenForo_Template_Helper_Core::helperAvatarHtml()
  */
 public static function helperAvatarHtml(array $user, $img, array $attributes = array(), $content = '')
 {
     $returnLink = XenForo_Template_Helper_Core::callHelper('th_unlinkbanned_avatarhtml', array($user, $img, $attributes, $content));
     if ($user['is_banned']) {
         return preg_replace('#(<a )href="[^"]*"([^>]*>.*<\\/a>)#Us', '$1$2', $returnLink);
     }
     return $returnLink;
 }
示例#6
0
 public function renderJson()
 {
     $output = $this->_renderer->getDefaultOutputArray(get_class($this), $this->_params, $this->_templateName);
     if ($this->_params['isStatus']) {
         $output['statusHtml'] = XenForo_Template_Helper_Core::callHelper('bodytext', array($this->_params['profilePost']['message'])) . ' ' . XenForo_Template_Helper_Core::callHelper('datetimehtml', array($this->_params['profilePost']['post_date']));
     }
     return XenForo_ViewRenderer_Json::jsonEncodeForOutput($output);
 }
示例#7
0
 public function getImage(XenForo_Model $model)
 {
     $resource = $this->_resourceDw->getMergedData();
     if (isset(XenForo_Template_Helper_Core::$helperCallbacks['resourceiconurl'])) {
         $iconUrl = XenForo_Template_Helper_Core::callHelper('resourceiconurl', array($resource));
         return XenForo_Link::convertUriToAbsoluteUri($iconUrl, true);
     }
     return parent::getImage($model);
 }
示例#8
0
文件: Add.php 项目: billyprice1/bdApi
 public function renderHtml()
 {
     if (isset($this->_params['scopes'])) {
         $scopes = array();
         foreach ($this->_params['scopes'] as $scope) {
             $scopes[$scope] = XenForo_Template_Helper_Core::callHelper('api_scopeGetText', array($scope));
         }
         $this->_params['scopes'] = $scopes;
     }
 }
示例#9
0
 public function getData(array $entry)
 {
     $result = array('loc' => XenForo_Link::buildPublicLink('canonical:xengallery/users/albums', $entry), 'priority' => 0.3);
     if ($entry['gravatar'] || $entry['avatar_date']) {
         $avatarUrl = htmlspecialchars_decode(XenForo_Template_Helper_Core::callHelper('avatar', array($entry, 'l')));
         $avatarUrl = XenForo_Link::convertUriToAbsoluteUri($avatarUrl, true, $this->getCanonicalPaths());
         $result['image'] = $avatarUrl;
     }
     return $result;
 }
示例#10
0
 public function prepareApiDataForComment(array $comment, array $profilePost, array $user)
 {
     $comment = $this->prepareProfilePostComment($comment, $profilePost, $user);
     $publicKeys = array('profile_post_comment_id' => 'comment_id', 'profile_post_id' => 'profile_post_id', 'user_id' => 'comment_user_id', 'username' => 'comment_username', 'comment_date' => 'comment_create_date', 'message' => 'comment_body');
     $data = bdApi_Data_Helper_Core::filter($comment, $publicKeys);
     $data['timeline_user_id'] = $profilePost['profile_user_id'];
     $data['links'] = array('detail' => bdApi_Data_Helper_Core::safeBuildApiLink('profile-posts/comments', $profilePost, array('comment_id' => $comment['profile_post_comment_id'])), 'profile_post' => bdApi_Data_Helper_Core::safeBuildApiLink('profile-posts', $profilePost), 'timeline' => bdApi_Data_Helper_Core::safeBuildApiLink('users/timeline', $user), 'timeline_user' => bdApi_Data_Helper_Core::safeBuildApiLink('users', $user), 'poster' => bdApi_Data_Helper_Core::safeBuildApiLink('users', $comment), 'poster_avatar' => XenForo_Template_Helper_Core::callHelper('avatar', array($comment, 'm', false, true)));
     $data['permissions'] = array('view' => $this->canViewProfilePost($profilePost, $user), 'delete' => $this->canDeleteProfilePostComment($comment, $profilePost, $user));
     return $data;
 }
示例#11
0
 public static function helperAvatarUrl($user, $size, $forceType = null, $canonical = false)
 {
     if (!empty($user['gravatar'])) {
         $avatarUrl = self::parseGravatar($user['gravatar']);
         if (!empty($avatarUrl)) {
             return XenForo_Template_Helper_Core::callHelper('bdapiconsumer_avatarresize', array($avatarUrl, $size));
         }
     }
     return call_user_func(self::$_helperOriginal, $user, $size, $forceType, $canonical);
 }
示例#12
0
 public function actionAddEntry()
 {
     // this action must be called via POST
     $this->_assertPostOnly();
     // guests not allowed
     $this->_assertRegistrationRequired();
     $permissions = XenForo_Visitor::getInstance()->getPermissions();
     $actionAllowed = XenForo_Permission::hasPermission($permissions, "forum", "postThread");
     if (!$actionAllowed) {
         return $this->responseError('You do not have permissions to do this');
     }
     # Grab user info/model/array from db
     $userModel = XenForo_Model::create('XenForo_Model_User');
     // get donor id and also get the receiver's name
     $dbtc_donor_id = $this->_input->filterSingle('dbtc_donor_id', XenForo_Input::STRING);
     $dbtc_receiver_name = $this->_input->filterSingle('dbtc_receiver_name', XenForo_Input::STRING);
     // get transaction id if it exists
     $dbtc_transaction_id = $this->_input->filterSingle('dbtc_transaction_id', XenForo_Input::UINT);
     // get parent transaction id if it exists
     $dbtc_parent_transaction_id = $this->_input->filterSingle('dbtc_parent_transaction_id', XenForo_Input::UINT);
     $donorModel = $userModel->getUserById($dbtc_donor_id);
     $receiverModel = $userModel->getUserByNameOrEmail($dbtc_receiver_name);
     // get user id
     $dbtc_receiver_id = $receiverModel['user_id'];
     // get the user based on id or error
     // $user = $this->_getUserOrError($dbtc_receiver_id);
     // get status id
     $dbtc_status_id = $this->_input->filterSingle('dbtc_status_id', XenForo_Input::UINT);
     // get date and make sure we have a 'human' versino of the date
     $dbtc_date = $this->_input->filterSingle('dbtc_date', XenForo_Input::DATE_TIME);
     $dbtc_human_date = gmdate("m/d/Y", $dbtc_date);
     # Grab avatar and link
     $avatar = XenForo_Template_Helper_Core::callHelper('avatarhtml', array($receiverModel, TRUE, array('size' => 's'), ''));
     // get all necessary inputs from this form
     $dbtc_thread_id = $this->_input->filterSingle('dbtc_thread_id', XenForo_Input::UINT);
     // $data = array($dbtc_thread_id, $dbtc_donor_id, $dbtc_receiver_id, $dbtc_status_id, $dbtc_date, $avatar);
     // create a new DataWriter and set user_id and message fields
     $writer = XenForo_DataWriter::create('DBTC_DataWriter_DBTCNodeEntry');
     // if we're editing a transaction
     if ($dbtc_transaction_id != 0) {
         $writer->setExistingData($dbtc_transaction_id);
     }
     $writer->set('dbtc_thread_id', $dbtc_thread_id);
     $writer->set('dbtc_donor_id', $dbtc_donor_id);
     $writer->set('dbtc_receiver_id', $dbtc_receiver_id);
     $writer->set('dbtc_status_id', $dbtc_status_id);
     $writer->set('dbtc_date', $dbtc_date);
     $writer->set('dbtc_parent_transaction_id', $dbtc_parent_transaction_id);
     $writer->save();
     // get the data that was saved
     $nodeData = $writer->getMergedData();
     $data = array('dbtc_transaction_id' => $nodeData['dbtc_transaction_id'], 'dbtc_thread_id' => $dbtc_thread_id, 'dbtc_donor_id' => $dbtc_donor_id, 'dbtc_receiver_id' => $dbtc_receiver_id, 'dbtc_receiver_name' => $dbtc_receiver_name, 'dbtc_status_id' => $dbtc_status_id, 'dbtc_date' => $dbtc_human_date, 'dbtc_receiver_avatar_html' => $avatar, 'dbtc_parent_transaction_id', $dbtc_parent_transaction_id);
     // redirect back to the normal scratchpad index page
     return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS, XenForo_Link::buildPublicLink('dbtc-node-entry'), null, $data);
 }
示例#13
0
 public function renderTagSigPic(array $tag, array $user)
 {
     $user = false;
     if (array_key_exists('0', $tag['children'])) {
         $user = XenForo_Model::create('XenForo_Model_User')->getUserById($tag['children'][0], array('join' => XenForo_Model_User::FETCH_USER_PERMISSIONS));
     } else {
         $user = XenForo_Visitor::getInstance()->toArray();
     }
     // For signature preview to not fail
     if ($user) {
         $user['permissions'] = XenForo_Permission::unserializePermissions($user['global_permission_cache']);
         if (XenForo_Permission::hasPermission($user['permissions'], 'signature', 'sigpic')) {
             return XenForo_Template_Helper_Core::callHelper('sigpic', array($user));
         }
     }
     return '';
 }
示例#14
0
文件: Base.php 项目: iversia/3ps_cmfu
 public static function helperUserNameHtml(array $user, $username = '', $rich = false, array $attributes = array())
 {
     if ($username == '') {
         $username = htmlspecialchars($user['username']);
     }
     if (!$rich and XenForo_Application::getOptions()->get("3ps_cmfu_overridePlainUsernameHelper") == 1) {
         $rich = true;
     }
     if ($rich) {
         $username = XenForo_Template_Helper_Core::callHelper('richusername', array($user, $username));
     }
     $href = self::getUserHref($user, $attributes);
     $class = empty($attributes['class']) ? '' : ' ' . htmlspecialchars($attributes['class']);
     unset($attributes['href'], $attributes['class']);
     $attribs = self::getAttributes($attributes);
     return "<a{$href} class=\"username{$class}\"{$attribs}>{$username}</a>";
 }
示例#15
0
 public static function getPlainText($bbCode)
 {
     $config = XenForo_Application::getConfig();
     $useSnippet = $config->get('bdApi_useSnippet');
     if (!empty($useSnippet)) {
         return XenForo_Template_Helper_Core::callHelper('snippet', array($bbCode, 0, array('stripQuote' => true, 'stripHtml' => false)));
     } else {
         // from XenForo_Helper_String::bbCodeStrip
         $string = $bbCode;
         $string = preg_replace('#\\[(attach|media|img)[^\\]]*\\].*\\[/\\1\\]#siU', '', $string);
         while ($string != ($newString = preg_replace('#\\[([a-z0-9]+)(=[^\\]]*)?\\](.*)\\[/\\1\\]#siU', '\\3', $string))) {
             $string = $newString;
         }
         $string = str_replace('[*]', '', $string);
         $string = trim($string);
         $string = XenForo_Helper_String::censorString($string);
         return htmlspecialchars($string);
     }
 }
示例#16
0
    public function findAllUsersSharing($page = 1, $perPage = 10, &$totalFound)
    {
        $db = $this->_getDb();
        $records = $this->fetchAllKeyed('
			SELECT SQL_CALC_FOUND_ROWS COUNT(*) AS total, field_value
			FROM xf_user_field_value
			WHERE field_id = "analytics_cid"
				AND field_value LIKE "GA%"
			GROUP BY field_value
			HAVING total > 1
			ORDER BY total DESC, field_value
			LIMIT ' . intval(($page - 1) * $perPage) . ', ' . $perPage . '
			', 'field_value', array());
        $totalFound = $db->fetchOne('SELECT FOUND_ROWS()');
        $clientIds = $users = array();
        if ($records) {
            foreach ($records as $record) {
                $clientIds[] = $record['field_value'];
            }
            $users = $db->fetchAll('
				SELECT xf_user.*, xf_user_field_value.field_value
				FROM xf_user_field_value
					LEFT JOIN xf_user ON (xf_user.user_id = xf_user_field_value.user_id)
				WHERE xf_user_field_value.field_id = "analytics_cid"
					AND xf_user_field_value.field_value IN(' . $db->quote($clientIds) . ')
				ORDER BY xf_user_field_value.user_id
			');
            if ($users) {
                foreach ($users as &$user) {
                    $records[$user['field_value']]['users_output'][$user['user_id']] = XenForo_Template_Helper_Core::callHelper('usernamehtml', array($user, '', true, array('href' => XenForo_Template_Helper_Core::adminLink('users/edit', $user, array()), 'class' => 'NoOverlay')));
                }
                foreach ($records as &$record) {
                    $record['users_output'] = implode(', ', $record['users_output']);
                }
            }
        }
        return $records;
    }
示例#17
0
 public static function renderNode($transInfo)
 {
     $userModel = XenForo_Model::create('XenForo_Model_User');
     $userData = $userModel->getUserById($transInfo['dbtc_receiver_id']);
     # Grab avatar and link
     $avatarHtml = XenForo_Template_Helper_Core::callHelper('avatarhtml', array($userData, TRUE, array('size' => 's'), ''));
     # Grab username and link
     // $userName = XenForo_Template_Helper_Core::callHelper('usernamehtml', array($user));
     $dbtc_parent_transaction_id = $transInfo['dbtc_parent_transaction_id'];
     $dbtcParentTransactionHtml = '<div id="dbtc_parent_transaction_id" class="dbtc_parent_transaction_id" value="' . $dbtc_parent_transaction_id . '"></div>';
     // add hidden form stuff
     $dbtc_thread_id = $transInfo['dbtc_thread_id'];
     $dbtcThreadHtml = '<div id="dbtc_thread_id" class="dbtc_thread_id" value="' . $dbtc_thread_id . '"></div>';
     $dbtc_transaction_id = $transInfo['dbtc_transaction_id'];
     $dbtc_donor_id = $transInfo['dbtc_donor_id'];
     $dbtcDonorHtml = '<div class="dbtc_donor_id" id="dbtc_donor_id" value="' . $dbtc_donor_id . '"></div>';
     $userName = $userData['username'];
     $userNameHtml = '<div class="dbtc_username" id="dbtc_username" value="' . $userName . '">' . $userName . '</div>';
     $userId = $transInfo['dbtc_receiver_id'];
     $userIdHtml = '<div class="dbtc_receiver_id" id="dbtc_receiver_id" value="' . $userId . '" style="display: none;">' . $userId . '</div>';
     // $userId = '<div class="dbtc_receiver_id" id="dbtc_receiver_id" value="'. $userId . '">' . $userId . '</div>';
     # Grab and translate unix time
     $dbtcDate = gmdate("m/d/Y", $transInfo["dbtc_date"]);
     $dbtcDateHtml = '<div id="dbtc_date" class="dbtc_date">' . $dbtcDate . "</div>";
     # grab dbtc status info
     $dbtcStatus_id = $transInfo["dbtc_status_id"];
     # list of statuses
     $status = array(0 => "growing", 1 => "available", 2 => "failed", 3 => "unknown");
     $dbtcStatusHtml = '<div id="dbtc_status_id" class="status">' . $dbtcStatus_id . '</div>';
     $nodeClassStartHtml = '<div id="dbtc_transaction" data-id="' . $dbtc_transaction_id . '" class="node ' . $status[$dbtcStatus_id] . '">';
     $nodeClassEndHtml = '</div>';
     // create string
     $nodeString = $nodeClassStartHtml . $dbtcThreadHtml . $dbtcParentTransactionHtml . $dbtcDonorHtml . $avatarHtml . $userNameHtml . $userIdHtml . $dbtcDateHtml . $nodeClassEndHtml;
     // print($nodeString);
     return $nodeString;
 }
	
	';
$__compilerVar2 = '';
$__compilerVar2 .= '	<script src="' . htmlspecialchars($jQuerySource, ENT_QUOTES, 'UTF-8') . '"></script>	
	';
if ($jQuerySource != $jQuerySourceLocal) {
    $__compilerVar2 .= '
		<script>if (!window.jQuery) { document.write(\'<scr\'+\'ipt type="text/javascript" src="' . htmlspecialchars($jQuerySourceLocal, ENT_QUOTES, 'UTF-8') . '"><\\/scr\'+\'ipt>\'); }</script>
	';
}
if ($xenOptions['uncompressedJs'] == 1 or $xenOptions['uncompressedJs'] == 3) {
    $__compilerVar2 .= '
	<script src="' . htmlspecialchars($javaScriptSource, ENT_QUOTES, 'UTF-8') . '/jquery/jquery.xenforo.rollup.js?_v=' . htmlspecialchars($xenOptions['jsVersion'], ENT_QUOTES, 'UTF-8') . '"></script>';
}
$__compilerVar2 .= '	
	<script src="' . XenForo_Template_Helper_Core::callHelper('javaScriptUrl', array('0' => $javaScriptSource . '/xenforo/xenforo.js?_v=' . $xenOptions['jsVersion'])) . '"></script>
';
if ($forum['node_id'] > 0) {
    $__compilerVar2 .= '<script>XenForo.node_name=\'' . XenForo_Template_Helper_Core::jsEscape($forum['title'], 'double') . ' (' . htmlspecialchars($forum['node_id'], ENT_QUOTES, 'UTF-8') . ')\';</script>';
}
$__compilerVar2 .= '
<!--XenForo_Require:JS-->';
$__output .= $__compilerVar2;
unset($__compilerVar2);
$__output .= '
	<script> jQuery.extend(true, XenForo, { _csrfToken: "' . htmlspecialchars($visitor['csrf_token_page'], ENT_QUOTES, 'UTF-8') . '" }); </script>
	
	';
$this->addRequiredExternal('js', 'js/tinymce/tiny_mce_popup.js');
$__output .= '
	';
	';
foreach ($recipients as $recipient) {
    $__output .= '
		<li>
			' . XenForo_Template_Helper_Core::callHelper('avatarhtml', array($recipient, true, array('user' => '$recipient', 'size' => 's', 'img' => 'true'), '')) . '
			';
    if ($recipient['user_id']) {
        $__output .= '
				' . XenForo_Template_Helper_Core::callHelper('usernamehtml', array($recipient, '', true, array())) . '
			';
    } else {
        $__output .= '
				' . XenForo_Template_Helper_Core::callHelper('userNameHtml', array('0' => $recipient, '1' => 'Unknown Member', '2' => '1')) . '
			';
    }
    $__output .= '
			';
    if ($recipient['user_id']) {
        $__compilerVar2 = '';
        $__compilerVar2 .= XenForo_Template_Helper_Core::callHelper('usertitle', array('0' => $recipient));
        if (trim($__compilerVar2) !== '') {
            $__output .= '<div class="userTitle">' . $__compilerVar2 . '</div>';
        }
        unset($__compilerVar2);
    }
    $__output .= '
		</li>
	';
}
$__output .= '
</ul>';
    $__compilerVar5 = '';
    $__compilerVar6 = '';
    $__compilerVar7 = '';
    $__compilerVar7 .= '
			';
    $__compilerVar8 = '';
    $__compilerVar8 .= '
			';
    if ($xenOptions['tweet']['enabled']) {
        $__compilerVar8 .= '
				<div class="tweet shareControl">
					<a href="https://twitter.com/share" class="twitter-share-button"
						data-count="horizontal"
						data-lang="' . XenForo_Template_Helper_Core::callHelper('twitterLang', array('0' => $visitorLanguage['language_code'])) . '"
						data-url="' . htmlspecialchars($__compilerVar5, ENT_QUOTES, 'UTF-8') . '"
						' . ($thread['title'] ? 'data-text="' . XenForo_Template_Helper_Core::callHelper('threadPrefix', array('0' => $thread, '1' => 'escaped')) . htmlspecialchars($thread['title'], ENT_QUOTES, 'UTF-8') . '"' : '') . '
						' . ($xenOptions['tweet']['via'] ? 'data-via="' . htmlspecialchars($xenOptions['tweet']['via'], ENT_QUOTES, 'UTF-8') . '"' : '') . '
						' . ($xenOptions['tweet']['related'] ? 'data-related="' . htmlspecialchars($xenOptions['tweet']['related'], ENT_QUOTES, 'UTF-8') . '"' : '') . '>' . 'Tweet' . '</a>
				</div>
			';
    }
    $__compilerVar8 .= '
			';
    if ($xenOptions['plusone']) {
        $__compilerVar8 .= '
				<div class="plusone shareControl">
					<div class="g-plusone" data-size="medium" data-count="true" data-href="' . htmlspecialchars($__compilerVar5, ENT_QUOTES, 'UTF-8') . '"></div>
				</div>
			';
    }
    $__compilerVar8 .= '
示例#21
0
 /**
  * Helper to get the user banner for the specified user.
  *
  * @param array $user
  * @param boolean $allowCustomTitle Allows the user title to come from the
  * custom title
  * @param boolean $disableStacking If true, stacking is always disabled
  * (highest priority title used)
  *
  * @return string
  */
 public static function helperUserBanner($user, $extraClass = '', $disableStacking = false)
 {
     $opt = XenForo_Application::getOptions()->userBanners;
     if (!$opt['displayMultiple'] || $disableStacking) {
         return XenForo_Template_Helper_Core::callHelper('th_userbanner_userbannergroups', array($user, $extraClass, $disableStacking));
     }
     if (!is_array($user) || !array_key_exists('user_group_id', $user) || !array_key_exists('secondary_group_ids', $user)) {
         return '';
     }
     if (empty($user['user_id'])) {
         $user['user_group_id'] = XenForo_Model_User::$defaultGuestGroupId;
         $user['secondary_group_ids'] = '';
     }
     $banners = array();
     $opt = XenForo_Application::getOptions()->userBanners;
     $memberGroupIds = array($user['user_group_id']);
     if (!empty($user['secondary_group_ids'])) {
         $memberGroupIds = array_merge($memberGroupIds, explode(',', $user['secondary_group_ids']));
     }
     $userBannerGroups = XenForo_Application::getSimpleCacheData('th_userBannerGroups');
     $bannerGroups = array();
     foreach (self::$_userBanners as $groupId => $banner) {
         if (!in_array($groupId, $memberGroupIds)) {
             continue;
         }
         $bannerGroupId = $banner['user_banner_group_id'];
         if ($bannerGroupId && !isset($userBannerGroups[$bannerGroupId])) {
             continue;
         }
         $bannerText = '<em class="' . $banner['class'] . ' ' . $extraClass . ' ' . $userBannerGroups[$bannerGroupId]['banner_css_class'] . '" itemprop="title"><span class="before"></span><strong>' . $banner['text'] . '</strong><span class="after"></span></em>';
         if (!$bannerGroupId || !$userBannerGroups[$bannerGroupId]['display_style_priority']) {
             if (!$bannerGroupId || $userBannerGroups[$bannerGroupId]['display_multiple'] || empty($userBannerGroups[$bannerGroupId]['banners'])) {
                 $banners[$groupId] = $bannerText;
             }
         }
         $userBannerGroups[$bannerGroupId]['banners'][] = $bannerText;
     }
     foreach ($userBannerGroups as $userBannerGroupId => $userBannerGroup) {
         if (!$userBannerGroup['display_style_priority']) {
             continue;
         }
         if (empty($userBannerGroup['banners'])) {
             continue;
         }
         if ($userBannerGroup['display_multiple']) {
             $bannerGroups[$userBannerGroupId] = implode("\n", $userBannerGroup['banners']);
         } else {
             $bannerGroups[$userBannerGroupId] = reset($userBannerGroup['banners']);
         }
     }
     if ($bannerGroups) {
         $banners = array('groups' => implode("\n", $bannerGroups)) + $banners;
     }
     if (!empty($user['is_staff']) && !empty($opt['showStaff'])) {
         $p = new XenForo_Phrase('staff_member');
         $banners = array('staff' => '<em class="userBanner bannerStaff ' . $extraClass . '" itemprop="title"><span class="before"></span><strong>' . $p . '</strong><span class="after"></span></em>') + $banners;
     }
     if (!$banners) {
         return '';
     }
     if ($opt['displayMultiple'] && !$disableStacking) {
         return implode("\n", $banners);
     } else {
         if ($opt['showStaffAndOther'] && isset($banners['staff']) && count($banners) >= 2) {
             $staffBanner = $banners['staff'];
             unset($banners['staff']);
             return $staffBanner . "\n" . reset($banners);
         } else {
             return reset($banners);
         }
     }
 }
<?php

if (!class_exists('XenForo_Application', false)) {
    die;
}
$__output = '';
$this->addRequiredExternal('css', 'message_simple');
$__output .= '

<li class="comment secondaryContent ' . ($comment['isIgnored'] ? 'ignored' : '') . '">
	' . XenForo_Template_Helper_Core::callHelper('avatarhtml', array($comment, true, array('user' => '$comment', 'size' => 's', 'img' => 'true'), '')) . '

	<div class="commentInfo">
		<div class="commentContent">
			' . XenForo_Template_Helper_Core::callHelper('usernamehtml', array($comment, '', true, array('class' => 'poster'))) . '
			<article><blockquote>' . XenForo_Template_Helper_Core::callHelper('bodytext', array('0' => $comment['message'])) . '</blockquote></article>
		</div>
		<div class="commentControls">
			' . XenForo_Template_Helper_Core::callHelper('datetimehtml', array($comment['comment_date'], array('time' => '$comment.comment_date', 'class' => 'muted'))) . '
			';
if ($comment['canDelete']) {
    $__output .= '<a href="' . XenForo_Template_Helper_Core::link('profile-posts/comment-delete', $profilePost, array('comment' => $comment['profile_post_comment_id'])) . '" class="OverlayTrigger item control delete"><span></span>' . 'Xóa' . '</a>';
}
$__output .= '
		</div>
	</div>
</li>';
<?php

if (!class_exists('XenForo_Application', false)) {
    die;
}
$__output = '';
$__output .= '<li id="wiki-' . htmlspecialchars($wiki['page_id'], ENT_QUOTES, 'UTF-8') . '" class="searchResult wiki primaryContent">

	<div class="listBlock main">
		<div class="titleText">
			<h3 class="title">' . htmlspecialchars($i, ENT_QUOTES, 'UTF-8') . ' <a href="' . XenForo_Template_Helper_Core::link('wiki', $wiki, array()) . '">' . XenForo_Template_Helper_Core::callHelper('highlight', array('0' => $wiki['page_name'], '1' => $search['search_query'], '2' => 'highlight')) . '</a></h3>
		</div>

		<div class="meta">
			' . 'Wiki' . ', ' . 'Last Modified' . ': ' . XenForo_Template_Helper_Core::callHelper('datetimehtml', array($wiki['page_date'], array('time' => htmlspecialchars($wiki['page_date'], ENT_QUOTES, 'UTF-8')))) . '
		</div>

		<blockquote class="snippet"><a href="' . XenForo_Template_Helper_Core::link('wiki', $wiki, array()) . '">' . XenForo_Template_Helper_Core::callHelper('snippet', array('0' => $wiki['page_content'], '1' => '150', '2' => array('term' => $search['search_query'], 'emClass' => 'highlight', 'stripQuote' => '1'))) . '</a></blockquote>

	</div>
</li>';
示例#24
0
			';
    $__compilerVar1 = '';
    $this->addRequiredExternal('css', 'dark_postrating');
    $__compilerVar1 .= '
';
    $this->addRequiredExternal('js', 'js/dark/postrating.js?' . $postrating_js_modification);
    $__compilerVar1 .= '    
';
    if ($postrating_hide_post) {
        $__compilerVar1 .= '
	<div class=\'dark_postrating_hide_post\'>
		<div class="placeholderContent">
			' . XenForo_Template_Helper_Core::callHelper('avatarhtml', array($message, true, array('user' => '$message', 'size' => 's', 'img' => 'true'), '')) . '			
			<div class="messageInfo primaryContent">
				<div>
					' . 'This message by ' . XenForo_Template_Helper_Core::callHelper('username', array('0' => $message)) . ' has been hidden due to negative ratings.' . ' (<a href=\'#\' class=\'dark_postrating_show_post\'>' . 'Show message' . '</a>)					
				</div>
				
			</div>			
		</div>
	</div>
';
    }
    $__compilerVar1 .= '
<ul class="dark_postrating_outputlist">
';
    $__compilerVar2 = '';
    $__compilerVar2 .= '
		';
    foreach ($postrating_ratings_out as $id => $rating) {
        $__compilerVar2 .= '
.MultiQuoteItem .messageArea
{
	position: relative;
	overflow: hidden;
	padding-bottom: 0;
	border-bottom: none;
}

.MultiQuoteItem .messageText
{
	max-height: 120px;
	overflow: hidden;
}

.MultiQuoteItem .messageGradient
{
	position: absolute;
	top: 0px;
	left: 0px;
	right: 0px;
	height: 120px;
	background: -webkit-linear-gradient(top, ' . XenForo_Template_Helper_Core::callHelper('rgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'), '1' => '0')) . ' 70px, ' . XenForo_Template_Helper_Core::callHelper('unrgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'))) . ' 90%);
	background: -moz-linear-gradient(top, ' . XenForo_Template_Helper_Core::callHelper('rgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'), '1' => '0')) . ' 70px, ' . XenForo_Template_Helper_Core::callHelper('unrgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'))) . ' 90%);
	background: -o-linear-gradient(top, ' . XenForo_Template_Helper_Core::callHelper('rgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'), '1' => '0')) . ' 70px, ' . XenForo_Template_Helper_Core::callHelper('unrgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'))) . ' 90%);
	background: linear-gradient(to bottom, ' . XenForo_Template_Helper_Core::callHelper('rgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'), '1' => '0')) . ' 70px, ' . XenForo_Template_Helper_Core::callHelper('unrgba', array('0' => XenForo_Template_Helper_Core::styleProperty('primaryContent.background-color'))) . ' 90%);
}

.MultiQuoteItem.sortable-dragging .messageGradient
{
	display: none;
}';
	<ul id="search_bar_nodes_Disabler">
		<li><label><input type="checkbox" name="type[post][group_discussion]" value="1"
			id="search_bar_group_discussion" class="AutoChecker"
			data-uncheck="#search_bar_thread" /> ' . 'Display results as threads' . '</label></li>
	</ul>';
$__extraData['searchBar']['forum'] .= $__compilerVar2;
unset($__compilerVar2);
$__output .= '

<form action="' . XenForo_Template_Helper_Core::link('threads/edit-tags', $thread, array()) . '" method="post" class="xenForm formOverlay">

	<ul class="Tinhte_XenTag_TagsEditor" data-varname="tinhte_xentag_tags[]">
		<li>
			<input type="text"
				name="tinhte_xentag_tags_text"
				value="' . XenForo_Template_Helper_Core::callHelper('Tinhte_XenTag_getImplodedTagsFromThread', array('0' => $thread)) . '"
				id="ctrl_tinhte_xentag_tags"
				class="textCtrl AutoComplete AcSingle Tinhte_XenTag_TagNewInput"
				data-acUrl="' . XenForo_Template_Helper_Core::link('tags/find', false, array()) . '"
				/>
		</li>
	</ul>
	<p class="muted">' . 'Enter list of tags, separated by comma.' . '</p>
	<input type="hidden" name="tinhte_xentag_included" value="1" />
	
	<div>
		<input type="submit" value="' . 'Save Changes' . '" accesskey="s" class="button primary" />
		<input type="reset" value="' . 'Cancel' . '" class="button cancel" />
	</div>

	<input type="hidden" name="_xfToken" value="' . htmlspecialchars($visitor['csrf_token_page'], ENT_QUOTES, 'UTF-8') . '" />
			<h3 class="title"><a href="' . XenForo_Template_Helper_Core::link('gallery/albums', $album, array()) . '">' . XenForo_Template_Helper_Core::callHelper('highlight', array('0' => $album['title'], '1' => $search['search_query'], '2' => 'highlight')) . '</a></h3>
		</div>

		<blockquote class="snippet">
			<a href="' . XenForo_Template_Helper_Core::link('gallery/albums', $album, array()) . '">' . XenForo_Template_Helper_Core::callHelper('snippet', array('0' => $album['description'], '1' => '200', '2' => array('term' => $search['search_query'], 'emClass' => 'highlight', 'stripQuotes' => '1'))) . '</a>
			';
if ($album['photos']) {
    $__output .= '
				<br /><br />
				';
    foreach ($album['photos'] as $content) {
        $__output .= '
					<a href="' . XenForo_Template_Helper_Core::link('gallery/photos', $content, array()) . '" class="attachedImages">
						<img src="' . htmlspecialchars($content['thumbnailSmall'], ENT_QUOTES, 'UTF-8') . '" style="max-height: 64px;" alt="" />
					</a>
				';
    }
    $__output .= '
			';
}
$__output .= '
		</blockquote>

		<div class="meta">
			' . XenForo_Template_Helper_Core::callHelper('usernamehtml', array($album, '', false, array())) . ',
			' . XenForo_Template_Helper_Core::callHelper('datetimehtml', array($album['album_date'], array('time' => '$album.album_date'))) . ',
			' . XenForo_Template_Helper_Core::numberFormat($album['comment_count'], '0') . ' ' . 'Comments' . '
		</div>
	</div>

</li>';
					title="' . 'Show only threads prefixed by \'' . XenForo_Template_Helper_Core::callHelper('threadPrefix', array('0' => $thread, '1' => 'plain', '2' => '')) . '\'.' . '">' . XenForo_Template_Helper_Core::callHelper('threadPrefix', array('0' => $thread, '1' => 'html', '2' => '')) . '</a>
			';
    } else {
        $__output .= '
				' . XenForo_Template_Helper_Core::callHelper('threadPrefix', array('0' => $thread)) . '
			';
    }
    $__output .= '
		';
}
$__output .= '
		<a href="' . XenForo_Template_Helper_Core::link($thread['isNew'] ? 'threads/unread' : 'threads', $thread, array()) . '" class="' . ($thread['hasPreview'] ? 'PreviewTooltip' : '') . '" 
			data-previewUrl="' . ($thread['hasPreview'] ? XenForo_Template_Helper_Core::link('threads/preview', $thread, array()) : '') . '">
			';
if (XenForo_Template_Helper_Core::styleProperty('VietXfAdvStats_ThreadTitleChars') > 0) {
    $__output .= '
				' . XenForo_Template_Helper_Core::callHelper('wordtrim', array('0' => $thread['title'], '1' => XenForo_Template_Helper_Core::styleProperty('VietXfAdvStats_ThreadTitleChars'))) . '
			';
} else {
    $__output .= '
				' . htmlspecialchars($thread['title'], ENT_QUOTES, 'UTF-8') . '
			';
}
$__output .= '
		</a>
	</div>
	<div class="VietXfAdvStats_SectionItemBlock VietXfAdvStats_SectionItemInfo VietXfAdvStats_ThreadLastPoster">
		' . XenForo_Template_Helper_Core::callHelper('usernamehtml', array($thread, '', true, array())) . '
	</div>
</div>
';
示例#29
0
    die;
}
$__output = '';
$__extraData['title'] = '';
$__extraData['title'] .= 'Xóa bài viết bởi ' . htmlspecialchars($post['username'], ENT_QUOTES, 'UTF-8') . '';
$__output .= '

';
$__extraData['navigation'] = array();
$__extraData['navigation'] = XenForo_Template_Helper_Core::appendBreadCrumbs($__extraData['navigation'], $nodeBreadCrumbs);
$__extraData['navigation'][] = array('href' => XenForo_Template_Helper_Core::link('full:posts', $post, array()), 'value' => XenForo_Template_Helper_Core::callHelper('threadPrefix', array('0' => $thread)) . htmlspecialchars($thread['title'], ENT_QUOTES, 'UTF-8'));
$__output .= '

';
$__extraData['bodyClasses'] = '';
$__extraData['bodyClasses'] .= XenForo_Template_Helper_Core::callHelper('nodeClasses', array('0' => $nodeBreadCrumbs, '1' => $forum));
$__output .= '
';
$__extraData['searchBar']['thread'] = '';
$__compilerVar6 = '';
$__compilerVar6 .= '<label title="' . 'Search only ' . htmlspecialchars($thread['title'], ENT_QUOTES, 'UTF-8') . '' . '"><input type="checkbox" name="type[post][thread_id]" value="' . htmlspecialchars($thread['thread_id'], ENT_QUOTES, 'UTF-8') . '"
	id="search_bar_thread" class="AutoChecker"
	data-uncheck="#search_bar_title_only, #search_bar_nodes" /> ' . 'Search this thread only' . '</label>';
$__extraData['searchBar']['thread'] .= $__compilerVar6;
unset($__compilerVar6);
$__output .= '
';
$__extraData['searchBar']['forum'] = '';
$__compilerVar7 = '';
$__compilerVar7 .= '<label title="' . 'Search only ' . htmlspecialchars($forum['title'], ENT_QUOTES, 'UTF-8') . '' . '"><input type="checkbox" name="nodes[]" value="' . htmlspecialchars($forum['node_id'], ENT_QUOTES, 'UTF-8') . '"
	id="search_bar_nodes" class="Disabler AutoChecker" checked="checked"
						<span class="itemPageNav">
							<span>...</span>
							';
    foreach ($conversation['lastPageNumbers'] as $pageNumber) {
        $__output .= '
								<a href="' . XenForo_Template_Helper_Core::link('conversations', $conversation, array('page' => $pageNumber)) . '">' . htmlspecialchars($pageNumber, ENT_QUOTES, 'UTF-8') . '</a>
							';
    }
    $__output .= '
						</span>
					';
}
$__output .= '
				</div>
			</div>
		</div>
	</div>
		
	<div class="listBlock stats pairsJustified">
		<dl class="major"><dt>' . 'Trả lời' . ':</dt> <dd>' . XenForo_Template_Helper_Core::numberFormat($conversation['reply_count'], '0') . '</dd></dl>
		<dl class="minor"><dt>' . 'Những người tham gia' . ':</dt> <dd>' . XenForo_Template_Helper_Core::numberFormat($conversation['recipient_count'], '0') . '</dd></dl>
	</div>

	<div class="listBlock lastPost">
		<dl class="lastPostInfo">
			<dt>' . XenForo_Template_Helper_Core::callHelper('usernamehtml', array($conversation['last_message'], '', false, array())) . '</dt>
			<dd class="muted"><a href="' . XenForo_Template_Helper_Core::link('conversations/message', $conversation, array('message_id' => $conversation['last_message_id'])) . '" class="dateTime">' . XenForo_Template_Helper_Core::callHelper('datetimehtml', array($conversation['last_message_date'], array('time' => '$conversation.last_message_date'))) . '</a></dd>
		</dl>
	</div>
	
</li>';