!!!cyr0n_k0r |
11-22-2002 06:12 PM |
here are my settings. I set my post count to 24 and made a new thread and I didnt get a PM or an e-mail. I even posted replies making my post count like 27.. and still no pm or e-mail.
Quote:
//Logician Greet Users Xth post via Email/PM/Create Thread hack
###########################################
## OPTIONS ##
###########################################
// How to send the greeting to the user:
// 0 --> Neither PM nor Email (Disables PM/email Greeting)
// 1 --> PM Only (If he can receive pms)
// 2 --> Email Only
// 3 --> PM Only (Whether he can receive PMs or not)
// 4 --> BOTH PM and email
// 5 --> If he can receive send PM, if not send Email.
$greeting_type=5;
// Which post numbers will be greeted via email or PM?
// The hack will greet send greetings email/PM for every number of posts you specified here
// Usage Examples: To greet only 1000th post use: $greetpost_pm=array('1000');
// To greet only 1000th and 2000th post use: $greetpost_pm=array('1000','2000');
$greetpost_pm=array('25');
//if send pm, will he get a pop up alert? set to 1 for yes, 0 for no.
$pop_alert=1;
// Do you want the hack to automatically create a thread to greet his post?
// 1-- > Yes, 0 --> No
$thread_create=0;
// Which post numbers will be greeted via a greeting Thread?
// The hack will create a greeting threadfor every number of posts you specified here
// Usage Examples: To greet only 1000th post use: $greetpost_thread=array('1000');
// To greet only 1000th and 2000th post use: $greetpost_thread=array('1000', '2000');
$greetpost_thread=array('1000', '1500', '2000', '2500', '3000', '5000');
// If you choose to create a new thread in your board, enter the forum id:
$greetings_forum = 2;
// Greeter's user id, username, email:
// Who will celebrate the user?
// He will be sender of the PM's or emails sent to your member:
$greeter=1; //His User ID
$greeter_name="PaintballForums.net Administrator"; //His User Name
$greeter_email="admin@paintballforums.net"; //His Email
// Subject/Title of the Email or PM users get.
// use ??post?? variable to refer their post number
// use ??name?? variable to refer their username
$title2= "Your post number has reached ??post??!! ;)";
// Icon ID of the PMs
$log_iconid=0;
// If you choose to create a new thread in your board, what's Thread Title?
// use ??post?? variable to refer their post number
// use ??name?? variable to refer their username
$title3= "??name??'s ??post??th Messages!!";
// Excluded User groups. (That is Usergroup ID, NOT userid!)
// If you dont want to sent greetings for some usergroups enter their usergroups id:
// Usage Examples: To exlude user group 12 use: $excluded_usergroups=array('12');
// To exclude user group 12 AND 13 use: $excluded_usergroups=array('12', '13');
// To NOT to exclude any usergroups, set it to $excluded_usergroups=array('0');
$excluded_usergroups=array('0');
// Report to Admin: Notifies the admin daily about the greetings
// 0 -> Dont notify Admin
// 1 -> Notify Admin via PM
// 2 -> Notify Admin via Email
$admin_report=0;
// Admin email (to send the greeting report via email, if set)
$admin__email="admin@paintballforums.net";
// Admin userid (to send the greeting report via PM, if set)
$admin__userid=1;
########## END OF OPTIONS #################
$greeteduserid=$bbuserinfo[userid];
$greetedusername=$bbuserinfo[username];
$greeteduserposts=$bbuserinfo[posts]+1;
$greetedemailusername=unhtmlspecialchars($bbuserin fo['username']); //for email title
if ($bbuserinfo[userid]!=0 AND $foruminfo[countposts] AND (in_array($greeteduserposts, $greetpost_thread) OR in_array($greeteduserposts, $greetpost_pm)) AND ($greeting_type>0 OR $thread_create>0 OR $admin_report>0) AND !(in_array($bbuserinfo[usergroupid], $excluded_usergroups)))
{
$greeteduserpostsstring=(string)$greeteduserposts;
$title3=ereg_replace('??name??', $bbuserinfo[username], $title3);
$title3=ereg_replace('??post??', "$greeteduserpostsstring", $title3);
$title2=ereg_replace('??post??', "$greeteduserpostsstring", $title2);
$title2=ereg_replace('??name??', $bbuserinfo[username], $title2);
$admin_report_text="Your member $greetedusername posted his ".$greeteduserposts."th message at ".date("F j, Y, g:i a")." (Server Time)\n\nActions Taken by the hack (if any):\n\n";
##############################################
if (in_array($greeteduserposts, $greetpost_thread) AND $thread_create>0)
{ //Lets Create a Thread for this user
// Creating Thread
eval("\$post_greeting_thread = \"".gettemplate("post_greeting_thread",1,0)."\";") ;
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES(NULL,'".addslashes(htmlspecialchars($title3 ))."','".time()."','$greetings_forum','1','0','".a ddslashes($greeter_name)."','".addslashes($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,datelin e,pagetext,allowsmilie,showsignature,ipaddress,ico nid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialcha rs($title3))."','".addslashes($greeter_name)."','$ greeter','".time()."','".addslashes($post_greeting _thread)."','1','0','127.0.0.1','0','1')");
$log_postid=$DB_site->insert_id();
// 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");
// Admin Report Text
$admin_report_text.="[*] Thread Created\n $bburl/showthread.php?threadid=".$log_threadid."\n\n";
}
##############################################
if ($greeting_type==3 OR $greeting_type==4 OR ($greeting_type==1 AND $bbuserinfo[receivepm]==1))
//Send PM
{
eval("\$post_greeting_pm = \"".gettemplate("post_greeting_pm",1,0)."\";");
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid) VALUES (NULL,$bbuserinfo[userid],$bbuserinfo[userid],$greeter,'".addslashes(htmlspecialchars($title2)) ."','".addslashes($post_greeting_pm)."',".time()." ,1,'$log_iconid',0,0)");
$admin_report_text.="[*] PM Sent\n\n";
if ($pop_alert==1)
//pop up alert set, lets send pm popup alert..
{
if ($noshutdownfunc) {$DB_site->query("UPDATE user SET pmpopup=2 WHERE userid=$bbuserinfo[userid]");}
else {$shutdownqueries[]="UPDATE LOW_PRIORITY user SET pmpopup=2 WHERE userid=$bbuserinfo[userid]";}
}
} //send PM
##############################################
if ($greeting_type==2 OR $greeting_type==4 OR ($greeting_type==5 AND $bbuserinfo[receivepm]!=1))
//Send Email
{
eval("\$post_greeting_email = \"".gettemplate("post_greeting_email",1,0)."\"; ");
mail($bbuserinfo[email],$title2,$post_greeting_email,"From: \"$bbtitle \"<$webmasteremail>");
$admin_report_text.="[*] Email Sent";
}// Send Email
$admin_report_text.="\n\n << Greet Members Xth Post Hack by Logician >> \n";
#############################################
if ($admin_report==1)
// Sending Greetings Report to Admin By PM
{
$admin_pm_title= $greetedusername."'s ".$greeteduserposts."th post!";
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,showsignature,iconid,messageread ,folderid) VALUES(NULL,$admin__userid,$admin__userid,$admin__ userid,'".addslashes(htmlspecialchars($admin_pm_ti tle))."','".addslashes($admin_report_text)."',".ti me().",1,'$log_iconid',0,0)");
}
if ($admin_report==2)
// Sending Greetings Report to Admin By Email
{
$admin_report_title = $greeteduserposts."th post of $greetedemailusername!";
mail($admin__email, $admin_report_title ,$admin_report_text,"From: \"$bbtitle \"<$webmasteremail>");
}
}
//exit;
//Logician Greet Users Xth post via Email/PM/Create Thread hack
|
|