How to get the "Home" button to work

GOHQ

New Member
Well, i been adding and taking buttons from the nav bar with ease thank to Gg but now im stuck on the last button, i want this button to not link to the /forums/ direcotry i was it to lead to www.mysite.com <-- (Thats not my site, just using it as a example.)

But i have tried a few things and it dont work, any ideas?

Also how do you make it so guests and members can see certain buttons?
 

GgAcE

New Member
GOHQ said:
Well, i been adding and taking buttons from the nav bar with ease thank to Gg but now im stuck on the last button, i want this button to not link to the /forums/ direcotry i was it to lead to www.mysite.com <-- (Thats not my site, just using it as a example.)

But i have tried a few things and it dont work, any ideas?

Also how do you make it so guests and members can see certain buttons?

Gg to the rescue!!!

What is the button link now ?

Also, I beleive this is predefined in your admin CP under your site options.

It asks you to set your URL. You set your forums URL as www.yoursite.com/forum. Most likely vbulletin has that home link set in as some sort of block like [$siteurl].

Just shoot me your coding again & I should be able to make the switch =)

Remember to back it up!

Your friend
~Gg
 

GOHQ

New Member
If im right i think you mean the code i got for the home button at the moment. So here it is.

Code:
href="index.php$session[sessionurl_q]">Home</a></td>
		<td width="78" height="34"  class="css_nav"><a

But it sends me to www.mysite.com/forums/index.php
All i need for this button is a way to get the /forums
out of the way, but i tried some stuff and it aint working.

And yes when i installed VB i installed it to the /forums/ directory.
 

GgAcE

New Member
GOHQ said:
If im right i think you mean the code i got for the home button at the moment. So here it is.

Code:
href="index.php$session[sessionurl_q]">Home</a></td>
		<td width="78" height="34"  class="css_nav"><a

But it sends me to www.mysite.com/forums/index.php
All i need for this button is a way to get the /forums
out of the way, but i tried some stuff and it aint working.

And yes when i installed VB i installed it to the /forums/ directory.

This is VERY simple to fix. The reason why it didn't work when you tried it before is because I am 100% sure you didn't add "http://" to your link.

So to fix this simply do:

Code:
href="http://www.YOURSITE.com">Home</a></td>

without adding http the vbulletin is told to open the site up at "your link"/the link you entered. So for example. Without HTTP the link would look like

www.yoursite.com/forum/www.yoursite.com

When you add HTTP it tells Vbulletin to REMOVE your portion of the code & only add the adjacent link.

Best of luck!

Your friend
~Gg
 

GgAcE

New Member
psilocybin said:
Check your settings in the ACP - vBulletin Options - Site Name/ URL/ Contact Details

Change the path to your forums and homepage there and see if that helps.

We already determined that his path will need to be "/forum". He simply wants to change the button so it shoots him to his websites index page instead.
 
GOHQ said:
If im right i think you mean the code i got for the home button at the moment. So here it is.

Code:
href="index.php$session[sessionurl_q]">Home</a></td>
		<td width="78" height="34"  class="css_nav"><a

But it sends me to www.mysite.com/forums/index.php
All i need for this button is a way to get the /forums
out of the way, but i tried some stuff and it aint working.

And yes when i installed VB i installed it to the /forums/ directory.

You can try adding the complete link to your code like

Code:
href="http://www.mysite.com">Home</a>

or replace:

Code:
"index.php$session[sessionurl_q]"

with:

Code:
"$vboptions[homeurl]?$session[sessionurl]"

I think that should work. ;)
 

GgAcE

New Member
psilocybin said:
You can try adding the complete link to your code like

Code:
href="http://www.mysite.com">Home</a>

or replace:

Code:
"index.php$session[sessionurl_q]"

with:

Code:
"$vboptions[homeurl]?$session[sessionurl]"

I think that should work. ;)


Adding:

Code:
[CODE]"$vboptions[homeurl]?$session[sessionurl]"
[/CODE]

Would simply take him to the forums homepage right?

I assume his forum is installed at yoursite.com/forum & he simply wants home to be yoursite.com.

Adding the session URL will add the /forum link back to it.
 

GOHQ

New Member
Well there now i know how to make links like that, but now i notice when i logout i don't see some of the buttons i added like Home,Forums is there a way to make it so guests can see them aswell?
 

GgAcE

New Member
GOHQ said:
Well there now i know how to make links like that, but now i notice when i logout i don't see some of the buttons i added like Home,Forums is there a way to make it so guests can see them aswell?

Do you have any <if> or other tags sourrounding the links? I assume you changed member only links.
 

GOHQ

New Member
This is all it is.

Code:
href="http://www.mysite.com">Home</a></td>
			<td width="78" height="34"  class="css_nav"><a

I don't know what to remove so ill wait.
 

GgAcE

New Member
GOHQ said:
This is all it is.

Code:
href="http://www.mysite.com">Home</a></td>
			<td width="78" height="34"  class="css_nav"><a

I don't know what to remove so ill wait.

Their is some <If> tags before & after that somewhere.
 

GOHQ

New Member
Since im still new to this, here is a copy of my header template.
I personally think its the codition=member thing you are talking about.

Code:
<!-- logo -->
<a name="top"></a>
<!-- <div class="side_borders"> -->
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" class="tborder">
<tr>
	<td align="center" valign="top">

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr class="header_bg">
	<td align="$stylevar[align=left]" valign="middle"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

	
		<td align="$stylevar[align=right]" id="header_right_cell">
        <if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>
    </td>
		
	
</tr>
<tr>
<td height="34" colspan="2" class="vb_navigation">

<!-- nav buttons bar -->

	<table  cellpadding="0" cellspacing="0" border="0"  align="left" class="vb_navigation">
	<tr align="center">
		<if condition="$show['member']">
			<td width="78" height="34"  class="css_nav"><a
href="http://MYSITE.C0M/index.php">Home</a></td>
			<td width="78" height="34"  class="css_nav"><a 
href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
		</if>
		<if condition="$show['registerbutton']">
			<td width="78" height="34"  class="css_nav"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
		</if>
 $template_hook[navbar_buttons_left]
<if condition="$vbulletin->products['vbprojecttools']"><td width="78" height="34"  class="css_nav"><a href="project.php$session[sessionurl_q]">$vbphrase[projects]</a></td></if>
<if condition="$vbulletin->products['vbblog']"><td width="78" height="34"  class="css_nav"><a href="blog.php$session[sessionurl_q]">$vbphrase[blogs]</a></td></if>
		<td width="78" height="34"  class="css_nav"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
		<td width="78" height="34"  class="css_nav"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[vb_members_list]</a></td>
		<td width="78" height="34"  class="css_nav"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
		<if condition="$show['popups']">		
			<if condition="$show['searchbuttons']">
				<if condition="$show['member']">
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[vb_new_posts_nav]</a></td>
				<else />
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[vb_todays_posts]</a></td>
				</if>
				<td id="navbar_search" width="78" height="34" class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", 1); </script></if></td>
			</if>
			<if condition="$show['member']">
				<td id="usercptools" width="78" height="34" class="css_nav"><a href="$show[nojs_link]#usercptools">$vbphrase[vb_quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools", 1); </script></td>		
			</if>
		<else />		
			<if condition="$show['searchbuttons']">
				<td width="78" height="34"  class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
				<if condition="$show['member']">
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
				<else />
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
				</if>
			</if>
			<td width="78" height="34"  class="css_nav"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
			<if condition="$show['member']">			
				<td width="78" height="34"  class="css_nav"><a href="#" onClick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>			
			</if>			
		</if>
$template_hook[navbar_buttons_right]
		<if condition="$show['member']">
			<td width="78" height="34"  class="css_nav"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
		</if>
		<td width="8" height="34" align="left"><img src="$stylevar[imgdir_misc]/nav_final.gif" width="8" height="34" alt="" border="0" /></td>
	</tr>
	</table>

<!-- / nav buttons bar -->
</td></tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output
$ad_location[ad_header_end]
 

GgAcE

New Member
Changed. Their was "If condition show member" tags before. Remember if you remove an <if> tag you also need to remove the first </if> tag that shortly follows as this tells anything in between to follow that condition.


Code:
<!-- logo -->
<a name="top"></a>
<!-- <div class="side_borders"> -->
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" class="tborder">
<tr>
	<td align="center" valign="top">

<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr class="header_bg">
	<td align="$stylevar[align=left]" valign="middle"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

	
		<td align="$stylevar[align=right]" id="header_right_cell">
        <if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>
    </td>
		
	
</tr>
<tr>
<td height="34" colspan="2" class="vb_navigation">

<!-- nav buttons bar -->

	<table  cellpadding="0" cellspacing="0" border="0"  align="left" class="vb_navigation">
	<tr align="center">
					<td width="78" height="34"  class="css_nav"><a
href="http://MYSITE.C0M/index.php">Home</a></td>
			<td width="78" height="34"  class="css_nav"><a 
href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
		
		<if condition="$show['registerbutton']">
			<td width="78" height="34"  class="css_nav"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
		</if>
 $template_hook[navbar_buttons_left]
<if condition="$vbulletin->products['vbprojecttools']"><td width="78" height="34"  class="css_nav"><a href="project.php$session[sessionurl_q]">$vbphrase[projects]</a></td></if>
<if condition="$vbulletin->products['vbblog']"><td width="78" height="34"  class="css_nav"><a href="blog.php$session[sessionurl_q]">$vbphrase[blogs]</a></td></if>
		<td width="78" height="34"  class="css_nav"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
		<td width="78" height="34"  class="css_nav"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[vb_members_list]</a></td>
		<td width="78" height="34"  class="css_nav"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
		<if condition="$show['popups']">		
			<if condition="$show['searchbuttons']">
				<if condition="$show['member']">
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[vb_new_posts_nav]</a></td>
				<else />
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[vb_todays_posts]</a></td>
				</if>
				<td id="navbar_search" width="78" height="34" class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", 1); </script></if></td>
			</if>
			<if condition="$show['member']">
				<td id="usercptools" width="78" height="34" class="css_nav"><a href="$show[nojs_link]#usercptools">$vbphrase[vb_quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools", 1); </script></td>		
			</if>
		<else />		
			<if condition="$show['searchbuttons']">
				<td width="78" height="34"  class="css_nav"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
				<if condition="$show['member']">
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
				<else />
				<td width="78" height="34"  class="css_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
				</if>
			</if>
			<td width="78" height="34"  class="css_nav"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
			<if condition="$show['member']">			
				<td width="78" height="34"  class="css_nav"><a href="#" onClick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>			
			</if>			
		</if>
$template_hook[navbar_buttons_right]
		<if condition="$show['member']">
			<td width="78" height="34"  class="css_nav"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
		</if>
		<td width="8" height="34" align="left"><img src="$stylevar[imgdir_misc]/nav_final.gif" width="8" height="34" alt="" border="0" /></td>
	</tr>
	</table>

<!-- / nav buttons bar -->
</td></tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output
$ad_location[ad_header_end]
 

GOHQ

New Member
The part that says "login.php" im not to sure on how to change it so its "MYSITE.C0M/forums/login.php since theres all that code around it, could you do it for me?
 

GgAcE

New Member
GOHQ said:
The part that says "login.php" im not to sure on how to change it so its "MYSITE.C0M/forums/login.php since theres all that code around it, could you do it for me?

Oooops I know this is old but hey you may come looking for this again, you do NOT need to add anything their. Yoursite.com/forums will automatically add itself to the link.

Hope you didn't do any crazy edits since I missed your post >.<
 
Top