How to add topic name after "View the latest post:

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

How to add topic name after "View the latest post:

Postby apeee » Thu Dec 13, 2007 11:50 am

When I hover around a small image file like http://www.phpbb-seo.com/boards/templat ... _reply.gif in your website it shows: View post "with the most current topic on that forum". How to make this happen in phpbb3. As in our phpbb forums it only shows "View the latest post" Please please let us know?
apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am

Advertisement

Postby HB » Thu Dec 13, 2007 12:45 pm

The change involves the constant $lang['View_latest_post'] in the code below from index.php:

Code: Select all
                        $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';


The exact code change depends on whether it's vanilla phpBB or with the phpBB-seo mod installed. In any case, the $lang['View_latest_post'] is replaced with $last_topic_title as shown below:

Code: Select all
                           // Censor Titles
                           $topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $forum_data[$j]['topic_title']) : $forum_data[$j]['topic_title'];
                           // Shorten the topic title
                           $last_topic_title =  ( strlen($topic_title) > 64 ) ? substr($topic_title, 0, 64) . '...' : $topic_title;
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1512
Joined: Mon Oct 16, 2006 2:25 am

Postby apeee » Thu Dec 13, 2007 5:42 pm

I'm using premod RC7. I'm sorry but I really didn't get what you said? Do I just need to change $lang['View_latest_post'] to $last_topic_title in index.php file?
apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am

Postby HB » Thu Dec 13, 2007 5:48 pm

I don't have the code in front of me, but yes, insert the two lines "$topic_title = ..." and "$last_topic_title = ..." above and then modify the "$last_post = ..." statement as I posted.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1512
Joined: Mon Oct 16, 2006 2:25 am

Postby apeee » Sun Dec 16, 2007 3:50 pm

Can it be made similar to http://rophotoshop.com/ it would also be great if such can be added to new up coming phpbb3 seo mod. It can be a good as per the seo aspect.
apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am

Postby apeee » Mon Dec 17, 2007 8:57 pm

apeee
PR0
PR0
 
Posts: 60
Joined: Tue Nov 06, 2007 11:47 am


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 11 guests