vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   vBulletin CMS Widgets - Alternate Section Navigation Widget Template (https://vborg.vbsupport.ru/showthread.php?t=233916)

ZippySLC 01-22-2010 10:00 PM

Alternate Section Navigation Widget Template
 
1 Attachment(s)
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

JAFRI 01-23-2010 05:13 AM

Thanks, nice........

Front Range 4x4 01-26-2010 03:04 AM

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. :confused:

as7apcool 01-26-2010 04:06 AM

very nice

anthony parsons 01-26-2010 06:04 AM

Quote:

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

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.

Front Range 4x4 01-27-2010 09:53 PM

I appreciate you adding the detail but I guess this just isn't meant to be used by me. :(

ZippySLC 01-27-2010 10:41 PM

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.

ZippySLC 01-27-2010 10:44 PM

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.

Front Range 4x4 01-30-2010 03:35 AM

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.

ZippySLC 01-30-2010 11:57 AM

Sorry!


All times are GMT. The time now is 07:13 AM.

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.01077 seconds
  • Memory Usage 1,738KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete