![]() |
Quote:
In birthday.php find: Code:
$birthdays = $DB_site->query(" Code:
$birthdays = $DB_site->query(" Code:
$emails .= iif($emails, ', '); Code:
$posts = $userinfo[posts]; Code:
// Create Birthday Thread Hack Code:
if ($posts>='1') Find: Code:
// End Create Birthday Thread Hack Code:
} In birthday.php find: Code:
$birthdays = $DB_site->query(" Code:
if ($vboptions['birthdaydatecut']) Code:
(options & $_USEROPTIONS[adminemail]) AND Code:
(options & $_USEROPTIONS[adminemail]) AND |
Quote:
Code:
$birthdays = $DB_site->query(" Code:
$birthdays = $DB_site->query(" EvilLS1's version gives you a lot more options. |
How do you turn it off??? :-S
|
Turn off what? The automatic email or the automatic thread?
|
The automatic thread.
|
Sure -- just put a \\ in front of all of the lines that relate to thread creation -- or delete everything that you hacked in.
|
Thanks! :)
|
Parse error: parse error in /home/virtual/site1/fst/var/www/html/forums/includes/cron/birthday.php on line 86
<?php /*================================================= =====================*\ || ################################################## ################## || || # vBulletin 3.0.1 - Licence Number XXXXXXXXXX || # ---------------------------------------------------------------- # || || # Copyright ?2000?2004 Jelsoft Enterprises Ltd. All Rights Reserved. || || # This file may not be redistributed in whole or significant part. # || || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ################################################## ################## || \*================================================ ======================*/ error_reporting(E_ALL & ~E_NOTICE); if (!is_object($DB_site)) { exit; } $today = date('m-d', TIMENOW); $ids = '0'; foreach($usergroupcache AS $usergroupid => $usergroup) { if ($usergroup['genericoptions'] & SHOWBIRTHDAY) { $ids .= ",$usergroupid"; } } $birthdays = $DB_site->query(" SELECT username, email, languageid, birthday, userid FROM " . TABLE_PREFIX . "user WHERE birthday LIKE '$today-%' AND (options & $_USEROPTIONS[adminemail]) AND usergroupid IN ($ids) "); vbmail_start(); while ($userinfo = $DB_site->fetch_array($birthdays)) { $username = unhtmlspecialchars($userinfo['username']); eval(fetch_email_phrases('birthday', $userinfo['languageid'])); vbmail($userinfo['email'], $subject, $message); $emails .= iif($emails, ', '); $emails .= $userinfo['username']; $bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, born ".$userinfo['birthday']."\n"; $bday_title .= $username.", "; vbmail_end(); if ($emails) { log_cron_action('Birthday Email sent to: ' . $emails, $nextitem); // Create Birthday Thread Hack $birthday_greeting_thread = "Here are today's birthdays!<br><br>$bday_people"; $greeter=3; //Your User ID $greeter_name="Jon"; //Your User Name $greetings_forum=56; //enter the forum id that you want the thread to go into $todays_date11= date("F j, Y", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y"))); $title3= "Happy Birthday to "; $title3.= $bday_title; $title3.= "on "; $title3.=$todays_date11; $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title3))."', '".time()."','$greetings_forum','1','0','".addslas hes($greeter_name)."','$greeter','".addslashes($gr eeter_name)."','".time()."','0','1','0')"); $log_threadid=$DB_site->insert_id(); // Creating Post $DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,pa getext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialcha rs($title3))."','".addslashes($greeter_name)."','$ greeter','".time()."','".addslashes($birthday_gree ting_thread)."','1','0','127.0.0.1','0','1')"); // Updating Forum $DB_site->query("UPDATE forum SET replycount=replycount+1,threadcount=threadcount+1, lastpost='".time()."',lastposter='".addslashes($gr eeter_name)."' WHERE forumid = $greetings_forum"); // Updating User's Post $DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$greeter"); // End Create Birthday Thread Hack /*================================================= =====================*\ || ################################################## ################## || # Downloaded: 22:57, Sun May 2nd 2004 || # CVS: $RCSfile: birthday.php,v $ - $Revision: 1.25 $ || ################################################## ################## \*================================================ ======================*/ ?> |
@ Jons5150
You missed a } between the two lines Code:
$bday_title .= $username.", "; Code:
$bday_title .= $username.", "; |
What about Usergroups to exclude from Birthday thread ?
any idea how to do this ? |
Nice hack.
I have it installed and working, but I am seeing all of the HTML code surrounding the birthday people. Does HTML have to be enabled in the forum for this to work properly? Also, what do I need to do to change the subject of the thread. I have LOTS of members and having all of the user names in the subject line is way too much clutter. Thank you. Rick |
Quote:
Quote:
$title3.= $bday_title; with: $title3.= "our members"; That would make the subject "Happy Birthday to our members on whateverdate". Enjoy! |
Thank you. That did it :D
|
works very fine here, thx. mate !
|
Quote:
Quote:
If only users with zero posts has birthday on a day this addition works, but if other users with more than zero post has also birthday a greating thread is generated and also the zero posters are greated ! any idea? |
I fixed the problem with the following database query:
PHP Code:
|
iam having problems i have done the hack as in the download and today this was made as a post not as the screenie shows.
Also a side effect has happened, in my admin panel in forums and moderator the options in the controls ie edit, delete have disappeared but when i delete the post the options have reappeared. this is how the post was displayed. Dear Forum,<br><br>Here are today's birthdays!<br><br><a href="member.php?u=124">RUGGY</a>, born 06-28-1938 <a href="member.php?u=54">RONNIEBI</a>, born 06-28-1941 Any ideas |
Looks like you need to turn on HTML for your birthday forum. Then the HTML code will disappear.
That second problem is a new one to me. Are you listing yourself as the poster? |
Sorted the first second one seems to have gone away strange
|
Hi there,
the post is done very well in my 3.0.3er Version but the Thread does not get a title on the forumhome. Take a look at my screen and you will see! |
Quote:
Hmmmm.... I'm running vB 3.0.0 and not having that problem. Double-check the code. See my screenshot from today. (Edit) Oh -- you said you're running 3.0.3 (you might want to update your profile). I'm not sure -- maybe that's the problem. I won't know until I upgrade to 3.0.3, which won't be for a couple of months.... |
I checked the code (its not so much :D) and this is looking like yours!
|
Quote:
Hmmmm..... I'm just not sure what the problem is, unless 3.0.3 handles something differently. Maybe someone familiar with 3.0.3 could help by looking at my code. Sorry! |
Quote:
|
Quote:
It seems to have the right title and link for new posts.... ??? |
Quote:
|
Quote:
Would be cool to get a fix to that though, thanks :) |
Well, I tried switching the post and thread creation and it just creates an empty thread. I think the problem is with this line:
$log_threadid=$DB_site->insert_id(); I think the insert_id() function is no longer valid in vB3, so it enters a thread id that is NULL. So, it doesn't show up until the next day. Make sense? Anyone know what the function insert_id() was replaced with? |
Quote:
|
Well, I've looked some code in newthread.php and I think I could re-write this hack to work correctly and streamline it a bit. I won't have time for a while, though (I've having surgery on Tuesday and will be out for a few weeks). I'll look back into it as soon as I can. :)
Thanks, |
Quote:
PHP Code:
|
Can someone please make it so we don't have to turn on HTML in our forums?
|
Installed yesterday, this morning I got this,
PHP Code:
|
You have to turn on HTML for your birthday forum. That will fix it...
|
I can't find out where that is in CP, can you hint me?
|
I got it and it works beautifully!
|
In the forum manager -- then enable/disable features. See the screenshot.
|
Thanks! You rock!
|
I use phrase in the birthday.php, when I test it by running cron, it works normally all the phrases show up properly, but when the cron runs in automatic mode, all phrases never show? whats the problem?
|
Quote:
OK... I didn't want to enable HTML on my forums (for obvious reasons) so I used BBCode Instead to create the thread's post text. ***EDIT*** The BR Code works even if you do not have HTML enabled. And it works just fine. :squareeyed: :nervous: This is what my code looks like: PHP Code:
|
All times are GMT. The time now is 04:17 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|