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)
-   -   [VB3 RC3] Member of the day (https://vborg.vbsupport.ru/showthread.php?t=60368)

restless 05-08-2005 03:25 AM

Not sure if anyone has answered this anywhere... but I've added this to my vba cmps.

Here how i did it (I have no idea if this is the BEST way to do it):

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:

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 13:38, Tue Feb 22nd 2005
|| # CVS: $RCSfile: global.php,v $ - $Revision: 1.256.2.5 $
|| ####################################################################
\*======================================================================*/ 

Add ABOVE:
PHP Code:

$mday unserialize($datastore['memberoftheday']);
if (!
$mday['hascustomavatar'] && $mday['avatarpath'])
{
    
$avatarurl $mday['avatarpath'];
}
else
{
    
$avatarurl "vboptions[bburl]/image.php?u=$mday[userid]";
}
eval(
'$memberoftheday .= "' fetch_template('memberoftheday') . '";'); 

2. create new template adv_portal_member

Add code:
PHP Code:

$memberoftheday 

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-08-2005 03:44 AM

you can see this in action here: http://www.vagrantcafe.com/index.php?

this is my code for my memberoftheday template:
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="1">
        <
tr
          <
td class="alt1"><img src="$avatarurl"></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/>
    <if condition="$mday[age]">Age: $mday[age]</span><br/></if>
    
    Favorite forum: <a href="$vboptions[bburl]/forumdisplay.php?f=$mday[forumid]">$mday[forumname]</a> </td>
        </tr>
        
        </table></td></tr>
</table><BR> 

i literally just figured out and installed this tonight... so i'll probably change my look at a bit.

cdoyle 05-15-2005 10:11 PM

Quote:

Originally Posted by AutomatikStudio
When I try to run the cron I get: "Couldn't elect a member of the day, not enough members"...i have a couple of hundred members and I check to make sure the correct usergroups weren't restricted. Also the member box on FORUMHOME is just showing blank b/c it hasn't selected anybody.

I'm getting this too on my testboard. Here are the settings I have everything at.
I have created a couple test members, and just posted several threads for each.

$restrictedGroups = "0";
$posts = 0;
$lastactivity = 90;
$lastpost = 30;
$reputation = 0;
$days = 7;
$privateForums = "0";

When I run the scheduler, I get that "Couldn't elect a member of the day, not enough members"

any ideas?

cdoyle 05-16-2005 10:12 PM

I got it to work, I was having the problem because this is a test forum, and I only have about 7 members listed. Since the hack wouldn't allow you to 'repeat' member of the day for at least 7 days, that is why I would get the error.

I just decreased it to 1 day and it worked finally.

Now to install on the real forum!!

cdoyle 05-20-2005 12:52 AM

Has support for this hack stopped?

I did finally get everything working, and got it to work on my CMPS page. But was wondering if some other features could be added?

Is it possible to display the users profile image? (I think that question was asked before, but I didn't see an answer)

Or how about also displaying their signature?

I hope the creator of this hack is still around!

Thanks in advance
Chris.

Paul M 05-20-2005 12:57 AM

Quote:

Originally Posted by cdoyle
Has support for this hack stopped?

.
.

I hope the creator of this hack is still around!

Well the hack is not marked as supported - but that may just be an oversight. The coder last visited four days ago so he's still around.

Corriewf 05-20-2005 01:05 AM

Quote:

Originally Posted by cdoyle
Has support for this hack stopped?

I did finally get everything working, and got it to work on my CMPS page. But was wondering if some other features could be added?

Is it possible to display the users profile image? (I think that question was asked before, but I didn't see an answer)

Or how about also displaying their signature?

I hope the creator of this hack is still around!

Thanks in advance
Chris.

Dont you think that will be a little over doing it? How much do you want to have people go through when they are trying to get to your forums?


If you really want it just input the variables using the hacks syntax.

cdoyle 05-20-2005 08:57 PM

I'm not really sure what you mean by input the 'vairables using the hacks syntax' I'm new to this, could you give me an example of what you mean?

Thanks
Chris.

cdoyle 05-27-2005 03:59 AM

I've just noticed something, it seems that it selects a new user whenever you refresh the screen?

I've checked the scheduler and it's only suppose to run on the 23rd hour of each day.

Anyone know why it would be selecting a new one, everytime the page is refreshed or opened?

Also, I'm still not sure what I would need to do add the profile pic?

Chris.

Corriewf 05-27-2005 12:40 PM

Quote:

Originally Posted by cdoyle
I've just noticed something, it seems that it selects a new user whenever you refresh the screen?

I've checked the scheduler and it's only suppose to run on the 23rd hour of each day.

Anyone know why it would be selecting a new one, everytime the page is refreshed or opened?

Also, I'm still not sure what I would need to do add the profile pic?

Chris.

Did you run the queries from the install? Somehow the cron is running everytime you refresh.


All times are GMT. The time now is 11:14 PM.

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.01433 seconds
  • Memory Usage 1,779KB
  • 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
  • (8)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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