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

Recent

Welcome to TinyPortal. Please login or sign up.

May 19, 2024, 12:02:46 AM

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

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

Blue Steel

could it be in the settings for SMF's recent topics  its self thats lower than the settings in your block ??? just guessing

RoarinRow

Quote from: BlueSteel on June 01, 2006, 01:41:55 PM
could it be in the settings for SMF's recent topics  its self thats lower than the settings in your block ??? just guessing


Thanks, but that didn't do it  :o

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

jcortina

I'm pretty sure that The RecentTopics function in SSI only searches for topics within the last X number of posts (where X is a function of the number of topics requested; something like 20 or 25 times that number; uses a WHERE clause like msg_id > (last_msg - X) ).

So (assuming 25 is the number used) asking for 35 topics will return up to 35 topics which were found in the last 875 (25x35) posts. It won't keep seeking backwards until 35 are found to return.

RoarinRow

Quote from: jcortina on June 02, 2006, 03:40:31 PM
I'm pretty sure that The RecentTopics function in SSI only searches for topics within the last X number of posts (where X is a function of the number of topics requested; something like 20 or 25 times that number; uses a WHERE clause like msg_id > (last_msg - X) ).

So (assuming 25 is the number used) asking for 35 topics will return up to 35 topics which were found in the last 875 (25x35) posts. It won't keep seeking backwards until 35 are found to return.

Ah ok. that explains it, thank you!

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

deniz

is it possible to show limited characters in subject field.

for example original subject: "is it possible to show limited characters in subject field"

limited characters in subject: "is it possible to show limi..."

thx.

jcortina

Instead of using $topic['subject'] in the code given, use $topic['short_subject'].

That's a shortened version of only 25 characters (not sure right now if that's 25 with or without the ellipsis '...').


deniz

there is no "$topic['subject']" in script ???

jcortina

Sorry. $topic['link'] has the full length subject embedded in it. It is this line:



    echo '<tr><td class="windowbg" valign="middle">', $topic['link'];



Try replacing that with:



    echo '<tr><td class="windowbg" valign="middle"><a href="' . $topic['href'] . '">' . $topic['short_subject'] . '</a>';


RoarinRow

Is it possible to make the Recent Topics view similar to the Unread Topics view. 

I would really like the 'Replies' and 'Views' columns in-between the 'Poster' and 'Time' columns.

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Techdomain

try adding:


<td class="windowbg2" valign="middle" width="10%">
                                                ', $topic['replies']['link'], '
                                        </td>
<td class="windowbg2" valign="middle" width="10%">
                                                ', $topic['views']['link'], '
                                        </td>

in there. you may have to fiddle with the percents, and possibly find out what the function calls for replies and views actually are (though logic tells me they would be called just that)