![]() |
Gr8 Hack !! Aman Clicks Install !!
I see warning options on each post but when a member clicks on these links he gets no permission message. What is use of showing it when they can not view it. Is there any option which makes it possible only for admin to view those links on each post or can an admin give permissions for users to view their warnings. i am a newbie, so kindly bear with me, please guide me. Best Regards Regards |
Quote:
PHP Code:
I hope this helps. ------------ John |
That's not it though... I've changed the conditionals and my regular users can see it, they can click on it, but they can't get to the actual warn.php listing. Is it because of the 'canadmin' conditional in that .php file?
|
Quote:
PHP Code:
PHP Code:
PHP Code:
Isn't that what happens in your setup? Rgds |
I understand everything you said, and I appreciate the break down. Yes users can currently see their own warnings. All users can see "View Warnings" if that person has greater than 0 points.
I want ALL users to be able to see ALL warnings of any other user. I'm sorry to be a bother, I'm just trying to get this worked out. They still keep getting a No Permission - "you do not have permission to access this page." Error. I think it has to do with "Warn.php?do=ViewWarnings&id=3732" .... the do ViewWarnings is set up in the .php code to be associated with canmoderate. I want to separate that out so that I can set it up by usergroups as well. Does that make sense? |
Quote:
PHP Code:
PHP Code:
Rgds ------------ John |
any news on how to stop people from warning the same post twice ?
|
Quote:
Hi. I replaced the code but now when I click on "warn XYZ" or "View XYZ's Warnings" it give me this error Code:
Parse error: parse error, unexpected T_VARIABLE in /home/www/.........../Warn.php on line 278 Thx |
Quote:
You may remove that part of the code, and use it. Just replace: PHP Code:
PHP Code:
Let me know if it works. Rgds ------------ John |
Quote:
Worked like a charm, thank you so much. Stupid me, I didn't think to comment it out, I thought I had to change it to usergroups or something. Thanks again!! |
Quote:
Rgds ------------ John |
Quote:
Only a thing: when user is banned, him user title doesn't change. I think that is sufficient set $user[customtitle]="banned" .. is it right? |
Quote:
PHP Code:
PHP Code:
Then find: PHP Code:
PHP Code:
|
Thx a lot :)
This night I found a solution like yours Code:
$liftdate=$time_unban; Thanks still for the patience ^^ |
Is it possible to remove warn points after the expiration of some time? And setup different time of expiration for each violation?
Thank you. |
Quote:
Rgds ------------ John |
Quote:
|
Such a mod has been posted in this thread, 5 - 10 pages back.
|
Quote:
Rgds |
sv1cec, I added your mature warnings cron job and it doesn't seem to do anything, even though I have several warnings that are over 1 month old. Any ideas what could be wrong?
|
Quote:
Rgds ----------- John |
Quote:
|
Since this thread is getting quite long, and there are several posts with replies I gave to users, based on my modifications of this excellent hack, and after being prompted by a fellow member here, I spend a whole night, putting down some notes to explain what my version of the hack does.
Unfortunatelly, when I was making those changes, I didn't kept a log, so it is not possible to provide step-by-step instructions. Also, it is not possible to implement one feature and leave out another. The whole thing is offered as a ... packaged deal, LoL. Please be patient, remember that last night I slept only one hour, preparing these things and making the code more "public", until yesterday, it was only for internal consumption. OK, hopefully when this message is complete, there will be several files uploaded. These are : 1. mymods.txt - a text file describing what my mods do, in addition or in difference to the original hack (even version 1.5, which should be installed before starting to change things). This file contains also the description of the tables that my mods use. IT DOES NOT CONTAIN STEP -BY-STEP INSTRUCTIONS ON HOW TO MODIFY THE TABLES, IT JUST SHOWS YOU THE TABLES STRUCTURE. 2. Warn.php - my version of Warn.php 3. admin_warn.php - my version of the file, this one should be uploaded into your admincp directory. 4. kill_warns.php - a cron script to automatically delete warnings, whose maturity period has been elapsed. This should be uploaded into your include/cron directory and activated from the "Add New Scheduled Task" in your AdminCP. Make it so it is run once a day. My settings for that are: Title: delete_old_warnings Day of the week : * Day of the month : * Hour : 3 Minute : 3 Log Entries : Yes File : ./includes/cron/kill_warns.php 5. templates.txt - a file which contains all my warn-related templates. Some of them may be the same as the ones of the original hack, but since I do not know/remember which ones I've modified, I included them all. It also contains instructions, on how to modify the postbit and the postbit_legacy templates. If you have some of the warn templates already, make sure they contain my code. If some of the templates I list, are not in your system, you have to create them. One more thing I remembered, as I finished this: Since I am not using the table that the original hack had for the banned users, the "Unban User" option is no longer available. I let vB cron job do the unbanning. Please test it though, because I am not sure how well it works. For example, in my hack, when a user is banned, his original user group id is maintained in the userban record, in order for it to be restored when the member is unbanned. I am not sure if this works though. Let me know. Added Friday Oct 8th Evening: If one is to allow multiple warnings for the same post (for various offences obviously), the person issuing the warning, should be able to see what other warnings were issued for this post. So, I edited Warn.php a little, and a couple of templates. The changes are reflected at the files below. Added Saturday Oct. 9th morning: I forgot to mention that the Warning Points a user has received, are also shown in his profile. So that brings the total number of templates you have to edit to 20!!!! I guess this is the best I can do to describe how I customized this beautiful hack, to make it more suitable to my needs. Credits should all be given to Zero Tolerance for the hack, all I did was lots of trials and (a whole lot more) errors. I'll try to help anyone who has issues, but I cannot guarantee it guys, there are two 2.5 years-old boys in this family, and this can be a really messy situation. Regards ---------- John |
Absolutely wonderful, sv1cec! Thanks for the hard work, implementing these changes now. :) One question, is the maturity period a day variable? Meaning, if I wanted a warning to expire in 30 days, the maturity period would be set to 30?
|
Quote:
Rgds --------- John |
My queries for the warning options are just not working. I'm trying to update from the original warning hack to the 1.5. Could anyone write something up real quickly for phpmyadmin that will delete the current warning options and readd the table with the necessary rows inside? I've spent 24 hours and I just can't seem to get it to work properly :(
|
Quote:
Not sure if you got my email, John, but the warn maturity feature doesnt seem to work. I set one to be removed after 2 days. I even waited that long but didnt seem to have removed it. |
Quote:
Please check that you have everything as described in the files a couple of posts above. It seems it's working OK in my forums, so I am not sure what's the problem. Please check everything again. And no, I haven't got any e-mail from you, sorry. Rgds ----------- John |
Could you make it possible for the next release to add warning permissions by usergroup? That would help so only mods, supermods and admins could warn users.
|
If I recall correctly, there actually is a hack for this somewhere in this thread.
|
Quote:
Rgds |
One feature I thought would be interesting, is the history of the warnings a user has received. As the hack was until now, a user might have received 100 warnings, which have matured, and were not displayed anywhere. I am sure the moderators would like to know the past history, so I did some changes to include the past history in the whole thing.
The records in the warnings table, are no longer deleted, when the maturity period expires or the mods/admins remove a warning, they are just marked as "Inactive". In that way when a mod/admin asks to see the warnings of a user, he sees not only the ones which are currently active, but also the ones which got matured (and thus removed automatically) or deleted. The inactive warnings are shown with lighter letters than the active ones, when one asks to see the warnings., so they are easily distinguished. The new feature requires changes in Warn.php, in includes/cron/kill_warns.php and in some templates. It also requires that you add another field in your warnings table. This time, I provided accurate step-by-step instructions, in the attached text file, but remember that they are based on my files released in this post. I've also included a screenshot of how the inactive warnings look like. Guys, if some of you are using my modified hack, please post a note here, as I have no idea if you do like me adding features or you would prefer me to go do some other things. Small update (Tuesday, October 12th): If you do the mods included in this post, to use the historical aspect of warnings, the included admin_warn.php is better, so you might want to use that as well. Rgds ------------- John |
If you have done the mods suggested in https://vborg.vbsupport.ru/showpost....&postcount=303, you may change the template warn_addwarn, with this new one, it just improves on the functionality, opening all links in new browser windows.
This should be the contents of your warn_addwarn template: PHP Code:
---------- John |
Quote:
|
Looking over this hack just a tad, does it have NEW database tables? Basically altering the database.
|
does anyone know who i would go about getting the amount of warning points to go in the profile?
ive seen it on a forum so basically you dont have to click view warnings cos it shows amount of warning points in red bold text any ideas? dean |
Quote:
You have to modify the memberinfo template to have the warning points shown in there. But you can also have it in each and every post of every member, by altering the postbit/postbit_legacy template. Is that what you had in mind? Rgds ------------- John |
Quote:
Rgds ----------- John |
Quote:
|
yeh thats it mate i just want it to show up under there post count etca evertime they post
do i just need to edit the postbit files in the template? could you or anyone else post up the code etc to change or edit etc? many thanks Dean |
All times are GMT. The time now is 03:40 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:
|