vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   End-User Options - Navbar Forumjump- Adds a DHTML "Forum Jump" menu to your Navbar (https://vborg.vbsupport.ru/showthread.php?t=157353)

Analogpoint 09-24-2007 11:27 PM

Quote:

Originally Posted by Smoothie (Post 1346348)
This is what I have in the header template:

PHP Code:

$forumjumpmenu <if condition="$vboptions[navbar_forumjump_enable] && $show[popups]"> | </if> 


It looks like you've got the menu only showing to logged in users.. so, try this:

PHP Code:

$forumjumpmenu <if condition="$vboptions[navbar_forumjump_enable] && $show[popups] && ($vboptions[navbar_forumjump_showusersonly] && $bbuserinfo[userid])"> | </if> 

That should do the trick.

Smoothie 09-25-2007 12:12 AM

Quote:

Originally Posted by Analogpoint (Post 1346406)
It looks like you've got the menu only showing to logged in users.. so, try this:

PHP Code:

$forumjumpmenu <if condition="$vboptions[navbar_forumjump_enable] && $show[popups] && ($vboptions[navbar_forumjump_showusersonly] && $bbuserinfo[userid])"> | </if> 

That should do the trick.

:up: Perfect, thank you! But if I change it to show menu to everyone, the bar disappears. Anyway to get it to show when needed and not show when not needed, no matter which Navbar Forumjump Options I use?

I tried the first code you posted, but that did not work either.

Analogpoint 09-25-2007 12:20 AM

Yes you're right. My bad.

Here you go.

Code:

$forumjumpmenu <if condition="$vboptions[navbar_forumjump_enable] && $show[popups] && (($vboptions[navbar_forumjump_showusersonly] && $bbuserinfo[userid]) || !$vboptions[navbar_forumjump_showusersonly])"> | </if>
Wow, that if statement keeps getting longer and longer. :)

Smoothie 09-25-2007 01:56 AM

Quote:

Originally Posted by Analogpoint (Post 1346453)
Yes you're right. My bad.

Here you go.

Code:

$forumjumpmenu <if condition="$vboptions[navbar_forumjump_enable] && $show[popups] && (($vboptions[navbar_forumjump_showusersonly] && $bbuserinfo[userid]) || !$vboptions[navbar_forumjump_showusersonly])"> | </if>
Wow, that if statement keeps getting longer and longer. :)

That statement is a work of art. Thanks again.

carubmun 09-27-2007 10:08 AM

Quote:

Originally Posted by Analogpoint (Post 1338411)
Make sure you have $template_hook[navbar_buttons_left] in your navbar template.

I still cant figure it out. :confused:

Everytime i try to put in the $template_hook[navbar_buttons_left] in either navgbar or header templates... i get things looking really odd and the forum jump doesnt work.

The only way ive gotten the forum jump to work, is to place the $template_hook[navbar_buttons_left] within an already written line of code and replace the part that starts with $ with $template_hook[navbar_buttons_left].

But then i get the ForumJump within the QuickLinks dropdown, or some ugly large block where the FAQ or something else used to be.

Bah what im writing probably makes no sense... i suck at this.
This is my forum if you would be so kind as to take another look....

carubmun 09-27-2007 11:48 AM

Quote:

Originally Posted by Analogpoint (Post 1343255)
Go to the product's options page and follow the instructions in the help items. (the little question mark icon.).

If the automatic display is not working, set it to not automatically display, and then insert these two variables into your templates:

$forumjumpmenu -- where you want the menu to appear.
$forumjumphidden -- at the bottom of the same template.

Ok so i tried again... screw sleep!

I was able to use this to get the forum jump to come up without altering my sites formatting.
Except its not in the navbar :(
If i try it in the navbar i either get nothing, or i get something that moves my formatting around... OR it works but the text inside the forum jump becomes HUGE and there is a weird line through it.

Ive got it to work in the small space under the navbar.... not perfect but its a start.

Analogpoint 09-27-2007 01:28 PM

Quote:

Originally Posted by carubmun (Post 1348154)
Ok so i tried again... screw sleep!

I was able to use this to get the forum jump to come up without altering my sites formatting.
Except its not in the navbar :(
If i try it in the navbar i either get nothing, or i get something that moves my formatting around... OR it works but the text inside the forum jump becomes HUGE and there is a weird line through it.

Ive got it to work in the small space under the navbar.... not perfect but its a start.

Each menu/link in the navbar is in a table cell. Here's the relevant part of the navbar template, where it shows a table, and each link is in a table cell.

Code:

<!-- nav buttons bar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
        <if condition="$show['member']">
                <td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
        </if>
        <if condition="$show['registerbutton']">
                <td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
        </if>
        $template_hook[navbar_buttons_left]
        <td class="vbmenu_control">$forumjumpmenu</td>
        <td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
        <td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
        <td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
        <if condition="$show['popups']">               
                <if condition="$show['searchbuttons']">
                        <if condition="$show['member']">
                        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
                        <else />
                        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
                        </if>
                        <td id="navbar_search" class="vbmenu_control"><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"); </script></if></td>
                </if>
                <if condition="$show['member']">
                        <td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>               
                </if>
        <else />               
                <if condition="$show['searchbuttons']">
                        <td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
                        <if condition="$show['member']">
                        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
                        <else />
                        <td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
                        </if>
                </if>
                <td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
                <if condition="$show['member']">                       
                        <td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;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 class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
        </if>
</tr>
</table>
<!-- / nav buttons bar -->

The navbar forumjump menu, when automaically displaying, outputs the menu where the template hooks are ($template_hook[navbar_buttons_left] or $template_hook[navbar_buttons_right] depending on your settings), and the menu is wrapped in <td> tags so that it is put inside a table cell. When autodisplay is off, the menu is not inside <td> tags, since people often want to put it elsewhere, in the header or somewhere else.

If you want to put the menu in the navbar without using the template hooks, just do this:

Code:

<td class="vbmenu_control">$forumjumpmenu</td>
then at the bottom of the template put this:

Code:

$forumjumphidden

adnan2007 09-27-2007 02:45 PM

Awesome mod.

I was wondering if theres a way to move the jump all the way to the left.

thx

Analogpoint 09-27-2007 03:29 PM

Quote:

Originally Posted by adnan2007 (Post 1348266)
Awesome mod.

I was wondering if theres a way to move the jump all the way to the left.

thx

Thanks.

1. Turn 'auto display' off.
2. Edit the navbar template

2a. Find this part of the template and add the code in red.
Code:

<!-- nav buttons bar -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
        <td class="vbmenu_control">$forumjumpmenu</td>
        <if condition="$show['member']">
                <td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
        </if>

2b. Add $forumjumphidden to the bottom of the navbar template.

carubmun 09-28-2007 04:19 AM

Quote:

Originally Posted by Analogpoint (Post 1348214)
Each menu/link in the navbar is in a table cell. Here's the relevant part of the navbar template, where it shows a table, and each link is in a table cell.

The navbar forumjump menu, when automaically displaying, outputs the menu where the template hooks are ($template_hook[navbar_buttons_left] or $template_hook[navbar_buttons_right] depending on your settings), and the menu is wrapped in <td> tags so that it is put inside a table cell. When autodisplay is off, the menu is not inside <td> tags, since people often want to put it elsewhere, in the header or somewhere else.

If you want to put the menu in the navbar without using the template hooks, just do this:

Code:

<td class="vbmenu_control">$forumjumpmenu</td>

then at the bottom of the template put this:

Code:

$forumjumphidden

You have been great with all your help and now i just feel like a failure at vb..
Ive tried everything you have suggested and i cant seem to make it work right.
I can make it show up on the navbar but it ends up having this huge colored background and then actual ForumJump content comes out huge and with strange colors as well.
Of course it works great with default template, and it worked fine when i reverted certain parts of this template that 3.6.8 asked me to revert.

BTW, on this template... there is no <!-- nav buttons bar --> area in my navbar template, its in my header template.
I tried making the changes in header and in importing your whole bit of code you posted into navgar... but i still got ugly.

I have it up so you can see how it looks.


All times are GMT. The time now is 11:47 PM.

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.01328 seconds
  • Memory Usage 1,804KB
  • 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
  • (8)bbcode_code_printable
  • (3)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete