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
  #12  
Old 02-01-2010, 07:13 AM
cy1138 cy1138 is offline
 
Join Date: Jan 2010
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the widget on my page but there is nothing in it.
Do i have to add some code in the widget when i made it?
Reply With Quote
  #13  
Old 02-01-2010, 08:53 PM
AURFSCAN AURFSCAN is offline
 
Join Date: Dec 2007
Posts: 328
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Create a New template and add the code above to it.
2. Call it vbcms_widget_navigation
3. Go to widgets
4. Click 'Configure' for Navigation
5. Change the template name from vbcms_widget_sectionnavext_page to vbcms_widget_navigation

edit: If the widget margins are 'off' change the vbcms_widget_margin settings in StyleVars
Reply With Quote
  #14  
Old 02-02-2010, 03:46 AM
cy1138 cy1138 is offline
 
Join Date: Jan 2010
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx AURFSCAN for taking the time to give me this explanation!

That worked like a dream for me!!
This looks so much better then the original setion nav!

Thanx!
Reply With Quote
  #15  
Old 02-13-2010, 11:40 AM
M@tt M@tt is offline
 
Join Date: Nov 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone have any thoughts/instructions on how to do the same for the Categories box please?
Reply With Quote
  #16  
Old 02-28-2010, 07:42 PM
giorgino giorgino is offline
 
Join Date: Dec 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

reserved
Reply With Quote
  #17  
Old 03-04-2010, 09:47 PM
HondaATC HondaATC is offline
 
Join Date: May 2004
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did it, I like it, Thanks!

My only question is though, I see on your site, njpinebarrens.com that you have the section list expanded as a default when I view it. How in the heck can I do that on mine! I changed the option on the widget configuration, but it didn't seem to do anything. What is yours set at?
Reply With Quote
  #18  
Old 03-09-2010, 01:57 AM
Jabong82 Jabong82 is offline
 
Join Date: Feb 2010
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Installed. How do you change the background color though of the widget? I don't know where to find the code to edit. Thank you.
Reply With Quote
  #19  
Old 01-20-2011, 06:43 PM
smnet smnet is offline
 
Join Date: Feb 2009
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to stop the expand and collapse when you click a label just remove this from clientscript/yui/treeview/treeview-min.js
Code:
B.on(H,"click",this._onClickEvent,this,true);
I am sure this is not the correct way to achieve this but hey, it works!
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 09:59 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.04560 seconds
  • Memory Usage 2,295KB
  • 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
  • (2)bbcode_code
  • (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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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