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 03-20-2004 05:24 PM

In your admin cp under scheduled tasks, you can choose to "run now" for any cron job. It's really useful for testing.

FASherman 03-20-2004 06:46 PM

Quote:

Originally Posted by ChurchMedia
For those of you having parse errors, there were some spaces added to the queries when I pasted the code (??). I've attached instructions in a text format. Copy from there and it should work.

MK@spug.net: Nice addition

sabret00the: To create individual threads for each birthday, just move the step 3 code up underneath the $bday_people = .... line. It should work, but I haven't tried it.

As far as usergroups, I'm still getting the hang of VB3. :)

Enjoy,

The parsing errors have nothing to do with queries, but with this line:

$birthday_greeting_thread = <<< EOF

It is bad syntax. Its also bad coding form.

ChurchMedia 03-21-2004 01:40 AM

hmmm.... I see that method used all the time. It doesn't cause errors even if it's considered bad syntax. What would you suggest (aside from calling a vb template)? :ermm:

ChurchMedia 03-21-2004 02:23 AM

I did go ahead and change the $birthday_greeting_thread into a single line variable instead of using <<< EOF EOF; tags, but that format is used quite frequently. I'm not sure why it would cause an error. PhotoPost makes liberal use of this type of format and it's taught in PHP books.... ??? :ermm:

nhochochack 03-21-2004 08:04 AM

use it for vbb Gold ,, don't work ,

Ted S 03-21-2004 09:21 AM

Great hack! I've got too many birthdays to print all the names in the title but I'm using the rest of MK@spug.net's changes. Very easy install on vb3 gold (if you're having errors check to see if your mysql insert has extra spaces).

Vb-Hispano 03-21-2004 03:17 PM

yes, working in gold

thanks :D

Platinumgamer 03-21-2004 03:26 PM

Hmm...this hack works fine on Gold, however the thread doesn't show up on the forumhome, just inside the forum. Also, the thread count doesn't rise when new threads are made. (I just installed this hack, so it only has one thread posted...yet the forum for the BDay threads still has '0' as the thread count...even though the reply count is there.

Is this supposed to happen, and can it be fixed?

Thanks!

ChurchMedia 03-21-2004 06:57 PM

Good point. I left out a couple of line of code from Logician's original hack. Add these lines right above // End Create Birthday Thread Hack

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"); 

I just tested it and it works. Credit goes to Logician :). I updated the original txt file.

Quote:

Originally Posted by Platinumgamer
Hmm...this hack works fine on Gold, however the thread doesn't show up on the forumhome, just inside the forum. Also, the thread count doesn't rise when new threads are made. (I just installed this hack, so it only has one thread posted...yet the forum for the BDay threads still has '0' as the thread count...even though the reply count is there.

Is this supposed to happen, and can it be fixed?

Thanks!


Platinumgamer 03-21-2004 08:07 PM

Thanks ChurchMedia and Logician!

That worked perfectly. :)


All times are GMT. The time now is 08:00 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.01198 seconds
  • Memory Usage 1,741KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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