| :: |
| Author |
Message |
j.buesking
Joined: 16 Sep 2007 Posts: 1
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sun Nov 18, 2007 12:50 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
Yes, the thread you mention provided the hack for the older phpBB mod rewrite versions.
For the 0.2.x ones, you should :
Open :
Find :
| Code: | if (!$auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
{
$lttitle = '';
$lang_in = '';
}
// append first 25 characters of topic title to last topic data
$lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />'; |
Replace with :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
{
if (!isset($phpbb_seo->seo_url['topic'][$ltid]) ) {
$phpbb_seo->seo_url['topic'][$ltid] = $phpbb_seo->format_url($lttitle);
}
// append first 25 characters of topic title to last topic data
$lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
}
// www.phpBB-SEO.com SEO TOOLKIT END |
And it should be ok  |
_________________ 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 |
|
 |
hoaxx
Joined: 07 Dec 2007 Posts: 6
|
Posted: Sun Dec 09, 2007 7:12 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
The Last Topic Title on Index Mod also has a patch for the Simple Subforums Mod.
To make that work with advanced seo 2.x one needs to apply the following:
| Code: | #
#---[ Open ]-----------------
#
viewforum.php
#
#---[ Find ]-----------------
#
if (!$auth_read_ary[$subforum_data[$j]['forum_id']]['auth_read'])
{
$lttitle = '';
$lang_in = '';
}
// undo_htmlspecialchars();
$lttitle = preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $lttitle);
// do_htmlspecialchars();
// set length of topic title to 25 characters
$lttitle = preg_replace($html_entities_match, $html_entities_replace, (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle);
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
#
#---[ Replace with ]-----------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($auth_read_ary[$subforum_data[$j]['forum_id']]['auth_read'])
{
if (!isset($phpbb_seo->seo_url['topic'][$ltid]) ) {
$phpbb_seo->seo_url['topic'][$ltid] = $phpbb_seo->format_url($lttitle);
}
// append first 25 characters of topic title to last topic data
$lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
}
// www.phpBB-SEO.com SEO TOOLKIT END
|
|
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3103
|
Posted: Sun Dec 09, 2007 8:46 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
Thanks for sharing  |
_________________
|
|
| Back to top |
|
 |
hoaxx
Joined: 07 Dec 2007 Posts: 6
|
Posted: Tue Dec 25, 2007 2:28 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
| The "Last Topic Title on Index" Mod seems to have a quite troublesome sql statement... on some larger boards it produces 4-6 Second querries when loading the index page... hopefully this will get some attention from the mod author (or some sql pro) soon. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3103
|
Posted: Tue Dec 25, 2007 3:31 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
Could be just an index to add on the topic_last_post_id field.
I saw the same error on the phpBB3 version of this mod (by the way not needed with the no duplicate for phpBB3). |
_________________
|
|
| Back to top |
|
 |
hoaxx
Joined: 07 Dec 2007 Posts: 6
|
Posted: Tue Dec 25, 2007 7:38 pm Post subject: Re: phpBB Seo for Last Topic Title on Index mod? |
|
|
I can confirm that. Works great again (even better then before without the topic titles).
Many thanks ! |
|
|
| Back to top |
|
 |
|
|