Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

News #610

Merged
merged 2 commits into from Jul 4, 2013
Merged

News #610

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 2 additions & 13 deletions sources/admin/ManageNews.php
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
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