Thread: Miscellaneous Hacks - vBH-Add new tabs
View Single Post
  #856  
Old 03-15-2012, 03:06 AM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gpinjason View Post
Thanks for the updates ForceHSS!

One issue I've found though, not sure if it's my system or not. I'm running 4.1.10, when I disable the "What's New?" Tab, and I click on the "New Posts" subnav link, the page comes up with the subnav links missing, and the borders missing on the bottom of the tabs.

This is what it looks like with the tab disabled:



And this is what it should look like:

Quote:
Originally Posted by gpinjason View Post
Same thing on default style...

admincp> Plugins & Products >plugin manager > Product : vBH - Add new tabs 1.2 or what ever version your using .. they are all the same but the "vbulletin" minversion= maxversion=

anyway

under Disable Tabs
replace the code with this

Code:
foreach ($vbulletin->bf_misc_vbhdistabs AS $tabname => $valor)
{
	if ($vbulletin->options['vbhdistabs'] & $valor){
switch($tabname){

			case 'vbh_cms':
			$vbulletin->templatecache['vbcms_navbar_link'] = str_replace('<li','<li style="display:none"',$vbulletin->templatecache['vbcms_navbar_link']);
break;
		break;

		case 'vbh_blogs':
			$vbulletin->templatecache['blog_navbar_link'] = str_replace('<li','<li style="display:none"',$vbulletin->templatecache['blog_navbar_link']);
		break;

		case 'vbh_whats_new':
			$vbulletin->templatecache['navbar']= preg_replace(
		'#(<li>|<li\s*class="selected">)*<a\s*class="navtab"\s*href="search\.php\?\'\s*\.\s*\$session\[\'sessionurl\'\]\s*\.\s*\'do=\w+&amp;contenttype=\w+"\s*accesskey="\d">\'\s*\.\s*vB_Template_Runtime::parsePhrase\("\w*"\)\s*\.\s*\'</a>(</li>)*#i',
		'',$vbulletin->templatecache['navbar']);
		break;

			}

	}
		
	
}
this mod is in good need of a update..

this will get you by with disabling the what's new and lossing the subnav







Quote:
Originally Posted by gpinjason View Post
I have tab links to a few cms article pages on my forum, and cannot figure out how to get the tab to show selected.. I know there has to be something I can do to make this happen, but I'm not too code savvy...
example

your adding content.php for your tab / button .. in the options on this mod under Tabs Selected
add vbcms
example
in Add new tabs URL and Text it would look like this
Calendar|calendar.php=>self
FAQ|faq.php=>self
Albums|album.php=>self
Groups|group.php=>self
Home|content.php=>self here add content.php and the rest that follows home can be what ever you like as long as the articles are using the content.php and you add the vbcms to tabs selected you golden

under Tabs Selected
it will look like this
Code:
calendar,faq,album,group,vbcms
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01234 seconds
  • Memory Usage 1,782KB
  • 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
  • (2)bbcode_code
  • (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