vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Automatic Birthday Thread (https://vborg.vbsupport.ru/showthread.php?t=62613)

ChurchMedia 08-27-2004 05:07 PM

Great idea. You can also use \n for line breaks. I'm going to post a new version of the b-day hack today and I'll change the HTML to BB code. Thanks!

ChurchMedia 08-27-2004 08:38 PM

Version 2.0 has just been released. Bug fixes, new features and update instructions are in the first post.

Enjoy,

NuclioN 08-27-2004 11:29 PM

Works great so far Churchmedia :) Tnx

SnowBot 08-27-2004 11:46 PM

Going to install NOW!!! :)

jluerken 08-28-2004 07:06 AM

Thanks man for version 2. I installed it two minutes ago and get a DB error when running it.

Database error in vBulletin 3.0.3:

Invalid SQL:
INSERT INTO vb3_thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible)
VALUES
('Happy Birthday to billyjobob, m4|Ranger, XeDa101, on August 28, 2004', 1093680294, 15,
1, 0, 'CFN|BirthdayBot', ,
'CFN|BirthdayBot', 1093680294, 0, 1)
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '
'CFN|BirthdayBot', 1093680294, 0, 1)' at line 4

mysql error number: 1064

Can you help?

ChurchMedia 08-28-2004 07:22 AM

Check your variables. The $greeter variable should be a number -- the user ID for CFN|BirthdayBot. Check that and if you still have problems, post the lines with \\change me in them.

EDIT: Actually, it looks like there is no user ID there. Again, make sure the $greeter variable has the correct user ID for the greeter name.

jluerken 08-28-2004 07:31 AM

I wrote greeter1 instead of greeter=1 but now I have a new error which is really one :D

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE user SET posts=posts+1 WHERE userid=4
mysql error: Table 'usr_web1_3.user' doesn't exist

mysql error number: 1146

Means you've once forgotten to check for table prefixes in this line
UPDATE user SET posts=posts+1 WHERE userid=4
Can you update this and tell me what to change?

jluerken 08-28-2004 07:48 AM

Ok I've done it already.

Pls. change this part of your hack
PHP Code:

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

with this
PHP Code:

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


HiDeo 08-28-2004 10:14 AM

Nice hack

Thanks

ChurchMedia 08-28-2004 11:44 AM

Fixed it! Sorry about that!

jugo 08-30-2004 01:15 PM

Mine has an issue...I run the Cron...but it just sits there and nothing happens.

Here is the CHANGEME Lines:

PHP Code:

if ($emails)
{
    
log_cron_action('Birthday Email sent to: ' $emails$nextitem);
    
$birthday_greeting_thread "Waddup My Peeps,\n\n[b]Here are today's Birthdays![/b]\n\n";
    
$birthday_greeting_thread $birthday_greeting_thread.$bday_people;
    
$birthday_greeting_thread $birthday_greeting_thread."\n\n[i]w00t w00t! I hope you like getting OLD!!![/i]";

    
$greetermail="birthdayfairy@s3squad.com"//CHANGE ME: Birthday greeter email
    
$greeter=2// CHANGE ME: Birthday greeter user ID
    
$greeter_name="jugo????"//CHANGE ME: Birthday greeter user name
    
$greetings_forum=2// CHANGE ME: Birthday forum ID
    
$todays_date11date("F j, Y"mktime (date("H")+$timesetdate("i"), date("s"), date("m"), date("d"), date("Y")));
    
$title3"Happy Birthday to "
    
$title3.= $bday_title
    
$title3.= "on "
    
$title3.=$todays_date11;

// Creating Thread 


ChurchMedia 09-02-2004 01:53 AM

It's working. Mine does that too. I'm not sure why it's not giving us a "done" message. It shows up in the cron logs, though. If anyone figures out what the problem is, let me know. Fortunately it isn't a big problem.

bspiller82 09-03-2004 06:50 AM

It seems after I upgraded from the old Birthday script to the new it stopped working. There is no errors that I see just that it's not posting the thread.

venomx 09-03-2004 12:25 PM

I am going to install this after the cron thing works right :P

trackpads 09-03-2004 01:47 PM

Is there a way to make it use Pets money instead of UCash?

Thanks again!!!

-Jason

ChurchMedia 09-03-2004 05:19 PM

Quote:

Originally Posted by venomx
I am going to install this after the cron thing works right :P

The cron message has never finished. It's really not a big deal and doesn't hurt anything. You never even see the message unless you run it manually.


So, I wouldn't worry about it and go ahead and install the hack :)

ChurchMedia 09-03-2004 05:23 PM

Quote:

Originally Posted by bspiller82
It seems after I upgraded from the old Birthday script to the new it stopped working. There is no errors that I see just that it's not posting the thread.

I suggest you start over with a fresh copy of birthday.php (without any hacks at all) and give it another shot. :)

ChurchMedia 09-03-2004 05:26 PM

Quote:

Originally Posted by trackpads
Is there a way to make it use Pets money instead of UCash?

Thanks again!!!

-Jason

Sure you can. I don't know what the code would be, though. Take a look at the code for the Pets hack and find the lines that give Pets money. Just insert those lines in place of the UCash lines. They should look very similar the to the Ucash code. Make sure the User ID variable looks the same as the Ucash hack and you should be okay.

bspiller82 09-06-2004 06:55 AM

Quote:

Originally Posted by ChurchMedia
I suggest you start over with a fresh copy of birthday.php (without any hacks at all) and give it another shot. :)

I did that and it diddn't work. I'll retry it with a fresh copy again and see what happens.

jugo 09-07-2004 08:40 PM

OK... it works. Awesome.

When i run it manually it just sits there but as a cron job it works just fine...I in cluded the /you hack and it does soem pretty cool things.

OK...Is there a way to make it only post the birthdays for those who have recent activity in the last xx days AND with at least xx posts?

bspiller82 09-16-2004 07:10 AM

Works good now. Is there a way to force it to tell the age so it doesn't say
(Age: Not telling! )?

ChurchMedia 09-16-2004 02:49 PM

Quote:

Originally Posted by bspiller82
Works good now. Is there a way to force it to tell the age so it doesn't say
(Age: Not telling! )?

Not if they didn't give their birth year -- there's no way to calculate it. You can change the "not telling" message to something else if you want. Just search the script for "Not telling!" and change it to "Year not given" or whatever.

Enjoy,

Lionel 09-24-2004 08:25 PM

I have a small problem. The email, the thread states the correct date but in the posts it shows as

Here are today's birthdays:

was born on November 30 (Age: Not telling! :))

missing the username, the age. Sometimes the age states 30 when it should have been 40

Lionel 09-24-2004 11:00 PM

I am using 3.01 and all I am getting for username is a blank and date is way off. Age does not display, even though the year is specified.

Lionel 09-24-2004 11:55 PM

ok, works for me now. I was placing code before {

also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post

Great hack, thanks.

MysticMoon 09-25-2004 01:18 AM

Great hack & had no problems with it.

I was wondering though, is it possible to change the post icon?
Right now it's using the standard icon1.gif & I'd like it to use a cupcake
one I have instead.

Thanks

KW802 09-29-2004 06:05 PM

Quote:

Originally Posted by Lionel
ok, works for me now. I was placing code before {

also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post

Great hack, thanks.

ChurchMedia,

Thanks for the hack! You may want to fix the first post to have the above correction though. It threw me off also.

Kevin

KW802 10-07-2004 01:33 PM

Quote:

Originally Posted by MysticMoon
Great hack & had no problems with it.

I was wondering though, is it possible to change the post icon?
Right now it's using the standard icon1.gif & I'd like it to use a cupcake
one I have instead.

Thanks

MysticMoon,

In the /includes/cron/birthday.php file find.....
Quote:

// Creating Thread
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible)
VALUES
('" . addslashes(htmlspecialchars($title3)) . "', " . TIMENOW . ", $greetings_forum,
1, 0, '". addslashes($greeter_name) ."', $greeter,
'". addslashes($greeter_name) ."', " . TIMENOW . ", 0, 1)");
$threadinfo['threadid'] = $DB_site->insert_id();

// Creating Post
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
showsignature, ipaddress, iconid, visible)
VALUES
($threadinfo[threadid], 0, '" . addslashes(htmlspecialchars($title3)) . "',
'" . addslashes($greeter_name) . "', $greeter, " . TIMENOW . ",
'" . addslashes($birthday_greeting_thread) . "', 1, 1, 0, 0, 1)");
$post['postid'] = $DB_site->insert_id();
.... and change the two zeros that are highlighted to instead be the iconid of the new icon you want to use.

ChurchMedia 10-07-2004 03:11 PM

Quote:

Originally Posted by Lionel
also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post

I fixed it in the instructions. Sorry about that! :)

Megareus Rex 10-07-2004 05:44 PM

I see the creator of the hack has 3.0 Gold. Any plans to modify the hack to work on 3.0.3? (The code for birthday.php has changed some, so I'm not sure how to do it now.)

venomx 10-07-2004 05:49 PM

I use 3.0.3 and installed it fine... Not sure it works yet because I only have 7 members.... soooo hard to get members for a forum about everything. :(

KW802 10-07-2004 06:05 PM

Quote:

Originally Posted by Megareus Rex
I see the creator of the hack has 3.0 Gold. Any plans to modify the hack to work on 3.0.3? (The code for birthday.php has changed some, so I'm not sure how to do it now.)

Worked fine for me with 3.0.3.

Megareus Rex 10-08-2004 06:34 AM

O.o really...

I'm reluctant to try and make the code work, merely because the birthday.php code isnt exactly what it asks you to search for, and testing the bot takes so long, and I'm not the paitent type...

Guess i might as well try though. Nothing to lose except someone doesnt get their precious b-day email, lol.

House_of_Crazed 10-08-2004 06:49 AM

Okay, I have a bug :(

Apparently, when more than 1 person has a birthday, it will not post the other people. Just one person. :(

I've gone through the code thousands of times and can't see anything.

richier 10-09-2004 09:12 PM

Quote:

Originally Posted by House_of_Crazed
Okay, I have a bug :(

Apparently, when more than 1 person has a birthday, it will not post the other people. Just one person. :(

I've gone through the code thousands of times and can't see anything.


I am having the same problem it only shows one birthday not everyones on that day

Help please :nervous:

ChurchMedia 10-09-2004 09:41 PM

Two questions for both of you, then we'll try to figure it out.

1) Did you install the hack as described in the original instructions, or did you do any of the modifications suggested by other people in this post?

2) Have you run the cron job manually to see if you get any errors? You have to do this from the admin cp. You can \\ the vbmail lines to make sure that your members don't get emails while you are testing.

See if you can get an error message and we'll go from there.

Boofo 10-09-2004 09:50 PM

Quote:

Originally Posted by ChurchMedia
Two questions for both of you, then we'll try to figure it out.

1) Did you install the hack as described in the original instructions, or did you do any of the modifications suggested by other people in this post?

2) Have you run the cron job manually to see if you get any errors? You have to do this from the admin cp. You can \\ the vbmail lines to make sure that your members don't get emails while you are testing.

See if you can get an error message and we'll go from there.

I get the same thing. It only pulls the first birthday.

Lionel 10-09-2004 10:21 PM

Works for me. Witnessed that 5 days ago with 2 birthdays

richier 10-09-2004 10:39 PM

Quote:

Originally Posted by ChurchMedia
Two questions for both of you, then we'll try to figure it out.

1) Did you install the hack as described in the original instructions, or did you do any of the modifications suggested by other people in this post?

2) Have you run the cron job manually to see if you get any errors? You have to do this from the admin cp. You can \\ the vbmail lines to make sure that your members don't get emails while you are testing.

See if you can get an error message and we'll go from there.


Yes and Yes I get 1 birthday in the thread when I run the cron and thats all.

And no extra hacks

House_of_Crazed 10-09-2004 11:51 PM

1. Yes
2. Yes - I even put the original file back and redid it. Same thing.

No extra hacks has been installed for the birthday.php in the cron folder inside the includes folder.


All times are GMT. The time now is 07:41 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.01711 seconds
  • Memory Usage 1,850KB
  • 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_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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