Ejemplo n.º 1
0
	<?= 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'])) {
						if (substr($post['text'], -4) == '</p>') {
							$post['text'] = substr($post['text'], 0, -4) . '<br>' . $readMoreLink . '</p>';
						} else {
Ejemplo n.º 2
0
    ?>
	<ul class="list">
	<?php 
    foreach ($aRows as $pageId => $aRow) {
        $oTitle = Title::newFromText($aRow['title'], $aRow['namespace']);
        $isVoting = 0;
        if (isset($aRow['props']) && array_key_exists('voting', $aRow['props'])) {
            $isVoting = $aRow['props']['voting'];
        }
        ?>
		<li class="list">
		<div class="wk_blogs_link"><a href="<?php 
        echo $oTitle->getLocalUrl();
        ?>
"><?php 
        echo BlogTemplateClass::getSubpageText($oTitle);
        ?>
</a></div>
		<?php 
        /* s: TIMESTAMP */
        if (!empty($aOptions['timestamp'])) {
            $sUserLinks = '';
            if ($wgTitle->getNamespace() != NS_BLOG_ARTICLE) {
                $aUserLinks = BlogTemplateClass::getUserNameRecord($aRow['username']);
                if (!empty($aUserLinks)) {
                    $sUserLinks = $aUserLinks['userpage'] . ' (' . $aUserLinks['talkpage'] . '|' . $aUserLinks['contribs'] . ')';
                }
            }
            ?>
		<div class="wk_date"><span class="left"><?php 
            echo $wgLang->date($aRow['rev_timestamp'], true);
Ejemplo n.º 3
0
    $title = Title::newFromText($post['title'], $post['namespace']);
    ?>
			<li class="WikiaBlogListingPost">
				<?php 
    echo F::app()->renderView('CommentsLikes', 'Index', array('comments' => $post['comments'], 'bubble' => true, 'title' => $title, 'accesskey' => false));
    ?>

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

				<div class='post-summary'>
					<?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 (substr($post['text'], -4) == '</p>') {
        $post['text'] = substr($post['text'], 0, -4) . '<br>' . $readMoreLink . '</p>';