vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   How to redo your vBulletin 3.5.0 Navbar in Four Easy Steps! (https://vborg.vbsupport.ru/showthread.php?t=91624)

Cloudrunner 07-03-2005 10:00 PM

How to redo your vBulletin 3.5.0 Navbar in Four Easy Steps!
 
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.

Cloudrunner 07-04-2005 07:20 PM

Here is the screens that everyone's going to ask about...

Cloudrunner 07-04-2005 07:47 PM

Oh and one more thing, it does add queries to every page, 5 to be exact...

1 for the avatar load and 4 separate ones for the counts...

Enjoy

Snatch 07-04-2005 08:52 PM

Great Big Thx for it.

Is it possible to make the new thread and new post text clickable so that he shows me in the search all new threads or als new posts if i click ?

GreeTz
Snatch

Cloudrunner 07-04-2005 08:54 PM

Quote:

Originally Posted by Snatch
Great Big Thx for it.

Is it possible to make the new thread and new post text clickable so that he shows me in the search all new threads or als new posts if i click ?

GreeTz
Snatch

I'm working on an update to this as we speak to cut down on the queries, and I'll add that in when I update the thread, I was thinking the same thing ;)

Zachery 07-04-2005 08:58 PM

You could lose one with the avatar code, if you do some searching theres some nifty feature to get it without any extra work ;)

Further more, you should not really run the ammount of new posts and threads on EVERY PAGELOAD, thats alot of overhead, for a small bit of information, also, without indecies on the tables, its going to be rather intensive in the long run.

You could Cache the ammount of newly registered users today and the ammount of users visiting online in some sort of datacache

Cloudrunner 07-04-2005 09:31 PM

Well, I was going to turn those 5 queries into two, but when I did the page load times jumped astronomically from .11 to .98. Therefore, I'm leaving the queries alone. I've updated the zip for the 'navbar' template edit in response to a request to add alink on the new threads and new posts lines. This is done, just open the install.txt and redo the template edit for Navbar, (i.e. replave everything in the breadcrumb area)

Enjoy

)O( Cloudrunner )O(

Cloudrunner 07-04-2005 09:36 PM

Quote:

Originally Posted by Zachery
You could lose one with the avatar code, if you do some searching theres some nifty feature to get it without any extra work ;)

Further more, you should not really run the ammount of new posts and threads on EVERY PAGELOAD, thats alot of overhead, for a small bit of information, also, without indecies on the tables, its going to be rather intensive in the long run.

You could Cache the ammount of newly registered users today and the ammount of users visiting online in some sort of datacache

If you are talking about the $vbulletin->userinfo that is included with the vB, it won't work if the user has a custom avatar...already looked into that...if you know of one, could you point me in the right direction, I would love to call the AV without having to query the DB if it's already done for me.

As far as the overhead on the others, it's actually as minimalistic as I can get it at this point, I tried merging them into 1 query and only resulted in gaining more overhead, but until I figure out just how the datamanager truly works, I'm stuck here at this point.

I'm going to look into the caching of the new users and visited users, but for now this is what we have....

If you can point me in the right directions, I am willing to follow, we are all here to learn right?

The Geek 07-04-2005 10:23 PM

Why not just have a cron job that updates a row in the datasotre whenever its called with the amount of posts made in a time frame?
Doing an aggregate on the posts table (and users table) every page load will bring most large boards to their knees.
I fact, if those queries were changed to 'today' instead of last visit... you could run a cron job nightly... save the results in the datastore... and eliminate most of your queries which in turn should bring your page generation down to a much more acceptable amount.

If not... maybe make it a configurable option. That way users could decide which way they wanted to do it to suit their needs better.

Chris M 07-04-2005 11:19 PM

The only thing I am interested in within this is the collapsable navbar :p

Nice idea though :)

Satan


All times are GMT. The time now is 09:04 PM.

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.01251 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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