The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#12
|
|||
|
|||
Is there any way that this can be used from the actual post and not from the CP so that the Moderators can issue the warning too?
That would be great |
#13
|
|||
|
|||
The latter section of warn user.php looks something like this. Compare to one above and you will see what I mean
$DB_site->query("INSERT INTO privatemessage (touserid,userid,fromuserid,title,message,dateline ,showsignature,iconid,messager ead,folderid) VALUES ($touserid,$bbuserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($warning[$why][title]))."','".addslashes($warning[$why][msg])."',".time().",'1','0',0,0)"); mail($toemail,$warning[$why]["title"],$warning[$why]["msg"],"From: \"$bbtitle Mailer\" <$webmasteremail>"); echo "User Altered To Need to Read Status and Email sent."; } elseif($useri[warnings] > $numwarn) { $bannedtl = "You have been suspended."; $bannedmsg = "You have broken some forum rules and your posting privliges have been suspended. Contact An administrator regarding re-instatement."; $DB_site->query("update user set usergroupid=$bannedgrp where userid='$touserid'"); $DB_site->query("INSERT INTO privatemessage (userid,touserid,fromuserid,title,message,dateline ,showsignature,iconid,messager ead,folderid) VALUES ($touserid,$bbuserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($bannedtl))."','". addslashes($bannedmsg)."',".ti me().",'1','0',0,0)"); mail($toemail,$bannedtl,$bannedmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); echo "User Altered To Need to Read Status and Email sent."; |
#14
|
|||
|
|||
OK
I am still getting banned user pm sent to me the administrator from instead of the banned user. However the email option works like a charm. I just need the pm to go to the banned users instead of to me. Any ideas? This is what I have: PHP Code:
TIA |
#15
|
|||
|
|||
yes, there are 2 instances in warnuser.php where you need to reverse the touserid and userid
You did the top one, but look further down, you forgot the second one Once complete, it should resemble this ----------- <?php // alter table user add column warnings int default 0; error_reporting(7); require("./global.php"); ## Edit This: ## $ban = 1; // 0 = Never ban nomatter what; 1 = Ban after $numwarn has been passed $numwarn = 0; // Number of warnings till user gets banned $bannedgrp = 30; // Group id for banned users ## Stop Editing ## $warning["new_spammer"]["title"] = "[Warning] Spamming On DSSChat.com Forums!"; $warning["new_spammer"]["msg"] = "You have been caught spamming the DSSChat.com Forums. Your posting access to the forums has been suspended. You can contact an administrator for consideration at re-instatement."; $warning["spammer"]["title"] = "[Warning] Off-Topic Posting on DSSChat Forums!"; $warning["spammer"]["msg"] = "You have violated some rules on the DSSChat Forum, usually an off-topic post where is does not belong. Your posting access to the forums has been suspended. You can contact an administrator regarding re-instatement."; $warning["flamer"]["title"] = "[Warning] Flaming On DSSChat.com Forums!"; $warning["flamer"]["msg"] = "You have violated some rules on DSSChat Forums, usually flaming other users or other un-acceptable conduct. Your posting access to the forums has been suspended. You can contact an administrator regarding re-instatement."; if(isset($touserid)) { $DB_site->query("update user set pmpopup='1',warnings=warnings+1 where userid='$touserid'"); $useri = $DB_site->query_first("select * from user where userid='$touserid'"); if(($useri[warnings] == "1") or ($ban == 0)) { $DB_site->query("INSERT INTO privatemessage (touserid,userid,fromuserid,title,message,dateline ,showsignature,iconid,messager ead,folderid) VALUES ($touserid,$bbuserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($warning[$why][title]))."','".addslashes($warning[$why][msg])."',".time().",'1','0',0,0)"); mail($toemail,$warning[$why]["title"],$warning[$why]["msg"],"From: \"$bbtitle Mailer\" <$webmasteremail>"); echo "User Altered To Need to Read Status and Email sent."; } elseif($useri[warnings] > $numwarn) { $bannedtl = "You have been suspended."; $bannedmsg = "You have broken some forum rules and your posting privliges have been suspended. Contact An administrator regarding re-instatement."; $DB_site->query("update user set usergroupid=$bannedgrp where userid='$touserid'"); $DB_site->query("INSERT INTO privatemessage (userid,touserid,fromuserid,title,message,dateline ,showsignature,iconid,messager ead,folderid) VALUES ($touserid,$bbuserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($bannedtl))."','". addslashes($bannedmsg)."',".ti me().",'1','0',0,0)"); mail($toemail,$bannedtl,$bannedmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>"); echo "User Altered To Need to Read Status and Email sent."; } } else { echo "eeek"; } ?> ----------- |
#16
|
|||
|
|||
Got her.
Thanx. |
#17
|
||||
|
||||
nice
gonna come in handy on my board thanks |
#18
|
|||
|
|||
sorry for not beeing here to maintain this hack.
hack updated and fixed.. thanks for your feedback. [QUOTE]Originally posted by inetd Make please so that it was possible to do make warning with board, and not just from Admin CP. |
#19
|
|||
|
|||
[QUOTE]Originally posted by holev
thats more of a template edit.. just edit your 'postbit' templete with the link of the warnuser with propper vars attached. |
#20
|
||||
|
||||
I'd like to see this enabled for mods as well in the Moderator's admin CP, if that's at all possible.
|
#21
|
||||
|
||||
[QUOTE]Originally posted by risestar
I installed this and it works ok, except that I got the Pm instead of the user. I noticed this userid,touserid and $bbuserinfo[userid],$touserid and reversed it and now it works fine and sends out to the user instead of me. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|