View Full Version : vBa CMPS - Member of the Day
restless
05-08-2005, 10:00 PM
This adds Kentaurus' "Member of the Day" (https://vborg.vbsupport.ru/showthread.php?t=60368) to your vBa CMPS. I take no credit for his hack whatsoever. You must have his hack installed for this to work.
- Added function to show default avatar for users with no selected avatar.
- Added link to member's Usernotes (in template).
- Added like to member's Friends [vBBuddies hack] (in template).
1. Edit global.php
Find:
$specialtemplates = array_merge($specialtemplates,
array(
'adv_modules',
add BELOW:
'memberoftheday',
Find:
$globaltemplates = array_merge($globaltemplates,
array(
'adv_portal',
Add BELOW:
'memberoftheday',
Find:
if (defined('VBA_PORTAL'))
{
require_once('./includes/vba_cmps_include_bottom.php');
}
Add ABOVE:
$mday = unserialize($datastore['memberoftheday']);
if ($mday['hascustomavatar'] AND $vboptions['avatarenabled'])
{
$avatarurl = "$vboptions[bburl]/image.php?u=$mday[userid]";
}
else
{
$avatarurl = "$stylevar[imgdir_misc]/noavatar.gif";
}
eval('$memberoftheday .= "' . fetch_template('memberoftheday') . '";');
2. create new template adv_portal_member
Add code:
$memberoftheday
or you can make any new template using the templates in the next post below (without having to call the original hack's memberoftheday template)
3. Add a new module:
Module Title: Member of the Day
Template to Include: member
Place it wherever you like (left, center, right)
That's it.
restless
05-09-2005, 05:40 AM
There are a few different ways to display this of course. I'll include a few of my own (see attachments):
Center Module:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="80%">
<tr><td class="alt1" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td class="alt1" width="100"><div align="center"><a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]"><img src="$avatarurl" border="0" alt="Visit $mday[username]'s Profile"></a></div></td>
<td class="alt1"><b>Vagrant of the Day: <a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">$mday[username]</a></b><br/><br/>
View $mday[username]'s <a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">Profile</a><BR>
View $mday[username]'s <a target="_top" href="$vboptions[bburl]/usernote.php?&u=$mday[userid]">UserNotes</a><BR>
View $mday[username]'s <a target="_top" href="$vboptions[bburl]/buddies.php?&u=$mday[userid]">Friends</a><BR>
Posts: $mday[posts]</span><br/>
Favorite forum: <a href="$vboptions[bburl]/forumdisplay.php?f=$mday[forumid]">$mday[forumname]</a> </td>
</tr>
</table></td></tr>
</table><BR>
Left/Right Module:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat">
<span class="smallfont">
<strong>$vba_options[portal_blockbullet] Member of the Day</strong>
</span>
</td>
</tr>
<tr><td class="$getbgrow" width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left" class="alt1"><b><a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">$mday[username]</a></b><BR>
<a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]"><img src="$avatarurl" border="0" alt="Visit $mday[username]'s Profile"></a><BR>
View <a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">Profile</a><br>
View <a target="_top" href="$vboptions[bburl]/usernote.php?&u=$mday[userid]">UserNotes</a><br>
Posts: $mday[posts]<br/>
Favorite forum: <a href="$vboptions[bburl]/forumdisplay.php?f=$mday[forumid]">$mday[forumname]</a>
</td>
</tr>
</table></td></tr>
</table><BR>
CMPS Stats Module:
<!-- Stats Block -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="100%">
<tr>
<td width="200" class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet]
<phrase 1="$vboptions[hometitle]">$vbphrase[x_statistics]</phrase> </strong></span></td>
<td class="tcat"><b>$vba_options[portal_blockbullet] Vagrant of the Day: <a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">$mday[username]</a></b></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont"> $vbphrase[members]: $numbermembers<br />
$vbphrase[threads]: $totalthreads<br />
$vbphrase[posts]: $totalposts<br />
$vbphrase[top_poster]: <a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$topposter[userid]">$topposter[username]</a>
($topposter[posts])<br />
<br />
<phrase 1="$vboptions[bburl]/member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase>
</span> <if condition="$birthdays"><BR>
<span class="smallfont"> <b>$vbphrase[todays_birthdays]:</b><br />
$birthdays</span></if> </td>
<td class="$getbgrow"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100"><div align="center"><a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]"><img src="$avatarurl" border="0" alt="Visit $mday[username]'s Profile"></a></div></td>
<td><span class="smallfont">View $mday[username]'s <a target="_top" href="$vboptions[bburl]/member.php?&u=$mday[userid]">Profile</a><BR>
View $mday[username]'s <a target="_top" href="$vboptions[bburl]/usernote.php?&u=$mday[userid]">UserNotes</a><BR>
View $mday[username]'s <a target="_top" href="$vboptions[bburl]/buddies.php?&u=$mday[userid]">Friends</a><BR>
Posts: $mday[posts]<br/>
Favorite forum: <a href="$vboptions[bburl]/forumdisplay.php?f=$mday[forumid]">$mday[forumname]</a></span></td>
</tr>
</table></td>
</tr>
</table>
<br />
<!-- End Stats Block -->
iSpanish
05-09-2005, 07:29 AM
Nice Module
*Marboosh.Net Clicks Install
thanks
Nice :) thank you restless :)
been having issues with this hack since I have the welcome pannel hack installed :ermm:
also, change this:
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 13:38, Tue Feb 22nd 2005
|| # CVS: $RCSfile: global.php,v $ - $Revision: 1.256.2.5 $
|| ################################################## ##################
\*================================================ ======================*/
to something more clear... new/unexperienced people will not be able to find this part of the code, unless they downloaded the file from vbulletin.com at the very exact moment in time as you (which is almost impossible)
restless
05-10-2005, 04:27 PM
been having issues with this hack since I have the welcome pannel hack installed :ermm:
which hack is that, polo?
This one restless:
https://vborg.vbsupport.ru/showthread.php?t=66969
restless
05-10-2005, 07:07 PM
it the avatar bit that's messing up the welcome panel?
it the avatar bit that's messing up the welcome panel?
yes... exactly how do you know?
the member of the month avatar goes to the welcome pannel at the top... and my avatar is in the "member of the month" block...
restless
05-12-2005, 12:07 AM
I installed that hack just to see what was up. I got it working fine. i tested it with an avatar and with no avatar.
in global.php I changed
$bbuserinfo['user_avatar']="<img src='{$bbuserinfo['user_avatar']}' alt='Edit Your Avatar' border='0'>";
to
$bbuserinfo['user_avatar']="<img src='$vboptions[bburl]/image.php?u=$bbuserinfo[userid]' alt='Edit Your Avatar' border='0'>";
in the navar template I changed
<if condition="THIS_SCRIPT == 'adv_index'">
<a href="profile.php?{$session['sessionurl']}&do=editavatar"><img src="$avatarurl" border=0></a>
<else />
{$welcome_avatar}
</if>
to
{$welcome_avatar}
Nordinho
05-13-2005, 03:39 PM
For some reason the 'memberoftheday' template remains uncached, it's added to the special templates and global templated...I can manually add it to each page, but isn't there an easier way??
restless
05-14-2005, 12:54 AM
For some reason the 'memberoftheday' template remains uncached, it's added to the special templates and global templated...I can manually add it to each page, but isn't there an easier way??not 100% sure what you mean.
Nordinho
05-14-2005, 01:54 AM
not 100% sure what you mean.
hmmm...well, the 'memberoftheday' template is uncached. I did add the modifications to global.php. I know I can add the code in each file to cache the module, but isn't there an easier way to do it, instead of editing each file?? hope this is more clear...
edit- solved, and off course my own stupid mistake ;) (vba cmps has some globaltemplates as well in global.php and I added them to that)
Nordinho
05-17-2005, 11:48 PM
Hey Restless,
The hack stops functioning when I move the avatars to be stored as files, instead of the being in the database...I think the line below should point to the custom avatar path if that's used...
$avatarurl = "$vboptions[bburl]/image.php?u=$mday[userid]";
Nordinho
05-20-2005, 01:52 PM
Hey Restless,
The hack stops functioning when I move the avatars to be stored as files, instead of the being in the database...I think the line below should point to the custom avatar path if that's used...
$avatarurl = "$vboptions[bburl]/image.php?u=$mday[userid]";
any idea's??
KW802
05-20-2005, 07:11 PM
Before modifying global.php, did you try adding "memberoftheday" to the "Templates to be included" section of the module?
avatar icon is not showing up in CMPS. I have followed all instructions exactly. Shows the no avatar.gif. User does have customer avatar.
I figured it out. Thanks.
Nordinho
06-23-2005, 07:35 PM
I figured it out. Thanks.
hmmm, how did you get it to work with custom avatars??
Sean S
06-23-2005, 08:06 PM
any idea's??
thank you restless for the module! :D
Colejo
09-09-2005, 02:51 PM
I have a small problem on this. Instead of showing the member of the day's avatar it shows the avatar of the person logged in. Can anyone tell me what might be wrong?
uReside.com
09-12-2005, 04:43 AM
could this be changed a little bit to be a "featured forum" instead of the member, i have 840 forums and a featured one would be cool, i have it hard coded right now.
www.ureside.com
StuKeR
11-15-2005, 09:08 AM
does it works on 3.5.1 ? cause I try to modify the global.php and I don't find anything similar to replace with this code...
any idea please?
thx
sidewinder1
11-26-2005, 10:54 PM
how do you change the text color in that block? cant find it... my forums are dark grey and the hack's letters are black,makes it really hard to see this.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.