vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How can I use a hook in a nav tab's title? (https://vborg.vbsupport.ru/showthread.php?t=284567)

Jeremy8 06-17-2012 07:45 PM

How can I use a hook in a nav tab's title?
 
I have asked this before, but no one seems to be able to help me.

I was okay before 4.2 because I could order nav tab templates via template hooks, but now it only has hooks for before or after manager tabs.

cellarius 06-17-2012 07:47 PM

Those hooks are deprecated and will go in future versions. Use the new navbar manager instead.

Jeremy8 06-17-2012 08:15 PM

Quote:

Originally Posted by cellarius (Post 2340506)
Those hooks are deprecated and will go in future versions. Use the new navbar manager instead.

I don't think you understood my question. I want to use a hook in a tab's title because it contains information that changes. To be more specific, the tab is for a chat room and the hook is the number of users in the chat. So if there are 8 people in the chat, the tab will say "Chat: 8".

kh99 06-17-2012 10:27 PM

I think you could use a plugin on hook build_navigation_array, and at that point there's an array called $result with the info for each tab. If you have your tab "Identity" value, you can change $result[$identity]['text'] to whatever text you want.

Edit: That plugin will also be called when you go to the Navigation Manager in the adminCP, so make sure you don't do anything that won't work there. You might want to check VB_AREA == 'AdminCP' and not do anything if that's true.


All times are GMT. The time now is 06:21 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.01530 seconds
  • Memory Usage 1,710KB
  • 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
  • (4)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