本文整理汇总了PHP中TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getSubpart方法的典型用法代码示例。如果您正苦于以下问题:PHP ContentObjectRenderer::getSubpart方法的具体用法?PHP ContentObjectRenderer::getSubpart怎么用?PHP ContentObjectRenderer::getSubpart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
的用法示例。
在下文中一共展示了ContentObjectRenderer::getSubpart方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateMail
/**
* This Method generates a Mailcontent with $this->templatecode
* as Mailtemplate. First Line in Template represents the Mailsubject.
* The other required data can be queried from database by Parameters.
*
* @param string $orderUid The uid for the specified Order
* @param array $orderData Contaning additional data like Customer UIDs.
* @param string $templateCode Template code
*
* @return string The built Mailcontent
*/
protected function generateMail($orderUid, array $orderData, $templateCode)
{
$database = $this->getDatabaseConnection();
$markerArray = array('###ORDERID###' => $orderUid);
$content = $this->cObj->getSubpart($templateCode, '###MAILCONTENT###');
// Get The addresses
$deliveryAdress = '';
if ($orderData['cust_deliveryaddress']) {
$data = $database->exec_SELECTgetSingleRow('*', 'tt_address', 'uid = ' . (int) $orderData['cust_deliveryaddress']);
if (is_array($data)) {
$deliveryAdress = $this->makeAdressView($data, '###DELIVERY_ADDRESS###', $content);
}
}
$content = $this->cObj->substituteSubpart($content, '###DELIVERY_ADDRESS###', $deliveryAdress);
$billingAdress = '';
if ($orderData['cust_invoice']) {
$data = $database->exec_SELECTgetSingleRow('*', 'tt_address', 'uid = ' . (int) $orderData['cust_invoice']);
if (is_array($data)) {
$billingAdress = $this->makeAdressView($data, '###BILLING_ADDRESS###', $content);
$this->customermailadress = $data['email'];
}
}
$content = $this->cObj->substituteSubpart($content, '###BILLING_ADDRESS###', $billingAdress);
$content = $this->cObj->substituteSubpart($content, '###INVOICE_VIEW###', '');
/*
* Hook for processing Marker Array
*/
$hookObject = \CommerceTeam\Commerce\Factory\HookFactory::getHook('Hook/OrdermailHooks', 'generateMail');
if (is_object($hookObject) && method_exists($hookObject, 'processMarker')) {
$markerArray = $hookObject->processMarker($markerArray, $this);
}
$content = $this->cObj->substituteMarkerArray($content, $markerArray);
// Since The first line of the mail is the Subject, trim the template
return ltrim($content);
}
示例2: aclAction
/**
*
* Displays a form for editing a forum's access control lists (ACLs).
* In this form, the administrator can grant or deny read, write and moderation
* access to every frontend group.
*
* @access private
* @return string HTML content
*/
function aclAction()
{
$forumUid = intval($this->v['setACLs']);
$forumData = $this->p->getBoardData($forumUid);
if (!$this->checkActionAllowance($forumData['parentID'] == 0 ? 'category' : 'forum', 'acl')) {
return $this->displayNoAccessError();
}
if ($this->v['acl_save']) {
$this->saveAclAction();
} elseif ($this->v['acl_cancel']) {
$this->redirectToAction(array());
}
$template = $this->cObj->fileResource($this->conf['templates.']['acl']);
$groupTemplate = $this->cObj->getSubpart($template, '###GROUP_ROW###');
# Very ugly. Why does "getParentUserGroups" have to return its result as
# commaseperated list, and not as array? Well, can't change that now...
$readGroups = array_filter(explode(',', $this->tools->getParentUserGroups($forumData['grouprights_read'])), 'intval');
$writeGroups = array_filter(explode(',', $this->tools->getParentUserGroups($forumData['grouprights_write'])), 'intval');
$moderatorGroups = array_filter(explode(',', $this->tools->getParentUserGroups($forumData['grouprights_mod'])), 'intval');
$marker = array('###ANON_READ_CHECKED###' => count($readGroups) > 0 ? '' : 'checked="checked"', '###ALL_READ_CHECKED###' => count($readGroups) > 0 ? '' : 'checked="checked"', '###ALL_WRITE_CHECKED###' => count($writeGroups) > 0 ? '' : 'checked="checked"', '###FORM_ACTION###' => $this->p->pi_getPageLink($GLOBALS['TSFE']->id), '###FORUM_UID###' => $forumUid);
$template = $this->cObj->substituteMarkerArray($template, $marker);
$template = $this->cObj->substituteSubpart($template, '###GROUP_ROW###', $this->aclGetGroupRow($groupTemplate, array($readGroups, $writeGroups, $moderatorGroups)));
$template = preg_replace_callback('/###L:([A-Z_-]+)###/i', array($this, 'replaceLL'), $template);
return $template;
}
示例3: generateMail
/**
* This Method generates a Mailcontent with $this->templatecode
* as Mailtemplate. First Line in Template represents the Mailsubject.
* The other required data can be queried from database by Parameters.
*
* @param string $orderUid The uid for the specified Order
* @param array $orderData Contaning additional data like Customer UIDs.
* @param string $templateCode Template code
*
* @return string The built Mailcontent
*/
protected function generateMail($orderUid, array $orderData, $templateCode)
{
$database = $this->getDatabaseConnection();
$markerArray = array();
$markerArray['###ORDERID###'] = $orderUid;
/**
* Since The first line of the mail is the Subject, trim the template
*/
$content = ltrim($this->cObj->getSubpart($templateCode, '###MAILCONTENT###'));
// Get The addresses
$deliveryAdress = '';
if ($orderData['cust_deliveryaddress']) {
$data = $database->exec_SELECTgetSingleRow('*', 'tt_address', 'uid=' . (int) $orderData['cust_deliveryaddress']);
if (is_array($data)) {
$deliveryAdress = $this->makeAdressView($data, '###DELIVERY_ADDRESS###');
}
}
$content = $this->cObj->substituteSubpart($content, '###DELIVERY_ADDRESS###', $deliveryAdress);
$billingAdress = '';
if ($orderData['cust_invoice']) {
$data = $database->exec_SELECTgetSingleRow('*', 'tt_address', 'uid=' . (int) $orderData['cust_invoice']);
if (is_array($data)) {
$billingAdress = $this->makeAdressView($data, '###BILLING_ADDRESS###');
$this->customermailadress = $data['email'];
}
}
$content = $this->cObj->substituteSubpart($content, '###BILLING_ADDRESS###', $billingAdress);
$invoicelist = '';
$content = $this->cObj->substituteSubpart($content, '###INVOICE_VIEW###', $invoicelist);
/**
* Hook for processing Marker Array
*/
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce_ordermails/mod1/class.tx_commerce_moveordermail.php']['generateMail'])) {
GeneralUtility::deprecationLog('
hook
$GLOBALS[\'TYPO3_CONF_VARS\'][\'EXTCONF\'][\'commerce_ordermails/mod1/class.tx_commerce_moveordermail.php\'][\'generateMail\']
is deprecated since commerce 1.0.0, it will be removed in commerce 1.4.0, please use instead
$GLOBALS[\'TYPO3_CONF_VARS\'][\'EXTCONF\'][\'commerce/Classes/Hook/OrdermailHooks.php\'][\'generateMail\']
');
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce_ordermails/mod1/class.tx_commerce_moveordermail.php']['generateMail'] as $classRef) {
$hookObj = GeneralUtility::getUserObj($classRef);
if (method_exists($hookObj, 'ProcessMarker')) {
$markerArray = $hookObj->ProcessMarker($markerArray, $this);
}
}
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/Classes/Hook/OrdermailHooks.php']['generateMail'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/Classes/Hook/OrdermailHooks.php']['generateMail'] as $classRef) {
$hookObj = GeneralUtility::getUserObj($classRef);
if (method_exists($hookObj, 'ProcessMarker')) {
$markerArray = $hookObj->ProcessMarker($markerArray, $this);
}
}
}
$content = $this->cObj->substituteMarkerArray($content, $markerArray);
return ltrim($content);
}
示例4: array
/**
* Outputs information about a specific user for the post listing.
* @param int $uid The UID of the user whose information are to be displayed
* @param array $conf The configuration vars of the plugin
* @param bool $threadauthor TRUE, if the user is the author of the thread displayed. In
* this case, a special string telling that this user is the author
* of the thread is displayed.
* @return string The user information
*/
function ident_user($uid, $conf, $threadauthor = FALSE)
{
$userData = !is_array($uid) ? tx_mmforum_tools::get_userdata($uid) : $uid;
$template = $this->cObj->fileResource($this->conf['template.']['list_post']);
$template = $this->cObj->getSubpart($template, '###USERINFO###');
if ($template) {
$avatar = $this->getUserAvatar($userData);
$marker = array('###LLL_DELETED###' => $this->pi_getLL('user-deleted'), '###USERNAME###' => $this->cObj->stdWrap($userData[$this->getUserNameField()], $this->conf['list_posts.']['userinfo.']['username_stdWrap.']), '###USERREALNAME###' => $this->cObj->stdWrap($userData['name'], $this->conf['list_posts.']['userinfo.']['realname_stdWrap.']), '###USERRANKS###' => $this->get_userranking($uid, $conf), '###TOPICCREATOR###' => $uid == $threadauthor ? $this->cObj->stdWrap($this->pi_getLL('topic-topicauthor'), $this->conf['list_posts.']['userinfo.']['creator_stdWrap.']) : '', '###AVATAR###' => $avatar, '###LLL_REGSINCE###' => $this->pi_getLL('user-regSince'), '###LLL_POSTCOUNT###' => $this->pi_getLL('user-posts'), '###REGSINCE###' => $this->cObj->stdWrap($userData['crdate'], $this->conf['list_posts.']['userinfo.']['crdate_stdWrap.']), '###POSTCOUNT###' => intval($userData['tx_mmforum_posts']), '###USER_RATING###' => $this->isUserRating() ? $this->getRatingDisplay('fe_users', $userData['uid']) : '');
if ($userData === false) {
$template = $this->cObj->substituteSubpart($template, '###USERINFO_REGULAR###', '');
} else {
$template = $this->cObj->substituteSubpart($template, '###USERINFO_DELETED###', '');
}
// Include hooks
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['userInformation_marker'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['userInformation_marker'] as $_classRef) {
$_procObj =& GeneralUtility::getUserObj($_classRef);
$marker = $_procObj->userInformation_marker($marker, $userData, $this);
}
}
$content = $this->cObj->substituteMarkerArray($template, $marker);
} else {
if ($userData === false) {
return '<strong>' . $this->pi_getLL('user.deleted') . '</strong>';
}
$content = '<strong>' . $userData[$this->getUserNameField()] . '</strong><br />';
if ($this->conf['list_posts.']['userinfo_realName'] && $userData['name']) {
$content .= $this->cObj->wrap($userData['name'], $this->conf['list_posts.']['userinfo_realName_wrap']);
}
$userranking = $this->get_userranking($uid, $conf) . '<br />';
if ($uid == $threadauthor) {
$userranking .= $this->cObj->wrap($this->pi_getLL('topic.topicauthor'), $this->conf['list_posts.']['userinfo_topicauthor_wrap']);
}
$content .= $userranking;
if ($userData['tx_mmforum_avatar']) {
$content .= $this->tools->res_img($conf['path_avatar'] . $userData['tx_mmforum_avatar'], $conf['avatar_height'], $conf['avatar_width']);
}
$content .= $this->cObj->wrap($this->pi_getLL('user.regSince') . ': ' . date('d.m.Y', $userData['crdate']) . '<br />' . $this->pi_getLL('user.posts') . ': ' . $userData['tx_mmforum_posts'], $this->conf['list_posts.']['userinfo_content_wrap']);
}
return $content;
}
示例5: array
/**
* Displays the post queue.
* This function displays all elements of the postqueue in a list
* view.
*
* @author Martin Helmich
* @version 2007-07-21
* @return string The postqueue list content
*/
function display_postQueue()
{
$template = $this->cObj->fileResource($this->conf['template.']['postqueue']);
$template = $this->cObj->getSubpart($template, '###POSTQUEUE_LIST###');
$template_row = $this->cObj->getSubpart($template, '###POSTQUEUE_ITEM###');
$marker = array('###LLL_PUBLISH###' => $this->pi_getLL('postqueue.publishtab'), '###LLL_DELETE###' => $this->pi_getLL('postqueue.deletetab'), '###LLL_IGNORE###' => $this->pi_getLL('postqueue.ignoretab'), '###LLL_POSTTEXT###' => $this->pi_getLL('postqueue.posttext'), '###LLL_POSTQUEUE###' => $this->pi_getLL('postqueue.title'), '###LLL_PUBLISHBUTTON###' => $this->pi_getLL('postqueue.publishbutton'), '###LLL_NOITEMS###' => $this->pi_getLL('postqueue.noitems'), '###ACTION###' => $this->parent->escapeURL($this->parent->pi_getPageLink($GLOBALS['TSFE']->id)));
$template = $this->cObj->substituteMarkerArray($template, $marker);
$rContent = '';
$boards = $this->getModeratorBoards();
if (is_array($boards)) {
$res = $this->databaseHandle->exec_SELECTquery('q.*', 'tx_mmforum_postqueue q LEFT JOIN tx_mmforum_topics t ON q.post_parent = t.uid', 'q.deleted = 0 AND (t.deleted=0 OR t.uid IS NULL) AND (q.topic_forum IN (' . implode(',', $boards) . ') OR t.forum_id IN (' . implode(',', $boards) . '))', '', 'q.crdate DESC');
} elseif ($boards === true) {
$res = $this->databaseHandle->exec_SELECTquery('*', 'tx_mmforum_postqueue', 'deleted=0', '', 'crdate DESC');
}
if ($boards !== false) {
if ($this->databaseHandle->sql_num_rows($res) > 0) {
$template = $this->cObj->substituteSubpart($template, '###POSTQUEUE_NOITEMS###', '');
} else {
$template = $this->cObj->substituteSubpart($template, '###POSTQUEUE_ITEMLIST###', '');
}
while ($arr = $this->databaseHandle->sql_fetch_assoc($res)) {
$rMarker = array('###LLL_WROTE###' => $this->pi_getLL('postqueue.wrote'), '###DATE###' => $this->parent->formatDate($arr['post_time']), '###POST_TEXT###' => $this->tx_mmforum_postparser->main($this->parent, $this->conf, $this->parent->escape($arr['post_text']), 'textparser'), '###UID###' => $arr['uid'], '###POST_POSTER###' => $this->parent->linkToUserProfile($arr['post_user']), '###CHECK_DELETE###' => '', '###CHECK_IGNORE###' => $arr['hidden'] ? 'checked="checked"' : '', '###CHECK_PUBLISH###' => $arr['hidden'] ? '' : 'checked="checked"', '###FORUMPATH###' => $this->getForumLink($arr['topic_forum']));
if ($arr['topic']) {
$rMarker['###TOPIC_LINK###'] = $this->parent->escape($arr['topic_title']) . ' [' . $this->pi_getLL('postqueue.newTopic') . ']';
} else {
$tData = $this->parent->getTopicData($arr['post_parent']);
$linkParams[$this->parent->prefixId] = array('action' => 'list_post', 'tid' => $tData['uid']);
if ($this->parent->getIsRealURL()) {
$linkParams[$this->parent->prefixId]['fid'] = $tData['forum_id'];
}
$rMarker['###TOPIC_LINK###'] = $this->parent->pi_linkToPage($this->parent->escape($tData['topic_title']), $this->conf['pid_forum'], '', $linkParams);
}
$rContent .= $this->cObj->substituteMarkerArray($template_row, $rMarker);
}
$template = $this->cObj->substituteSubpart($template, '###POSTQUEUE_ITEM###', $rContent);
} else {
$template = $this->cObj->substituteSubpart($template, '###POSTQUEUE_ITEMLIST###', '');
}
return $template;
}
示例6: objDisplay
/**
* Display a poll.
* This function displays a poll. Depending on whether the user that is
* currently logged in is allowed to vote on this poll (this will be the
* case if the user has not already voted in this poll and if the poll is
* not yet expired), the user will see a set of radio buttons allowing him/her
* to choose an answering possibility, or the poll results.
*
* @return string The poll content
* @version 2007-05-22
*/
function objDisplay()
{
if ($this->piVars['poll']['vote'] == '1') {
$this->objVote();
}
$template = $this->cObj->fileResource($this->conf['template.']['polls']);
$template = $this->cObj->getSubpart($template, '###POLL_DISPLAY###');
$vote = $this->getMayVote();
if (!$vote) {
$template = $this->cObj->substituteSubpart($template, '###POLL_SUBMIT###', '');
$row_template = $this->cObj->getSubpart($template, '###POLL_ANSWER_2###');
} else {
$row_template = $this->cObj->getSubpart($template, '###POLL_ANSWER_1###');
}
$res = $this->databaseHandle->exec_SELECTquery('*', 'tx_mmforum_polls_answers', 'poll_id=' . intval($this->data['uid']) . ' AND deleted=0');
$i = 1;
$aContent = '';
while ($arr = $this->databaseHandle->sql_fetch_assoc($res)) {
$pAnswers = $arr['votes'] > 0 ? round($arr['votes'] / $this->data['votes'] * 100) : 0;
if ($this->conf['polls.']['pollBar_colorMap.'][$i]) {
$color = $this->conf['polls.']['pollBar_colorMap.'][$i];
} else {
$color = $this->conf['polls.']['pollBar_colorMap.']['default'];
}
$aMarker = array('###ANSWER_UID###' => $arr['uid'], '###ANSWER_TEXT###' => $this->p->escape($arr['answer']), '###ANSWER_COUNT###' => sprintf($this->p->pi_getLL('poll.replies'), $arr['votes'], $this->data['votes'], $pAnswers . '%'), '###ANSWER_ANSWERS###' => '<div style="width: ' . $pAnswers . '%; height:10px; background-color: ' . $color . ';"> </div>', '###ENABLE###' => '');
$aContent .= $this->cObj->substituteMarkerArray($row_template, $aMarker);
$i++;
}
$actionParams[$this->p->prefixId] = array('tid' => $this->p->piVars['tid'], 'fid' => $this->p->piVars['fid'], 'action' => 'list_post');
$actionLink = $this->p->pi_getPageLink($GLOBALS['TSFE']->id, '', $actionParams);
$marker = array('###LABEL_POLL###' => $this->p->pi_getLL('poll.title'), '###LABEL_VOTE###' => $this->p->pi_getLL('poll.vote'), '###LABEL_QUESTION###' => $this->p->pi_getLL('poll.question'), '###QUESTION###' => $this->p->escape($this->data['question']), '###EXPIRES###' => $this->data['endtime'] ? $this->p->pi_getLL('poll.expires') . ' ' . date('d. m. Y, H:i', $this->data['endtime']) : '', '###ACTION###' => $this->p->escapeURL($actionLink), '###ICON###' => $this->cObj->cObjGetSingle($this->conf['polls.']['poll_icon'], $this->conf['polls.']['poll_icon.']));
$marker['###EXPIRES###'] = $this->cObj->stdWrap($marker['###EXPIRES###'], $this->conf['polls.']['expired_stdWrap.']);
$template = $this->cObj->substituteMarkerArray($template, $marker);
$template = $this->cObj->substituteSubpart($template, '###POLL_ANSWER_1###', $aContent);
$template = $this->cObj->substituteSubpart($template, '###POLL_ANSWER_2###', '');
return $template;
}
示例7: printPosts
/**
* Prints an array of posts.
* This function prints an array of posts that are to be listed in the RSS
* feed.
* @param array $posts A numeric array of all posts that shall be listed in the
* RSS
* @return string The RSS feed as XML string
*/
function printPosts($posts)
{
$template = $this->cObj->fileResource($this->conf['template.']['rss']);
$template = $this->cObj->getSubpart($template, '###RSS_FEED###');
$rowTemplate = $this->cObj->getSubpart($template, '###RSS_POST_ITEM###');
// Include hooks
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_posts'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_posts'] as $_classRef) {
$_procObj =& GeneralUtility::getUserObj($_classRef);
$marker = $_procObj->rss_posts($posts, $this);
}
}
// TODO: FIXME undefined variables $mode, $param
$marker = array('###RSS_ENCODING###' => $GLOBALS['TSFE']->renderCharset, '###RSS_TITLE###' => '<![CDATA[' . $this->getFeedTitle($mode, $param) . ']]>', '###RSS_DESCRIPTION###' => $this->getFeedDescription(), '###RSS_URL###' => $this->pObj->escapeURL($this->getFeedURL()), '###RSS_GENERATOR###' => 'mm_forum powered by TYPO3', '###RSS_LASTBUILT###' => date('r'), '###RSS_LANGUAGE###' => $this->pObj->LLkey == 'default' ? 'en' : $this->pObj->LLkey);
// Include hooks
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_globalMarkers'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_globalMarkers'] as $_classRef) {
$_procObj =& GeneralUtility::getUserObj($_classRef);
$marker = $_procObj->rss_globalMarkers($marker, $posts, $this);
}
}
$template = $this->cObj->substituteMarkerArray($template, $marker);
$rowContent = '';
foreach ($posts as $post) {
$rowMarker = array('###RSS_TOPIC_NAME###' => $this->pObj->escape($post['topic_title']), '###RSS_POST_LINK###' => $this->getPostLink($post['post_uid']), '###RSS_POST_DATE###' => date('r', $post['post_time']), '###RSS_POST_TEXT_SHORT###' => $this->getPostTextShort($post['post_text']), '###RSS_POST_TEXT###' => $this->getPostTextComplete($post['post_text']), '###RSS_FORUM_NAME###' => $this->pObj->escape($post['forum_name']), '###RSS_POST_AUTHOR###' => $this->pObj->escape($post[$this->conf['userNameField'] ? $this->conf['userNameField'] : 'username']));
$rowContent .= $this->cObj->substituteMarkerArray($rowTemplate, $rowMarker);
// Include hooks
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_itemMarkers'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['mm_forum']['forum']['rss_itemMarkers'] as $_classRef) {
$_procObj =& GeneralUtility::getUserObj($_classRef);
$rowMarker = $_procObj->rss_itemMarkers($marker, $post, $this);
}
}
}
$template = $this->cObj->substituteSubpart($template, '###RSS_POST_ITEM###', $rowContent);
return $template;
}
示例8: display
/**
* Displays the plugin
* @author Martin Helmich <m.helmich@mittwald.de>
* @param string $content The plugin content
* @return string The plugin content
* @uses getOnlineGuests
* @uses getTodayGuests
* @uses getOnlineUsers
* @uses getTodayUsers
* @uses getTotalUsers
* @uses getTotalTopics
* @uses getTotalReplies
* @uses getAveragePosts
* @uses getUserList
*/
function display($content)
{
$small = $this->small;
$template = $this->cObj->fileResource($this->conf['templateFile']);
$subpart = !$small ? "###PORTALINFO###" : "###PORTALINFO_SMALL###";
$template = $this->cObj->getSubpart($template, $subpart);
// Determine amount of registered users
$onlineUsers = $this->getOnlineUsers();
$todayUsers = $this->getTodayUsers();
// Determine amount of guests
if (ExtensionManagementUtility::isLoaded('sys_stat')) {
$onlineGuests = $this->getOnlineGuests();
$todayGuests = $this->getTodayGuests();
} else {
$onlineGuests = 0;
$todayGuests = 0;
}
// Determine total amount of visitors
$onlineTotal = $onlineUsers['count'] + $onlineGuests;
$todayTotal = $todayUsers['count'] + $todayGuests;
// Current users
$llMarker = array('###PRD###' => $this->getSgPl('prd.pr', $onlineTotal ? $onlineTotal : $onlineUsers['count']), '###BESUCHER_TOTAL###' => $this->cObj->wrap($onlineTotal ? $onlineTotal : 0, $this->conf['importantInformation_wrap']), '###BESUCHER_TOTAL_LABEL###' => $this->getSgPl('total_user', $onlineTotal ? $onlineTotal : $onlineUsers['count']), '###BESUCHER_REG###' => $this->cObj->wrap($onlineUsers['count'], $this->conf['importantInformation_wrap']), '###BESUCHER_REG_LABEL###' => $this->getSgPl('reg_user', $onlineUsers['count']), '###BESUCHER_GAST###' => $this->cObj->wrap($onlineGuests, $this->conf['importantInformation_wrap']), '###BESUCHER_GAST_LABEL###' => $this->getSgPl('guest', $onlineGuests));
$currentTotal = $this->cObj->substituteMarkerArray($this->pi_getLL('info.currentTotal'), $llMarker);
// Today's users
$llMarker = array('###PRD###' => $this->getSgPl('prd.vg', $todayTotal ? $todayTotal : $todayUsers['count']), '###BESUCHER_REG_HEUTE###' => $this->cObj->wrap($todayUsers['count'], $this->conf['importantInformation_wrap']), '###BESUCHER_REG_HEUTE_LABEL###' => $this->getSgPl('reg_user', $todayUsers['count']), '###BESUCHER_GAST_HEUTE###' => $this->cObj->wrap($todayGuests, $this->conf['importantInformation_wrap']), '###BESUCHER_GAST_HEUTE_LABEL###' => $this->getSgPl('guest', $todayGuests));
$todayTotal = $this->cObj->substituteMarkerArray($this->pi_getLL('info.todayTotal'), $llMarker);
// Statistics
$llMarker = array('###BENUTZER_TOTAL###' => $this->cObj->wrap($this->getTotalUsers(), $this->conf['importantInformation_wrap']), '###THEMEN_TOTAL###' => $this->cObj->wrap($this->getTotalTopics(), $this->conf['importantInformation_wrap']), '###ANTWORTEN_TOTAL###' => $this->cObj->wrap($this->getTotalReplies(), $this->conf['importantInformation_wrap']), '###BEITRAEGE_SCHNITT###' => $this->cObj->wrap(round($this->getAveragePosts(), 2), $this->conf['importantInformation_wrap']), '###SITENAME###' => $this->cObj->wrap($this->conf['siteName'], $this->conf['importantInformation_wrap']));
$statistics = $this->cObj->substituteMarkerArray($this->pi_getLL('info.stats'), $llMarker);
$marker = array('###LABEL_INFO###' => $this->pi_getLL('info.title'), '###LABEL_CURRENT_TOTAL###' => $currentTotal, '###LABEL_TODAY_TOTAL###' => $todayTotal, '###LABEL_CURRENTLYONLINE###' => $this->pi_getLL('info.currentlyOnline'), '###LABEL_TODAYONLINE###' => $this->pi_getLL('info.todayOnline'), '###LABEL_STATS###' => $statistics, '###BESUCHER_LISTE###' => $this->getUserList($onlineUsers, TRUE), '###BESUCHER_LISTE_HEUTE###' => !$small ? $this->getUserList($todayUsers, TRUE) : '', '###EXPAND###' => $this->getExpandCollapseLink(TRUE), '###COLLAPSE###' => $this->getExpandCollapseLink(FALSE));
$template = $this->cObj->substituteMarkerArray($template, $marker);
return $content . $template;
}
示例9: successMessage
/**
* Generates a success message.
* @author Martin Helmich <m.helmich@mittwald.de>
* @param array $conf The plugin's configuration vars
* @param string $msg The success message
* @return string The HTML success message
*/
function successMessage($conf, $msg)
{
$template = $this->cObj->fileResource($conf['template.']['login_error']);
$template = $this->cObj->getSubpart($template, '###SUCCESSNOTICE###');
$marker = array();
$marker['###LOGINERROR_MESSAGE###'] = $msg;
return $this->cObj->substituteMarkerArrayCached($template, $marker);
}