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)

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!


All times are GMT. The time now is 01:25 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.01471 seconds
  • Memory Usage 1,758KB
  • 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
  • (7)bbcode_php_printable
  • (8)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