View Full Version : How to remove "index.php?" from Home links?
onlinecc
11-06-2007, 08:23 AM
I have a forum where I would like to remove the index.php? part of the Home links in my forum. Like here for example (http://www.vtctalk.com/forumdisplay.php?f=15):
VTCTalk.com - Video conferencing Forum > Hardware
The link "VTCTalk.com - Video conferencing Forum " points to http://www.vtctalk.com/index.php? instead of http://www.vtctalk.com
Maybe in this case it makes no difference but on my site I would like to direct all pagerank to www.vtctalk.com and not half of it to www.vtctalk.com/index.php?.
So the question is, how do I change/get rid of this index.php? part of the "http://www.vtctalk.com/index.php?" link? Is there some template file I can edit or some other setting?
All help and suggestions are greatly appreciated.
Thanks,
Martin.
PS: I searched the forum for a solution as I cannot imagine that I'm the first one with this problem, but I didn't find anything. Maybe I'm just an idiot at searching :)
ShawneyJ
11-06-2007, 09:07 AM
you could always open navbar template and find
$vboptions[forumhome].php$session[sessionurl_q]
and replace with
http://www.vtctalk.com
done :)
onlinecc
11-06-2007, 10:12 AM
Sweeet !! :up:
Thanks a lot jaycob!
/martin
mihai11
11-15-2007, 11:25 AM
you could always open navbar template and find
$vboptions[forumhome].php$session[sessionurl_q]
and replace with
http://www.vtctalk.com
done :)
If you do this then users that don't have cookies enabled will be automatically logged out whenever they would use that link.
onlinecc
11-15-2007, 11:47 AM
Hmmm interesting point.... Well I'll wait and see if it is a problem. My feeling is that this link is not so much used a for example the "back" function..
But thanks for the info mihai11!
mihai11
11-15-2007, 12:49 PM
Hmmm interesting point.... Well I'll wait and see if it is a problem. My feeling is that this link is not so much used a for example the "back" function..
But thanks for the info mihai11!
I found the solution to this problem. You need to test whether $session[sessionurl_q] is defined on not. If it is not defined then use $vboptions[bburl] instead of $vboptions[forumhome].php$session[sessionurl_q].
Currently, in 3.6.8 there are 2 links from the navbar. The first link is this:
<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
and the second link is this:
<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
Replace the first link with this:
<if condition="$session[sessionurl_q]">
<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
<else />
<a href="$vboptions[bburl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</if>
and the second link with this:
<if condition="$session[sessionurl_q]">
<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
<else />
<a href="$vboptions[bburl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
and that's all. I already tested this for users with cookies and without cookies.
If you will perform a search on this template then you will also find the string "$vboptions[forumhome].php" in the "action" field of a form (it is at the bottom of the template). Don't touch that as it is not relevant for the issue discussed here.
I hope that you understand my instructions. I don't have much time right now so I won't be able to provide much support for this issue.
Regards,
Razvan M.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.