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)

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


All times are GMT. The time now is 08: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.01376 seconds
  • Memory Usage 1,756KB
  • 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
  • (6)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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