vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Warning Hack V1.5 (https://vborg.vbsupport.ru/showthread.php?t=65336)

bnn121 11-03-2004 09:06 AM

I have another question...to sv1cec,

Within on these post there are several mentions of the hack allowing and not allowing certain users to view any or all of the warning hack details. I was woundering if I could get some sort of clarification on what I need to do in order to accomplish the following using your files.

1) I want to have all members regardless of there status to be able to view there own warnings, but not that of other members.

2) Only the Moderators that are assigned a specific forum are allowed to use the warning system within that forum...but are able to see the status of other members...but not able to do anything if its not there forum they moderate.

3) SuperMods need to have access to the warning system in all forums.

4) Admins can not be warned.

5) Supermods can warn mods

Right now...I am using your files on my board. I created a test user...and nomatter what status I give this user...It can see the warning system.

Again...I no some of these... if not all are posted in this thread...but from what I gather...they are not using the files that you submitted in order to use your config.

Thanks for any clarification.

sv1cec 11-03-2004 09:54 AM

Quote:

Originally Posted by bnn121
I have another question...to sv1cec,

Within on these post there are several mentions of the hack allowing and not allowing certain users to view any or all of the warning hack details. I was woundering if I could get some sort of clarification on what I need to do in order to accomplish the following using your files.

1) I want to have all members regardless of there status to be able to view there own warnings, but not that of other members.

2) Only the Moderators that are assigned a specific forum are allowed to use the warning system within that forum...but are able to see the status of other members...but not able to do anything if its not there forum they moderate.

3) SuperMods need to have access to the warning system in all forums.

4) Admins can not be warned.

5) Supermods can warn mods

Right now...I am using your files on my board. I created a test user...and nomatter what status I give this user...It can see the warning system.

Again...I no some of these... if not all are posted in this thread...but from what I gather...they are not using the files that you submitted in order to use your config.

Thanks for any clarification.

AS the system is today, members can see their own warnings, but not the warnings of other members. However, everyone can see how many warning points everyone else has, these are shown in the postbit.

As far as I remember, a moderator can see everyone's warnings (even in a forum he is not moderating), but can only issue warnings in the forums he/she is moderating. That is done, to help the moderator get a better idea of how bad a user is.

I do not use Supermoderators, so I do not know what they can and cannot do, at this moment. Sorry.

An administrator can do whatever he likes.

Admins, mods and supermods cannot be warned, these are the protected user groups, declared in the Warning Options.

rgds

sv1cec 11-03-2004 09:59 AM

One thing that has been requested in the past, or at least I think this is what has been requested, is to have increased banned days, depending on the ... offensiveness of the warned member. So what I did, is I did some mods, to increase the number of days a member is banned, if he is banned more than one time.

To clarify this, if a member is banned for the first time, let's say he is banned for days. If you activate this new feature (controlable from the Warning Options in AdminCP), if the same member is banned again, he will be banned for 14 days (2x7) If he is banned again, he will be banned for 21 days (3x7) etc..

The mods allow you to define a maximum number of bans, after which the member is permanently banned from your forums.

The mods are listed in the attached file, but if you have any problems, please let me know.

rgds

sv1cec 11-03-2004 01:45 PM

For those who downloaded the above instructions, please note that I had a small mistake in the file. Ijust reuploaded the instructions.

The mistake was in a line in Warn.php file, which said:

Replace with:

PHP Code:

if($warn_type['warn_permban']=="Yes" OR ($warn_options['incr_ban_days']="Yes" AND($warn_options['max_no_bans']!=and $number_of_bans>=$warn_options['max_no_bans']))) 

while it should say replace with:

PHP Code:

if($warn_type['warn_permban']=="Yes" OR ($warn_options['incr_ban_days']=="Yes" AND($warn_options['max_no_bans']!=and $number_of_bans>=$warn_options['max_no_bans']))) 

Two equals in the second comparison, instead of one.

j_86 11-03-2004 02:00 PM

Again, good work sv1 :) I hope to repay some day.

There is a problem, I cannot find;
Code:

<b>User ID :</b> $userid
</div>

in the standard VB template?

j_86 11-03-2004 02:19 PM

And one question; How do I remove the

Guest - No Permissions
Unable To View
Guests Are Unable To View This Page

When a guest tries to view warnings (I have allowed all people to view warnings, but it seems not for guests).

sv1cec 11-03-2004 03:45 PM

Quote:

Originally Posted by JimpsEd
Again, good work sv1 :) I hope to repay some day.

There is a problem, I cannot find;
Code:

<b>User ID :</b> $userid
</div>

in the standard VB template?

I think it is in the standard vB template, but then again, I am not 100% sure.

If you can't find that, try finding this:

PHP Code:

</td>
            <if 
condition="$show['profilepic']"

and put the code above this.


Quote:

And one question; How do I remove the

Guest - No Permissions
Unable To View
Guests Are Unable To View This Page

When a guest tries to view warnings (I have allowed all people to view warnings, but it seems not for guests).
I am not sure, where this originates from, I can't find anything in Warn.php, which prohibits guests from viewing the warnings. It must be somewhere else, I'll need some time to find it, if you do not mind.

Rgds

SamirDarji 11-03-2004 04:13 PM

Sounds almost like a usergroup permission thing?

sv1cec 11-03-2004 05:26 PM

Quote:

Originally Posted by SamirDarji
Sounds almost like a usergroup permission thing?

Nope, it is hidden in the WARN template. Edit that, and you will find something like:

HTML Code:

<if condition="$bbuserinfo[userid]=='0'">


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="tcat" colspan="3">Guest - No Permissions</td>
</tr>
<tr>
        <td class="thead">Unable To View</td>
</tr>
<tr>
        <td class="alt1" colspan="1">Guests Are Unable To View This Page</td>
</tr>
</table>
<br/>

<else />


$warn_page
<br />
</if>

Replace that with:

HTML Code:

$warn_page
<br />


beano33 11-05-2004 05:45 PM

Quote:

Originally Posted by sv1cec

The mods allow you to define a maximum number of bans, after which the member is permanently banned from your forums.

Is there any way to carry over bannings from a previous system? We use a 3 strikes protocol and it would be nice if I could enter the users prior bans when switching over.

j_86 11-05-2004 08:30 PM

Thank you sv1 - this did it!

sv1cec 11-06-2004 05:06 AM

Quote:

Originally Posted by beano33
Is there any way to carry over bannings from a previous system? We use a 3 strikes protocol and it would be nice if I could enter the users prior bans when switching over.

There are always ways to do things, after all we are talking about computers here.

How do you plan to import the rest of the information? Is there a script you would run? It's not easy to tell if I do not know the other system and I have no experience with any other one.

The number of times a user has been already banned, is stored in his record in the user table, in the column called warning_bans, if that's of any help.

Rgds

Kmaster 11-06-2004 07:09 AM

Quote:

Originally Posted by sv1cec
It doesn't matter how many members you have, iwhat makes the difference is how many warnings you have issued. And yes, as far as I know they will all show in one page (haven't looked in that). Now for paging, I am not sure if my knowledge will allow me to do that, I'll give it a try tomorrow morning. If I'll come up with something, I'll let you know. I'll have to create at least 30 or 40 warnings in my test system to test that, so it might take some time.

Rgds


Hello sv1cec

any good news? no mean to push you, just let me know some information.
thanks a lot.

rgds,

Blam Forumz 11-06-2004 01:14 PM

How can I stop my Super Mods warning my Admins?

beano33 11-06-2004 02:55 PM

Quote:

Originally Posted by sv1cec
There are always ways to do things, after all we are talking about computers here.

How do you plan to import the rest of the information? Is there a script you would run? It's not easy to tell if I do not know the other system and I have no experience with any other one.

The number of times a user has been already banned, is stored in his record in the user table, in the column called warning_bans, if that's of any help.

Rgds

Our other system is all done manually. We recorded the info in usernotes and in a private forum. There's zero importablility. Past bans would have to be entered manually. Ideally there should be a field for this similar to the reputation field in User Manager in AdminCP that's editable by admins or others with permission. It's no biggie, this is going to save us a lot of time and work regardless of whether we can add in prior bans. :)

WAR 11-06-2004 04:12 PM

@beano33:

I was using what sounds like a similar system involving the usernotes and the built-in ban feature of vbulletin up till now. What we did was create an "instant ban" warning type titled "Previously Banned" and in the description we put "see user notes for details".

Then we just applied this warning to everyone that was previously banned.

Thought that that might be helpful...

sv1cec 11-07-2004 07:34 PM

Quote:

Originally Posted by beano33
Our other system is all done manually. We recorded the info in usernotes and in a private forum. There's zero importablility. Past bans would have to be entered manually. Ideally there should be a field for this similar to the reputation field in User Manager in AdminCP that's editable by admins or others with permission. It's no biggie, this is going to save us a lot of time and work regardless of whether we can add in prior bans. :)

Oh, then it's easy. Do the following changes in your admin/user.php file.

Search for:

PHP Code:

// PROFILE FIELDS SECTION
    
print_table_header($vbphrase['user_profile_fields']);
    
$profilefields $DB_site->query("SELECT * FROM " TABLE_PREFIX "profilefield ORDER by displayorder");
    while (
$profilefield $DB_site->fetch_array($profilefields))
    {
        
print_profilefield_row($profilefield$userfield);
    } 

Right below that, add:

PHP Code:

    print_table_break(''$INNERTABLEWIDTH);
    
    
print_table_header("Warnings Information");
    
print_input_row('Warning Level''user[warning_level]'$user['warning_level']);
    
print_input_row('Bans''user[warning_bans]'$user['warning_bans']); 

Two more fields are added, in the page you get when you are looking at the details of one of your users, the Warning Level of the user at that moment, and how many bans he has already. Edit to your heart's desire.

I hope this helps.

Rgds

sv1cec 11-07-2004 07:38 PM

Quote:

Originally Posted by Kmaster
Hello sv1cec

any good news? no mean to push you, just let me know some information.
thanks a lot.

rgds,

Sorry, didn't have the chance to look at that. It's not something I've done before, and I have to research code from other places in vBulleting to impelent it. But before doing that, I'll have to transfer my database from my production system to my test system at home, and that is not something I enjoy doing.

I'll post here if I get any result on the paging thing.

Rgds

UPDATE: I spend about 5 hours trying to figure that out, using admincp/user.php as an example. Unfortunatelly, I didn't manage to finish it. I have managed to display the first x warnings of y, but then I can't make it continue to the rest of them. If I don't manage it tomorrow morning, you will have to live with a long list. I am fed up (not with you, with the bloody code).

Rgds

sv1cec 11-08-2004 05:40 AM

OK, the paged layout for the Warning Logs is done.

You have to add a new column in your warning_options table, using the following SQL Query (remember to use the TABLE_PREFIX if you are using one):

alter table `warning_options` add warnings_per_page int(3)

After you've done this, use the attached admin_warn.php file. Sorry I can't provide a detailed step-by-step mods write-up, too many changes to make it viable.

Let me know if it works.

Rgds
------------
John

Blam Forumz 11-08-2004 06:00 AM

Is it possible to make it so I can set out a system like this :

5 - Warnings = 3 day ban.

After those 3 days are up, then another 5 warnings = 10day ban

Thanks

/Blam

sv1cec 11-08-2004 08:05 AM

Quote:

Originally Posted by Blam Forumz
Is it possible to make it so I can set out a system like this :

5 - Warnings = 3 day ban.

After those 3 days are up, then another 5 warnings = 10day ban



Thanks

/Blam

Well, not exactly, but you can make it so that

5 - Warnings = 3 day ban.
5 more Warnings = 6 day ban.

I could make the multiplication factor a parameter in warning_options, but it will have to be a multiple of the original ban days parameter.

etc.

sv1cec 11-08-2004 08:08 AM

Quote:

Originally Posted by Blam Forumz
How can I stop my Super Mods warning my Admins?

Use the protected groups field. I assume that your admins/mods/supermods should all be there, so that they can't warn each other. As I said before, I do not use Super Mods, so the full hierarchical scale is not implemented.

Rgds

beano33 11-08-2004 03:35 PM

Here's a tip for those who use Super Moderators. The conditionals in the hack are written for Moderators as the primary usergroup. If you don't want to edit that, you can make everything work fine by changing usergroup settings.

For Super Moderators use the settings:
Primary Usergroup: Moderators
Display Usergroup: Super Moderators
Additional Usergroups: Super Moderators

As long as the primarary usergroup is moderators, everything in the hack works fine. Your Super Moderators will still be displayed as Super Moderators and have Super Moderator permissions doing it this way.

sv1cec 11-08-2004 03:43 PM

Quote:

Originally Posted by beano33
Here's a tip for those who use Super Moderators. The conditionals in the hack are written for Moderators as the primary usergroup. If you don't want to edit that, you can make everything work fine by changing usergroup settings.

For Super Moderators use the settings:
Primary Usergroup: Moderators
Display Usergroup: Super Moderators
Additional Usergroups: Super Moderators

As long as the primarary usergroup is moderators, everything in the hack works fine. Your Super Moderators will still be displayed as Super Moderators and have Super Moderator permissions doing it this way.

Yeah, that's a good idea. But would they be able to warn moderators and not be warned by them? I guess not, since the protected groups are all treated the same.

Oh well, if I find the time, some day, perhaps. But I guess if this is added, then I'll have to spend some time coming up with proper documentation of changes, compared to the standard release, and maybe release the whole thing as a new hack, with thanks to the original author, Zero Tolerance, of course.

Rgds
-----------
John

beano33 11-08-2004 04:34 PM

Quote:

Originally Posted by sv1cec
Yeah, that's a good idea. But would they be able to warn moderators and not be warned by them? I guess not, since the protected groups are all treated the same.

I tested that out. It works fine this way regarding protected usergroups. The problem I was having was that only mods and admins could view warnings anywhere, and I really didn't feel like going through the whole thing again to fix the conditionals for supermods. Since I only have a handful of supermods, this was an easy way to handle it.

Quote:

Oh well, if I find the time, some day, perhaps. But I guess if this is added, then I'll have to spend some time coming up with proper documentation of changes, compared to the standard release, and maybe release the whole thing as a new hack, with thanks to the original author, Zero Tolerance, of course.
You might want to inquire about vBulletin's plans to release their next version so you don't end up doing a lot of work that may have to be modified. For all we know the next version may include a warning system. :D

sv1cec 11-08-2004 04:46 PM

Quote:

Originally Posted by beano33
I tested that out. It works fine this way regarding protected usergroups. The problem I was having was that only mods and admins could view warnings anywhere, and I really didn't feel like going through the whole thing again to fix the conditionals for supermods. Since I only have a handful of supermods, this was an easy way to handle it.



You might want to inquire about vBulletin's plans to release their next version so you don't end up doing a lot of work that may have to be modified. For all we know the next version may include a warning system. :D

This whole issue of updates is really making me nervous. I am still at release 3.01, because I have made so many mods to my files/templates etc. that I do not dare to upgrade, I would hate to go through the same process again. Is there a list of files which shows which have changed between 3.01 and 3.03? Just thinking that this can occur every six months, when vB is releasing a new release, makes me crazy. I think I'll stick with 3.01, until something major is done.

As for your suggestion for the supermods, it is indeed very nice.

Rgds

beano33 11-08-2004 06:08 PM

Quote:

Originally Posted by sv1cec
This whole issue of updates is really making me nervous. I am still at release 3.01, because I have made so many mods to my files/templates etc. that I do not dare to upgrade, I would hate to go through the same process again. Is there a list of files which shows which have changed between 3.01 and 3.03? Just thinking that this can occur every six months, when vB is releasing a new release, makes me crazy. I think I'll stick with 3.01, until something major is done.


I asked one of the vB people this in mid-September before I upgraded from 3.0.1 to 3.0.3 and was told it would be at least a few months before the next version and that I should update then unless I have a lot of custom programming in PHP. There's a list of file changes in the announcements forum at vbulletin.com. I was able to upgrade with only one major problem due to a search hack that we installed that modified search.php. vB changed it's search so if you have any search hacks installed, it's liable to conflict, so it's best to remove it before you start. The other issues just involved redoing the templates we had modified (postibit legacy, navbar, and a few I can't remember). It was simply a matter of saving the templates we had modded as text files and pasting them back in. They all worked fine with the upgrade. Custom templates and custom php files weren't affected.

rex_b 11-08-2004 11:05 PM

Quote:

Originally Posted by sv1cec
As I said before, I liked the idea of a covered warner, so I did some changes in the database and the files/templates to make it a "consistent" feature of the hack. A text file is attached here, with the required modifications.

I hope you enjoy it.

While doing this, I also discovered a strange behaviour, in the Warning Options section of AdminCP. So, I changed the code a bit to correct it. The changes you should do, are described in the second attached file. All those who have implemented my "Allow multiple warnings for the same post?" option and the "Send PM to the warned member?" option, should do these changes, or else these features will not function properly.

Sorry for any inconvenience.

Finally, since the Warning Options part of AdminCP is getting a bit large as it is (it shows both the warning options, the defined offenses and allows you to add a new offence), I decided to separate them a bit, in order to make things more manageable. A third file is attached, which explains how to separate the Warning Options from the Warning Types.

I hope you enjoy.

Rgds
-----------
John


my templates look nothing like you ones you posted :(

sv1cec 11-09-2004 04:00 AM

Quote:

Originally Posted by rex_b
my templates look nothing like you ones you posted :(

What version are you running? This whole thing is based on 3.01, but should work on later releases.

Rgds

rex_b 11-09-2004 01:52 PM

Quote:

Originally Posted by sv1cec
What version are you running? This whole thing is based on 3.01, but should work on later releases.

Rgds


I'm using zero tolerances version and I didn't know there was another version within this thread. that's the problem I have.

sv1cec 11-09-2004 05:56 PM

Quote:

Originally Posted by rex_b
I'm using zero tolerances version and I didn't know there was another version within this thread. that's the problem I have.

Well, Zero Tolerance has stopped adding features at his version 1.5. From then on, several other features have been added by me. Unfortunatelly, not in a very well documented way.

Rgds

TCattitude 11-09-2004 08:12 PM

Quote:

Originally Posted by sv1cec
Well, Zero Tolerance has stopped adding features at his version 1.5. From then on, several other features have been added by me. Unfortunatelly, not in a very well documented way.

Rgds

Can you make another hack (new thread) with you mod of this hack?
And in a document way?
Your mods are very useful for all, i think.

Please :ermm:

sv1cec 11-09-2004 08:23 PM

Quote:

Originally Posted by TCattitude
Can you make another hack (new thread) with you mod of this hack?
And in a document way?
Your mods are very useful for all, i think.

Please :ermm:

OK folks, at this moment, I am a little loaded trying to figure out an upgrade path for my site, to go from 3.01 to 3.03. I assume that will take me another day or two, since I do it at my test environment first, and then I'll do the main site.

After that, I promise, I'll add no more functionality and I'll try to do a properly documented hack. At least now I have the original files and a tool to compare them with my modified ones, so it shouldn't be too difficult. And I assume that if I forget something, you folks, will not jump to kill me.

Wish me luck with the upgrade, the sooner I am done with it, the sooner I'll start working on the fully documented hack. I'll post any announcement here too.

Rgds
-----------
John

SamirDarji 11-09-2004 09:44 PM

Good luck! Should be pretty painless.

sv1cec 11-09-2004 09:54 PM

Quote:

Originally Posted by SamirDarji
Good luck! Should be pretty painless.

LoL, yeah on a simple forums site, with the standard software installed, it is painless. Try that with about 15 hacks installed, and then we'll talk.

I think I am at a pretty good point right now, but it's two am here almost and I need some sleep.

We'll talk tomorrow.

Rgds

RsX 11-10-2004 04:45 PM

i need help!!
What do i need to change to make it so that Admins, Super Mods, and moderators (only in their own forums) can use the "Warn 'User'" link and that the "View 'User's Warnings" Can be used also by Admins, Super Mods, moderators (only in their own forums) AND registered users (in my case usergroups 2,10,9) if it is their post...

Thanks alot in advance!

sv1cec 11-10-2004 05:17 PM

Quote:

Originally Posted by RsX
i need help!!
What do i need to change to make it so that Admins, Super Mods, and moderators (only in their own forums) can use the "Warn 'User'" link and that the "View 'User's Warnings" Can be used also by Admins, Super Mods, moderators (only in their own forums) AND registered users (in my case usergroups 2,10,9) if it is their post...

Thanks alot in advance!

If I am not totally mistaken, that's how it works (except the supermods thing). Admins can see both links everywhere. Mods can see them everywhere, but can only warn in their own forums. Registered users can see only their own warnings. What more do you want?

RsX 11-10-2004 05:27 PM

a moderator in my forum warned someone for a post outside his forum

sv1cec 11-10-2004 07:45 PM

Quote:

Originally Posted by RsX
a moderator in my forum warned someone for a post outside his forum

RsX,

Which version of this hack are you using?

My version does not allow a moderator to warn someone unless the post is in one of the mods forums. If you are using the original Zero Tolerance's hack, I am sorry, I can't be of much help.

Rgds

RsX 11-11-2004 03:41 AM

im using 1.5


All times are GMT. The time now is 04:57 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
  • Page Generation 0.01958 seconds
  • Memory Usage 1,913KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_html_printable
  • (5)bbcode_php_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete