Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBa CMPS - Member of the Day Details »»
vBa CMPS - Member of the Day
Version: 1.00, by restless restless is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 05-08-2005 Last Update: Never Installs: 8
 
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-13-2005, 03:39 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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??
Reply With Quote
  #13  
Old 05-14-2005, 12:54 AM
restless's Avatar
restless restless is offline
 
Join Date: Jan 2002
Location: Canada
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nordinho
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.
Reply With Quote
  #14  
Old 05-14-2005, 01:54 AM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by restless
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)
Reply With Quote
  #15  
Old 05-17-2005, 11:48 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...

PHP Code:
 $avatarurl "$vboptions[bburl]/image.php?u=$mday[userid]"
Reply With Quote
  #16  
Old 05-20-2005, 01:52 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nordinho
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...

PHP Code:
 $avatarurl "$vboptions[bburl]/image.php?u=$mday[userid]"
any idea's??
Reply With Quote
  #17  
Old 05-20-2005, 07:11 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Before modifying global.php, did you try adding "memberoftheday" to the "Templates to be included" section of the module?
Reply With Quote
  #18  
Old 05-22-2005, 04:30 AM
deb0 deb0 is offline
 
Join Date: Sep 2004
Location: somewhere
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

avatar icon is not showing up in CMPS. I have followed all instructions exactly. Shows the no avatar.gif. User does have customer avatar.
Reply With Quote
  #19  
Old 05-22-2005, 05:18 AM
deb0 deb0 is offline
 
Join Date: Sep 2004
Location: somewhere
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I figured it out. Thanks.
Reply With Quote
  #20  
Old 06-23-2005, 07:35 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by deb0
I figured it out. Thanks.
hmmm, how did you get it to work with custom avatars??
Reply With Quote
  #21  
Old 06-23-2005, 08:06 PM
Sean S's Avatar
Sean S Sean S is offline
 
Join Date: Jan 2004
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nordinho
any idea's??
thank you restless for the module!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04829 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (9)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete