Skip to content

Commit

Permalink
Merge pull request #610 from emanuele45/news
Browse files Browse the repository at this point in the history
News
  • Loading branch information
emanuele45 committed Jul 4, 2013
2 parents e46e34e + 1b6f05c commit 647342c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
15 changes: 2 additions & 13 deletions sources/admin/ManageNews.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function action_editnews()
$listOptions = array(
'id' => 'news_lists',
'get_items' => array(
'function' => 'list_getNews',
'function' => 'getNews',
),
'columns' => array(
'news' => array(
Expand Down Expand Up @@ -922,15 +922,4 @@ public function settings()

return $config_vars;
}

/**
* Prepares an array of the forum news items for display in the template
* Callback for createList()
*
* @return array
*/
function list_getNews()
{
return getNews();
}
}
}
10 changes: 6 additions & 4 deletions themes/default/BoardIndex.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,13 @@ function template_news_fader()
', $txt['news'], '
</h2>';

// Just use a basic paragraph here, as only one news item is shown at a time.
// No, here we need a list because the fade uses the list to split the items.
echo '
<p id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>
', implode($context['news_lines']), '
</p>
<ul id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>
<li>
', implode('</li><li>', $context['news_lines']), '
</li>
</ul>
</div>
<script src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script><!-- // --><![CDATA[
Expand Down

0 comments on commit 647342c

Please sign in to comment.