TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 777
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 83
  • Total: 83

Forum News in block

Started by YahMan, December 14, 2005, 10:15:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YahMan

Is it possible to put the forum news in a block instead of somewhere at the top of the page? Like an SSI function?

IchBin

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>';

bloc

There is also the built-in news blocktype....  ;)


bloc


TwinsX2Dad

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.  :)

bloc

Just add the blocktype to your active blocks, and it will simply show random news. ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.