vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to remove "index.php?" from Home links? (https://vborg.vbsupport.ru/showthread.php?t=162038)

onlinecc 11-06-2007 08:23 AM

How to remove "index.php?" from Home links?
 
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

Quote:

Originally Posted by jaycob (Post 1376881)
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

Quote:

Originally Posted by onlinecc (Post 1382944)
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:

Code:

<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
and the second link is this:

Code:

<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:
Code:

<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:

Code:

<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.


All times are GMT. The time now is 07:50 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01219 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete