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,970
  • Latest: bynw
Stats
  • Total Posts: 196,061
  • Total Topics: 21,338
  • Online today: 234
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 162
  • Total: 162

SMALL RECENT FORUM TOPICS

Started by brianjw, April 21, 2007, 04:30:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brianjw

INSTRUCTIONS
Place the code below into a "scriptblock" or modify the theme you're using and add it wherever you want. This is viewed best using "center block" type but I think will squeeze into a right or left block as well. :) Remember to save the image below.

CODE
<table border="0" width="100%" height="210" cellspacing="0" cellpadding="0" bgcolor="#24292f" height="210" background="', $settings['images_url'], '/topicbox.png"><tr><td height="1"></td></tr>';
       $what=ssi_recentTopics('6', NULL, 'array');


        foreach ($what as $topic)
        {
                echo ' <tr><td valign="middle" style="padding-left: 3px; padding-right: 2px;" class="headertext" align="left">
                                                <b>&raquo;</b>  ', $topic['link'];

                echo '</td></tr><tr><td style="padding-right: 5px;" class="headertext" align="right">
                                         ';

                echo '

                                                        By: ', $topic['poster']['link'], ' @ ', $topic['time'], '

                                   
                                        </td>
                                </tr>';
        }

        echo '
                        </table>


DOWNLOAD
Download the attached image to this topic and save it in your theme image folder. /Themes/THEME_NAME/images/ Save it as topicbox.png.

DEMO
http://www.gamerzgarage.com/index.php (at the top of the theme)

Brianjw :)

soMzE

Sorry i did exactly what you have explained here but it does not seem to work :(

rebelrose

Quote from: soMzE on May 09, 2007, 08:42:37 PM
Sorry i did exactly what you have explained here but it does not seem to work :(

What are you looking to do exactly? I know a recent post block but what kind, there is one that comes automatic with TP did you want to modify it some way?

soMzE

Quote from: Ã,©RebelRose on May 09, 2007, 09:19:45 PM
Quote from: soMzE on May 09, 2007, 08:42:37 PM
Sorry i did exactly what you have explained here but it does not seem to work :(

What are you looking to do exactly? I know a recent post block but what kind, there is one that comes automatic with TP did you want to modify it some way?

I have tp disabled within the forums only not for the main forum page, but i want my users to view the recent forum topics everywhere they go :)

I viewed this code snippit on BrianJw's page but when i put it is in a script block al i see is code, maybe there is something missing in the script?

IchBin

It doesn't go in a script block. It should go in a phpbox.

soMzE

Quote from: IchBinâ„¢ on May 10, 2007, 07:00:48 AM
It doesn't go in a script block. It should go in a phpbox.

Sorry forgot to mention i tried this as well and the box stays empty :(

Zetan

I tested it last night, I couldn't get it to work. I didn't really have time to play with for ages so I gave up.
It does seem to work at Brians site though.

Svaha

I see a fatal error on the site of Brian, and when I click on a link of the small 'recent topics' block it leads me nowhere, I keep getting only the front page. (maxthon browser with IE6 engine)

IchBin

Looking closer at the code now, sorry I didn't see this before. But it appears that the code is missing quite a few things.
Try this and see if it works.
echo '<table border="0" width="100%" height="210" cellspacing="0" cellpadding="0" bgcolor="#24292f" height="210" background="', $settings['images_url'], '/topicbox.png"><tr><td height="1"></td></tr>';
       $what=ssi_recentTopics('6', NULL, 'array');


        foreach ($what as $topic)
        {
                echo ' <tr><td valign="middle" style="padding-left: 3px; padding-right: 2px;" class="headertext" align="left">
                                                <b>&raquo;</b>  ', $topic['link'];

                echo '</td></tr><tr><td style="padding-right: 5px;" class="headertext" align="right">
                                         ';

                echo '

                                                        By: ', $topic['poster']['link'], ' @ ', $topic['time'], '

                                   
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';

Svaha

This (above) does the job, but it kind of spreads out all over the center (php block) http://www.amevita.eu/forum

This website is proudly hosted on Crocweb Cloud Website Hosting.