Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Alternate Section Navigation Widget Template Details »»
Alternate Section Navigation Widget Template
Version: 1.00, by ZippySLC ZippySLC is offline
Developer Last Online: Nov 2010 Show Printable Version Email this Page

Category: vBulletin CMS Widgets - Version: 4.0.1 Rating:
Released: 01-22-2010 Last Update: Never Installs: 12
Template Edits
Re-useable Code  
No support by the author.

This template will make your section navigation widget look like the other widgets on your CMS page. It always bothered me that the navigation widget looked so radically different than the other widgets.

What I did was created a custom template, and assigned that to the section widget. You should create one with the following code:

Code:
<script type="text/javascript">
<!--
	var IMGDIR_MISC = "{vb:stylevar imgdir_misc}";
	var vb_disable_ajax = parseInt("0", 10);

        /* Start Sections Widget Configuration */
        vbGlobal_SHOW_ALL_TREE_ELEMENTS_THRESHOLD = parseInt("{vb:raw show_all_tree_elements_threshold}");
        /* End Seections Widget Configuration */
// -->
</script>
<script type="text/javascript" src="{vb:stylevar yuipath}/treeview/treeview-min.js"></script>
<!-- start treeview css -->
<script type="text/javascript">
	if (window.loadVbCss) {
		loadVbCss("{vb:stylevar yuipath}/treeview/assets/skins/sam/treeview.css",true);
	}
</script>
<!-- end treeview css -->

<!-- custom treeview styles defined at template: headinclude -->

<!-- END VB Tree-Menu Implementation of YUI TreeView -->

<div class="cms_widget">
	<div class="block">
          <div class="cms_widget_header">

          <h3>Articles</h3><!-- You can change this to whatever you'd like to call the menu -->

	  </div>

	<div class="cms_widget_content">
		<div class="vb-tree-menu">
			{vb:raw nodelist}
		 </div>
	</div>
  </div>
</div>
<script type="text/javascript">
<!--
	// Main vBulletin Javascript Initialization
	//vBulletin_init();
//-->
	initVbTreeMenus({vb:raw menu_static});
</script>
Additionally, you'll want to edit the stylevars that control how the menu are displayed. They're vbcms_navwidget_menuitem_*. I also got rid of the images that display the plus and minus icons for the sub-sections on my site.

You can see this in action at http://www.njpinebarrens.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-23-2010, 05:13 AM
JAFRI's Avatar
JAFRI JAFRI is offline
 
Join Date: Jun 2009
Posts: 203
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, nice........
Reply With Quote
  #3  
Old 01-26-2010, 03:04 AM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just what I was looking for. I just wish the directions were clear and concise enough for me (and others) to figure out how to do it.
Reply With Quote
  #4  
Old 01-26-2010, 04:06 AM
as7apcool as7apcool is offline
 
Join Date: Feb 2009
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice
Reply With Quote
  #5  
Old 01-26-2010, 06:04 AM
anthony parsons anthony parsons is offline
 
Join Date: Apr 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Front Range 4x4 View Post
I just wish the directions were clear and concise enough for me (and others) to figure out how to do it.
Just for others....

Create a new template, call it vbcms_widget_navigation and paste the above code within it.

Create a new static HTML widget, which will be your new navigation.

Configure the widget and change the template name to the one you created, in this example: vbcms_widget_navigation

That is it. You will now load a default widget style with the JS section menu inside of it. It will obviously inherit your default style for your widgets.
Reply With Quote
  #6  
Old 01-27-2010, 09:53 PM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I appreciate you adding the detail but I guess this just isn't meant to be used by me.
Reply With Quote
  #7  
Old 01-27-2010, 10:41 PM
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, actually what I did was create a new template:

AdminCP > Styles & Templates > Style Manager, and in the dropdown for your style, select "Add New Template."

Name your template whatever you'd like, and paste the code in my first post into the text box. Hit save.

Now, you want to edit the template that the widget that draws that menu uses to use your new custom template.

AdminCP > VBulletinCMS > Widgets and configure the widget for the menu (it will say Section Navigation - JS Advanced). In the popup box you'll change the name of the template to the name that you gave your new custom template.
Reply With Quote
  #8  
Old 01-27-2010, 10:44 PM
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To get rid of the plus and minus images that show up in the menu, the easiest way I found is to replace the images in images/misc/trees with 0 byte files. You'll want to change all of the minus-on, minus-off, plus-on, and plus-off images.
Reply With Quote
  #9  
Old 01-30-2010, 03:35 AM
Front Range 4x4 Front Range 4x4 is offline
 
Join Date: Jan 2009
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the extra directions ZippySLC but I can't get it to work. I've redone it so many times I don't need to read your steps any more.
Reply With Quote
  #10  
Old 01-30-2010, 11:57 AM
ZippySLC's Avatar
ZippySLC ZippySLC is offline
 
Join Date: Oct 2004
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry!
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 04:39 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.04525 seconds
  • Memory Usage 2,314KB
  • Queries Executed 24 (?)
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)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (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_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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete