Okay, lol, could have found this one
So, I had a brief look up of the phpBB Fecht all script, and it is quite strange it is not using the append_sid function in its functions.
And if I get it well, this script is meant to be customised by users.
So in the end the changes to make could be different for different set up.
So for the released portal.php in the example folder of the 2.0.15 release, try this :
Open :
example/portal.php
Find :
- Code: Select all
<?php $last_cat = $forums[$i]['cat_id']; ?>
<tr>
<td class="catLeft" colspan="3" height="28"><span class="cattitle"><a href="<?php echo append_sid($phpbb_root_path . 'index.php?c=' . $forums[$i]['cat_id']); ?>" class="cattitle"><?php echo $forums[$i]['cat_title']; ?></a></span></td>
</tr>
<?php } ?>
Replace with :
- Code: Select all
<?php $last_cat = $forums[$i]['cat_id']; ?>
<tr>
<td class="catLeft" colspan="3" height="28"><span class="cattitle"><a href="<?php echo append_sid($phpbb_root_path . make_url_friendly($forums[$i]['cat_title']) . '-vc' . $forums[$i]['cat_id']); ?>" class="cattitle"><?php echo $forums[$i]['cat_title']; ?></a></span></td>
</tr>
<?php } ?>
Find :
- Code: Select all
<tr>
<td class="row1" align="left" width="100%">
<span class="forumlink">
<a href="<?php echo append_sid($phpbb_root_path . 'viewforum.php?f=' . $forums[$i]['forum_id']); ?>" class="forumlink"><?php echo $forums[$i]['forum_name']; ?></a><br />
Replace with :
- Code: Select all
<tr>
<td class="row1" align="left" width="100%">
<span class="forumlink">
<a href="<?php echo append_sid($phpbb_root_path . make_url_friendly($forums[$i]['forum_name']) . '-vf' . $forums[$i]['forum_id']); ?>" class="forumlink"><?php echo $forums[$i]['forum_name']; ?></a><br />
</span>
Find :
- Code: Select all
<span class="gensmall">
<div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path . 'viewtopic.php?t=' . $news[$i]['topic_id']); ?>">
<?php echo $lang['Replies']; ?></a></font></div>
Replace with :
- Code: Select all
<span class="gensmall">
<div align="right"><font color="#333333" face="Verdana" size="1">(<?php echo $news[$i]['topic_replies']; ?>)
<a href="<?php echo append_sid($phpbb_root_path . make_url_friendly($news[$i]['topic_title']) . '-vt' . $news[$i]['topic_id']); ?>">
<?php echo $lang['Replies']; ?></a></font></div>
Then, there is the last post link being a duplicate since it's a viewtopic.php?p= link, so it's a duplicate, you may just do nothing about it a leae it unallowed by the robots.txt.
- Code: Select all
Disallow: /path/viewtopic.php
This rule should be in there anyway.
So this should do the trick.
Note : You have to be running the last updated version of the webmedic mode (2.3.1) to use this patch (the main difference with previous version is the make_url_friendly() code to have been moved to function.php, allowing it to be used anywhere in phpBB pages.
Tell me if you encounter problems.
I'd appreciate a link to see the result

and will issue a patch for the phpBB SEO mod rewrites as well.
++