![]() |
i have installed and upgraded the warning hack but normal members can warn other members is there a setting to make it so that admins and mod or supermods can warn
|
Nice man! I'm clicking install button now!
|
I have found a very annoying problem with this hack.
No offense but your function ParseInput wasnt very good and it is not handling the comments the way i want. It is not giving good pm results. Meaning i get the ASCII characters in my PM's when recieving a warning notice. First i would like to thank the admin's over at www.battleforums.com for pointing this out. Proper grammar can really improve a forum's appearance and that is one of the reasons i want help with this problem. I tried to use a function by vbulletin but thats not working. If you could please modify it that would be great. |
Why not use the template mod suggested further back in this thread?
|
hmmm...I'm getting a Who is Online error aswel...having my programmer check it out.
|
can someone please answer my question
|
Quote:
Rgds |
Quote:
|
Quote:
Rgds |
Yea if you could send those my way that'd be great. Just pm me.
Also, I know it has something to do with the way the message is parsed from the database. ParseInput() is a decent function but it does not seem to deal with it the right way. And the pm text SHOULD be the same, unless you made a custom function for send_pm() but i didnt notice anything. Thanks for the help, and i hope i can figure this problem out. ~Sicloan |
Set it up with no problems! Thanks again for such an awesome hack and awesome work ;) I'd expect no less from you. :p
|
Quote:
HTML Code:
Dear $user[username], PHP Code:
Right below those two lines, add the following: PHP Code:
I hope this helps. --------- John |
One issue I had with this hack, is the fact that it uses a separate table, to maintain those members which get banned. If you do that, then you have to manually change their status to unbanned, when the banning period expires.
Why can't we use the normal table, in which vB stores the banned users, called "userban"? In that way, we can have the vB's cron job take care of the unbanning. For those who are interested in this, all you have to do, is the followings: In your warn.php file, find the following line: PHP Code:
PHP Code:
Also, it is obvious, that if you use this mod of mine, any future improvements by the author of this hack, might not work, so use at your own risk. I'll try to help anyone who has issues with the above mods, but I can't promise any response times. Rgds ------------ John |
* jd clicks install *
I have been testing this for a while, it is great just installed it on my live forum. I have made a few changes mostly conditionals so only staff can see the warn and view warn text in the postbit template, also added a Warn Level indicator for everyone (except staff) to see, also added the same in the MEMBERINFO template. Thank you. JD. :) |
I get SQL errors when trying to send the message using both the original method by Zero Tolerance, and the template method by sv1cec
Here is the error with the stock code: Code:
Database error in vBulletin 3.0.3: Code:
$DB_site->query(" Thanks! |
Quote:
|
Quote:
Rgds ------------ John |
Quote:
I have attached my Warn.php file so you can see exactly what it says. When I change Warn.php so that it adds a user to the normal vB banned usergroup I get this error and this error only when attempting to warn a user or view their warning level: Code:
Parse error: parse error, unexpected T_VARIABLE in /home/observed/public_html/vb/Warn.php on line 250 Code:
243: if($warn_type['warn_permban']=="Yes") When I change the private message function so that it uses the template instead of the stock way it notifies a user of a warning I get this mySQL error: Code:
Database error in vBulletin 3.0.3: Matt |
Matt,
The first error is easy, you need to add a semicolon at the line which says: $usergroupid=8 Change that to $usergroupid=8; As far as the second mistale is concerned, have you commented out both lines starting with "$messageb=...."? There are two lines there, looking like: PHP Code:
PHP Code:
My warn.php looks like that, in that area: PHP Code:
Rgds ---------- John |
i'd still like expirable warnings
|
Quote:
Rgds ---------- John |
Quote:
|
Hey John, the first problem has been solved, the semicolon worked no problem.
I still have a problem with the private messaging though. The lines are uncommented just how you said to do and the next lines are just like yours. The SQL error is still the same though. You can view my Warn.php here if you want to verify anything for yourself. Also, I warned my test account up to a ban and it went to the correct usergroup in the correct ban log (the one built into vB), but it said the ban was permanent. I have it set to 3 days in the Admin CP. If you have any idea what is going on with that I'd appreciate it. Thanks for all the help, Matt Edit: just saw you run m1911.org, very :cool: Congrats on getting the forums running, I hadn't even seen them before. I always used http://forums.1911forum.com/ :) Anyhow, just wanted to let you know I've learned a LOT from your site |
Matt,
Thanks for the nice words about M1911.ORG, appreciated. Yes, we have our own forums site running since June. As for the mods, there were a couple of minor mistakes in your warn.php, so I had them corrected. I guess the problem with the eval statement was a dot, just before the = sign. Anyway, I attached it here. Let me know if it works. Rgds |
i hope two idea's i've seen on these forums make it into version 2.0
Expirable warnings Can't warn same post twice |
sv1cec, It didn't work. The first problem I had was that I needed a new colum in warn_types called warn_maturity. I made that, but now I'm still getting the problem with the PM function:
Code:
Database error in vBulletin 3.0.3: If you have any ideas I'd appreciate it :). Matt |
Quote:
I found a few more differences between your warn.php and mine. I am attaching your file with the new code. It is in the SQL Query that inserts those values in the omtext table. The problem is that I haven't touched that part of the code myself, so I guess we have a ... version discrepancy here. Let me know if this one works. John |
Quote:
As for not warning the same post twice, I think I've got it working by adding the following code: PHP Code:
PHP Code:
Rgds John |
Quote:
however it would be good to have it intergrated into the hack itself for example the way it was in mikes warning hack for vb2 Spamming expires 30 days Rudeness expires 1 day Signature expires 30 days its settable per warning but the way i found in this thread was as a whole 30 days from the time set per warning |
Quote:
It appears to be working great now :D except for two small things. 1.) If a user has a warning level of 5 and the ban level is 6 and I give them a warning worth 2 points it takes the level up to 6, but when I remove the warning it keeps an extra point in "reserve" that I can't seem to erase. I can of course go into the my user table and remove it from the last column, but I thought I'd let you know in case you want to fix it. 2.) At the bottom of the Warn.php interface (on the site) it says "Once you reach warning level 6, you will be banned for 3 days". Well, I'm not banning them, I have a usergroup on my site I add them to called the Kiddie Korner, and that is the only place they're allowed to post. I would like to say "Once you reach warning level 6, you will be moved to the Kiddie Korner for 3 days" |
Quote:
As I said, if you care, it's here, but don't expect me to provide step-by-step instructions, I just do not have them. I'll try to help you out, but that's all I can do. Rgds -------- John |
Quote:
The minute I say "OK, I can go and rest a bit", here you come with a different thing! LoL I'll have to check on the first one, this is a tough one, because the hack works initially like that, when you reach the limit, it resets itself at the limit. I can change that, but I need to check what impact it will have overall. As for the second point, just alter your warn_viewtype_end template. Easy enough, if not let me know. Now, I go rest, before the twins wake up and my baby-sitting session starts. Rgds |
Quote:
Quote:
Thanks for all of the help, Matt |
Quote:
I am aware of this problem, it's just that I am not sure which is the best way to handle it. I assume that in some cases, leaving the code as it is, is a better option, in other cases, it's better to have a warning level above the limit, like when deleting warnings. To do it the way you want (i.e. to work properly when removing a warning, as far as the rremoved points are concerned), find the following line: PHP Code:
PHP Code:
---------- John |
Quote:
That brings up errors when someone is already one below the ban level and I try to warn them again (to bring them 1 above the ban level), SQL errors: Code:
Database error in vBulletin 3.0.3: Matt |
Quote:
That's another issue I have to deal with. See that the statement that is causing the problem, is the one which inserts an entry in the userban table, this is the table where the banned users are inserted. Now, I remember that you said that you do not ban the users, you just move them to another user group, so I am not sure how you want this handled. To verify that this is the case (I am sure it is), just comment that line, it should still increase the warn points for that user, but it will not enter his entry in the userban table. If you do not plan to ban users, then you'd better stick with the original hack, which allows you to move your users to another usergroup, and when the maturity period is over, they can be re-moved back to their original group. But this has to be done manually, from the "Unban members" option in the AdminCP. Matt, it's hard for me to suggest the best alternative, as I do not have in mind all the details of your environment. If you can come up with some guidelines (e-mail me directly), I'll try to help, but as mentionned before, I cannot commit to anything. Rgds ----------- John |
Quote:
The only thing viewable by a member is the Warn Level (all members are displayed for everyone to see) and their warning page (only viewable by them and staff). My staff love this as originally everyone saw all links. You will have to reference with ZT's original instructions to see what is different for the 'postbit' template (additional navbar and MEMBERINFO template alterations by me): 1. In the 'postbit' template (you will have to find the equivalent place in the 'postbit_legacy' template yourself as I do not use it), Warn and View Warning only seen by staff. Warn Level are displayed for members (when level is above zero it changes colour). You can change the font colours to whatever you want. Postbit Templates -> postbit:- Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
2. I put a 'View My Warnings' link in 'Quick Links' on the navbar (as staff can't get warned they will not see this). Navigation / Breadcrumb Templates -> navbar:- Find: PHP Code:
PHP Code:
3. For members public profiles I have added a view warnings (viewable by staff only) and Warning Level (everyone can see) Member Info Templates -> MEMBERINFO:- Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
That is all I really did, so if you find use for it go right ahead and use it :) JD. :) |
Thank you very much. I'm putting the finishing touches on my new site and want to have these same features. I'm no coder either, so I won't tell. ;)
|
I would like other groups to be able to see the warned reasons, besides those that can moderate. I haven't been able to figure out how to do this yet. Any suggestions?
|
Quote:
PHP Code:
1. Is not made by an admin or a mod. 2. If the member viewing the post is either a mod or admin. If these are true, it shows the "View Warnings" link. You may add other conditions within the OR parenthesis, to show the link to other groups. Rgds |
All times are GMT. The time now is 02:26 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:
|