Thread: Miscellaneous Hacks - Tab and Link Manager Lite
View Single Post
  #18  
Old 01-08-2011, 04:38 AM
Mosh's Avatar
Mosh Mosh is offline
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 1,968
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ascroft View Post
Thanks - installed this - with 2 links under the tab - however they (the links) don't appear to display when I hover over the tab - if I click on the tab it launches the URL I have on the tab.
Quote:
Originally Posted by Russ_T View Post
Does this work for anyone? Doesn't highlight for me at all.

I have so far not found a single tab mod that works Anyone any ideas please?
Quote:
Originally Posted by mgurain View Post
These did not work ! :
- links
- submenues
- highlight of active tab
I have added links & submenues but they didn't show up.
Links and SubMenu Links only appear under a tab when it is highlighted.

A tab will only be highlighted if:
  • the file is locally installed on the forum (not an external web site)
  • the THIS_SCRIPT line in the local file matches the file's name (define('THIS_SCRIPT', 'XXXX'))
  • the tab is not pointing another tab that has the same THIS_SCRIPT line in the file
  • the links associated with the tab are sections related to the local file.
I will give an example below (it is bare-bones, and will not work as it is, but is an example to explain the above):

Lets say we have a file you have uploaded to the root of your forum.... say test.php, the contents are as below:
PHP Code:
<?php 
// this should be the same name as the file
define('THIS_SCRIPT''test');  

// set to main page, if there are no arguments
if (empty($_REQUEST['do']))
{
    
$_REQUEST['do'] = 'main';
}

// this is the main section
if ($_REQUEST['do'] == 'main')
{
    
// DO MAIN STUFF
}

// this is another section
if ($_REQUEST['do'] == 'stuff')
{
    
// DO SOME STUFF
}

// this is yet another section
if ($_REQUEST['do'] == 'otherstuff')
{
    
// DO SOME OTHER STUFF
}
?>

We can create the tab and point the Tab URL to test.php or test.php?do=main.

The two links that will allow the tab to stay highlighted when either are clicked would have to have the Link URL field of each link set to test.php?do=stuff and test.php?do=otherstuff

Tab highlighting will not work if:
  • the Tab URL points to an external site
  • the THIS_SCRIPT line in the file matches another file that already has another tab that points to it
  • the Link URL fields do not point to sections of the same file that is pointed to by the tab they are associated with

I hope this explain things a bit, and as to why some people are having problems with getting tabs to highlight. It is not this hack that is the problem, it is how it is being utilised that is the problem.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01079 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete