Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-23-2016, 01:55 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default FAQ Tab Highlight Custom Tab

Hi was wondering if this is possible to do. What I have done is I have a custom FAQ area with secondary FAQ questions & answers within it. I've created a link that is seen by only certain usergroups in the bottom part of the default navigation on vBulletin 4.2.3. The link only shows when a certain tab is clicked on the top part of the navigation. What I need is when I click that link in the bottom portion of the navbar is it possible to highlight my custom tab where that link shows instead of the "Forum" tab.

Basically the first screen shot is what you see before you click the top tab and go into the area I've highlighted the link to the custom FAQ area that I'm speaking of...

The second screen shot is what happens after you click the FAQ link. The tab that I have put a yellow highlight over is the one I want highlighted when you click that FAQ link from the first screen shot. Hope this is not too confusing.

I'm guessing that I need to create some sort of plugin, but I do not know what to put for the code.

EDIT: I also need that same top tab to stay highlighted when a member actually clicks on that particular forum area connected with that tab.
Attached Images
File Type: png Screenshot from 2016-01-23 10:49:12.png (17.1 KB, 0 views)
File Type: png Screenshot from 2016-01-23 10:49:31.png (19.7 KB, 0 views)
Reply With Quote
  #2  
Old 01-23-2016, 08:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is your custom faq area part of the actual faq? What is the URL structure like for it and what is the URL structure like for the regular faq?
Reply With Quote
  #3  
Old 01-23-2016, 10:28 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The URL for the custom FAQ is http://lenmkaiser.com/forums/faq.php?faq=cusclients. The URL for the regular FAQ is http://lenmkaiser.com/forums/faq.php. So I created this FAQ based off the default one.
Reply With Quote
  #4  
Old 01-24-2016, 04:56 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then you probably just need to create a navtab for it in the Navigation Manager, grab the identity at the top of that page (let's pretend it is tab_abc_123) and add a plugin at the set_navigation_tab_main:

PHP Code:
if ($_GET['faq'] == 'cusclients'$root 'tab_abc_123'
I *think* that will do it (it's been a while since I writen a plugin to highlight a navtab).
Reply With Quote
  #5  
Old 01-24-2016, 06:11 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Then you probably just need to create a navtab for it in the Navigation Manager, grab the identity at the top of that page (let's pretend it is tab_abc_123) and add a plugin at the set_navigation_tab_main:

PHP Code:
if ($_GET['faq'] == 'cusclients'$root 'tab_abc_123'
I *think* that will do it (it's been a while since I writen a plugin to highlight a navtab).
Awesome! Worked perfectly, thanks Lynne.
Reply With Quote
2 благодарности(ей) от:
Lynne, MarkFL
  #6  
Old 01-26-2016, 08:44 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a bit of a different question about tabs. I call the calendar Events on another site and created a tab instead of the bottom link. I would like the new Events tab to be highlighted when I'm in the calendar, how would I go about this? Currently when viewing the calendar the forum tab is highlighted I would prefer to have the Events tab highlighted.
Attached Images
File Type: jpg Screenshot from 2016-01-26 17:43:50.jpg (31.4 KB, 0 views)
Reply With Quote
  #7  
Old 01-27-2016, 08:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The calendar page that THIS_SCRIPT defined at the top of the page:
define('THIS_SCRIPT', 'calendar');

So, in the Navigation Manager, edit the Events tab and where it says "Tab Script(s)", put "calendar" (no quotes).
Reply With Quote
Благодарность от:
HM666
  #8  
Old 01-27-2016, 09:10 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doh! I knew that but forgot all about it. Thanks again Lynne.
Reply With Quote
  #9  
Old 02-05-2016, 10:01 PM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Next question...How would I go about making the support forum highlight that same Client Support tab? The link is http://lenmkaiser.com/forums/forums/6-Support-Tickets. Instead of the "Forums" tab being highlighted I want the "Client Support" tab to highlight only for that support forum. The rest of the forums would be normal.

Also I want the same tab "Client Support" highlighted when a person is viewing a certain form from the Easy Forms mod. The link for that is http://lenmkaiser.com/forums/forms.php?do=form&fid=1.

Also, also lol I need to know what plugin code I would use to change the "+Post New Thread" button to say "+Submit Ticket" in just one forum only.
Reply With Quote
  #10  
Old 02-09-2016, 01:48 AM
HM666's Avatar
HM666 HM666 is offline
 
Join Date: Jan 2014
Location: Little Rock, AR
Posts: 1,060
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump. Anyone?
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 08:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04306 seconds
  • Memory Usage 2,290KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete