Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
How to redo your vBulletin 3.5.0 Navbar in Four Easy Steps! Details »»
How to redo your vBulletin 3.5.0 Navbar in Four Easy Steps!
Version: 1.03, by Cloudrunner Cloudrunner is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Version: 3.5.0 Beta 3 Rating:
Released: 07-03-2005 Last Update: 07-15-2005 Installs: 30
Uses Plugins Template Edits
Additional Files  
No support by the author.

NavBar Redux
By )O( Cloudrunner )O( of The Noble Pagan


This extension was inspired by the concept provided by Megatekno and his Welcome Panel Script. Unfortunately that script was killing servers, so I took his concept and did a Redux of it using vBresident code as the inspiration for the plug side of the house.

What you need to do
Upload images: 2
(I have provided the blinking PM notification image, you provide the no avatar image, must be named noavatar.gif and both are placed in the ./images/misc/ directory. If you want to not display an avatar without breaking the navbar with a big red "X" then follow the instructions below)

Queries to run: 3
(to add indexes to the user, post, and thread tables to speed up page loads and cut overhead, this is optional, but is reccomended)

File Edits: 0
Template Edits: 2
Plugin XML Import: 1

All done!
Features
  • Avatar Display
  • Fully Breadcrumb compatible
  • Blinking PM notification on new PM (Concept inspiration and HTML code provided by vBulletin.org)
  • Collapsible Navbar to hide all that stuff
  • Guest message is now in the Navbar, instead of on top of your forums
  • Display of new threads since last visit, new posts since last visit, new users registered today, and total registered users visited today.
I think that's it. My users like it, and I hope yours do too.

Page Load and Queries are as follows on a heavy traveled forum:

Quote:
Originally Posted by The Noble Pagan Forums w/o NavBar
Page generated in 0.11882 seconds with 9 queries
Quote:
Originally Posted by The Noble Pagan Forums w/ NavBar
Page generated in 0.12219 seconds with 14 queries
If you want to check this and provide me with your results, I would appreciate it!

Love and Light to you all!

)O( Cloudrunner )O(


To disable display of NoAvatar Image

In the plugin NavBar Redux, simply find this code
PHP Code:
$av_url $stylevar['imgdir_misc'] . '/noavatar.gif'
and change it to read
PHP Code:
        $av_url ''
All done, no broken avatar on noavatar users.

To get this to work with vB Advanced CMPS for 3.5.0

In your VBACMPS default settings add the following to your Portal Output Global Variables:
Code:
nav_av_image
nav_new_users_today
nav_users_today
nav_new_threads
nav_new_posts
pm_show
pm_tdwidth
All done.

Show Your Support

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

Comments
  #52  
Old 01-29-2006, 09:02 PM
LWillmann LWillmann is offline
 
Join Date: Jan 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cludrunner, thanks for this! I really like it.

I had an issue with the stock no_avatar.gif file being smaller than the size you specified in the .xml file, and it doesn't stretch very well, so I wrote something to work with avatars that are a different size.

This code change will resize the avatar proportionally if either dimension larger than the set size (I left it set to 100x100), or if it's equal to the set size or smaller, it will use the set size.

To adjust your script to make this work do this:

1) Go to your Admin Control Panel
2) Go to the Plugin manager
3) Choose to edit the Navbar Redux plugin.

Find this code:
PHP Code:
$av_url fetch_avatar_url($vbulletin->userinfo['userid']); 
    if (!
$av_url){ 
        
$av_url $stylevar['imgdir_misc'] . '/noavatar.gif'
    } else { 
        
$av_url $vbulletin->options['bburl'] . '/' $av_url[0]; 
    } 
    
$nav_av_image '<img width="100" height="100" src="'.$av_url.'" border="0">'
And replace it with this:
PHP Code:
$av_url fetch_avatar_url($vbulletin->userinfo['userid']); 
    if (!
$av_url){ 
        
$av_url $stylevar['imgdir_misc'] . '/noavatar.gif'
    } else { 
        
$av_url $vbulletin->options['bburl'] . '/' $av_url[0]; 
    } 
    
$av_size GetImageSize($av_url);
    
$max_av_disp_height '100';
    
$max_av_disp_width '100';
    if (
$max_av_disp_width $av_size[0])
    {
    
$av_disp_width $av_size[0]/$max_av_disp_width;
    
$av_disp_height $av_size[1]/$av_disp_width;
    }
    else 
    {
    
$av_disp_width $av_size[0];
    
$av_disp_height $av_size[1];
    }
    if (
$max_av_disp_height $av_size[0])
    {
    
$av_disp_height $av_size[1]/$max_av_disp_height;
    
$av_disp_width $av_size[0]/$av_disp_height;
    }
    else 
    {
    
$av_disp_width $av_size[0];
    
$av_disp_height $av_size[1];
    }
    
$nav_av_image '<img width="'.$av_disp_width.'" height="'.$av_disp_height.'" src="'.$av_url.'" border="0">'
This should make the avatar display better. Editing the NAVBAR template after this would allow you to specify that particular cell in the table to be horizontally and vertically centered so that the avatar was centered in the block opening if the Welcome panel is talled than the avatar.

Thanks again!

*Clicks Install
Reply With Quote
Reply

Thread Tools

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 06:07 AM.


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.07251 seconds
  • Memory Usage 2,235KB
  • Queries Executed 18 (?)
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
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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