View Full Version : Birthday list way too long
Thomas P
03-06-2008, 02:15 PM
Hello,
is there any mod out there for vB3.6 which shows only birthdays from users with >250 posts?
On Big Boards the list is way too long imo.
It may be an easy mod, but I don't know where to look for...
Thanks,
-Tom
andrewkhunn
03-07-2008, 12:20 AM
One way you could accomplish this is to make a separate usergroup that forum members with >250 posts get promoted to. Then turn off birthday display for forum members and turn it on for the promoted group.
Ted S
03-07-2008, 05:39 PM
Should be simple enough to hack in...
Pop open includes/functions_databuild.php
Find
$bdays = $vbulletin->db->query_read_slave("
SELECT username, userid, birthday, showbirthday
FROM " . TABLE_PREFIX . "user
WHERE (birthday LIKE '$todayneggmt-%' OR birthday LIKE '$todayposgmt-%')
AND usergroupid IN ($usergroupids)
AND showbirthday IN (2, 3)
$activitycut
");
And replace it with
$bdays = $vbulletin->db->query_read_slave("
SELECT username, userid, birthday, showbirthday
FROM " . TABLE_PREFIX . "user
WHERE (birthday LIKE '$todayneggmt-%' OR birthday LIKE '$todayposgmt-%')
AND usergroupid IN ($usergroupids)
AND showbirthday IN (2, 3)
AND posts > 250
$activitycut
");
You'll either have to wait for the birthday list to recompile or you can manually update it. You should be able to do by running this script:
<?php
error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
require_once(DIR . '/includes/functions_databuild.php');
$birthdaystore = build_birthdays();
DEVDEBUG('Updated Birthdays');
echo "Done";
?>
Just save it as birthday.php in your main directory and run.
Note: This is untested so please test it before going live.
Thomas P
03-09-2008, 03:13 PM
Good one - many thanks mate
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.