Actually, the mod did not have to add the WTU_LINK template variable, since the U_TOPIC one is already doing the job (that is, the full topic url with http ... and without sid, and of course, with url rewriting when activated).
So you can just edit the viewtopic_body.html template to replace :
- Code: Select all
{WTU_LINK}
with :
- Code: Select all
{U_TOPIC}
For the WTU_HTML one though, something need to be done. The original code you posted does not make much sense since it's passing ">" to append_sid, and also, I bet you do not want to promote an url that could contain an sid in it, so append_sid should not be used at all in the first palce. The goal here seems to display a non active (escaped) code for the full href code, but it's not using the trailing </a>. I assume that this is done directly in the template, but I don't have the mod's code to check.
The best approach to me would be to reuse the U_TOPIC template variable to directly build the escaped code using < (<)and > (>) to build the output in the template :
- Code: Select all
< a href="{U_TOPIC}">the title you want, can be a template variable like the topic title or a language entry</a>
This would make a lot more sense since it would keep the templating logic (eg do not use html in php) and would also save two lines of code change.
Maybe you can report this to the mod author.
I don't exactly get why the WTU_BBCODE is using the post URL instead of the topic one like the other two (adding the #post hash in template could also do the trick and prevent duplicates). Also, as is, the code may output sids in the link.
If it matters, you can replace :
- Code: Select all
'WTU_BBCODE' => append_sid(generate_board_url() . "/viewtopic.$phpEx", 'p=' . $row['post_id']) . (($topic_data['topic_type'] == POST_GLOBAL) ? '&f=' . $forum_id : '') . '#p' . $row['post_id'],
with :
- Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
'WTU_BBCODE' => $phpbb_seo->drop_sid(append_sid((!empty($phpbb_seo->seo_opt['url_rewrite']) ? $phpbb_root_path : generate_board_url()) . "/viewtopic.$phpEx", 'p=' . $row['post_id'] . ($topic_data['topic_type'] == POST_GLOBAL ? '&f=' . $forum_id : ''))) . '#p' . $row['post_id'],
// www.phpBB-SEO.com SEO TOOLKIT END
++