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

Recent

Welcome to TinyPortal. Please login or sign up.

May 05, 2024, 09:49:22 AM

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

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

FUBAR

No, I'm not using uft8 on my forum.

IchBin

Does it do the same thing in the default theme?

FUBAR

Yeah, it does it with all themes.

ZarPrime

Fubar,

Please Read the Reply to the Posting Guidelines and supply the information requested, including your site url, so that we can help you.

Also, please go to Admin --> Server Settings and tell us what is says for "Default Forum Language".

ZarPrime

javier

Bloc, its possible use your code but keeping the recent topics visible more time?

I mean, in boards with little traffic after 1 or 2 days the latest replys block become empty because no exist new replys.

Exist any solution for avoid that?

Thanks in advance
best regards.

ZarPrime

javier,

If you are using the code in the first post in this topic, that code won't allow you to do that but there is code in this topic that will allow this.  Have you read the whole topic?

Perhaps a post I made a while back will help you with this ---> http://www.tinyportal.net/index.php/topic,596.msg219427.html#msg219427

ZarPrime

Nr|Five

<-- n00b when it comes to modifying code etc.

The first code (first post) is just what I have been looking for. Only 1 thing I'd love to see added (if someone can help me out).

Is the board it was posted on. So basicly like the "recent topics block" but than it will be bigger.

Many thanks in advance

// Nr|Five

ZarPrime

Nr|Five,

Welcome to TinyPortal.

The first post in this topic does not report the board it was posted in but there are several blocks of code throughout this topic that do.

I know it's a long thread but I would suggest starting at the end and working your way back and find one of the blocks of code that will do what you want by trying each one.  I use one of JA Cortina's blocks of code on one of my sites (the one below my Avatar) as a featured front page article and it does what you want.

ZarPrime

Final60

#478
Hey guys
Im using the following code on the first page posted by Bloc.



global $scripturl;

echo '
                       <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
                                ';
       $what=ssi_recentTopics('5', 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>';


There are a couple of issues I have with it. Firstly it doesn't display the new image next to the title of the thread when a new reply has been made.

Also it would be great to have "views" and "Replies" inbetween the title and Author.

Lastly I have the following top posters code which I'd love to have on the end of this recent topics block, on the far right. Ive tried the two bits of code in the same php block and they appear to work together, I just can;t seem to position them correctly next to one another.



$result = ssi_topPoster(5, '');
echo '
<font size="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr><td align="left">Username</td><td align="right">Posts</td></tr>
  <tr><td colspan="2"><hr /></td></tr>';
foreach($result as $data)
  echo  '
  <tr><td align="left">', $data['link'] ,'</td><td align="right">',  $data['posts'] ,'</td></tr>';
echo '

</font>
</table>';



Thanks for any interest in my request.

Paragaya