View Full Version : Welcome Panel Hack [3.5.X]
SmasherMaster
01-21-2006, 10:00 PM
Version 1.3
Hack Author:
[b][color=yellow]Name: SmasherMaster (https://vborg.vbsupport.ru/member.php?u=49730)
E-Mail: Xenaero@gmail.com
[size=4]Description:
This hack replaces the box on top of the postbit in the index page with a snazzy panel with stats, new posts and PMs. When you go to view a different page, the box on top of the navbar changes into the default navigation/breadcrumb box.
Changelog:
V1.3 - Added 2 new texts, one under Forum Stats and one under Your Info:
Your Posts, which displays your total # of posts and the %
of the total forum's posts it is.
Active Members, this basically is the same stat as the one
in the bottom of the What's Going On? Panel.
V1.2 - Updated it for vB 3.5.x! Enjoy! Note also that since I do not have
the vBA portal anymore, I cannot be certain how to update that
coding as well, sorry! =(
I also fixed a few minor security bugs and avatar paths,
And made it work with the plugin system! Have fun!
V1.1 - Changed file edit to global.php for tidier code.
Added file and new template edits for VbAdvanced CMPS
So the welcome panel will work on CMPS.
V1.0 - Welcome Panel Hack RELEASED! :)
Installation Time:
5 min.
Zip Contents:
WelcomePanelHack_V1.3[3.5.x].zip
|-instructions.txt -- Instructions on how to install this hack.
|-WelcomePanel-Plugin.xml -- The plugin XML
|-noavatar.gif -- Image for members who don't have an avatar yet.
|-guestavatar.gif -- Image for guests.
|-Welcome_Panel_Guest.jpg -- What the panel will look like to a guest
|-Welcome_Panel_loggedin.jpg -- What the panel will look like to a member with an avatar
|-Welcome_Panel_loggedin_noav.jpg -- What the panel will look like to a member without an avatar
Testing:
Tested on vBulletin 3.5.3
Plugins to upload:
WelcomePanel-Plugin.xml
Templates to Modify:
forumhome (Optional)
navbar
Images to Upload:
noavatar.gif
guestavatar.gif
Notes:
If you use this hack, please click on the INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=105958) button.
You will be notifited via email about any updates or changes.
Megareus Rex
01-22-2006, 12:38 AM
Arent you glad I bugged you to do this, Smash? :P
As you know, I've installed it too >.>
SmasherMaster
01-22-2006, 12:44 AM
Arent you glad I bugged you to do this, Smash? :P
As you know, I've installed it too >.>
Yep, and now everyone can have this awesome update for the latest vB! \o/
One thing I forgot to mention, is if you werent logged in, there would be an extra 'sector' to the left of the guest please register avatar space, i've fixed that pesky problem. ;)
rb290
01-22-2006, 12:47 AM
kool installing
SmasherMaster
01-22-2006, 01:08 AM
A quick mod you can make to the coding. If you want the # of threads with new posts, instead of the # of newly CREATED threads, replace:
$vbulletin->userinfo['newthreads'] = $db->query_first("select count(*) as newthreads from ".TABLE_PREFIX."thread where dateline >= {$vbulletin->userinfo['lastvisit']} and visible = 1 and sticky in(0,1)");
In the plugin, with:
$vbulletin->userinfo['newthreads'] = $db->query_first("select count(*) as newthreads from ".TABLE_PREFIX."thread where dateline and lastpost >= {$vbulletin->userinfo['lastvisit']} and visible = 1 and sticky in(0,1)");
Happy trails~
Edit: Oh ffs can someone move this to the Extensions forum, I mistakenly posted it here. :/
BoYagoob
01-22-2006, 05:25 AM
Thanks ..
Scooterpig
01-22-2006, 05:51 AM
Thanks ..
Finaly at last, thank you thank you Smasher..:)
Azhrialilu
01-22-2006, 06:53 AM
very nice!
Snake
01-22-2006, 08:47 AM
SWEET! I was looking for a new version of a welcome panel hack and I got this! Thanks. :D
Dollah
01-22-2006, 09:24 AM
sumthing mew i'm on it lets go thanx
chimaira
01-22-2006, 01:18 PM
Awsome and works fine... Just one thing... What part do i need to edit to have the avatar display on the right hand side.. rather than the left
SmasherMaster
01-22-2006, 10:10 PM
Awsome and works fine... Just one thing... What part do i need to edit to have the avatar display on the right hand side.. rather than the left
Replace the navbar template coding that I had you insert with this:
<!-- Welcome Panel Hack V1.2 [] Created By SmasherMaster -->
<if condition="THIS_SCRIPT == 'index'">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%"
align="center">
<tr>
<!-- Main Welcome Panel Block [] Begin -->
<td class="alt1" nowrap="nowrap" style="padding:3px">
<if condition="$vbulletin->userinfo[userid]!=0">
<!-- Your Stats [] Begin -->
<div class="smallfont"><b>Your Info:</b><br />User: <a
href="member.php?{$session['sessionurl']}u={$vbulletin->userinfo['userid']}"
title="Go To Your Profile">{$vbulletin->userinfo['username']}</a><br />
<a href="search.php?{$session['sessionurl']}do=getnew">New Posts</a>:
{$vbulletin->userinfo['newposts']}<br />New Threads:
{$vbulletin->userinfo['newthreads']}<br />
<if condition="$show[pmstats]"><phrase
1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]"
3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if></div>
<!-- Your Stats [] End -->
<else />
<!-- login form -->
<form action="login.php" method="post"
onsubmit="md5hash(vb_login_password,vb_login_md5password)">
<script type="text/javascript"
src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="smallfont">User Name</td>
<td><input type="text" class="button" name="vb_login_username"
id="navbar_username" size="10" accesskey="u" tabindex="1" value="User Name"
onfocus="if (this.value == 'User Name') this.value = '';" /></td>
</tr>
<tr>
<td class="smallfont">Password</td>
<td><input type="password" class="button"
name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td>
</tr>
<tr>
<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" />Remember Me?</label>
<input type="submit" class="button" value="Log in" tabindex="4"
title="Enter your username and password in the boxes provided to login, or click
the 'register' button to create a profile for yourself." accesskey="s" />
</td>
</tr>
</table>
<input type="hidden" name="ID" value="" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="vb_login_md5password" />
</form>
<!-- / login form -->
</td>
<!-- Guest [] End --></if>
</td>
<td class="alt2" valign="top" nowrap="nowrap">
<!-- Forum Stats [] Begin -->
<div class='smallfont'><b>Forum Stats:</b><br />Threads: $welcome_topics<br
/>Posts: $welcome_posts<br />Members: $welcome_members<br /><phrase
1="member.php?$session[sessionurl]u=$newuserid"
2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
<!-- Forum Stats [] End -->
</td>
<td class="alt1" valign="middle" align="center">
<if condition="$vbulletin->userinfo[userid]!=0">
<!-- Avatar Cell [] Begin -->
{$welcome_avatar}
<!-- Avatar Cell [] End -->
<else />
<!-- Guest [] Begin -->
<!-- Avatar -->
<a href="register.php?ID=&"><img
src="images/avatars/guestavatar.gif" border="0"></a>
</td>
<!-- / Avatar -->
</if>
<!-- Main Welcome Panel Block [] End -->
</tr>
</table>
<else />
<!-- / Welcome Panel Hack V1.2 [] Created By SmasherMaster -->
chimaira
01-22-2006, 10:29 PM
Superb. Thanks
SmasherMaster
01-24-2006, 03:03 AM
Hey uh, could a mod/admin move this to the Extensions forum? I realised I put it in the wrong place. :/
ggiersdorf
01-27-2006, 01:03 PM
Can you make this so that new posts, and new replies are both clickable taking you to a display of new messages and also to a display of the current threads with new posts in it? Also have it so once I click a thread and view the new messages that it updates them immediately right now it will still show 100 new posts even if I read 98 of them untill the next time I log on..
Great Hack though!
leedzinh
01-28-2006, 04:32 AM
Warning: Division by zero in /index.php(63) : eval()'d code on line 98
SmasherMaster
01-28-2006, 04:51 PM
Can you make this so that new posts, and new replies are both clickable taking you to a display of new messages and also to a display of the current threads with new posts in it? Also have it so once I click a thread and view the new messages that it updates them immediately right now it will still show 100 new posts even if I read 98 of them untill the next time I log on..
Great Hack though!
My hack uses the coding from the new posts feature in vB, unless I misunderstood you. =o
leedzinh: Did you try disabling the plugin? You might have done something wrong. =(
Megareus Rex
02-13-2006, 07:49 PM
Hey smash, I think I figured out that problem w/ the "% of total posts" feature that EF has been having (I'm posting this here in case you see it before I get to talk to you again, and because other people may have had the same problem).
Some things I noticed:
-It only gives the % to 2 decimal places. Since EF has 224000+ posts, even at 100 posts, the % of a member's total posts to 2 decimal places is still 0.00%, without rounding. The % should round the %, so that even if a person only has 1 post on a board with millions of posts total, it'll read "0.01%". Or if its 0.00% w/out rounding, have it say "negligable % of total posts"
-It ignores any manual edits to postcounts admins make. So if a person has only posted 10 times, and the admin changes their postcount to 10000, it'll still read the % as though they only have 10.
-Every post a user makes in a forum with the postcount turned off, it SUBTRACTS 1 post from the % of total posts. So if a person posts enough in a forum like Spammyland on EF (which pretty much any EF member has), their post % will read 0.00% easily.
Those are just 3 observations I made while testing it ay EFv's test forum, so I figure I'd relay them to you here before I forgot, since you arent on now >.>
SmasherMaster
02-13-2006, 09:10 PM
Making it round will be tough, since I haven't really dont anything like that yet, but I bet I can do it. As for the 2nd one, It reads from the user's postcount data, so I don't get how that wouldn't count though...Now the third one REALLY confuses me. I have absolutely no idea on what to do about that, but i'll look into it.
Megareus Rex
02-16-2006, 03:15 AM
Idea! Why not add in parenthesis next to the total member count, the # of members that registered today. I've seen other hacks for that, so adding it may make your panel even more appealing.
khaleel
02-17-2006, 07:58 PM
The guest avatar comes up, the no avatar comes up but the users avatars dont?
SmasherMaster
02-18-2006, 08:09 PM
The guest avatar comes up, the no avatar comes up but the users avatars dont?
What does it say in the field where the user avatar is?
Mamochka
02-27-2006, 10:24 PM
SmasherMaster,
i have a little problem.
on forum home i see :
User: Mamochka
Your Posts: 250 Posts
New Posts: 49
if i read some thread :
userinfo:
Mamochka
Administrator
Posts: 185 <- ?
Why?
Megareus Rex
02-27-2006, 11:26 PM
SmasherMaster,
i have a little problem.
on forum home i see :
User: Mamochka
Your Posts: 250 Posts
New Posts: 49
if i read some thread :
userinfo:
Mamochka
Administrator
Posts: 185 <- ?
Why?
Methinks Smash didn't update the hack with that fix yet.
Right now, it queries the post table, and generates the postcount based on the # of posts that are tagged with the user's ID. The postcount used in the postbit queries the actual postcount column in the user table. I thought he'd updated the hack here though, guess not. Anyways, I informed him of the problem for you.
SmasherMaster
02-27-2006, 11:50 PM
Replace the relevant coding lines in the plugin XML:
$vbulletin->userinfo['yourposts'] = $db->query_first("select posts as your_posts from ".TABLE_PREFIX."user where userid = {$vbulletin->userinfo['userid']}");
$vbulletin->userinfo['yourposts'] = vb_number_format($vbulletin->userinfo['yourposts']['your_posts']);
Mamochka
03-05-2006, 10:41 AM
SmasherMaster,
Thx.It's work.
Bukusami
03-15-2006, 04:55 PM
Warning: Division by zero in /index.php(62) : eval()'d code on line 24
Get this too, disabling plugin gets rid of it but i done everything in the instructions by the letter, i looked ta index.php and found this
// get special data templates from the datastore
$specialtemplates = array(
'userstats',
'birthdaycache',
'maxloggedin',
'iconcache',
'eventcache',
'mailqueue'
Thats line 23/24+
So i removed line 24 witch was the 'userstats' and still got the error.
Bukusami
03-15-2006, 05:53 PM
Silly question, is says works with 3.5.x but has it been tested and works on 3.5.4 as i had to do a little extra editing to remove the bottom stats than the instructions told me (Didnt cause the error i reverted it after to check)
QueenBee
03-15-2006, 06:16 PM
wonderful! clicks install!
Bukusami
03-21-2006, 10:15 AM
Noone has a way to fix this error i am getting on 3.5.4?
I really like this addon but cant get rid of the error above ^^
kazido
03-26-2006, 07:39 AM
I get a different error while trying to do the first navbar edit...
The following error occurred when attempting to evaluate this template:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ooncha/public_html/forum/includes/adminfunctions_template.php(3537) : eval()'d code on line 114
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish
I have 3.5.4 with CMPS 2.1.0. Im thinking my previous mos "show avatar in navbar" may cause a conflict or someting.
Any gurus out there know what that means?
Cheers :)
SmasherMaster
03-29-2006, 12:01 AM
Warning: Division by zero in /index.php(62) : eval()'d code on line 24
Get this too, disabling plugin gets rid of it but i done everything in the instructions by the letter, i looked ta index.php and found this
// get special data templates from the datastore
$specialtemplates = array(
'userstats',
'birthdaycache',
'maxloggedin',
'iconcache',
'eventcache',
'mailqueue'
Thats line 23/24+
So i removed line 24 witch was the 'userstats' and still got the error.
What other hacks do you have installed? And did you download the latest version?
I get a different error while trying to do the first navbar edit...
Quote:
The following error occurred when attempting to evaluate this template:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/ooncha/public_html/forum/includes/adminfunctions_template.php(3537) : eval()'d code on line 114
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish
I have 3.5.4 with CMPS 2.1.0. Im thinking my previous mos "show avatar in navbar" may cause a conflict or someting.
Any gurus out there know what that means?
Cheers
Hmm, CMPS might be a problem with it, try disabling CMPS and see what happens. I don't use CMPS myself so i'm not sure what effects it has on the navbar.
Bukusami
03-30-2006, 08:29 PM
What other hacks do you have installed? And did you download the latest version?
Fresh install yours was first hack installed..
Although now i have the Welcome Headers hack installed and thats it.
Bukusami
04-04-2006, 06:00 PM
Any info on this i woudl really love to have this hack installed.
Bukusami
04-08-2006, 11:12 AM
i take it there is no fix then..
rareclownfish
04-10-2006, 12:31 AM
Thanks great hack.
rareclownfish
04-10-2006, 12:48 AM
How can I had this blinking PM image to this hack.
I tried to see if it work but didn't.
Here the image link and the code. http://www.guitars101.com/images/newpm.gif
Code:
Open your navbar template and find:
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
Add this underneath: (change the paths accordingly)
<if condition="$bbuserinfo['pmunread']">
<a href="http://www.yoursite.com/board/private.php?"><img border="0" src="http://www.yoursite.com/images/newpm.gif" width="22" height="10"></a>
</if>
Thanks
rareclownfish
05-05-2006, 12:59 AM
can this work on vbportals?
I went ahead and tried it but no avatar showed up or any info for new members or any of that.
Is there a way to change the original code for it to work on vbportals?
rareclownfish
05-05-2006, 11:30 AM
Hello????
Wordplay
05-10-2006, 03:22 PM
how would i make this showup on any page other then the forumhome?
i don't mind manually editing it, even if its alot to do, as long as you tell me how to.
like should i just place something infront of all the variables such as:
{$exec_lastposts}
if so just tell me what to.
matter of fact right now it only works with all the info on the index.php page (forumhome) on other pages it shows up but like the memberslist it doesnt have any working numbers.
also on vbadvanced pages it doesn't show up neither.
index is at:
site.com
and the forum is at:
board.site.com
mardavikia
07-12-2006, 07:22 PM
hi
how can i remove the space around the avatar image?
thz :)
SmasherMaster
07-14-2006, 10:18 PM
hi
how can i remove the space around the avatar image?
thz :)
Space? O_o
What do you mean? Can you be a bit more specific?
rareclownfish
09-19-2006, 12:17 PM
I love this little hack, how can I make it show up on all the pages on the site???
Shazz
09-19-2006, 01:04 PM
Put it under the header or maybe even navbar...
rareclownfish
09-19-2006, 01:09 PM
Put it under the header or maybe even navbar...
Is this referring to me?
big dan
09-27-2006, 03:54 PM
Any luck getting this to work on 3.6.1?
Pearl
10-01-2006, 01:51 PM
i wonder if this would work on 3.6.1
big dan
10-01-2006, 02:27 PM
i wonder if this would work on 3.6.1
Me too :)
SmasherMaster
04-23-2007, 01:43 PM
Woooow I haven't been here in like, forever. Hmm, I'm unsure about 1.6.1 compatability, depends on how much stuff was changed. I don't have a forum of my own anymore, so I'm unsure. :P
Has anyone tried it?
Robley
03-12-2008, 10:03 PM
Works on 3.6.8 all apart from the post count not showing true amount
Scholle
12-16-2008, 08:39 AM
Hello together, first of all sorry for the following question, but is it possible to put this addon into a "Module" which can be used in VBCMS so i can do the positioning where ever i want to? (I was thinking about that it should look similar like the function in "vbadvanced", but i'm using vbcms)
Plz help, thanks a lot!
Blue91
01-10-2009, 10:27 PM
Man, I'm glad I found this! I had V1.1 on 3.03 and when I upgraded to 3.8, I didn't find a panel that I liked. After doing a search on your username, here I am! FWIW, this is working for me in VB 3.8 now!
How can I remove the % of posts though? We don't really need it on my forums.
Thanks again!
Blue91
01-10-2009, 11:40 PM
Figured it out. Removed the following from the navbar template...
Your Posts: {$vbulletin->userinfo['yourposts']} ({$vbulletin->userinfo['postpercent']}% of forum's total.)<br />
SmasherMaster
01-11-2009, 01:51 AM
Hello together, first of all sorry for the following question, but is it possible to put this addon into a "Module" which can be used in VBCMS so i can do the positioning where ever i want to? (I was thinking about that it should look similar like the function in "vbadvanced", but i'm using vbcms)
Plz help, thanks a lot!
Unfortunately, no. It wasn't built for module coding and I'm sorry to say I probably won't ever include that functionality.
Blue91
01-23-2009, 07:10 PM
TTT for one more question...
Currently, I have this Welcome Panel installed on my forums as shown in the first screen shot.
How can I get this same welcome panel to show on my vbA homepage? I want to show it there and then remove the UserCP module from the center column of the page.
Any help is appreciated.
I have been using this hack for years - just FYI works fine on 3.7.5 :-)
Wifey
10-02-2009, 03:31 PM
Is there a way to fix it so the posts in the welcome bar match those on the rest of the forum? A couple forums I have the post count turned off, and the two don't match up. The one in the welcome bar is actual posts - every post ever made on the site - the one in the postbit and on the rest of the boards is the one taking into account the forums with postcount off.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.