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)

rex_b 08-17-2004 11:40 AM

Quote:

Originally Posted by sv1cec
In the "Control Warnings" page of the AdminCP.

Rgds


Damn I am blind... Thanks.

j_86 08-18-2004 01:25 PM

Quote:

Originally Posted by JimpsEd
What I mean is, VB already lets you have timed-bans for users, so why not use this system?

BUMP

Rahzel_hx 08-18-2004 05:56 PM

I was the 100th install ^___^ do i win a prize XD

Great hack

GunsNetwork 08-18-2004 08:03 PM

I have installed everything and even made the upgrade with no problem but when I go to Warn a test member, I have NO OPTIONS.

I can click on the drop down and all I get is "Choose A WARNING"

Need help in finding what did not get uploaded or do I have to put in my own warnings???

Thanks

sv1cec 08-19-2004 06:29 PM

Quote:

Originally Posted by bowhunt
I have installed everything and even made the upgrade with no problem but when I go to Warn a test member, I have NO OPTIONS.

I can click on the drop down and all I get is "Choose A WARNING"

Need help in finding what did not get uploaded or do I have to put in my own warnings???

Thanks

You have to add your own violations and points etc.

Rgds

SnowBot 08-26-2004 02:27 AM

sv1cec How could i add buttons/links to the dropdown menu in the postbit, where the "view users profile" & " visit users homepage" links are?

I would like it so that Admins and S/Mods and the user himself to see the how many warnings they have BUT other users cant, they can see there own but not others. Like Erwins hack did. Can you help do this? Thanks

Snowy

Rociel 08-26-2004 08:45 AM

I can't seem to edit the banned usergroups and the amount of points it takes to ban someone. All I get is the error message:

Database error in vBulletin 3.0.1:

Invalid SQL: update warning_options set
banned_limit='14',
points_before_banned='5',
banned_usergroup_id='4',
protected_usergroups=''
where oid='1'
mysql error: Unknown column 'banned_usergroup_id' in 'field list'

mysql error number: 1054

Date: Thursday 26th of August 2004 05:34:43 AM
Script: http://www.rolldeepcrew.com/forums/a...admin_warn.php
Referer: http://www.rolldeepcrew.com/forums/a...n.php?act=view
Username: Rociel
IP Address: xx.xxx.xxx.xx

sv1cec 08-26-2004 11:08 AM

Quote:

Originally Posted by SnowBot
sv1cec How could i add buttons/links to the dropdown menu in the postbit, where the "view users profile" & " visit users homepage" links are?

I would like it so that Admins and S/Mods and the user himself to see the how many warnings they have BUT other users cant, they can see there own but not others. Like Erwins hack did. Can you help do this? Thanks

Snowy

Snowbot,

I am trying to find that dropped-down menu you are talking about and I can't . All I can find, which looks like the menu you are talking about, is the one which appears if you click on the user name, above each post. Is that the one you are talking about?

In any case, what I've done in my site, is to have a couple of links in the postbit, through which the admins/mods and the owner of the post can see the warnings this particular user has received.

The code for those links is:

HTML Code:

<!-- checks for warning system -->
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)">
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a> ?</if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0">
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a> ?</if>
<!-- end of warning system -->

This code will do what you want (admins and mods can see the warnings, and the user can see his own warnings but not those of another user), but it might need some modifications in order to include it in the drop-down menu you are refering to.

Let me know which menu it is and I'll try to be more specific.

Rgds
-----
John

SnowBot 08-26-2004 03:26 PM

Hi John,

Yes its the menu with the username. I just think it would be better. Can we include the supermod group also, i notice you dont use that but i do.

Thanks

Liam

sv1cec 08-26-2004 05:30 PM

Well, in postbit template, find the following:

HTML Code:

        </table>
</div>
<!-- / post $post[postid] popup menu -->

Just above it, you should add the code I gave you before, but change it a bit to fit in a table. In other words, try this:

HTML Code:

<!-- checks for warning system -->
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><tr><td><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a></td></tr>
</if>
<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=5 AND $post[usergroupid]!=7 AND ($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6)"><tr><td>
<a href='Warn.php?do=ViewWarnings&id=$post[userid]'>View $post[username]'s Warnings</a></td></tr></if>
<if condition="$post[userid]==$bbuserinfo[userid] AND $post[usergroupid]==2 AND $post[warning_level]>0"><tr><td>
<a href='Warn.php?do=ViewMyWarnings'>View your Warnings</a></td></tr></if>
<!-- end of warning system -->

Let me know if it works

Rgds
-------
John

SnowBot 08-26-2004 09:54 PM

Thats got it :)

I realy appreciate the help mate, THANKS :)

hello 08-27-2004 09:28 AM

It only works for me but the other admins and smods get a blank page when they try to warn someone. why is that

sv1cec 08-27-2004 10:19 AM

Quote:

Originally Posted by SnowBot
Thats got it :)

I realy appreciate the help mate, THANKS :)

Glad if I can be of help.

I wish I had noticed down all the changes I 've done in this hack, so that I could pass them along to you guys. I've added the followings:

1. A Warning Maturity field, which specifies for how many days the warning points will stay in the member's record. After the Warning Maturity is over, the points are automatically cleared. The admin can set the Maturity to his likings and a cron script takes care of the deletion.
2. I added another field, called "Permanent Ban", which can be also selected by the admin. If selected, then the member which gets warned for that particular offence is permanently banned from the forum.
3. I've also modified the program to use a template for the PM. In that way, those unfortunate ones to get a warning, get a more readable message, with more details.

If someone is willing to swim through my mods, I can send him my files and hopefully, he can do the same things I've done. Sorry for not recording everything.

Rgds

SnowBot 08-27-2004 10:04 PM

Quote:

Originally Posted by sv1cec
Glad if I can be of help.

I wish I had noticed down all the changes I 've done in this hack, so that I could pass them along to you guys. I've added the followings:

1. A Warning Maturity field, which specifies for how many days the warning points will stay in the member's record. After the Warning Maturity is over, the points are automatically cleared. The admin can set the Maturity to his likings and a cron script takes care of the deletion.
2. I added another field, called "Permanent Ban", which can be also selected by the admin. If selected, then the member which gets warned for that particular offence is permanently banned from the forum.

If someone is willing to swim through my mods, I can send him my files and hopefully, he can do the same things I've done. Sorry for not recording everything.

Rgds

These would be great and just what i need, if you maybe could run me through it i would be greatful.

Rociel 08-27-2004 10:11 PM

Now I have two problems with this hack, first is the one I mentioned above and the other one is when I try and ban someone. It gives this error message:

Database error in vBulletin 3.0.1:

Invalid SQL: update user set usergroupid='8'',warning_level='5' where userid='3449'
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '5' where userid='3449'' at line 1

mysql error number: 1064

Can anyone help me please?

TosaInu 08-30-2004 12:23 AM

Thanks for the great hack Zero Tolerance,

Nice additions sv1cec.

We had a custom warnhack in Ikonboard and we have a bit of experience in using it (unfortunately).

The purpose of a warning system should of course be to correct a person when he causes troubles in the forums (sometimes just a friendly PM doesn't stop it and a complete ban isn't justified). Our floodsystem was linked to the amount of warnings. 1 warning added say 30 seconds, 2 warnings added 2^2 * 30 seconds, 3 added 3^2 * 30 seconds and so on (admin could set this to 60 as well). The extra flood was a pretty motivation to get back in line.

There's another thing: users posting a bait and removing the evidence once a few others took it and replied with a counter, then acting as the attacked innocent victim. Users who have 2 warnings can't edit their posts anymore.

I like this auto ban and it fits in nicely. I too feel that 2 auto ban types are nice.

TosaInu 08-30-2004 01:51 AM

Hello,

I didn't use the parent style when installing the hack, the warn templates are now only loaded for 1 Style, not the others. How do I get them into the others?

I already upgraded to 1.5, running the installer again will break things now?

TosaInu 08-30-2004 11:16 AM

This is what I found so far. The installer only installs to the template set as default in vBulletin Options / Style & Language Settings. So, if you have many Styles it's most convenient to have one common grandmother and set that one as default during install.

The installer also splits template addition and database additions (Warn tables): two steps two buttons. So, in my case I set the grandmother as default (a child was) and just run the first part of the install again to get the templates in all styles and it won't mess the 1.5 upgrade.

Correct?

Tayeb 08-30-2004 08:55 PM

Hello:

I nistalled version 1.0 and upgrade but I see nothing that allows warning. Where ought this warning link be? I am Admin and have full priviledges on my site. I'd appreciate any help or clues on why the warning doesn't appear in every post bit. My site is at www.myiwc.com/forums

Thanks in advance.

TosaInu 08-30-2004 11:04 PM

Quote:

Originally Posted by Tayeb
Hello:

I nistalled version 1.0 and upgrade but I see nothing that allows warning. Where ought this warning link be? I am Admin and have full priviledges on my site. I'd appreciate any help or clues on why the warning doesn't appear in every post bit. My site is at www.myiwc.com/forums

Thanks in advance.

Hello Tayeb,

Make sure you follow the instructions in the readme: running the installer is just one step, some files have to be edited too. Also note that ONLY the default Style will get the new warn templates (unless it's parent of all other Styles). -^

I forgot to do a page refresh F5 and saw nothing in the adminCP.

Tayeb 08-31-2004 08:21 AM

Quote:

Originally Posted by TosaInu
Hello Tayeb,

Make sure you follow the instructions in the readme: running the installer is just one step, some files have to be edited too. Also note that ONLY the default Style will get the new warn templates (unless it's parent of all other Styles). -^

I forgot to do a page refresh F5 and saw nothing in the adminCP.

Thanks for your response and help. I did exactly what's said at the beginning of this thread. Do I need to edit files etc that aren't mentioned in the zipped files?

I see the templates in Style Manager of Admincp. What puzzles me where the link ought to be? Shouldn't I have to edit the Forumhome templates?

Also in Admincp there's isn't any Warning system link, so it seems v.1.0 installer (found in Warning_System.zip) doesn't install everything correctly?

I thank antecipately any help.

TCB 08-31-2004 08:45 AM

It's a great hack..... But the fact that the 'warn (user)' and 'view (user)'s warnings' links are visible for anyone (instead of only the ones that are allowed to warn) makes it a bit messy.

I would also welcome it when you could select in the control panel what usergroups in what forums can warn users.

Tayeb 08-31-2004 11:22 AM

Quote:

Originally Posted by Tayeb
Thanks for your response and help. I did exactly what's said at the beginning of this thread. Do I need to edit files etc that aren't mentioned in the zipped files?

I see the templates in Style Manager of Admincp. What puzzles me where the link ought to be? Shouldn't I have to edit the Forumhome templates?

Also in Admincp there's isn't any Warning system link, so it seems v.1.0 installer (found in Warning_System.zip) doesn't install everything correctly?

I thank antecipately any help.

I'm becoming blind! Didn't read the instructions on installing v. 1.0 so didn't work. Have sorted out and it's wroking now and improving reading all other contributions. Thanks TosaInu for the clues. :)

TosaInu 08-31-2004 03:10 PM

You're welcome Tayeb.

Make sure you read the other posts TCB especially sv1cec, it's not as easy as just running an installer, but it's not hard to do. I'm not a coder at all, but just reading and experimenting will give you the result you want.

This post seems to be the most important one for you. It did help me a lot
https://vborg.vbsupport.ru/showpost....&postcount=192

His code only allows moderators to warn user in their own forum, and admins being global mods in all forums.

Not really my business, but I think you want to give this only to moderators/supmods. You risk a civil war on your site when people who are not staffmembers can warn.

If you need it, just edit the code from sv1cec:

HTML Code:

<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND can_moderate($forum[forumid], '', $bbuserinfo[userid])"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>

to something like

HTML Code:

<if condition="$post[usergroupid]!=6 AND $post[usergroupid]!=7 AND ($bbuserinfo[userid]== 10 OR can_moderate($forum[forumid], '', $bbuserinfo[userid]))"><a href='Warn.php?do=WarnUser&id=$post[userid]&post=$post[postid]'>Warn $post[username]</a> ?
</if>

Where you should replace 10 by the ID of the group you want to give warn.

TosaInu 08-31-2004 03:12 PM

Tayeb, upgrade 1.5 has extra install instructions too. Need to update the SQL database by running a query and have to edit a file.

TosaInu 08-31-2004 03:41 PM

And a suggestion for v2.0 of this great hack.

It forces sending a PM, very good thinking here. But it's possible that the user disabled (accidentely or not) the message system. It's luck if he sees the message then. It would be nice if it did also forcefully sent an e-mail.

sv1cec's code -^ will allow staff and warned members to check their status which also includes the PM. I added a flag in the forumview that will notify staff and warned members instantly:

In Postbit (or legacy) find:

HTML Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
Above that add

HTML Code:

<if condition="$post[warning_level]>=3 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6 OR ($post[userid]==$bbuserinfo[userid] AND $post[warning_level]>0)"><BR>Warn Level: $post[warning_level]</if>
or to make it flag for staff too (faster spotting):

HTML Code:

<if condition="$post[warning_level]>=3 OR (($bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==6 OR $post[userid]==$bbuserinfo[userid]) AND $post[warning_level]>0)"><BR>Warn Level: $post[warning_level]</if>
$post[warning_level]>=3 makes the warning level visible to everyone once level 3 is reached. Our staff feels that the first warnings should be a private afair between mods and user, level 3 and beyond should get some public pressure.

I also updated the moderator comments in Warn_AddWarn template to get a larger box for composing the PM:

HTML Code:

                Moderator Comments:</td>
        <td class="alt2"><textarea name="comment" rows=10 cols=50 class="bginput"> </textarea>
        </td>
</tr>

It works, but I'm not entirely sure whether it's proper code :o

Tayeb 08-31-2004 03:53 PM

Quote:

Originally Posted by TosaInu
Tayeb, upgrade 1.5 has extra install instructions too. Need to update the SQL database by running a query and have to edit a file.

Thanks TosaInu, I did do the upgrade to 1,5 and followed the instructions and also took care so that only Admin and Moderators (these ones in their own forums) can warn.

:)

venomx 09-04-2004 11:17 PM

Just posting here so Ill get an update when V2 is out... Will wait for it before I install. :)

Blam Forumz 09-05-2004 08:57 AM

Database error in vBulletin 3.0.1:

Invalid SQL: CREATE TABLE `warnings` (
`wid` int(15) NOT NULL auto_increment,
`warned_user` int(15) NOT NULL default '0',
`warned_by` int(15) NOT NULL default '0',
`warned_time` int(15) NOT NULL default '0',
`warned_reason` text NOT NULL,
`warned_post` int(15) NOT NULL default '0',
`warned_warning_id` int(15) NOT NULL default '0',
PRIMARY KEY (`wid`)
) TYPE=MyISAM;
mysql error: Table 'warnings' already exists

mysql error number: 1050

Date: Sunday 05th of September 2004 10:55:20 AM
Script: http://xxxxx/forum/admincp/install_warn.php
Referer: http://xxxxx/forum/admincp/install_warn.php
Username: Blaminator
IP Address: xxxxxxxx




help

SnowBot 09-09-2004 12:51 AM

Zero Tolerance I have one problem with the hack, maybe you or another member can help

OK the hack is GREAT but lets say the member DOES NOT post but just sends a PM, there is no way you can add a warning for them :(

Is there a way we can include this?

Thanks for any help on this.

Snowy

sv1cec 09-09-2004 02:03 AM

Quote:

Originally Posted by SnowBot
Zero Tolerance I have one problem with the hack, maybe you or another member can help

OK the hack is GREAT but lets say the member DOES NOT post but just sends a PM, there is no way you can add a warning for them :(

Is there a way we can include this?

Thanks for any help on this.

Snowy

If you go through this thread, I think there was a reference to how to change the original hack, to show only in threads and not in PMs. If you want it in PMs too, just reverse that reference.

Sorry, but I do not have the time to search for it.

Rgds

Sonic625 09-10-2004 05:17 AM

Sv1,
Any idea how to make the postbit mod you did where it shows the number of warnings each user has viewable to everyone?

SnowBot 09-10-2004 02:07 PM

Quote:

Originally Posted by sv1cec
If you go through this thread, I think there was a reference to how to change the original hack, to show only in threads and not in PMs. If you want it in PMs too, just reverse that reference.

Sorry, but I do not have the time to search for it.

Rgds

I have searched the thread but could not find it :(

sv1cec 09-10-2004 06:22 PM

Quote:

Originally Posted by Sonic625
Sv1,
Any idea how to make the postbit mod you did where it shows the number of warnings each user has viewable to everyone?

As it is in my postbit template, the warning points total, for each member, is viewable by everyone. What is not viewable, is the warnings themselves, in other words the details of each warning that the admin and mods can see. Here is the code I use:

Right below:

HTML Code:

<if condition="$show['reputation']">$post[reputationdisplay]</if>
I have:

HTML Code:

<if condition="$post[usergroupid]==2">
<if condition="$post[warning_level]>0">
<font color="#ff0000">
</if>
<BR>Warns Level: $post[warning_level]
<font color="#000000">
</if>

That should make the warning total viewable to all.

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

coRtALoS 09-12-2004 04:00 AM

I ran it, and everything works absolutely great after doing all the steps, however it never added the custom templates to my other skins. Just the default VB3 skin for my forum.

I'll be damned if I'm going to add all those custom templates to 8 skins. :p

Help anyone?

TosaInu 09-12-2004 01:03 PM

Hello coRtALoS,

I had the same problem. It only installs to the skin that's set to default in vB options. It will only install to the other skins if that one is the parent Style of all others.

The only alternative I know about is using a SQL tool, that can be some work.

Borisch 09-12-2004 06:00 PM

Great hack.
2 thumbs up!

SnowBot 09-13-2004 01:30 AM

Any update on the warning in PMs guys, i have looked through the thread and cant find anything :(

coRtALoS 09-13-2004 08:44 PM

I've had some problems with my moderators in the past abusing the warning system.

Is there anyway to remove moderator privilages to remove warning points (so a Staff or Admin has to remove it manually), or a way to keep a log of all warnings issued, active, removed and expired?

j_86 09-14-2004 01:27 PM

Read through the thread :)


All times are GMT. The time now is 03:12 PM.

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.03299 seconds
  • Memory Usage 1,872KB
  • 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
  • (11)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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