TinyPortal
Development => Support => Topic started by: YahMan on December 14, 2005, 10:15:43 PM
Is it possible to put the forum news in a block instead of somewhere at the top of the page? Like an SSI function?
You should be able to put something like this in a phpbox. Just copied it out of the techhead theme. Any problems let me know.
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '<table cellspacing="0" cellpadding="0" border="0" width="100%" style="padding: 0px;"><tr><td style="width: 12px;" valign="top">
<img src="' .$settings['images_url']. '/mydot2.gif" alt="*" border="0" style="margin: 2px;" /><br />
</td><td valign="top" style="padding-left: 8px;padding-right: 8px;">
<div style="text-align: left; overflow: auto; height: 60px;" class="smalltext">', $context['random_news_line'], '
</div></td></tr></table>';
There is also the built-in news blocktype.... ;)
:uglystupid2:
:D lol
Quote from: Bloc on December 16, 2005, 10:58:19 AM
There is also the built-in news blocktype.... ;)
I can't seem to get that to work.
Instead, since I have a number of themes and I don't want to be changing settings on all of them, I placed this in a phpbox:
echo '<table cellspacing="0" cellpadding="0" border="0" width="100%" style="padding: 0px;"><tr><td style="width: 12px;" valign="top">
</td><td valign="top" style="padding-left: 8px;padding-right: 8px;">
<div style="text-align: left; overflow: auto; height: 100px;" class="smalltext">', $context['random_news_line'], '
</div></td></tr></table>';But if using a news blocktype is better, I'd be thrilled to get an explanation drilled into my thick skull. :)
Just add the blocktype to your active blocks, and it will simply show random news. ;)