vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBa CMPS - Member of the Day (https://vborg.vbsupport.ru/showthread.php?t=81178)

restless 05-08-2005 10:00 PM

vBa CMPS - Member of the Day
 
This adds Kentaurus' "Member of the Day" 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:
PHP Code:

$specialtemplates array_merge($specialtemplates
         array(
             
'adv_modules'

add BELOW:
PHP Code:

'memberoftheday'

Find:
PHP Code:

$globaltemplates array_merge($globaltemplates,
         array(
              
'adv_portal'

Add BELOW:
PHP Code:

'memberoftheday'

Find:
PHP Code:

if (defined('VBA_PORTAL'))
{
    require_once(
'./includes/vba_cmps_include_bottom.php');


Add ABOVE:
PHP Code:

$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:
PHP 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:
PHP Code:

<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="$avatarurlborder="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]'
<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:
PHP Code:

<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_blockbulletMember of the Day</strong>
</
span>
</
td>
</
tr>
<
tr><td class="$getbgrowwidth="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="$avatarurlborder="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:
PHP Code:

<!-- 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_blockbulletVagrant 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=$newuserid2="$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="$avatarurlborder="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]'
<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

Polo 05-09-2005 12:56 PM

Nice :) thank you restless :)

Polo 05-10-2005 04:06 PM

been having issues with this hack since I have the welcome pannel hack installed :ermm:

also, change this:

PHP Code:

/*======================================================================*\
|| ####################################################################
|| # 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

Quote:

Originally Posted by Polo
been having issues with this hack since I have the welcome pannel hack installed :ermm:

which hack is that, polo?

Polo 05-10-2005 05:26 PM

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?

Polo 05-10-2005 07:53 PM

Quote:

Originally Posted by restless
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
PHP Code:

$bbuserinfo['user_avatar']="<img src='{$bbuserinfo['user_avatar']}' alt='Edit Your Avatar' border='0'>"

to
PHP Code:

$bbuserinfo['user_avatar']="<img src='$vboptions[bburl]/image.php?u=$bbuserinfo[userid]' alt='Edit Your Avatar' border='0'>"

in the navar template I changed
PHP Code:

<if condition="THIS_SCRIPT == 'adv_index'">
    <
a href="profile.php?{$session['sessionurl']}&do=editavatar"><img src="$avatarurlborder=0></a>
    <else />
    {
$welcome_avatar}
    </if> 

to
PHP Code:

{$welcome_avatar



All times are GMT. The time now is 12:12 AM.

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.02312 seconds
  • Memory Usage 1,843KB
  • 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
  • (15)bbcode_php_printable
  • (2)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