The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#32
|
||||
|
||||
HTML Code:
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title3))."','".time()."','$greetings_forum','1','0','".addslashes($greeter_name)."','$greeter','".addslashes($greeter_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,pagetext,allowsmilie,showsignatu re,ipaddress,iconid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialchars($title3))."','".addslashes($greeter_name)."','$greeter','".time()."','".addslashes($birthday_greeting_thread)."','1','0','127.0.0.1','0','1')"); // End Create Birthday Thread Hack then you have to change this: HTML Code:
INSERT INTO thread to INSERT INTO yourprefix_thread HTML Code:
INSERT INTO post to INSERT INTO yourprefix_post |
#33
|
||||
|
||||
Quote:
|
#34
|
|||
|
|||
Strange, i ran the Happy Birthday email and got no errors but I had a birthday and gor a email :
Database error in vBulletin 3.0.0 Release Candidate 4: Invalid SQL: INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastpos ter,dateline,iconid,visible,attach) VALUES (NULL,'Happy Birthday to on March 21, 2004','1079867961','6','1','0','Happy Birthday','11064','Happy Birthday','1079867961','0','1','0') 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 'ter,dateline,iconid,visible,attach) VALUES (NULL,'Happy Birthda mysql error number: 1064 Any ideas what is wrong?? Thanks! |
#35
|
||||
|
||||
Be sure to change the user id,user name and forum id variables. If they don't exist you will get an error. Looks like you might have used example variables (from MK@spug.net). Let me know if you still have problems after changing these:
$greeter=1; //Your User ID $greeter_name="Your User Name"; //Your User Name $greetings_forum=1; //enter the forum id that you want the thread to go into |
#36
|
|||
|
|||
Quote:
AAHHh YEs I didn;t read that closely enough. . . :nervous: Thanks for the reply! ryan\ |
#37
|
||||
|
||||
Quote:
|
#38
|
||||
|
||||
To show the age (in years)...
In includes/cron/birthday.php find: Code:
$emails .= iif($emails, ', '); $emails .= $userinfo['username']; Code:
// Generate Age if (!$year) { $year = vbdate('Y', TIMENOW, false, false); $month = vbdate('n', TIMENOW, false, false); $day = vbdate('j', TIMENOW, false, false); } if (empty($gotage["$userinfo[userid]"])) { $date = explode('-', $userinfo['birthday']); if ($year > $date[2] AND $date[2] != '0000') { $age = $year - $date[2]; if ($month < $date[0] OR ($month == $date[0] AND $day < $date[1])) { $age--; } if ($age < 101) { $gotage["$userinfo[userid]"] = $age; } else { unset($age); } } } else { $age = $gotage["$age[userid]"]; } // end age Code:
$bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, born ".$userinfo['birthday']."\n"; Code:
$bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, Age: ".$age."\n"; |
#39
|
||||
|
||||
Very cool! Thanks for that addition. Here's an addition to email the greeter when the thread is created (it will email the birthday greeting).
Find: Code:
$greeter=1; //His User ID Below that add: Code:
$greetermail="youremail@yourdomain.com"; Find: Code:
$DB_site->query("UPDATE user SET posts=posts+1 WHERE userid=$greeter"); Code:
// email the admin $birthday_greeting_thread=strip_tags($birthday_greeting_thread); vbmail_start(); vbmail($greetermail, $title3, $birthday_greeting_thread); vbmail_end(); |
#40
|
||||
|
||||
Here's an addition to give users store points for their birthday:
Find: Code:
$bday_title .= $username.", "; Code:
$DB_site->query("UPDATE user SET storep=storep+50 where userid='$userinfo[userid]'"); You can change the "50" to however many points you want to give for a birthday present. Be sure to mention the present in your birthday greeting. |
#41
|
|||
|
|||
church media one request if possible - can this be set to ignore zero posters ?
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|