vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=188)
-   -   navigation to Links Directory at navbar (https://vborg.vbsupport.ru/showthread.php?t=93299)

mikaelweb 07-30-2005 10:00 PM

navigation to Links Directory at navbar
 
1 Attachment(s)
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.

cmiller1014 08-01-2005 07:20 AM

Weird hack considering vbadvanced links doesnt work with 3.5 yet

Neal-UK 08-01-2005 11:43 AM

Quote:

Originally Posted by cmiller1014
Weird hack considering vbadvanced links doesnt work with 3.5 yet

it does ;-)

mikaelweb 08-01-2005 02:03 PM

1 Attachment(s)
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

http://www.coderslabz.com/testbord/demo.gif

Neal-UK 08-04-2005 12:35 AM

very good installed, thankyou

welo 08-27-2005 04:42 PM

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 :D. (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. :)


All times are GMT. The time now is 08:41 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.01241 seconds
  • Memory Usage 1,749KB
  • 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
  • (6)bbcode_code_printable
  • (1)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