PDA

View Full Version : Hide birthday on forumhome if postcount<X...


Kingster
07-06-2005, 01:35 AM
I've searched around, and I found a hack for 2.2.x to hide the display of a user in "Today's Birthdays" if the user has less than X posts, but I don't see one for 3.0.X.

Can someone build one, or at least point me in the right direction? The new birthday stuff appears to be cached, and I'm struggling with it, nor do I want to break it.

Thanks in advance!

Andreas
07-06-2005, 01:44 AM
Easy :)

In functions_databuild.php
FIND

AND usergroupid IN ($usergroupids)


BELOW that ADD

AND posts > X


Of course X must be replaced with the real number.

Kingster
07-06-2005, 02:06 AM
Thanks much!

Though I'm not so sure I want to thank you for making it so simple. Couldn't you have made me edit 7 files, change 3 templates, and add a column or two to my DB? And not have those changes actually do anything? Then I wouldn't feel so dumb. :D

Alrighty then... I gave this a shot, and I'm still seeing users with a zero postcount in "Today's Birthdays". Any idea why?

I looked through the rest of that code section for the birthdays in function_databuild.php, and it seems like it should work. I even ran the query that you told me to modify (after the mod) in mysql (replacing the variables) and it worked.

What gives? Why isn't it working on my forums? :confused:

Thanks much!

Though I'm not so sure I want to thank you for making it so simple. Couldn't you have made me edit 7 files, change 3 templates, and add a column or two to my DB? And not have those changes actually do anything? Then I wouldn't feel so dumb. :D

Alrighty then... I gave this a shot, and I'm still seeing users with a zero postcount in "Today's Birthdays". Any idea why?

I looked through the rest of that code section for the birthdays in function_databuild.php, and it seems like it should work. I even ran the query that you told me to modify (after the mod) in mysql (replacing the variables) and it worked.

What gives? Why isn't it working on my forums? :confused:
bah. The forums are merging my posts.

Anyway... Could someone look at the problem above? It's not working, even though the SQL works right... :confused:

Andreas
07-06-2005, 02:35 PM
The cache is only updated once/day, so to force an update you have to clear it first:


DELETE FROM datastore WHERE title = 'birthdaycache'

Kingster
07-06-2005, 05:03 PM
The cache is only updated once/day, so to force an update you have to clear it first:


DELETE FROM datastore WHERE title = 'birthdaycache'

Thanks, Kirby. That did it. :D