[RFC|Merged] Last topic title in forum list
Re: [RFC|Merged] Last topic title in forum list
Tried that code. It's not intuitive to users because the last post is text instead of a link. Any way to get this version working before 3.1?
- Pony99CA
- Registered User
- Posts: 986
- Joined: Sun Feb 08, 2009 2:35 am
- Location: Hollister, CA
- Contact:
Re: [RFC|Merged] Last topic title in forum list
If you want a phpBB 3.0 MOD, you should probably ask on the Support board. If you want a core change made to phpBB 3.0, you could try the 3.x RFC forum, but good luck -- phpBB 3.0 is feature frozen.
Steve
Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
- DionDesigns
- Registered User
- Posts: 51
- Joined: Sat Apr 21, 2012 4:29 am
- Location: Uncertain due to momentum
- Contact:
Re: [RFC|Merged] Last topic title in forum list
Find this line inKnocksX wrote:Guys, is there a quick hack I can use to integrate this into a live forum while the final code is being straightened out?
includes/functions_display.php
:Code: Select all
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
Code: Select all
'LAST_POST_DDSUBJECT' => (utf8_strlen(censor_text($last_post_subject)) > 24) ? utf8_substr(censor_text($last_post_subject), 0, 24) . '...' : censor_text($last_post_subject),
forumlist_body.html
:Code: Select all
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
Code: Select all
<!-- IF forumrow.LAST_POST_TIME --><strong><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LAST_POST_DDSUBJECT}</a></strong><br /><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
Re: [RFC|Merged] Last topic title in forum list
That's basically the same thing as the KB article, just with the added
strong
and a href
tags. - DionDesigns
- Registered User
- Posts: 51
- Joined: Sat Apr 21, 2012 4:29 am
- Location: Uncertain due to momentum
- Contact:
Re: [RFC|Merged] Last topic title in forum list
My modification also adds a tooltip to display the full topic title on hover, which is how this board works. That feature is not in the KB, and it's why a line is being added in
I also increased the cutoff length to a more usable 24 characters. This board uses 29 characters, which is fine if there are few capitalized letters in the title, but it's better to be safe than sorry.
includes/functions_display.php
as opposed to being replaced.I also increased the cutoff length to a more usable 24 characters. This board uses 29 characters, which is fine if there are few capitalized letters in the title, but it's better to be safe than sorry.
Re: [RFC|Merged] Last topic title in forum list
Which is another reason why "Re: " should not be used as it adds 4 extra characters.DionDesigns wrote: I also increased the cutoff length to a more usable 24 characters. This board uses 29 characters, which is fine if there are few capitalized letters in the title, but it's better to be safe than sorry.
- nickvergessen
- Former Team Member
- Posts: 733
- Joined: Sun Oct 07, 2007 11:54 am
- Location: Stuttgart, Germany
- Contact:
Re: [RFC|Merged] Last topic title in forum list
for 3.0 there is a mod called NV advanced last topic titles which has several config vars for this. You could use that as long as you have 3.0
Member of the Development-Team — No Support via PM
- DionDesigns
- Registered User
- Posts: 51
- Joined: Sat Apr 21, 2012 4:29 am
- Location: Uncertain due to momentum
- Contact:
[RFC|Merged] Last topic title in forum list
Well, then get rid of it! Find this code inKnocksX wrote:Which is another reason why "Re: " should not be used as it adds 4 extra characters.
includes/functions_display.php
:Code: Select all
$last_post_subject = $row['forum_last_post_subject'];
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
Code: Select all
if (utf8_substr($row['forum_last_post_subject'], 0, 4) == 'Re: ')
{
$last_post_subject = utf8_substr($row['forum_last_post_subject'], 4);
}
else
{
$last_post_subject = $row['forum_last_post_subject'];
}
$last_post_time = $user->format_date($row['forum_last_post_time']);
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
posting.php
that adds it in the first place. IMO it is an archaic term that adds nothing...well, nothing other than four characters in the title that could be put to better use. (Actually I'd like to see the subject removed entirely from replies, and have all replies inherit the topic title.)