News:

Wondering if this will always be free?  See why free is better.

Main Menu

Recent Topics On "Recent Posts" Page

Started by Nathaniel, September 22, 2008, 07:20:01 PM

Previous topic - Next topic

Nathaniel

Link to Mod

Recent Topics On "Recent Posts" Page 1.2 by Nathaniel
Overview
This mod replaces the list of recent posts/messages which are displayed for the 'Recent Posts' action with a list of recent/new topics (default) or recently updated topics. The template remains completely the same. It also changes the 'View the most recent posts on the forum.' link in the info center so that it says 'recent topics' or 'recently updated topics' instead of 'recent posts'.

This mod has two modes:
1) 'Recent/New Topics' - Displays a list of the topics which have been created recently, in order of their creation. The first message of each topic will be shown. (default)
2) 'Recently Updated Topics' - Displays a list of the topics which have been recently updated, in order of the the most recent post in each respective topic. The last or most recent message of each topic will be shown.

You can change the mode setting in the admin area:
For SMF 1.1.x: Admin -> Configuration -> Features and Options -> Layout and Options -> "Recent Topics On "Recent Posts" Page mode".
For SMF 2: Admin ->  Configuration -> Modification Settings -> "Recent Topics On "Recent Posts" Page mode".

SMF Version Support
This mod is officially supported for SMF 2.0 and above only. Below is a list of available versions of this mod and the previous versions of SMF that they supported. Use them at your own risk. The mod author will not be supporting or upgrading this mod in any way for versions of SMF below 2.0.

Version 1.1: SMF 1.1.x and versions of SMF 2 below SMF 2 RC4.
Version 1.2: SMF 2 RC4 and above.

Donate
If this mod has helped you, then feel free to support the developer by Donating. Any amount of money is welcome.

Custom Themes Changes:
These edits are only necessary if your custom theme has a 'BoardIndex.template.php' file, otherwise the mod should work automatically. The edits below are applied to your 'BoardIndex.template.php' file.

Code ("Find (SMF 1.1.x)") Select
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>

Code ("Find (SMF 2)") Select
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>

Code ("Replace") Select
<a href="', $scripturl, '?action=recent">', !empty($modSettings['RecentTopicsOnRecentPostsPage_mode']) && $modSettings['RecentTopicsOnRecentPostsPage_mode'] == 'updated' ? $txt['RecentTopicsOnRecentPostsPage_updated_linktext'] : $txt['RecentTopicsOnRecentPostsPage_linktext'], '</a>

Version Changes
v1.2 - 5 November 2010
Updated for SMF 2 RC4.

v1.1 - 20 November 2009
Added support for SMF 2 RC2.
Added the mode changing setting, and the new "Recently Updated Topics" mode as requested by Akyhne.

v1.0 - 18 September 2008
Original Mod release.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

neil h

#1
Great stuff LHVWB!

Installed without a hitch.

One request for v.2 - A 'number of replies' field.

Many, many thanks,

Neil

See it working here: frameforum dot org slash forum3

Nathaniel

I am glad that you like the mod! :D

Its not a bad suggestion, although I don't think that I will add it to the mod because it would have to change the layout of that template (which is a pain). I am however happy to help you change your template if you can tell me exactly where you want it on that page.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

RoarinRow


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

neil h

Quote from: LHVWB on September 23, 2008, 09:02:25 PM
I am glad that you like the mod! :D

Its not a bad suggestion, although I don't think that I will add it to the mod because it would have to change the layout of that template (which is a pain). I am however happy to help you change your template if you can tell me exactly where you want it on that page.

I would put it just after 'Started by XXX'  'Last post by xxx'

like this:
'Started by XXX' : 'Last post by xxx' :  Replies NNN

Is it possible to do this? would be cool!


Nathaniel

@neil h,
Which version of SMF do you have? That should definitely be possible, but the edits will change depending on the version of SMF.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

zaabava


neil h

Quote from: LHVWB on September 24, 2008, 05:05:18 AM
@neil h,
Which version of SMF do you have? That should definitely be possible, but the edits will change depending on the version of SMF.

sorry, my bad. I'm on v.1.16

neil h



gigz09

i dont know why but it seems it doesnt have effect in my forum, im using 1.1.6 with default template.. but it doesnt change at all.. is there any settings do i have to enable for me to use this?

TIA
ONYX is a non-profit, voluntary initiative of Filipino computer, electronics and software engineers. It was launched on July 2007 in Manila, Philippines. The initial idea is to create a broad organization where the Open Source and Open Content volunteers and professionals can exchange their ideas and embark on new initiatives. In the last year after formation ONYX has matured into an independent organization with partnerships with other Open Source based organization and individuals.

Visit ONYX - Pinoy Open Source Technologies

neil h

Quote from: gigz09 on September 27, 2008, 01:39:41 PM
i dont know why but it seems it doesnt have effect in my forum, im using 1.1.6 with default template.. but it doesnt change at all.. is there any settings do i have to enable for me to use this?

TIA

where's your forum?

gigz09

ONYX is a non-profit, voluntary initiative of Filipino computer, electronics and software engineers. It was launched on July 2007 in Manila, Philippines. The initial idea is to create a broad organization where the Open Source and Open Content volunteers and professionals can exchange their ideas and embark on new initiatives. In the last year after formation ONYX has matured into an independent organization with partnerships with other Open Source based organization and individuals.

Visit ONYX - Pinoy Open Source Technologies

neil h

Quote from: gigz09 on September 28, 2008, 07:03:14 PM
here it is:

http://electronicstup.gzxlab.com

I couldn't sign up because I'm not a student, but I'd say you've got 'Recent Posts' switched off in your admin panel. What version of SMF are you using?

Akyhne

#14
I just tried this mod, but it gives me the first post in a topic, not the the newest. Isn't that the idea?

What I'm trying to say is that it shows me the most recent topics, but with the first post of the topic and not the newest post.

Nathaniel

@akyhne,
No, the idea is that it shows a list of the lastest topics that have been posted (thus it shows the first post), not the lastest updated topics. It could however be edited so that it shows the lastest post, or even the 'Most Recently Updated Topics' instead of the 'Most Recent Topics'. I could post the edits if you want, although I will need to know your SMF version.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Akyhne

People are using the most recent posts to view the most recent posts. I think your mod is great because it "hides" all new posts in a topic. I have a forum with a high post count (1.1.6) and people are complaining that there are to many posts to read in the most recent posts.

But they can't use the first post to anything, only the latest. So it would be great if you made the mod to show the latest, or even an option in admin part to choose wether it should show the most recent post of the topic or the first post.

I'll take your code with open arms.

Aky

Nathaniel

Open up your 'Recent.php' file, find the code below:
   $request = db_query("
      SELECT m.ID_MSG
      FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
      WHERE b.ID_BOARD = m.ID_BOARD
         AND m.ID_MSG = t.ID_FIRST_MSG


Replace with this code:
   $request = db_query("
      SELECT m.ID_MSG
      FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
      WHERE b.ID_BOARD = m.ID_BOARD
         AND m.ID_MSG = t.ID_LAST_MSG


Please note, that its still just showing a list of the most recent topics, just with the last post instead of the first post, the edit will be slightly different if you want the 'Most Recently Updated topics'.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Akyhne

Hmm, it must be the 'most recently topics' I'm looking for.

What my users requires is this:
When they visit the "recent posts", they get all the posts. So if a topic has 10 new posts, they are shown. They just want the latest post shown from each topic.

Nathaniel

Thats odd, the code I posted should actually work. It should show the lastest posts, but only the lastest from each topic.... Its amazing what you can archieve by changing a single part of an SQL query. ;)
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Advertisement: