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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 240
  • Total: 240

"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.

ZarPrime

Quote from: zapiy on October 27, 2009, 08:32:04 PM
Zarprime...

This is proper strange, after reinstalling the whole site the other day i added TP1.0 beta 4 then 2 themes and no other mods..

Then i activated the Recent posts block that comes with TP and the posts just keep repeating themselves ie all the same.. If i hit the 'Mark ALL messages as read' link then go back to the frontpage its all good but soon as i read one of them it all goes whacko again..

Tried this on a m8's site and his works fine.

Cheers

zapiy,

I'd like you to do something for me.  Please setup a test site with a totally new install (new database) and have your Admins and Moderators, and anyone else you want, to join the test site and start posting.  Meanlingness posts are OK since it's just a test site.  Set it up exactly like you have you current site set up with the same blocks, etc. and see if the same thing happens on the test site.  Make sure you install SMF, then TP, then your 2 themes, in that order.  If it happens on the test site, then it obviously has something to do with your host.  If the same problems with the recent topics don't occur then it is obviosly your database.  Once you have done this, we can decide what to do next.

ZarPrime

zapiy

Jim,

I just went for it last night and exported the default tables and imported them to a new database....And guess what all seems to work..

Wondered if you would help me with some errors i now have since..

Thanks fella

ZarPrime

Sure, we can help you with those, but for now, let's take it out of this topic.  Why don't you start a new topic in the support board for the errors and let's see what we can do to get you fixed up.  That will move us away from having further discussions about the code from the OP in this topic and place the emphasis on your errors.  It will also allow others to help out if they choose to do so, since most of them, except Ichbin that is, had no idea what we've been discussing on your problems.

First, post a new topic in the support board, and follow the posting guidelines so that everybody will know where your site is and we can go from there.

ZarPrime

zapiy

Using your recent code you post earlier and i seem to have some issues..

Are they just the way its setup?

ZarPrime

#544
zapiy,

What issues?  I'll see if I can get some time a little later today to take a look at your site and see if I can figure out what you mean.

ZarPrime

Edit:  OK, I went ahead and looked at your site.  The same thing is happening with the recent topics function that was happening before (take a look at the attached image).  At this point, I think you need to go over to SMF and ask them why this is happening on your site and what can be done to fix it.

ZarPrime

zapiy

Is very annoying and strange this seems to only ever happened to me..  I have asked bigguy to look into it for me as i hope we can sort it.

uniektekniek

hey all.. nice script... but i cant seem to get the targeted boards working.. its still showing the most recent topics from the whole forum rather than just selected boards

what am I doing wrong?


       
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', array('1','112','47','52','36','49','37','51','192','8') , '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>';

IchBin

The boards you put in the array are boards that are excluded. You need to put the boards in the array that you don't want recent topics to come from. Or pick another recentTopics code snippet that does what you want.

uniektekniek

ah excellent... thats actually way easier for me... as you can probably tell my forum is fair large... theres only really 3 boards i wanna hide...

thanks for your help!

uniektekniek

one last quick question... is it possible to set this so the threads stay showing for more than 10 hours or so? eg the last 10 threads no matter how long ago it was?

This website is proudly hosted on Crocweb Cloud Website Hosting.