![]() |
<a href="http://foros.animeko.com.mx/memberofday" target="_blank">http://foros.animeko.com.mx/memberofday</a>[1].hack.php
What Happen ! |
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"); 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? |
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. :)
|
|
How many queries will that add, though? Won't it add a query for each member?
|
Ooo... yeah, you're right, Boofo. Is there some other way I can code it so that it'll only perform one query?
|
I'm not really sure how to pull this one off. Give me some time to see what I can come up with. ;)
|
Never mind... I figured something out myself. :) Here's what I did... (This assumes you have it installed.)
1. Run the following query: Quote:
Quote:
Code:
$DB_site->query("UPDATE user SET motd='0' WHERE userid=$daybits[1]"); Code:
$DB_site->query("UPDATE template Code:
$DB_site->query("UPDATE user SET motd='1' WHERE userid=$newmember[userid]"); Code:
eval("\$post[profile] = \"".gettemplate("postbit_profile")."\";"); Code:
if ($post[motd]) { 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. :) |
What? Now I'm interested in what I missed. ;)
|
Does this work?
|
All times are GMT. The time now is 07:27 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|