View Full Version : How to redo your vBulletin 3.5.0 Navbar in Four Easy Steps!
Cloudrunner
07-03-2005, 10:00 PM
NavBar Redux
By )O( Cloudrunner )O( of The Noble Pagan (http://www.noblepagan.com)
This extension was inspired by the concept provided by Megatekno (https://vborg.vbsupport.ru/member.php?u=47505) and his Welcome Panel Script (https://vborg.vbsupport.ru/showthread.php?t=83205). 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:
Page generated in 0.11882 seconds with 9 queriesPage generated in 0.12219 seconds with 14 queriesIf 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$av_url = $stylevar['imgdir_misc'] . '/noavatar.gif';and change it to read $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:nav_av_image
nav_new_users_today
nav_users_today
nav_new_threads
nav_new_posts
pm_show
pm_tdwidthAll 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
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
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
Cloudrunner
07-05-2005, 03:31 AM
The only thing I am interested in within this is the collapsable navbar :p
Nice idea though :)
Satan
wasn't my idea, I just fixed a bad implementation of the idea that was killing servers...
Cloudrunner
07-05-2005, 03:38 AM
Why not just have a cron job that updates a row in the datastore whenever its called with the amount of posts made in a time frame?I want to keep this as simple as humanly possible, adding crons and whatnot are too intensive in my eyes, I will figure this one out, no worries ;)Doing an aggregate on the posts table (and users table) every page load will bring most large boards to their knees.no, actually the implementation of this idea that was originally posted in the code mods section did that...killed MANY servers...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.now, what use would the end user of the forum have in today's last posts? most everyone I've dealt with over the years only wants posts and threads since last visit. As far as the page generation time, .07 seconds of additional overhead is not a respectable number? In whose eyes?
Seriously though, I am working on getting this to talk with the datamanager as a cached thing, I don't want to add tables, or modify the db in anyway shape or form, but I will figure this out to kill off what little overhead there is right now. I have severa scenarios running on my test bed that have brought the page gen overhead down but I need to make sure that they are reliable methods first, my biggest concern at this point is the avatar...
taffy056
07-05-2005, 10:54 AM
Hi,
I have installed your version of the welcome panel but have a couple of problems, the welcome panel is not showing up at all on the style by Kall below, I was wondering how to fix this.
https://vborg.vbsupport.ru/showthread.php?t=90792
Also, the panel does not resize like the other one did, so if you go to show favourites or bookmarks it does not look right.
I would also like to make the avatar image smaller, how do I go about it?
And finally thanks for sharing :)
taffy
Zachery
07-05-2005, 02:09 PM
I want to keep this as simple as humanly possible, adding crons and whatnot are too intensive in my eyes, I will figure this one out, no worries
Crons are the best and near only way to keep things non intensive, a cron to update the ammount of users online would be best.
You need to add indexs to the datelines in the thread and post tables, which should reduce the query times even more, for the two table scans to get the ammount of new posts.
simplicity is not the best way when it comes to some things.
The data that you want to get can be very strenious on the server, esp done on everypage load for every user, including guests it seems, very bad idea, guests DO NOT need to see this data, and most of it would be flawed to them as well.
As far as Avatars go, try this in the config.php file
define('AVATAR_ON_NAVBAR', 1);
And this in the navbar.
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]&dateline=$bbuserinfo[avatardateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" />
taffy056
07-05-2005, 02:44 PM
Hi,
Just realised that I didn't put the file edit in the navbar template :o , so that is fixed now! But still having a problem with sizing the welcome bar, it does adjust to a degree but the avatar is taking up to much room in my opinion, perhaps if it was 25% - 50% smaller the sizing issue would not be a problem?
taffy
taffy056
07-05-2005, 02:48 PM
Originally Posted by taffy056
I want to keep this as simple as humanly possible, adding crons and whatnot are too intensive in my eyes, I will figure this one out, no worries
hmmm,
Did I quote that? :smoke:
taffy
Cloudrunner
07-05-2005, 05:29 PM
Hi,
Just realised that I didn't put the file edit in the navbar template :o , so that is fixed now! But still having a problem with sizing the welcome bar, it does adjust to a degree but the avatar is taking up to much room in my opinion, perhaps if it was 25% - 50% smaller the sizing issue would not be a problem?
taffy
I've got it set to a height of 100 px, but I did not set the width to any particular size to keep the look of the image, however I can add that in as well...
Cloudrunner
07-05-2005, 05:40 PM
Crons are the best and near only way to keep things non intensive, a cron to update the ammount of users online would be best.Would there be a way for a cron to store the information in the datastore table without it breaking anything?You need to add indexs to the datelines in the thread and post tables, which should reduce the query times even more, for the two table scans to get the ammount of new posts.That is not a difficult adjustment, will get that into the deal.Simplicity is not the best way when it comes to some things.True enoughThe data that you want to get can be very strenious on the server, esp done on everypage load for every user, including guests it seems, very bad idea, guests DO NOT need to see this data, and most of it would be flawed to them as well.Truth be told, I never even thought of guests loading that...excellent idea though, that will be in next update as well.As far as Avatars go, try this in the config.php file
define('AVATAR_ON_NAVBAR', 1);
And this in the navbar.
<img src="image.php?$session[sessionurl]u=$bbuserinfo[userid]&dateline=$bbuserinfo[avatardateline]" title="$bbuserinfo[username]'s Avatar" alt="Avatar" border="0" />Is the define statement within the config file already, or will it need to be added (At work, no access to the server at the moment)?
and lastly, Thank you for your help, I do appreciate constructive assistance!
)O( Cloudrunner )O(
Zachery
07-05-2005, 05:49 PM
Would there be a way for a cron to store the information in the datastore table without it breaking anything?That is not a difficult adjustment, will get that into the deal.True enoughTruth be told, I never even thought of guests loading that...excellent idea though, that will be in next update as well.Is the define statement within the config file already, or will it need to be added (At work, no access to the server at the moment)?
and lastly, Thank you for your help, I do appreciate constructive assistance!
)O( Cloudrunner )O(
I think it might be able to be added to a hook, no, its not in the config, its one of those fun hidden features that I poked out of the devs ages ago :)
But in realitity that is a very small modification, and seeing as the config is a safe file to edit.. you might get away wiuth this as a plugin.
taffy056
07-05-2005, 05:55 PM
I've got it set to a height of 100 px, but I did not set the width to any particular size to keep the look of the image, however I can add that in as well...
Thanks very much! :)
Cloudrunner
07-06-2005, 01:57 AM
I think it might be able to be added to a hook, no, its not in the config, its one of those fun hidden features that I poked out of the devs ages ago :)
But in realitity that is a very small modification, and seeing as the config is a safe file to edit.. you might get away wiuth this as a plugin.
Nope, I just spent three hours walking through the initialization code from initial page call from the browser to the display, and unfortunately class_core.php is called WAY before any hooks, so I'm stuck with editing the config.php file...
What do you think, since the call is part of the resident vB coding, placing it in your config.php file (like the debug statement) would not invalidate the support? If so then I'll keep the mod here in the extensions forum...
Anyway, I'll start working on the data stuffies tomorrow after work...
Oh, BTWPage generated in 0.12269 seconds with 9 queriesPage generated in 0.18365 seconds with 13 queriesSo looks like those four queries are kickin the juice up...will work on that tomorrow as I said...
And thanks again for the help!
)O( Cloudrunner )O(
Zachery
07-06-2005, 03:45 AM
It shouldn't invlidate support, its just an undocumented feature :)
taffy056
07-06-2005, 09:09 AM
Hi,
Encountered a problem with the panel, I posted 2 posts into my test site, and then deleted one of them, but the panel is still showing two posts posted today, as you can see on the image attached. Is there a fix for this?
taffy
Zachery
07-06-2005, 02:01 PM
For your new post and new thread querys, you should use WHERE visable = 1 which should help clear that problem up.. abit...
Cloudrunner
07-06-2005, 11:51 PM
Hey folks, had to do an update to the system to cut down on the overhead abit...
So, download the new zip, and delete the old plugin, then import the new xml file.
After you do that follow step 4 again in the install.txt file and you should notice a decent drop in overhead.
I am still working on cutting down the overhead to as close to nothing as possible, but I thought I'd update with what I had so far.
A LOT of this update is due to the help that I have received on it from Zachery, Thank you boss!
)O( Cloudrunner )O(
Cloudrunner
07-07-2005, 12:00 AM
Hi,
Encountered a problem with the panel, I posted 2 posts into my test site, and then deleted one of them, but the panel is still showing two posts posted today, as you can see on the image attached. Is there a fix for this?
taffy
Did you "soft" delete it? if so it will still show due to how the threads and posts are called from the DB...
jesus likes pie
07-07-2005, 02:22 PM
by looking at the pic, its a welcome panel then?
taffy056
07-07-2005, 02:39 PM
Did you "soft" delete it? if so it will still show due to how the threads and posts are called from the DB...
No it was hard deleted, but I will try the same on your new panel to see if it makes any difference.
Thanks for sharing,
taffy
Rover416
07-07-2005, 06:19 PM
If you want to check this and provide me with your results, I would appreciate it!
These are mine
Page generated in 0.10616 seconds with 14 queries
And then when i clicked on a forum post it went to
Page generated in 0.21673 seconds with 15 queries
Cloudrunner
07-16-2005, 01:45 PM
Just an update on the avatars for this hack...if you are running vbadvanced CMPS then the navbar redux will break.
To fix this you'll need to DL this version and then do the following:
Remove the AVATAR_ON_NAVBAR line in your config file.
Remove the old plugin and then re-upload it and activate it.
Then in your VBACMPS default settings add the following to your Portal Output Global Variables:
nav_av_image
nav_new_users_today
nav_users_today
nav_new_threads
nav_new_posts
pm_show
pm_tdwidthYour navbar should be fixed now on all of your VBACMPS pages.
feldon23
09-07-2005, 07:21 PM
Just an update on the avatars for this hack...if you are running vbadvanced CMPS then the navbar redux will break.
To fix this you'll need to DL this version and then do the following:
Remove the AVATAR_ON_NAVBAR line in your config file.
Remove the old plugin and then re-upload it and activate it.
Then in your VBACMPS default settings add the following to your Portal Output Global Variables:
nav_av_image
nav_new_users_today
nav_users_today
nav_new_threads
nav_new_posts
pm_show
pm_tdwidthYour navbar should be fixed now on all of your VBACMPS pages.
Welcome Box on every page? Ugh!
Thanks for the effort... can a FORUMHOME version of this be built?
TruthElixirX
09-26-2005, 12:47 AM
Installed. Nice./ Thanks. :)
Alien
10-03-2005, 11:54 PM
Nice work! There's several versions of welcome panels out there, and none of them on 3.5 yet limit themselves to altering the forumhome only so I'd like to see this option on this excellent hack. I'm so close to finally getting our welcome panel back! However, until that forumhome option happens, I think I'll wait.
But this does look real nice though I'd want to change the templates around a bit to resemble this one (which to me had the most attractive approach and elliminated the stats table on forumhome too): https://vborg.vbsupport.ru/showthread.php?t=60451
That's the cleanest one I've found physically, does anyone think they can replicate that with some template modifications? I'd think that would look amazing if this hack could output via that style. :)
dirtycrow
10-10-2005, 06:01 AM
ok, stupid question. how do you - Import the Plugin XML file and activate the plugin called NavBar Redux??
TruthElixirX
10-21-2005, 10:34 PM
I'm having a problem with this in Firefox. IF a thread title is too big the screen gets waaaaaaaaaay distorted.
I've attatcheda screen of when I'm logged in and logged out.
If there is a way to fix this I'd be very happy.
Firefox only problem.
nexus851
11-15-2005, 06:17 AM
Why am i not getting the blinking "NEW PRIVATE MESSage" when im in the CMPS home? i onlyg et it when im in the forum....
Please advise..
sim tech
11-15-2005, 04:25 PM
I installed it on ver 3.51 and I love it! No one has noticed ay slowdown at all on the pageloads.
One thing that has confused a few of my users though, is that when they log out the navbar is still present and still says "logout", instead of the typical logout page.
http://www.simtechonline.com/temp/deano.gif
And then only if they hit logout a 2nd time does it come up with this page:
http://www.simtechonline.com/temp/deano1.gif
Chadi
11-19-2005, 05:23 AM
I am getting this error:
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*yourtableprefix*user ADD INDEX (joindate, lastactivity)' at line 1
Chadi
11-19-2005, 05:44 AM
Please look at my header. After I modified navbar it added those black small squares/spaces. How do I correct them? Also, my avatar is larger than it should be. How do I make it show original size?
http://www.talkjesus.com/index.php?
navbar:
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>
<br />
<!-- breadcrumb, login, pm info -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="thead" colspan="5">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('navbar')"><img id="collapseimg_navbar" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_navbar].gif" alt="" border="0" /></a>
<strong>$vboptions[bbtitle]</strong>
</td>
</tr>
</thead>
<tbody id="collapseobj_navbar" style="$vbcollapse[collapseobj_navbar]">
<tr>
<if condition="$bbuserinfo['userid']">
<td class="alt2" valign="top" nowrap="nowrap" width ="1%">
$nav_av_image
</td>
</if>
<if condition="$bbuserinfo['userid']">
<td class="alt1" valign="middle" nowrap="nowrap" width="100%">
<else />
<td class="alt1" valign="middle" nowrap="nowrap">
</if>
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1)"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
<if condition="$bbuserinfo['userid']">
<td class="alt2" valign="middle" nowrap="nowrap">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase><br />
<br />
<a href="search.php?do=getnew">New Threads</a> Since Last Visit: $nav_new_threads<br />
<a href="search.php?do=getnew">New Posts</a> Since Last Visit: $nav_new_posts<br />
Total Users Visiting Today: $nav_users_today<br />
New Users Registered Today: $nav_new_users_today
</div>
</td>
<if condition="$bbuserinfo['pmunread'] and $permissions['pmquota'] > 0">
<td style="background-image: url($stylevar[imgdir_misc]/New_PM_BG.gif); background-repeat: no-repeat;" class="alt1" align="center" valign="middle" nowrap="nowrap">
<else />
<td class="alt1" align="center" valign="middle" nowrap="nowrap">
</if>
<div class="smallfont">
<if condition="$show['pmstats']">
<div align="center" class="smallfont">
<table cellpadding="0" cellspacing="1" border="0" width="75%">
<tr align="center">
<td colspan="3" nowrap="nowrap">
<div class="smallfont">
<a href="$vboptions[bburl]/private.php">Private Messaging</a> Statistics<br />
<img src="$stylevar[imgdir_statusicon]/pm_new.gif" alt="Unread Messages" border="0" /> $vbphrase[unread_x_nav_compiled]<br>
<img src="$stylevar[imgdir_statusicon]/pm_old.gif" alt="Unread Messages" border="0" /> $vbphrase[total_x_nav_compiled]</div>
</td>
</tr>
<tr>
<if condition="$pm_show['allfolderstotal']">
<td nowrap="nowrap" width="$pm_tdwidth[total]" style="background-color:red; font-size:10px" title="<phrase 1="$bbuserinfo[pmtotal]">$vbphrase[total_messages_in_all_folders_x]</phrase>"> </td>
</if>
<if condition="$pm_tdwidth[quota] > 0">
<td nowrap="nowrap" width="$pm_tdwidth[quota]" style="background-color:green; font-size:10px" title="<phrase 1="$permissions[pmquota]">$vbphrase[maximum_allowed_messages_x]</phrase>"> </td>
</if>
</tr>
</table>
</div>
</if>
</div>
</td>
<else />
<if condition="$show['guest']">
<!-- guest welcome message -->
<td class="alt2" valign="middle" width="100%">
<div align="center">
<phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase><br />
<br />
<phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
</div>
</td>
<!-- / guest welcome message -->
</if>
<!-- login form -->
<td class="alt1" valign="middle" nowrap="nowrap" style="padding:0px">
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password,vb_ login_md5password_utf)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td class="smallfont">$vbphrase[username]</td>
<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td>
</tr>
<tr>
<td class="smallfont">$vbphrase[password]</td>
<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
<td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
</td>
<!-- / login form -->
</if>
</tr>
</tbody>
</table>
<!-- / breadcrumb, login, pm info -->
<!-- nav buttons bar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
</if>
<if condition="$bbuserinfo['userid']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
<if condition="$bbuserinfo['userid']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td>
</if>
</tr>
</table>
</div>
<!-- / nav buttons bar -->
<br />
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="text" class="bginput" name="query" size="20" /> $gobutton<br />
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
</table>
</div>
<!-- / header quick search form -->
</if>
<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->
<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
</if>
Chadi
11-19-2005, 04:27 PM
Also,
I can't find something closer to this:
https://vborg.vbsupport.ru/showthread.php?t=60451
Can anyone do this style instead?
Chadi
11-20-2005, 06:34 PM
Why is the avatar enlarged/cropped? How do I fix this?
Madmp3zz
11-22-2005, 12:25 PM
Bump
Chadi
11-24-2005, 11:22 PM
No one?
Chadi
11-28-2005, 03:15 AM
Bump :)
AshokForums.com
12-04-2005, 07:56 PM
No support? I am facing the same problem as that of TruthElixirX..
It gets distorted not only in Firefox but in opera too
Chadi
12-05-2005, 01:09 AM
How do I add the quick search (dropdown) to the welcome panel? Say new column, first one on the right after pm's
Scooterpig
12-28-2005, 09:36 AM
How do I add the quick search (dropdown) to the welcome panel? Say new column, first one on the right after pm's
Have it installed and running fine all except for the Total Number of Users visited today. For some strange reason the figure drops throughout the day and I have no idea why.
At one stage there was 100 visitors and now there have only been 75.
Any ideas please?
DF-inside
01-01-2006, 03:14 PM
Any 3.52 users having this MOD? And does Firefox screws up the design of the forum when aplying this MOD?
Scooterpig
01-03-2006, 06:53 AM
Anyone???
shadow187
01-15-2006, 12:25 AM
Great thing, was looking a long time for this
Just one thing it shows my avatar as broken ..
Any ideas on this
LWillmann
01-29-2006, 09:02 PM
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:
$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:
$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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.