The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need Help - Using newpost_complete
I've got this plugin I've been trying to write for newpost_complete...but I can't get it to work...anyone see where I've gone wrong?
Code:
//if post is original author $originals = $vbulletin->db->query_read(" SELECT postuserid FROM " . TABLE_PREFIX . "thread WHERE threadid = '" . $newpost['threadid'] . "'"); while($original = $vbulletin->db->fetch_array($originals)) { if($original['userid']==$newpost['userid']){ //Find who is subscribed to this thread $subscribed = $vbulletin->db->query_read(" SELECT emailupdate,userid FROM " . TABLE_PREFIX . "subscribethread WHERE threadid = '" . $newpost['threadid'] . "'"); while($subscribe = $vbulletin->db->fetch_array($subscribed)) { if ($subscribe['emailupdate'] == 5) { //User is subscribed to thread & wants notification when original replies //Get users email address and name $user = $vbulletin->db->query_first(" SELECT email,username FROM " . TABLE_PREFIX . "user WHERE userid = '" . $subscribe['userid'] . "' LIMIT 1"); // Get email phrases eval(fetch_email_phrases('foruminstantnotify', $forum['languageid'])); //Send the email vbmail($user['email'], $subject, $message); } } }} |
#2
|
|||
|
|||
Bumping out of desperation...
|
#3
|
||||
|
||||
Replace the where clauses in your SQL statments in the following way.
change: PHP Code:
PHP Code:
|
#4
|
|||
|
|||
Thanks...that seems to do something...
Except now, I always get a "this is a duplicate of a post you did in the last 5 minutes" message. It's like it double posts. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|