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)
-   -   Automatic Greeting Email/PM/Threads for Member Birthdays (https://vborg.vbsupport.ru/showthread.php?t=39663)

Logician 06-12-2002 03:24 PM

Quote:

Originally posted by Lionel
I installed last night minutes after midnight. I have birthdays today and tomorrow. Nothing is posting yet in the specific thread. :cry:
1- When did you installed the hack (date and time)
2- What time it is now (date and time)
3- Have you set timeset variable?
4- Run this query and tell me what it returns:
SELECT leftdate from timetick where action='birthday';

5- What did you set your server load variable to? What's your estimated daily visitor number of index.php?

6- Are you aware that hack does not greet at exactly 12.00 am, but it will greet at a random hour after midnight, depending on your visitor number you set?

Lionel 06-12-2002 03:48 PM

Quote:

Originally posted by Logician

1- When did you installed the hack (date and time)
2- What time it is now (date and time)
3- Have you set timeset variable?
4- Run this query and tell me what it returns:
SELECT leftdate from timetick where action='birthday';

5- What did you set your server load variable to? What's your estimated daily visitor number of index.php?

6- Are you aware that hack does not greet at exactly 12.00 am, but it will greet at a random hour after midnight, depending on your visitor number you set?

1-I installed early this morning at 12:05 AM
2-it is 12:40 PM, 12 hours later
3-$timeset=0;
4-query returns 2002-06-12
5-load variable was placed at 15 estimated daily visitors is 2000+
6-I understand that it will not trigger at midnight

Logician 06-12-2002 04:04 PM

Quote:

Originally posted by Lionel
1-I installed early this morning at 12:05 AM
2-it is 12:40 PM, 12 hours later

You are missing the point that hack will start greeting birthdays the day after you installed the hack ie 13.6.2002 for you.. It's written in the instructions..

Lionel 06-12-2002 04:20 PM

if I manually change the date to 11 in mysql database, will it run it today? I am anxious to see this at work...

Logician 06-12-2002 04:26 PM

yep it will, but be careful to not to enter a wrong date (or date format) there.

David Bott 06-12-2002 04:28 PM

Yesterday at the load value set at 30...it ran at 11:00AM.

Today...With the load value set at 5....it ran at 11:00AM.

Logician 06-12-2002 04:47 PM

Quote:

Originally posted by David Bott
Yesterday at the load value set at 30...it ran at 11:00AM.

Today...With the load value set at 5....it ran at 11:00AM.

You probably didnt set the timeset variable correctly and although you it's 11.00 AM to you, it's 00.00 AM for your server..

Considering the fact that you have very high number of visitors in your server, numbers like 30 or 5 makes no difference for you. The hack will run VERY VERY close to midnight in your board with these numbers..

Lionel 06-12-2002 04:48 PM

Quote:

Originally posted by Logician
yep it will, but be careful to not to enter a wrong date (or date format) there.
k, I changed it to yesterday, set the load value at 15, had 36 visitors since and I did a few refreshes of index.php.... well, I guess I'll wait a little...

David Bott 06-12-2002 05:15 PM

Code:

## Time difference between the time zone you and your server's time.
## Set is as a positive or negative number such as -3, +5 etc.
$timeset=-8;

ok...Then maybe clear this up. Would it not always be set at zero then if you want it to run per the serers time? I have it set for -8 which is the time offset for GMT as the forum is set. So..Seeing the server is Calf....What should it be? Boy...it sure seems simple....but guess not.

Logician 06-12-2002 05:33 PM

Quote:

Originally posted by David Bott
ok...Then maybe clear this up. Would it not always be set at zero then if you want it to run per the serers time? I have it set for -8 which is the time offset for GMT as the forum is set. So..Seeing the server is Calf....What should it be? Boy...it sure seems simple....but guess not.
This clarifies why it greeted at 11.00 am..

It's "Time difference between the time zone you and your server's time." NOT "difference between your server and London".

So if server is in California and so do you, set it to 0.

By setting it to -8, you programmed the hack to start greetings at 8.00AM server time. Since it greeted at 11.00 AM, may I assume that you live somewhere that has 3 hours difference with California? ;)

David Bott 06-12-2002 05:54 PM

Bingo! NY

Logician 06-12-2002 05:55 PM

Small Bug Fix:

Small bug fix with "Create Thread" feature:

Find:

PHP Code:

$log_postid=$DB_site->insert_id(); 

After that line add:

PHP Code:

// Updating Forum
$DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($greeter_name)."' WHERE forumid = $greetings_forum");

// Updating User's Post
$DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$greeter"); 

Save and upload your index.php..That's it.. Now created threads will be visible in the forum display too and these threads will increase the thread starter's post number.

Original hack file in the thread is already updated so this fix only applies to users who installed the hack prior to 12.June.2002.

Logician

Me2Be 06-12-2002 09:31 PM

I've just installed it and now I'm waiting until tomorrow LOL...

Couple of requests if this is possible...

1] When it created the thread, can we have it add that day's date in the subject heading? Like "Today's Birthdays: June 13, 2002" -- this way the threads won't all be the same subject every day :)

2] On the list of that day's birthdays on the thread, is it possible to have each username linked to either their profile link, or better yet, 'send a PM' to them? (All of my members use PMs)

Thanks! I can't wait to see what happens tomorrow!

Logician 06-12-2002 09:56 PM

Quote:

Originally posted by Me2Be
[B]1] When it created the thread, can we have it add that day's date in the subject heading? Like "Today's Birthdays: June 13, 2002" -- this way the threads won't all be the same subject every day :)
[B]
Find:

PHP Code:

// Creating Thread 

After that add:

PHP Code:

$todays_date11date("F j, Y"mktime (date("H")+$timesetdate("i"), date("s"), date("m"), date("d"), date("Y")));
$title3.=$todays_date11

Quote:

2] On the list of that day's birthdays on the thread, is it possible to have each username linked to either their profile link, or better yet, 'send a PM' to them? (All of my members use PMs)
Their usernames are already linked to their profile, by default.. (clickable)

Quote:

I can't wait to see what happens tomorrow!
Let me guess: Hack will greet the birthdays hehe ;)

Enjoy..
Logician

Me2Be 06-12-2002 10:06 PM

Quote:

Originally posted by Logician
[B]
PHP Code:

$todays_date11.....=$todays_date11


Thanks for the quick response!
Do I have to add anything to the templates to get that to work or will it automatically add it?

Logician 06-12-2002 10:16 PM

Quote:

Originally posted by Me2Be
Thanks for the quick response!
Do I have to add anything to the templates to get that to work or will it automatically add it?

nope nothing needed for templates. This modification changes only the subject of the thread (upon your request) and thread subject has nothing to do with any templates.

But you may like to change thread title variable ($title3) in the options part. This modification will add the date of celebration at the end of this variable, so you should regard a suitable title like:

PHP Code:

$title3='Todays Birthdays :'

when it is parsed it will become:

Todays Birthdays: June 14, 2002

Boofo 06-12-2002 10:26 PM

Don't you mean the $title3 variable? :)

Quote:

Originally posted by Logician

nope nothing needed for templates. This modification changes only the subject of the thread (upon your request) and thread subject has nothing to do with any templates.

But you may like to change thread title variable ($thread3) in the options part. This modification will add the date of celebration at the end of this variable, so you should regard a suitable title like:

PHP Code:

$thread3='Todays Birthdays :'

when it is parsed it will become:

Todays Birthdays: June 14, 2002


Logician 06-12-2002 10:36 PM

Quote:

Originally posted by Boofo
Don't you mean the $title3 variable? :)

yep $title3 it is.. 2.30 AM here and I really answered many questions.. Need some sleep :) Good night!

Boofo 06-12-2002 10:38 PM

Good night, my friend. :)

Quote:

Originally posted by Logician

yep $title3 it is.. 2.30 AM here and I really answered many questions.. Need some sleep :) Good night!


Me2Be 06-13-2002 03:08 PM

Worked beautifully - thank you!

Lionel 06-14-2002 05:31 AM

I've got 5 birthdays today... the thread posted in the correct forum, but it shows only 2 birthdays :ermm:

Logician 06-14-2002 05:48 AM

Quote:

Originally posted by Lionel
I've got 5 birthdays today... the thread posted in the correct forum, but it shows only 2 birthdays :ermm:
Make sure other 3's usergroup is not excluded in options part.

Lionel 06-14-2002 06:05 AM

yep, number 3 is the users awaiting confirmation and that was the case

Logician 06-14-2002 06:17 AM

glad you figured that out. You either disable it or if you want not to greet awaiting confirmation members leave it as it is.

Lionel 06-14-2002 06:26 AM

My boards are 100% community based and I am sure the members appreciate to be remembered.

I must tell you that I was so impressed by your hack that I went hunting for your other hacks and installed a couple more. Both the webtemplates and the way that you provide for "cut and paste" of any section of a thread into news were impressive.
It's also good to know who rated.

Nice work, keep it up!

Logician 06-16-2002 08:33 AM

Addition to the Hack:

This small modifications will play happy birthday song to your members when they visit your board in their birthdays.


Features:
  • This addition is independent from the hack itself. So you can use one without another. That is, you can apply this modification even if you didnt applied the hack itself
  • It will play any .wav or .mid sound file to your users in their birthdays when they visited your board's main page.

Installation:

1-Edit global.php

find:

PHP Code:

// figure out the chosen style settings
unset($codestyleid);
unset(
$style); // prevent some weird issues 

After that add:

PHP Code:

// Logician Play Happy Birthday Song in users' birthday hack
$today_birthday=substr($bbuserinfo[birthday],-5);
$today_of_user vbdate("m-d",time());
if (
$today_of_user==$today_birthday) {$birthdaysong='<EMBED SRC="mysound.wav" hidden="true" AUTOSTART="true" loop=1  PLAYCOUNT=1>';}
// Logician Play Happy Birthday Song in users' birthday hack 

2- Upload the midi or wav you want to play under your board directory and replace mysound.wav with its name in the code.

3- Admin CP/Modify Template, edit template: forumhome

Find:
PHP Code:

$headinclude 

Replace it AS:

PHP Code:

$headinclude
$birthdaysong 

Notes:
  • The hack will play the song in the board's home page only. If you wanted to play in other pages too (user CP for example) add the $birthdaysong variable to any template you want
  • If you want the song be played in any page of your board, remove the $birthdaysong variable form forumhome and put it into a more global template like header. (But it would be boring to browse the board with a sound file chasing you in every page you visited so be warned!) ;)
  • By default song will be played once only when the page is loaded. If you want to play more than once replace 1s in "loop=1 PLAYCOUNT=1" part.

Enjoy!
Logician

Ps. If you apply the add-on that changes user's style in their birthdays, please check its post and reapply the code. I catched a bug in the code and corrected it. Considering the fact that nobody hollered, it seems nobody uses it though :)

amity 06-21-2002 03:12 AM

now i can't figure out why it isn't posting the thread on the forum.

if i put 1 for the forum number, does that mean the first forum i created? or the first forum listed on the main page? and does the numbering include the category as a forum?

thanks and blessings,
amity

Logician 06-21-2002 05:09 AM

Quote:

Originally posted by amity
now i can't figure out why it isn't posting the thread on the forum.

if i put 1 for the forum number, does that mean the first forum i created? or the first forum listed on the main page? and does the numbering include the category as a forum?

if you put 1 for the forum number this means that you want it to post in the forum with forum id 1. That is:

http://www.yoursite.com/forum/forumd...p?s=&forumid=1

Do mail/pm/admin notifications run ok?

David Bott 06-23-2002 07:09 PM

For the last 3 days this hack has sent out more than one birthday greeting and I receive more than one PM of the ones that went out.

What I mean is..When I go into my PM the next day...I find 2 or three of the notcies of what went out. They all have the same time stamp and the same data in the message of who it went to.

When I contacted one of the birthday people on the list...they told me they received the message more than once.

NOTE...I am using it for E-MAIL only sending with it checking for their OK to send a message.

Please advise.

Logician 06-23-2002 07:32 PM

Quote:

Originally posted by David Bott
For the last 3 days this hack has sent out more than one birthday greeting and I receive more than one PM of the ones that went out.

When I contacted one of the birthday people on the list...they told me they received the message more than once.

David increase the $estimated_load value.

The very high trafic of your board and very low estimated_load number (compared to your traffic) causes it. This is how it happens:

One visitor triggers the hack at midnight, the hack begins to compile birthday greetings but before it finishes and updates the database date, another visitor triggers it again (the first visitor's trigger didnt finished yet, so database date is still yesterday). Hack will be done in less than a second and your traffic is so high that, it gets triggered more than once in that very second and produce more than 1 greetings.

With so high traffic you really dont need so low estimated_load value. Increase it and you'll be fine.

David Bott 06-23-2002 07:35 PM

Ok...will give it a shot. Thank you.

Heineken77 07-15-2002 08:07 PM

Odd problem.

I followed the instructions to the T, used phpMyAdmin to run the queries, added and saved the templates, and edited my index.php file under forum/index.php .. however when I tried to access my site I got the following email:

Quote:

Database error in vBulletin :

Link-ID == false, connect failed
mysql error: Can't connect to MySQL server on 'mysql.zeonhost.com' (110)

mysql error number: 2003

Date: Monday 15th of July 2002 04:55:58 PM
Script: http://nba2k3.net/forum/index.php
Referer:
Any ideas? I just put everything back to it's original state :(

Heineken

Logician 07-15-2002 10:06 PM

MYSQL error no 2003 is related to MYSQL access problems and occurs when the script can not access to MYSQL. So it can not be related to the hack. It's very likely your were just unlucky, your MYSQL server went down at the moment you installed the hack. When it's back online, IMO give it a shot again .. The hack has been tested, installed and used by many people with no problems at all.. ;)

Heineken77 07-15-2002 10:08 PM

DOH! Means I have to redo it all over again lol ... should have waited before reverting back to original state eheh

Thanks bro, great hack by the way! Look forward to installing it :)

Logician 07-15-2002 10:23 PM

yw, let me know if you encounter any problems again.. :)

dprice 07-16-2002 12:45 PM

Logician,

Installed the hack and it sent the emails and PMs to the Birthday members, but the EMAILS are Blank. The subject is titled: Happy Birthday, but there isnt any messages in the PMs or emails?

Logician 07-16-2002 02:20 PM

Quote:

Originally posted by dprice
Installed the hack and it sent the emails and PMs to the Birthday members, but the EMAILS are Blank. The subject is titled: Happy Birthday, but there isnt any messages in the PMs or emails?
dprice, make sure :
a) you have created the templates
b) content of that templates are not blank
c) You entered the template names exactly (no trailing space etc.)
d) Create the templates in all styles if it still does not work..

Your problem is very likely related to either of these..

dprice 07-17-2002 01:50 AM

That was the problem, thanks!

I am using a CUSTOM template and when I added the templates above, they were added in the DEFAULT templates, which I was not using.
So I merely moved them to my custom templates.

Thanks again my friend!

tractor-beam 07-17-2002 06:16 PM

Great hack! Quick question:

Can I add either the "$birthday_children[username]" or "$birthday_children[user]" to the title in the new thread, such as:

$title = "Happy Birthday " .$birthday_children[username]."!"

Thanks!

- Gerry

Logician 07-17-2002 09:19 PM

Quote:

Originally posted by tractor-beam
Can I add either the "$birthday_children[username]" or "$birthday_children[user]" to the title in the new thread, such as:

$title = "Happy Birthday " .$birthday_children[username]."!"

Gerry, greeting thread is not seperate for each user. Instead one thread is created per day regardless of birthday number, so you cant use user name in thread title..


All times are GMT. The time now is 04:15 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.01528 seconds
  • Memory Usage 1,869KB
  • 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
  • (11)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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