Currently I have my own links in templates like: <a href="showthread.php?t=$variable">
I want to automaticaly look them as <a href="showthread.php/1234-topicname">.
How can I do that, what conditional variables are there?
This is a discussion on How to write my own showthread / forumdisplay links with vbseo URL rewriting enabled? within the General Discussion forums, part of the vBSEO SEO Plugin category; Currently I have my own links in templates like: <a href="showthread.php?t=$variable"> I want to automaticaly look them as <a href="showthread.php/1234-topicname">. ...
Currently I have my own links in templates like: <a href="showthread.php?t=$variable">
I want to automaticaly look them as <a href="showthread.php/1234-topicname">.
How can I do that, what conditional variables are there?
You don't have to change anything 'inside' the templates.
Set the appropriate options and link structure from your vBSEO's Control Panel,
and let vBSEO do the rest !
![]()
I have changed my styles which involves adding additional links. Currently I have my own links in templates like: <a href="showthread.php?t=$variable">
I want to automaticaly look them as <a href="showthread.php/1234-topicname">.
How can I do that, what conditional variables are there?
Can you give a live example of what you are trying to achieve ?
What you said earlier, ie, converting URLs from showthread.php?t=$variable to showthread.php/1234-topicname
vBSEO already does that automatically. You don't need to edit any templates to reflect the changes.
This is what I wrote
Code:<!-- show latest active threads --> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tbody> <tr> <td class="tcat" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_external')"><img id="collapseimg_forumhome_external" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_external].gif" alt="" border="0" /></a> <a href="forumdisplay.php?f=$foruminfo[forumid]">Topics in $foruminfo[title]</a> </td> </tr> </tbody> <tbody id="collapseobj_forumhome_external" style="$vbcollapse[collapseobj_forumhome_external]"> <tr> <td class="alt1" width="100%"> <div class="smallfont"> <script type="text/javascript" src="external.php?forumids=$foruminfo[childlist]&type=js"></script> <script language="" type="text/javascript"> <!-- for (var x in threads) { document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/firstnew.gif\" alt=\"\" border=\"0\" /></a> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <br />"); } //--> </script></div> </td> </tr> </tbody> <!-- show latest active threads --> </table> <br />
are there any solutions?
You want your URL rewrites to look like this?
Code:showthread.php/1234-topicname
I just want them to be shown like in my forum (for example "http://www.vbseo.com/how-write-my-own-showthread-forumdisplay-links-vbseo-url-rewriting-enabled-19969/"). How can I do that?
Hello,
as I see, you have those links created in Javascript:
as a result, that code is processed on client side (browser) and cannot be processed by vBSEO automatically. You can create SEOed URLs in your mod/script using vBSEO Functions for Extensibility though.HTML Code:for (var x in threads) { document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/firstnew.gif\" alt=\"\" border=\"0\" /></a> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <br />"); }
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!