Advertisement:
NameCheap

Author Topic: Recent Topics On "Recent Posts" Page  (Read 26104 times)

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Recent Topics On "Recent Posts" Page
« on: September 22, 2008, 07:20:01 PM »
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.
« Last Edit: June 16, 2011, 02:01:07 AM by Nathaniel »
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.

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #1 on: September 23, 2008, 07:36:05 AM »
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
« Last Edit: September 24, 2008, 06:51:06 AM by neil h »

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Recent Topics On "Recent Posts" Page
« Reply #2 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.
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.

Offline RoarinRow

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
  • Ride my AV!
    • Avalanche Style
Re: Recent Topics On "Recent Posts" Page
« Reply #3 on: September 23, 2008, 11:54:38 PM »
cool, gotta try this out   8)

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #4 on: September 24, 2008, 02:46:20 AM »
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!


Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Recent Topics On "Recent Posts" Page
« Reply #5 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.
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.

Offline zaabava

  • Semi-Newbie
  • *
  • Posts: 96
Re: Recent Topics On "Recent Posts" Page
« Reply #6 on: September 24, 2008, 05:14:24 AM »
Photos Modn ,plesase

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #7 on: September 24, 2008, 06:48:23 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

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #8 on: September 24, 2008, 06:49:36 AM »
« Last Edit: September 24, 2008, 07:18:10 AM by neil h »

Offline zaabava

  • Semi-Newbie
  • *
  • Posts: 96
Re: Recent Topics On "Recent Posts" Page
« Reply #9 on: September 24, 2008, 07:52:21 AM »
Thenks!!

Offline gigz09

  • Jr. Member
  • **
  • Posts: 102
  • Gender: Male
    • GZX Laboratory
Re: Recent Topics On "Recent Posts" Page
« Reply #10 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
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

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #11 on: September 28, 2008, 04:05:48 AM »
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?

Offline gigz09

  • Jr. Member
  • **
  • Posts: 102
  • Gender: Male
    • GZX Laboratory
Re: Recent Topics On "Recent Posts" Page
« Reply #12 on: September 28, 2008, 07:03:14 PM »
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

Offline neil h

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
    • frameforum
Re: Recent Topics On "Recent Posts" Page
« Reply #13 on: September 29, 2008, 03:01:03 AM »
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

  • Guest
Re: Recent Topics On "Recent Posts" Page
« Reply #14 on: October 02, 2008, 06:56:03 AM »
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.
« Last Edit: October 02, 2008, 07:00:35 AM by akyhne »

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Recent Topics On "Recent Posts" Page
« Reply #15 on: October 02, 2008, 07:06:38 AM »
@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

  • Guest
Re: Recent Topics On "Recent Posts" Page
« Reply #16 on: October 02, 2008, 07:19:51 AM »
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

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Recent Topics On "Recent Posts" Page
« Reply #17 on: October 02, 2008, 07:39:25 AM »
Open up your 'Recent.php' file, find the code below:
Code: [Select]
   $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:
Code: [Select]
   $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

  • Guest
Re: Recent Topics On "Recent Posts" Page
« Reply #18 on: October 02, 2008, 07:46:24 AM »
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.

Offline Nathaniel

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,117
  • Gender: Male
    • Verbtest.com
Re: Recent Topics On "Recent Posts" Page
« Reply #19 on: October 02, 2008, 08:01:51 AM »
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.