How to display last post TITLE in forum list

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
apolyonn
Registered User
Posts: 2
Joined: Fri Aug 27, 2010 12:07 pm

How to display last post TITLE in forum list

Post by apolyonn »

One crucial element of most message boards is displaying the title of the last post title in any particular forum on the forum list. I've noticed phpBB, great as it is, does not have this feature. I'd like to know how to work around this. I am using a custom skin, not prosilver or subsilver.

djinvincible74
Registered User
Posts: 33
Joined: Mon Aug 09, 2010 7:34 pm
Location: Rochester, NY

Re: How to display last post TITLE in forum list

Post by djinvincible74 »

I'm curious as to how to accomplish this too.
Check out the NEW Hall of Justice Forums at:

http://www.hojforums.com/phpbb/index.php

apolyonn
Registered User
Posts: 2
Joined: Fri Aug 27, 2010 12:07 pm

Re: How to display last post TITLE in forum list

Post by apolyonn »

I see this as important enough to bump. it would be very useful to everyone if we could find a fix.

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: How to display last post TITLE in forum list

Post by marian0810 »

You and me, time and space. You watch us run!

Rudeman72
Registered User
Posts: 64
Joined: Fri Nov 16, 2007 6:28 am
Contact:

Re: How to display last post TITLE in forum list

Post by Rudeman72 »

The mod above works fine, if you want to display the last topic title (Topic name instead of re: ....) here's how to do it. Make sure to backup files before making any changes in case you make a mistake.

------------------------------------------------------------------

First:
Open includes/functions_display.php

------------------------------------------------------------------

Look for

Code: Select all

if ($show_active)
Replace it with:

Code: Select all

$sql_array['LEFT_JOIN'][] = array('FROM' => array(TOPICS_TABLE => 't'), 
          'ON' => 'f.forum_last_post_id = t.topic_last_post_id'); 
          $sql_array['SELECT'] .= ', t.topic_id, t.topic_title'; 
           
	if ($show_active)
------------------------------------------------------------------

then look for:

Code: Select all

$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
replace it with:

Code: Select all

$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
                        $forum_rows[$parent_id]['topic_id'] = $row['topic_id']; 
                        $forum_rows[$parent_id]['topic_title'] = $row['topic_title'];
------------------------------------------------------------------

then look for

Code: Select all

$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
replace it with:

Code: Select all

$forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
                                $forum_rows[$parent_id]['topic_id'] = $row['topic_id']; 
                                $forum_rows[$parent_id]['topic_title'] = $row['topic_title'];
------------------------------------------------------------------

then look for:

Code: Select all

'SUBFORUMS' => $s_subforums_list,
replace it with:

Code: Select all

'SUBFORUMS'				=> $s_subforums_list,
                        'LATEST_TOPIC_TITLE_SHORT' => (utf8_strlen($row['topic_title'])> 16) ? truncate_string($row['topic_title'], 15) . "\xE2\x80\xA6" : ($row['topic_title']), 
                        'LATEST_TOPIC_TITLE_FULL' => censor_text($row['topic_title']), 
                        'U_FIRST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']),
------------------------------------------------------------------

then look for:

Code: Select all

if ($return_moderators)
and replace it with:

Code: Select all

 $template->assign_vars(array('S_LTT' => $config['ltt_url']));
	if ($return_moderators)
After that save the file.

------------------------------------------------------------------
****If you're using prosilver****

Then open stlyes/prosilver/template/forumlist_body.html

Find:

Code: Select all

<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
after add:

Code: Select all

<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LATEST_TOPIC_TITLE_SHORT}</a><br />
Then save.
------------------------------------------------------------------
****If you're using subsilver2****

Then open stlyes/subsilver2/template/forumlist_body.html

Find:

Code: Select all

<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
before add:

Code: Select all

<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LATEST_TOPIC_TITLE_SHORT}</a></p>
then save.
------------------------------------------------------------------

That should work.

Here's a screen shot of Subsilver:
Image

Here's a screen shot of prosilver:
Image

Hope that helps.

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: How to display last post TITLE in forum list

Post by marian0810 »

Rudeman72 wrote:The mod above works fine, if you want to display the last topic title (Topic name instead of re: ....) here's how to do it.
Or you just check the box in your acp to do the same thing ;)
You and me, time and space. You watch us run!

Rudeman72
Registered User
Posts: 64
Joined: Fri Nov 16, 2007 6:28 am
Contact:

Re: How to display last post TITLE in forum list

Post by Rudeman72 »

marian0810 wrote:
Rudeman72 wrote:The mod above works fine, if you want to display the last topic title (Topic name instead of re: ....) here's how to do it.
Or you just check the box in your acp to do the same thing ;)
Never installed the mod myself, just know that it's worked for others. I use the edits I posted above for my forum.

I guess I could have read the description of the mod. :lol:

djinvincible74
Registered User
Posts: 33
Joined: Mon Aug 09, 2010 7:34 pm
Location: Rochester, NY

Re: How to display last post TITLE in forum list

Post by djinvincible74 »

marian0810 wrote:
Rudeman72 wrote:The mod above works fine, if you want to display the last topic title (Topic name instead of re: ....) here's how to do it.
Or you just check the box in your acp to do the same thing ;)


Where exactly is this box in my acp?
Check out the NEW Hall of Justice Forums at:

http://www.hojforums.com/phpbb/index.php

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: How to display last post TITLE in forum list

Post by marian0810 »

It's part of that same mod, so it should be on your .MODS tab.
You and me, time and space. You watch us run!

Locked

Return to “[3.0.x] MOD Requests”