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)
-   -   Send User a PM on Birthday (https://vborg.vbsupport.ru/showthread.php?t=36911)

melondog 04-03-2002 08:39 PM

It's all fixed guys. I hope there arn't anymore problems with it.

pwr_sneak 04-04-2002 05:37 PM

ok, this works now, but adds load to the server and doesn't work on forums, which use multiple boxes, but these problems are very special :)

Another problem could occur more often. Your hack won't work if a user got a pipe (|) in his username, better to use userid.

My idea was, send all PM notifications just once a day on the first page-impression after midnight.
Do do that add right after:
while ($birthday=$DB_site->fetch_array($bdays)) {

Code:

while ($birthday=$DB_site->fetch_array($bdays)) {
$message = "Your message here.\n";
$title = "Happy Birthday!!";

$DB_site->query("INSERT INTO privatemessage (privatemessageid, userid,touserid, fromuserid,
 title, message, dateline, showsignature, iconid, messageread, folderid, receipt) VALUES (NULL,
$birthday[userid],$birthday[userid],1,'$title','$message',".time().",0,0,0,0,0)");



All times are GMT. The time now is 01:42 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.00924 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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