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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,026
  • Total Topics: 21,333
  • Online today: 916
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 453
  • Total: 453

last post from a board

Started by metal13, January 16, 2007, 06:05:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

metal13

does anyone have this code? last 5 or more post from a board? like the front page of tp? how do i get the code of that?  :) ::)

JPDeni

How would you decide which board is displayed?

IchBin

Look at the recent topics code taht block has posted in this forum. You can find it in the index post stickied at the top. You can exclude any boards that you don't want recent_Topics to pick up.

metal13

hmm ok ill search for it, thanks

metal13

is this the code for it? how do i use it only for one board? like i only want to show the recent topics from board 58

       
global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                               <tr><td colspan="3" class="titlebg">Recent topics</td></tr> ';
       $what=ssi_recentTopics('8', NULL, 'array');


        foreach ($what as $topic)
        {
                echo '
                                <tr>
                                        <td class="windowbg" valign="middle">
                                                ', $topic['link'];

                // Is this topic new? (assuming they are logged in!)
                if (!$topic['new'] && $context['user']['is_logged'])
                        echo '
                                                <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

                echo '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="20%">
                                                ', $topic['poster']['link'], '
                                        </td>
                                        <td class="windowbg2" valign="middle" width="35%">';
                if ($settings['images_url'] != $settings['theme_url'] . '/images' || file_exists($settings['theme_dir'] . '/images/icons/last_post.gif'))
                        echo '
                                        <a href="', $topic['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" border="0" style="float: right;" /></a>';
                echo '
                                                <span class="smalltext">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';

metal13

ohh ok, no need.. its the "8" right... ill try it out

metal13

i tried this code but it did not work..
       $what=ssi_recentTopics('8', array('429','430','431','432') , 'array');


i want to get the recent topics from the child boards  this board
http://www.pinoystream.net/pt/index.php/board,426.0.html

help please...



JPDeni

In the $what line array, you list the boards you don't want to include.

metal13

hmmm... is there a code only for a single board? coz i have like 400+ boards on my forum.. hehe.. i cant do that...  any more codes please?...


This website is proudly hosted on Crocweb Cloud Website Hosting.