Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > Programming Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
navigation to Links Directory at navbar
mikaelweb's Avatar
mikaelweb
Join Date: Feb 2003
Posts: 122

 

Sweden
Show Printable Version Email this Page Subscription
mikaelweb mikaelweb is offline 07-30-2005, 10:00 PM

here is navigation to Links at navbar vBadvanced Links Directory

In the Navbar template find:
Code:
<if condition="$show['member']">
Above that add:
Code:
<td id="link" class="vbmenu_control"><a href="$vboptions[bburl]/#link" accesskey="4" rel="nofollow">Links</a> <script type="text/javascript"> vbmenu_register("link"); </script></td>
In the Navbar template find:
Code:
<!-- / PAGENAV POPUP -->
Under that add:
Code:
<!-- link menu -->
    <div class="vbmenu_popup" id="link_menu" style="display:none"> 
      
  <table cellpadding="4" cellspacing="1" border="0">
    <tr> 
      <td class="thead">Links Directory</td>
    </tr>
    <tr> 
      <td class="vbmenu_option"><a href="$vboptions[homeurl]/links">Links&nbsp;Directory</a></td>
    </tr>
    <tr> 
      <td class="vbmenu_option"><a href="$vboptions[bburl]/misc.php?do=linktous">Link 
        To Us</a></td>
    </tr>
    <tr> 
      <td class="vbmenu_option"><a href="$vboptions[homeurl]/links/addlink.php?c=">Submit 
        a Link</a></td>
    </tr>
    <tr> 
      <td class="vbmenu_option"><a href="$vboptions[homeurl]/links/browselinks.php?do=newlinks">What's 
        New</a></td>
    </tr>
    <tr> 
      <td class="vbmenu_option"><a href="$vboptions[homeurl]/links/search.php?">Search</a></td>
    </tr>
  </table>
    </div>
    <!-- / link menu -->
There you have it.
Attached Images
File Type: gif demo.gif (5.0 KB, 0 views)
Attached Files
File Type: txt navigation to Links at navbar.txt (1.6 KB, 37 views)
Reply With Quote
  #2  
Old 08-01-2005, 07:20 AM
cmiller1014 cmiller1014 is offline
 
Join Date: May 2004
Posts: 248
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird hack considering vbadvanced links doesnt work with 3.5 yet
Reply With Quote
  #3  
Old 08-01-2005, 11:43 AM
Neal-UK's Avatar
Neal-UK Neal-UK is offline
 
Join Date: Feb 2004
Location: Lancashire, England
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cmiller1014
Weird hack considering vbadvanced links doesnt work with 3.5 yet
it does ;-)
Reply With Quote
  #4  
Old 08-01-2005, 02:03 PM
mikaelweb's Avatar
mikaelweb mikaelweb is offline
 
Join Date: Feb 2003
Location: Sweden
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It work?s mate i now that

This is better templates to this tread
Open template "ADV_LINKS_LINKTOUS"
and replace all contet whit this one
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[hometitle] - $vba_options[links_title] - $vbphrase[link_to_us]</title>
$headinclude
</head>
<body>

$header
$navbar

$linksnav

<!--// Link to us content-->
<br>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
  <tr> 
    <td class="tcat"><strong>Link To Us</strong></td>
  </tr>
  <tr> 
    <td class="alt1"><div class="smallfont">The codes below Will Make a text link 
        or graphic with them. Don't forget to save the graphic (gif or .jpg) your 
        directory. Right click on the graphic and choose "save image as". Remember 
        to upload the graphic when you upload your page.<BR>
        If You need my help to add the Link, please feel free to ask..... We will 
        gladly help!!!!!! <BR>
        <BR>
        Thanks, <BR>
        <B>Your-Site.com</B></div></td>
  </tr>
  <tr> 
    <td align="center" class="tcat"><span class="smallfont"><a href="mailto:webmaster@Your-Site.com?subject=Link%20To%20Us%20Help"><strong>Contact 
      Us</strong></a></span></td>
  </tr>
</table>
<br/>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
  <tr> 
    <td class="tcat"><strong>$vboptions[hometitle], Text Link</strong></td>
  </tr>
  <tr> 
    <td class="alt1"><div class="smallfont">
        <textarea name="textlink" cols="60" rows="2">
<a href="http://www.Your-Site.com" target="_top"> Your-Site.Com</a> Short description of your site!
 </textarea>
      </div></td>
  </tr>
</table>
<br/>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
  <tr> 
    <td class="tcat"><strong>$vboptions[hometitle], button</strong></td>
  </tr>
  <tr> 
    <td class="alt1"><div class="smallfont">
        <textarea name="buttonlink" cols="60" rows="3">
<a href="http://www.Your-Site.com"><img border="0" src="http://www.Your-Site.Com/files/banner01.gif" width="88" height="31" alt="Your-Site.Com"></a>
 </textarea>
 <br/>
        <a href="http://www.Your-Site.Com"><br/><img border="0" src="http://www.Your-Site.Com/files/banner01.gif" width="88" height="31" alt="Your-Site.Com"></a> 
      </div></td>
  </tr>
</table>
<br>
<!--// End Link to us content-->  
$footer

</body>
</html>
here is demo of this template

Attached Files
File Type: txt Link to us template.txt (2.9 KB, 14 views)
Reply With Quote
  #5  
Old 08-04-2005, 12:35 AM
Neal-UK's Avatar
Neal-UK Neal-UK is offline
 
Join Date: Feb 2004
Location: Lancashire, England
Posts: 604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very good installed, thankyou
Reply With Quote
  #6  
Old 08-27-2005, 04:42 PM
welo welo is offline
 
Join Date: Jan 2004
Location: Portland, Oregon
Posts: 172
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Taking it a step further, a slight variation of this method can be used to add an additional navigation bar to any VB template, like header for instance.

Say you want to add dropdowns for "Polices", "Features", and "FAQ". The code will look something like this:

Code:
<table width="100%" cellspacing="0" cellpadding="0">
<tr>

<!-- Polices Menu -->
<td id="policies" class="vbmenu_control"><a href="#policies">Policies</a><script type="text/javascript"> vbmenu_register("policies"); </script>
	<div class="vbmenu_popup" id="policies_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Forum Policies</td></tr>		
		<tr><td class="vbmenu_option"><a href="policy01.php">1st Policy</a></td></tr>
		<tr><td class="vbmenu_option"><a href="policy02.php">2nd Policy</a></td></tr>
		<tr><td class="vbmenu_option"><a href="policy03.php">3rd Policy</a></td></tr>
	</table>
	</div>
</td>
<!-- /Polices Menu -->

<!-- Features Menu -->
<td id="features" class="vbmenu_control"><a href="#features">Features</a><script type="text/javascript"> vbmenu_register("features"); </script>
	<div class="vbmenu_popup" id="features_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Site Features</td></tr>		
		<tr><td class="vbmenu_option"><a href="feature01.php">1st Feature</a></td></tr>
		<tr><td class="vbmenu_option"><a href="feature02.php">2nd Feature</a></td></tr>
		<tr><td class="vbmenu_option"><a href="feature03.php">3rd Feature</a></td></tr>
	</table>
	</div>
</td>
<!-- /Features Menu -->

<!-- Stretch table so last cell is positioned to the right -->
<td width="90%" class="vbmenu_control">&nbsp;</td>
<!-- /Stretch -->

<!-- FAQ Menu -->
<td id="faq" class="vbmenu_control"><a href="#faq">FAQ</a><script type="text/javascript"> vbmenu_register("faq"); </script>
	<div class="vbmenu_popup" id="faq_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
		<tr><td class="thead">Frequent Questions</td></tr>		
		<tr><td class="vbmenu_option"><a href="faq01.php">1st FAQ</a></td></tr>
		<tr><td class="vbmenu_option"><a href="faq02.php">2nd FAQ</a></td></tr>
		<tr><td class="vbmenu_option"><a href="faq03.php">3rd FAQ</a></td></tr>
	</table>
	</div>
</td>
<!-- /FAQ Menu -->

</tr>
</table>
The key is to keep your td id, first href, vbmenu_register(), and div id all named with the same control word, e.g.:
<td id="features" class="vbmenu_control">
<a href="#features">Features</a>
<script type="text/javascript"> vbmenu_register("features"); </script>
<div class="vbmenu_popup" id="features_menu" style="display:none">
And just incidentally, if you happen to accidentally put that <script> inside the closing </a> tag, it crashes IE6 completely . (am trying to come up with a use for that)

Anyway, how to do this for some reason is pretty hard to track down around here and I almost started a new thread for it until I saw this one. Hope you don't mind me jumping on.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:45 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.03927 seconds
  • Memory Usage 2,285KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete