vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Navbar button question (https://vborg.vbsupport.ru/showthread.php?t=260645)

boodog 03-19-2011 10:49 AM

Navbar button question
 
Here's a link to my site.

Question: I have buttons to my various forums on my navbar, but when in these forums only the main FORUMS button stays selected (such as when you're in Tips Archive or Buy & Sell). Other buttons work as they should. How can I make each button stay selected when in the respective forum?

I'll bet whizkid Lynne will know how to fix this! :)

Lynne 03-19-2011 04:23 PM

You make them active by creating conditions that say "if on this page, then this one is selected". I don't know how you added them, but I know if you read my article about adding them via a plugin, then that plugin includes the condition line (that you would need to change depending on your own tab).

boodog 03-20-2011 09:45 AM

Lynne: I added code I found in a post on vb.com to add a few buttons to my navbar, but I think the problem is the definitions.

If my navbar buttons link to forums, do I need to define them in forumdisplay.php? I made a plugin per your instructions and got it to correctly link to forumdisplay.php?6, but the button doesn't stay selected when in that forum. I think I'm just one or two steps away from making this work correctly.

Lynne 03-20-2011 03:16 PM

If the button isn't staying selected in that forum, then your condition is not valid to make it stay active. What condition did you use that is *unique* to that page?

boodog 03-22-2011 11:34 AM

I used your plugin instructions and it worked beautifully! Thank you so much for what you do and for your support.

I did find one bug...I tried to make links for Who's Online and PM's and it produced an error when an apostrophe is used. Not a big deal at all but I thought I'd mention it in case someone else has trouble and thinks they accidentally screwed up the code somewhere (like I thought I did).

Lynne 03-22-2011 03:30 PM

Quote:

Originally Posted by boodog (Post 2176166)
I used your plugin instructions and it worked beautifully! Thank you so much for what you do and for your support.

I did find one bug...I tried to make links for Who's Online and PM's and it produced an error when an apostrophe is used. Not a big deal at all but I thought I'd mention it in case someone else has trouble and thinks they accidentally screwed up the code somewhere (like I thought I did).

You need to escape apostrophes when you use them inside text that is surrounded by apostophes.

What\'s New
PM\'s

boodog 03-22-2011 05:18 PM

Thank you, Lynne. My apologizes for saying it was a bug!


All times are GMT. The time now is 11:51 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.01246 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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