vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Member of the Day! (https://vborg.vbsupport.ru/showthread.php?t=34779)

Rose 03-22-2003 04:20 PM

*hehe* Hey Boofo - I've got a dupe motd. It's not a biggie, but I wanted to let you know. The dupe was motd on 3/17 and 3/22.


Raptor - look back a page or two in this thread and I believe there's a fix for your problem. :)

Boofo 03-22-2003 08:45 PM

Quote:

Today at 12:20 PM Rose said this in Post #201
*hehe* Hey Boofo - I've got a dupe motd. It's not a biggie, but I wanted to let you know. The dupe was motd on 3/17 and 3/22. :)
I noticed the same thing a few days ago on my site. I will look at the code and see what I can figure out. Sorry about that. ;)

Crazy Pete 03-26-2003 09:05 PM

Rather than have it choose a member at random, how can I make it so that the member of the day is the person with the highest amount of posts that day?

Rose 03-26-2003 09:16 PM

Quote:

Today at 05:05 PM Crazy Pete said this in Post #203
Rather than have it choose a member at random, how can I make it so that the member of the day is the person with the highest amount of posts that day?

https://vborg.vbsupport.ru/showthrea...threadid=50733 You might want to try that. :D


Boofo - Not a problem at all. :D I'm thinking of adding some way to track the past X members of the day in a list of sorts. Like five days. Wanna point me in a direction? I keep track for reasons of giving away a free brunch, as established, but I keep an Excel sheet. I'm only afraid to miss weekends or when I'm not at the work computer which is why keeping track of the most recent 2-5 members or so might be nice.

NexDog 04-06-2003 03:54 AM

Is this compatible with 2.3.0? I notice it's no longer in use here....

Boofo 04-06-2003 03:59 AM

It looks like a few have been removed and a few added here and there. ;)

Genocide 04-06-2003 06:09 AM

nice

NexDog 04-06-2003 06:20 AM

But will it work with 2.3.0?

RetroDreams 05-14-2003 01:28 PM

Is there a way this can work with vbHome lite 4.2? I'd really like to add this, but that is where I'd want it to be.

RetroDreams 05-25-2003 05:09 PM

OKay, I've installed this but even with all the different versions of lastactivity in the query, it still pulls people who haven't been active in months on my site. Anyone with a working query?

Also, I have modified it slightly to add the posts and title so they show up on my main page and it works fine with the manual reset, but doesn't work when it is automatically reset. What do I need to do to make sure it works with that as well?

Djidane Tribal 05-26-2003 02:40 PM

<a href="http://foros.animeko.com.mx/memberofday" target="_blank">http://foros.animeko.com.mx/memberofday</a>[1].hack.php

What Happen !

reismarktq2 06-19-2003 06:45 PM

I'm trying to figure out the code necessary to make the words "Member of the Day" appear in the postbit of the MOTD, and I'd appreciate a little help...

I know the code needs to go somewhere in showthread.php. I'm not sure exactly where in the file it should go, but at the very least, I know it needs to start with the same code that the index.php uses:
Code:

$getdaytemplate=$DB_site->query_first("SELECT template FROM template WHERE title='memberoftheday' AND templatesetid=-2");
$daytemplate=$getdaytemplate['template'];
$daybits=explode('||vb||',$daytemplate);

The next logical step from there would be an if statement that would run if $daybits[1] and the poster ID (what would the variable be?) matched up. That would be followed by a line establishing the variable $motd with the HTML code (properly slashed, of course) I want. Once that's done, then put $motd in the postbit template where I want it to go.

Can someone help make this vision work? I love the idea for the hack but I don't want to install it if I can't have this postbit thing... Boofo?

NexDog 06-19-2003 09:55 PM

You're trying to make it so that when a member is Member of the Day, it says so in that member's postbit? That would be pretty cool. :)

reismarktq2 06-24-2003 07:27 PM

I figured it out!

Click here to see...

:)

Boofo 06-24-2003 08:02 PM

How many queries will that add, though? Won't it add a query for each member?

reismarktq2 06-24-2003 08:43 PM

Ooo... yeah, you're right, Boofo. Is there some other way I can code it so that it'll only perform one query?

Boofo 06-24-2003 08:51 PM

I'm not really sure how to pull this one off. Give me some time to see what I can come up with. ;)

reismarktq2 06-24-2003 09:09 PM

Never mind... I figured something out myself. :) Here's what I did... (This assumes you have it installed.)

1. Run the following query:
Quote:

ALTER TABLE user ADD motd SMALLINT(6) DEFAULT '0' NOT NULL;
2. Find this comment in index.php:
Quote:

/* This template is either outdated or the admin wants to reset it.
Either way, we need to choose a new member of the day. Aren't you excited?! */
Add directly below it:
Code:

$DB_site->query("UPDATE user SET motd='0' WHERE userid=$daybits[1]");
3. Still in index.php, find:
Code:

$DB_site->query("UPDATE template
                        SET template='".addslashes($newtemplate)."'
                      WHERE templatesetid=-2
                        AND title='memberoftheday'");

Add directly below it:
Code:

$DB_site->query("UPDATE user SET motd='1' WHERE userid=$newmember[userid]");
4. In admin/functions.php, find:
Code:

eval("\$post[profile] = \"".gettemplate("postbit_profile")."\";");
Add directly ABOVE it:
Code:

if ($post[motd]) {
$motd = "<smallfont><b>Member of the Day!</b></smallfont><br>";
}

5. Add $motd to your postbit template.

This not only adds two queries to the home page (which is not good, but better than 25+ more queries on each showthread page) but it allows the Member of the Day to be recorded as a variable in the user table. This might be useful if, say for instance, one wanted to have multiple Members of the Day for some reason. :)

Boofo 06-24-2003 09:15 PM

What? Now I'm interested in what I missed. ;)

NexDog 06-24-2003 10:41 PM

Does this work?

reismarktq2 06-25-2003 10:13 AM

It works great on my boards...

And just to clarify something. What I did adds two additional queries to the homepage, but those queries only run when the member of the day gets changed (i.e. once a day or whenever the admin adds the parameter) so it shouldn't adversely impact the homepage's regular performance. :)

NexDog 06-25-2003 12:29 PM

Extra cool. So those 2 queries are only added on one page view as that's all it takes to switch MOTD. I'm definitely trying to keep queries down on the home page at least...

Darkmeteor 08-01-2003 05:57 PM

here's a slight variation for the member of the day hack

I did it on my boards, and it works fine.

I modified the code to use the table word from vbulletin. On my forum it's called the word of the day. Some words written from the members are just fun, especially when there are typo :)

for exemple : "Word of the day : pie"

geniuscrew 10-24-2003 07:03 PM

Was Vivi Ornitier's emailing idea overlooked, because I think it's a wicked idea and should be considered.

I could actually put it to very good use because of a feature on my forums.

[RK]DarkKnight 10-27-2003 02:32 AM

will this Member of the day hack work in 2.3.2??

NexDog 10-27-2003 02:42 AM

Quote:

Originally Posted by [RK]DarkKnight
will this Member of the day hack work in 2.3.2??

It does. We have it running on ours.

Polo 08-17-2004 06:55 PM

what about vb 3.0.3?

cditty 08-29-2004 11:05 PM

My people miss this after I upgraded.

Chris

pdatoon 08-30-2004 12:41 AM

Anyone using that on a VB2 board so i can have a look?

Polo 09-02-2004 01:32 PM

does this hack work on vb3.0.3? just wondering...


All times are GMT. The time now is 04:18 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.01335 seconds
  • Memory Usage 1,782KB
  • 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
  • (6)bbcode_code_printable
  • (5)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
  • (30)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