当前位置: 首页>>代码示例>>PHP>>正文


PHP Wikia::specialPageLink方法代码示例

本文整理汇总了PHP中Wikia::specialPageLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Wikia::specialPageLink方法的具体用法?PHP Wikia::specialPageLink怎么用?PHP Wikia::specialPageLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wikia的用法示例。


在下文中一共展示了Wikia::specialPageLink方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: executeIndex

 public function executeIndex($params)
 {
     $page_owner = User::newFromName($this->wg->Title->getText());
     if (!is_object($page_owner) || $page_owner->getId() == 0) {
         // do not show module if page owner does not exist or is an anonymous user
         return false;
     }
     // add CSS for this module
     $this->wg->Out->addStyle(AssetsManager::getInstance()->getSassCommonURL("skins/oasis/css/modules/FollowedPages.scss"));
     $showDeletedPages = isset($params['showDeletedPages']) ? (bool) $params['showDeletedPages'] : true;
     // get 6 followed pages
     $watchlist = FollowModel::getWatchList($page_owner->getId(), 0, 6, null, $showDeletedPages);
     $data = array();
     // weird.  why is this an array of one element?
     foreach ($watchlist as $unused_id => $item) {
         $pagelist = $item['data'];
         foreach ($pagelist as $page) {
             $data[] = $page;
         }
     }
     // only display  your own page
     if ($page_owner->getId() == $this->wg->User->getId()) {
         $this->follow_all_link = Wikia::specialPageLink('Following', 'oasis-wikiafollowedpages-special-seeall', 'more');
     }
     $this->data = $data;
     $this->max_followed_pages = min(self::MAX_FOLLOWED_PAGES, count($this->data));
 }
开发者ID:yusufchang,项目名称:app,代码行数:27,代码来源:FollowedPagesController.class.php

示例2: onBeforeToolbarMenu

 /**
  *  @brief hook to add toolbar item for admin dashboard
  */
 function onBeforeToolbarMenu(&$items)
 {
     if (F::app()->wg->User->isAllowed('admindashboard')) {
         $item = array('type' => 'html', 'html' => Wikia::specialPageLink('AdminDashboard', 'admindashboard-toolbar-link', array('data-tracking' => 'admindashboard/toolbar/admin')));
         if (is_array($items)) {
             $isMenuSubElPresent = false;
             foreach ($items as $el) {
                 if (isset($el['type']) && $el['type'] === 'menu') {
                     $isMenuSubElPresent = true;
                     break;
                 }
             }
             if ($isMenuSubElPresent) {
                 $items[] = $item;
             }
         } else {
             $items = array($item);
         }
     }
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:24,代码来源:AdminDashboardLogic.class.php

示例3: wfMsg

<section class="WikiaActivityModule module" id="<?= !empty( $userName ) ? 'WikiaRecentActivityUser' : 'WikiaRecentActivity'; ?>">
	<h1 class="activity-heading"><?= $moduleHeader ?></h1>
	<ul>
<?php
	if(!empty($changeList)){
		foreach ($changeList as $item) {
?>
		<li>
			<img src="<?= $wg->BlankImgUrl ?>" class="sprite <?= $item['changeicon'] ?>" height="20" width="20">
			<em><?= $item['page_href'] ?></em>
			<div class="edited-by"><?= $item['changemessage'] ?></div>
		</li>
<?php
		}
	}
	elseif(!empty($userName)) {
		echo wfMsg( 'userprofilepage-recent-activity-default', $userName );
	}
?>
	</ul>

	<? if ( $userName && count($changeList) ) :?>
		<?= Wikia::specialPageLink('Contributions/' . $userName, 'userprofilepage-top-recent-activity-see-more', 'more') ;?>
	<? elseif(empty($userName)): ?>
		<?= Wikia::specialPageLink('WikiActivity', 'oasis-more', 'more') ?>
	<? endif ;?>
</section>
开发者ID:schwarer2006,项目名称:wikia,代码行数:27,代码来源:LatestActivity_Index.php

示例4: array

            ?>
</div>
					<?php 
        }
        ?>
				</div>
			</div>
			<?php 
        // edit button with actions dropdown
        if (!empty($action)) {
            echo F::app()->renderView('MenuButton', 'Index', array('action' => $action, 'image' => $actionImage, 'dropdown' => $dropdown, 'name' => $actionName));
        }
        // TODO: use PageHeaderIndexExtraButtons hook for these buttons
        // "Add a photo" button
        if (!empty($isNewFiles) && !empty($wg->EnableUploads)) {
            echo Wikia::specialPageLink('Upload', 'oasis-add-photo', 'wikia-button upphotos', 'blank.gif', 'oasis-add-photo-to-wiki', 'sprite photo');
        }
        // "Add a video" button
        if (!empty($isSpecialVideos) && !empty($wg->EnableUploads) && $showAddVideoBtn) {
            ?>
				<a class="button addVideo" href="#" rel="tooltip" title="<?php 
            echo wfMsg('related-videos-tooltip-add');
            ?>
">
					<img src="<?php 
            echo wfBlankImgUrl();
            ?>
" class="sprite addRelatedVideo"/> <?php 
            echo wfMsg('videos-add-video');
            ?>
				</a>
开发者ID:yusufchang,项目名称:app,代码行数:31,代码来源:PageHeader_Index.php

示例5: wfMsg

<div id="WikiWelcome" class="WikiWelcome">
	<h1><?php 
echo wfMsg('cnw-welcome-headline', $wg->Sitename);
?>
</h1>
	<p><?php 
echo wfMsg('cnw-welcome-instruction1');
?>
</p>
	<?php 
echo Wikia::specialPageLink('CreatePage', 'button-createpage', 'wikia-button createpage', 'blank.gif', 'oasis-create-page', 'sprite new');
?>
	<p><?php 
echo wfMsg('cnw-welcome-instruction2');
?>
</p>
	<p class="help"><?php 
echo wfMsg('cnw-welcome-help');
?>
</p>
</div>
开发者ID:schwarer2006,项目名称:wikia,代码行数:21,代码来源:CreateNewWiki_WikiWelcomeModal.php

示例6: array

}
?>
		<?php 
echo $app->renderView('WikiNavigation', 'Index');
?>
    </nav>
	<?php 
if ($displayHeaderButtons) {
    ?>
    <div class="buttons">
		<?php 
    echo $app->renderView('ContributeMenu', 'Index');
    ?>
    </div>
	<?php 
}
?>
    <div class="hiddenLinks">
		<?php 
echo Wikia::specialPageLink('Watchlist', 'watchlist', array('accesskey' => 'l'));
?>
		<?php 
echo Wikia::specialPageLink('Random', 'randompage', array('accesskey' => 'x'));
?>
		<?php 
echo Wikia::specialPageLink('RecentChanges', 'recentchanges', array('accesskey' => 'r'));
?>
    </div>
</header>

开发者ID:yusufchang,项目名称:app,代码行数:29,代码来源:WikiHeader_Index.php

示例7: testWikiaSpecialPageLink

	function testWikiaSpecialPageLink() {
		$this->assertTag (
			array("tag" => "a"),
			Wikia::specialPageLink('CreatePage', 'button-createpage', 'wikia-button')
		);
	}
开发者ID:schwarer2006,项目名称:wikia,代码行数:6,代码来源:ControllerTest.php

示例8: wfMessage

					<br>
					<button title="<?php 
echo wfMessage('toplists-list-add-item-label')->inContentLanguage()->escaped();
?>
" class="AddButton">
						<img class="osprite icon-add" src="<?php 
echo wfBlankImgUrl();
?>
" alt="<?php 
echo wfMessage('toplists-list-add-item-label')->inContentLanguage()->escaped();
?>
"/>
						<?php 
echo wfMessage('toplists-list-add-item-label')->inContentLanguage()->escaped();
?>
					</button>
					<p class="error"></p>
				</form>
			</li>
	</ul>
	<div class="create-new-list">
		<h5><?php 
echo wfMessage('toplists-create-heading')->inContentLanguage()->parse();
?>
</h5>
		<?php 
echo Wikia::specialPageLink('CreateTopList', 'toplists-create-button-msg', 'wikia-button createtoplist', 'blank.gif', 'toplists-create-button-msg', 'sprite new');
?>
	</div>
</div>
开发者ID:Tjorriemorrie,项目名称:app,代码行数:30,代码来源:list.tmpl.php

示例9: array

<section class="<?= $blogListingClass ?>">
	<?php // only display header block for the BlogListingBox
	if (strpos($blogListingClass, 'WikiaBlogListingBox') !== false) { ?>
	<?= Wikia::specialPageLink('CreateBlogPage', 'blog-create-post-label', 'wikia-button', 'blank.gif', 'blog-create-post-label', 'sprite blog') ?>
	<h3>
		<?= $title ?>
	</h3>
	<?php } // end BlogListingBox header ?>
	<ul>
		<?php
		foreach ($posts as $post) {
			$title = Title::newFromText($post['title'], $post['namespace']);
		?>
			<li class="WikiaBlogListingPost">
				<?= F::app()->renderView('CommentsLikes', 'Index', array('comments' => $post['comments'], 'bubble' => true, 'title' => $title, 'accesskey' => false)); ?>

				<?= $post['avatar'] ?>
				<div class="author-details">
					<h1><a href="<?= htmlspecialchars($title->getLocalUrl()) ?>"><?= htmlspecialchars(BlogTemplateClass::getSubpageText($title)) ?></a></h1>
					<span><?= wfMsg('blog-by', $post['date'], Xml::element('a', array('href' => htmlspecialchars($post['userpage'])), $post['username'], false)) ?></span>
				</div>

				<blockquote>
					<?php
					// handle proper rendering of "read more"
					$readMoreLink = Xml::openElement('span', array('class' => 'read-more')) .
							Wikia::link($title, wfMsg('blog-readfullpost') . ' &gt;') .
							Xml::closeElement('span');

					// if blog post rendered text ends with </p>
					if (!empty($post['readmore'])) {
开发者ID:schwarer2006,项目名称:wikia,代码行数:31,代码来源:BlogListing_Index.php

示例10: wfMsg

<section class="WikiaPagesOnWikiModule module">
	<h2><?php 
echo wfMsg('oasis-pages-on-wiki-header', $wg->Sitename);
?>
</h2>
	<?php 
if (empty($wg->EnableWikiAnswers)) {
    $loginClass = empty($wg->DisableAnonymousEditing) ? '' : ' require-login';
    echo Wikia::specialPageLink('CreatePage', 'oasis-add-page', 'wikia-button createpage' . $loginClass, 'blank.gif', 'oasis-create-page', 'sprite new');
}
?>
	<div class="tally">
		<?php 
echo wfMessage('oasis-total-articles-mainpage', $total)->parse();
?>
	</div>
</section>
开发者ID:Tjorriemorrie,项目名称:app,代码行数:17,代码来源:PagesOnWiki_Index.php

示例11: empty

<header id="WikiaPageHeader" class="WikiaPageHeader<?= (empty($revisions) && empty($categories)) ? ' separator' : '' ?>">
	<h1><?= !empty($displaytitle) ? $title : htmlspecialchars($title) ?></h1>

<?php
	// edit button with actions dropdown
	if (!empty($action)) {
		echo F::app()->renderView('MenuButton', 'Index', array('action' => $action, 'image' => $actionImage, 'dropdown' => $dropdown, 'name' => $actionName));
	}

	// "Add a photo" button
	if (!empty($isNewFiles) && !empty($wg->EnableUploads)) {
		echo Wikia::specialPageLink('Upload', 'oasis-add-photo', (!$isUserLoggedIn ? 'wikia-button upphotoslogin' :'wikia-button upphotos'), 'blank.gif', 'oasis-add-photo-to-wiki', 'sprite photo');
	}

	// "Add a photo" button
	if (!empty($isSpecialVideos) && !empty($wg->EnableUploads)) { ?>
		<a class="button addVideo" href="#" rel="tooltip" title="<?=wfMsg('related-videos-tooltip-add');?>"><img src="<?=wfBlankImgUrl();?>" class="sprite addRelatedVideo" /> <?=wfMsg('videos-add-video')?></a>
	<? }

	// comments & like button
	if( !$isWallEnabled ) {
		echo F::app()->renderView('CommentsLikes', 'Index', array('comments' => $comments, 'likes' => $likes));
	}
	foreach( $extraButtons as $button ){
		echo $button;
	}

	// "pages on this wiki" counter
	if (!is_null($tallyMsg)) {
?>
	<div class="tally">
开发者ID:schwarer2006,项目名称:wikia,代码行数:31,代码来源:PageHeader_IndexV2.php

示例12: wfMsg

    ?>
</span>
					<?php 
    echo wfMsg('themedesigner-previous-versions');
    ?>
					<img class="chevron" src="<?php 
    echo $wg->BlankImgUrl;
    ?>
">
					<ul>
					<?php 
    foreach ($themeHistory as $themeHistoryItem) {
        ?>
						<li>
							<?php 
        echo Wikia::specialPageLink('#', null, 'wikia-chiclet-button', 'blank.gif', 'recycle');
        ?>
							<?php 
        echo wfMsg('themedesigner-history-item', $themeHistoryItem['timeago'], $themeHistoryItem['author']);
        ?>
						</li>
					<?php 
    }
    ?>
					</ul>
				</span>
<?php 
}
//end if
?>
				<button class="save"><?php 
开发者ID:Tjorriemorrie,项目名称:app,代码行数:31,代码来源:ThemeDesigner_Index.php

示例13: wfMsg

        ?>
<li class="watchlist"><?php 
        echo Wikia::specialPageLink('WikiActivity/activity', 'myhome-activity-feed');
        ?>
</li><?php 
    } else {
        ?>
<li class="watchlist"><?php 
        echo Wikia::specialPageLink('WikiActivity/watchlist', 'oasis-button-wiki-activity-watchlist');
        ?>
</li><?php 
    }
}
?>
		<li><?php 
echo Wikia::specialPageLink('RecentChanges', 'oasis-button-wiki-activity-feed');
?>
</li>
	</ul>
<?php 
// render checkbox select default view
if ($showDefaultViewSwitch) {
    ?>
	<p>
		<input type="checkbox" id="wikiactivity-default-view-switch" data-type="<?php 
    echo $type;
    ?>
" disabled="disabled">
		<label for="wikiactivity-default-view-switch"><?php 
    echo wfMsg('myhome-default-view-checkbox', wfMsg("myhome-{$type}-feed"));
    ?>
开发者ID:Tjorriemorrie,项目名称:app,代码行数:31,代码来源:navigation.oasis.tmpl.php

示例14: wfMessage

    ?>
			<?php 
    if (in_array($change['type'], ['new', 'edit', 'delete'])) {
        $message = wfMessage("recent-wiki-activity-{$change['type']}-details")->params(AvatarService::renderLink($change['username']), wfTimeFormatAgoOnlyRecent($change['timestamp']))->text();
    } else {
        $message = wfTimeFormatAgoOnlyRecent($change['timestamp']);
    }
    ?>
			<li>
				<a class="recent-wiki-activity-link" href="<?php 
    echo $change['url'];
    ?>
"><?php 
    echo $change['title'];
    ?>
</a>
				<span><?php 
    echo $message;
    ?>
</span>
			</li>
		<?php 
}
?>
	</ul>

	<?php 
echo Wikia::specialPageLink('WikiActivity', 'recent-wiki-activity-see-more', 'more');
?>
</aside>
开发者ID:Tjorriemorrie,项目名称:app,代码行数:30,代码来源:RecentWikiActivity_index.php


注:本文中的Wikia::specialPageLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。