phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Link from Last Post Time w/Simple Subforums

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Patches  » Mods and Code
::  
Author Message
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

Link from Last Post Time w/Simple SubforumsPosted: Mon Sep 03, 2007 12:55 pm    Post subject: Link from Last Post Time w/Simple Subforums

My very first mod, ever.

I'm not sure if anyone else has already come up with this. I've searched all over the 'net for it, and I can't seem to find it anywhere else, so I'm posting it here first. Smile

This mod is based on the same principle that A2K uses to link to the last post on index.php. This mod will do the same thing for Simple Subforums 1.0.2 (by pentapenguin) on viewforum.php.

If this is not an original mod, someone please tell me.

Code:
##############################################################
## MOD Title: Link to posts by date on Simple Subforums
## MOD Author: FoxyLoxy http://www.foxymods-phpbb.com
## MOD Description: Fixes the last post display on Simple Subforums to link to
##          the last post instead of the last post author's profile.
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 1 Minute
## Files To Edit: viewforum.php
## Included Files: n/a
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#----[ OPEN ]---------------------------------
#

viewforum.php

#
#----[ FIND ]---------------------------------
#

            $last_post_time = create_date($board_config

['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);


#
#----[ REPLACE WITH ]-------------------------
#

//            $last_post_time = create_date($board_config

['default_dateformat'], $subforum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post_time = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' .

$subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_data[$j]['forum_last_post_id'] . '"

title="' . $lang['View_latest_post'] . '">' . create_date($board_config['default_dateformat'],

$subforum_data[$j]['post_time'], $board_config['board_timezone']) . '</a>';


#
#----[ FIND ]---------------------------------
#

            $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  .

POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_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>';

#
#----[ REPLACE WITH ]-------------------------
#

/*
            $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?"  .

POST_POST_URL . '=' . $subforum_data[$j]['forum_last_post_id']) . '#' . $subforum_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>';
*/

#
#----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



DEMO

Comments? Suggestions?
Back to top
Visit poster's website
Peter77
phpBB SEO Team
phpBB SEO Team


Joined: 10 May 2006
Posts: 512
Location: Michigan

Link from Last Post Time w/Simple SubforumsPosted: Tue Sep 04, 2007 2:37 am    Post subject: Re: Link from Last Post Time w/Simple Subforums

That's a nifty add on. I know about that little patch and actually have it on a test forum. what would be really sweet, if this does actually help to make the link more "interesting" to Search engines, is to have it work with Today-Yesterday Relative Time MOD. Example of what it does to the time is on the 4th post of that link. Smile


:edit:

I took the Mouse hover over post MOD and did it so that the first "x" characters of the last post hovers over the date link Smile . the MOD was developed to show the alt over the Topic title made in viewforum.php.

But Instead of adding

Code:
class="topictitle">{topicrow.TOPIC_TITLE}


in viewforum_body.tpl

I added it in viewforum.php . I took out the tittle= attribute and moved it...

find
Code:
'View_latest_post'] . '">'


and added the title to where you can fit in html.

Code:
'View_latest_post'] . '" title={topicrow.LAST_POST_RESULT}>'


There is extra stuff in there that needs to come out, I know, but I can not figure how to get rid of it without messing it up.

So I have ...

$last_post_time = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $topic_rowset[$i]['topic_last_post_id']) . '#' . $topic_rowset[$i]['topic_last_post_id'] . '""' . $lang['View_latest_post'] . '"title={topicrow.LAST_POST_RESULT}>' . create_date($board_config['default_dateformat'], $topic_rowset[$i]['post_time'], $board_config['board_timezone']) . '</a>';

:edit: edit to add that I had to take out title= because other wise with Fire Fox I was getting {topicrow.LAST_POST_RESULT} in the preview and it looked ugly.

I have it showing the latest post thanks to this little fix
http://www.phpbb.com/community/viewtopic.php?p=1805270#p1805270

But probably better to show the first post's content...



So it needs some cleaning. We should have a phpbb-seo.com version with these ideas Smile . This forum has something similar.


Last edited by Peter77 on Thu Nov 01, 2007 12:19 am; edited 2 times in total
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Link from Last Post Time w/Simple SubforumsPosted: Tue Sep 04, 2007 9:37 am    Post subject: Re: Link from Last Post Time w/Simple Subforums

Thanks for sharing Wink

Displaying the last post date is for sure a bit more user and bot friendly. I don't think though that displaying all of the post content on mouse over these link is this wise. Because it makes the pages heavier and could be taken a spam indexing (too long title tags).

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
coyote
phpBB SEO Team
phpBB SEO Team


Joined: 11 May 2007
Posts: 72

Link from Last Post Time w/Simple SubforumsPosted: Tue Sep 04, 2007 9:41 pm    Post subject: Re: Link from Last Post Time w/Simple Subforums

Peter77 wrote:
That's a nifty add on. I know about that little patch and actually have it on a test forum. what would be really sweet, if this does actually help to make the link more "interesting" to Search engines, is to have it work with Today-Yesterday Relative Time MOD.


YES, I agree! Alternatively, I would also like to figure out how to get topic titles to display on the simple subforums. Not as bot friendly, but more user friendly for sure. The supreme mod would be to figure out how to make all that configurable through the ACP. To be able to link via date or topic title per forum, whichever you choose.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Link from Last Post Time w/Simple SubforumsPosted: Wed Sep 05, 2007 10:46 am    Post subject: Re: Link from Last Post Time w/Simple Subforums

That's pretty much what the today at yesterday at mod would do. It costs an extra join in index, but it's not that much in most cases.
If I recall well, there is an add on for the sub forum mod to work with the today at yesterday at mod as well.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Patches  » Mods and Code
Page 1 of 1

Navigation Similar Topics

Jump to: