vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Big Board Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=172)
-   -   Birthday list way too long (https://vborg.vbsupport.ru/showthread.php?t=172253)

Thomas P 03-06-2008 02:15 PM

Birthday list way too long
 
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
Code:

$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

Code:

$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:

Code:

<?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


All times are GMT. The time now is 01:56 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.00984 seconds
  • Memory Usage 1,714KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete