本文整理汇总了PHP中Avatar::insertAvatarIntoDiscussion方法的典型用法代码示例。如果您正苦于以下问题:PHP Avatar::insertAvatarIntoDiscussion方法的具体用法?PHP Avatar::insertAvatarIntoDiscussion怎么用?PHP Avatar::insertAvatarIntoDiscussion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Avatar
的用法示例。
在下文中一共展示了Avatar::insertAvatarIntoDiscussion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
//.........这里部分代码省略.........
$wikitext = ContentHandler::getContentText($this->getSkin()->getContext()->getWikiPage()->getContent(Revision::RAW));
$magic = WikihowArticleHTML::grabTheMagic($wikitext);
$this->data['bodytext'] = WikihowArticleHTML::processArticleHTML($body, array('sticky-headers' => $sticky, 'ns' => $wgTitle->getNamespace(), 'list-page' => $list_page, 'magic-word' => $magic));
} else {
if ($action == 'edit') {
$heading .= WikihowArticleEditor::grabArticleEditLinks($wgRequest->getVal("guidededitor"));
}
$this->data['bodyheading'] = $heading;
$body = '<div id="bodycontents">' . $this->data['bodytext'] . '</div>';
if (!$isTool) {
$this->data['bodytext'] = WikihowArticleHTML::processHTML($body, $action, array('show-gray-container' => $sk->showGrayContainer()));
} else {
// a little hack to style the no such special page messages for special pages that actually
// exist
if (false !== strpos($body, 'You have arrived at a "special page"')) {
$body = "<div class='minor_section'>{$body}</div>";
}
$this->data['bodytext'] = $body;
}
}
// post-process the Steps section HTML to get the numbers working
if ($wgTitle->getNamespace() == NS_MAIN && !$isMainPage && ($action == 'view' || $action == 'purge')) {
// for preview article after edit, you have to munge the
// steps of the previewHTML manually
$body = $this->data['bodytext'];
$opts = array();
if (!$showAds) {
$opts['no-ads'] = true;
}
//$this->data['bodytext'] = WikihowArticleHTML::postProcess($body, $opts);
}
// insert avatars into discussion, talk, and kudos pages
if (MWNamespace::isTalk($wgTitle->getNamespace()) || $wgTitle->getNamespace() == NS_USER_KUDOS) {
$this->data['bodytext'] = Avatar::insertAvatarIntoDiscussion($this->data['bodytext']);
}
//$navMenu = $sk->genNavigationMenu();
$navTabs = $sk->genNavigationTabs();
// set up the main page
$mpActions = "";
$mpWorldwide = '
';
$profileBoxIsUser = false;
if ($isLoggedIn && $wgTitle && $wgTitle->getNamespace() == NS_USER) {
$name = $wgTitle->getDBKey();
$profileBoxUser = User::newFromName($name);
if ($profileBoxUser && $wgUser->getID() == $profileBoxUser->getID()) {
$profileBoxIsUser = true;
}
}
// Reuben (11/2013): Micro-customization as a test for BR
//$slowSpeedUsers = array('BR');
$slowSpeedUsers = array();
$isSlowSpeedUser = $wgUser && in_array($wgUser->getName(), $slowSpeedUsers);
$optimizelyJS = false;
if (class_exists('OptimizelyPageSelector') && $wgTitle) {
if (OptimizelyPageSelector::isArticleEnabled($wgTitle) && OptimizelyPageSelector::isUserEnabled($wgUser)) {
$optimizelyJS = OptimizelyPageSelector::getOptimizelyTag();
}
}
$showSpotlightRotate = $isMainPage && $wgLanguageCode == 'en';
$showBreadCrumbs = $sk->showBreadCrumbs();
$showSideBar = $sk->showSideBar();
$showHeadSection = $sk->showHeadSection();
$showArticleTabs = $wgTitle->getNamespace() != NS_SPECIAL && !$isMainPage;
if (in_array($wgTitle->getNamespace(), array(NS_IMAGE)) && (empty($action) || $action == 'view') && !$isLoggedIn) {