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

Recent

Welcome to TinyPortal. Please login or sign up.

May 20, 2024, 07:54:41 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,195
  • Total Topics: 21,220
  • Online today: 144
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 52
  • Total: 52

"recent topics" in SMF style

Started by Lesmond, August 17, 2005, 12:01:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Innocenzia

Hi everyone,

Type=started is what I've been looking for, however i want all my users to be able to see their own, as it is now only the "Admin" can see it, and I can't figure out how to get it to work for the members as well, as it is now everyone is going to ask me to check their threads for them, and it's going to drive me insane.

I'm now using the one J.A.Cortina has posted on page 38. Is it possible to make started viewable for all members?

failquail

Is there a way to make it actually mark topics as read when clicked?

This is for the first code block.

IchBin

If you refresh the page does the list of topics change/update?

alhaudhie


2inchpvc

#394
I used the code from below for this block and tried the board specific code given, but it still lists from EVERY board not just the ones specified, is there something I am doing wrong?? Plus if I remove the "NULL," it works but the background for it dissapears.




  global $scripturl;

echo '
                        <table border="0" width="100%" cellspacing="0" cellpadding="4">
                               <tr>
    <td colspan="3" class="titlebg">Recently Posted To Topics (see Forum for more!!)</td>
  </tr> ';
       $what=ssi_recentTopics('15', NULL, array('30','1','11','2','41','53','3','51','54','37','4','10','7','12','14','5','33','34','36','32','35','40','20','18','6','15','21','22','23','24'));


        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['time'], '#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 '
                                                <span class="smalltext3">
                                                        ', $topic['time'], '
                                                </span>
                                        </td>
                                </tr>';
        }

        echo '
                        </table>';


IchBin

The boards you put in there are boards you want to exclude.

2inchpvc

Quote from: IchBinâ,,¢ on April 14, 2008, 11:14:20 PM
The boards you put in there are boards you want to exclude.

But it doesn't work unless you remove the "NULL" and then when you do that you lose the background for the block.  ????

2inchpvc

Quote from: 2inchpvc on April 15, 2008, 12:56:42 AM
Quote from: IchBinâ,,¢ on April 14, 2008, 11:14:20 PM
The boards you put in there are boards you want to exclude.

But it doesn't work unless you remove the "NULL" and then when you do that you lose the background for the block.  ????

bump

IchBin

You are using the function wrong. Where you put null, is where you should have the array of boards that you want to exclude.
ssi_recentTopics(15, array(1,2,3,4,5,9,15), 'array')

alhaudhie

Quote from: alhaudhie on February 06, 2008, 03:35:35 AM
i think there is a nice way to show recent post in center block like phpfusion one
http://www.phpfusion-themes.com/news.php   

hope someones can make it for tpblock in smf.

anybody can do this?