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)

sv1cec 10-11-2004 12:54 AM

Quote:

Originally Posted by RasMasta
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.

This feature is already there, I think, in version 1.5, in the form of protected groups. Also, my hack takes this into consideration, as far as which members see the "Warn XYZ" link.

Rgds

sv1cec 10-11-2004 04:41 AM

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

sv1cec 10-11-2004 06:45 AM

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:

<form action="Warn.php" method="post">
<
input type="hidden" name="do" value="DoWarnUser">
<
input type="hidden" name="id" value="{$_GET['id']}">
<
input type="hidden" name="post" value="{$_GET['post']}">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat" colspan="2">Warning User $user[username]<div class="smallfont">All links belowwill open a new browser windowclose it to return here.</div></td>
</
tr>
<
tr>
    <
td class="alt1">User Info:</td>
    <
td class="alt1">
<
a href="member.php?u=$_GET[id]"  onclick="window.open('member.php?u=$_GET[id]}','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank">User Profile for $user[username] - User ID$_GET[id]</a><br />
<if 
condition="$user[warning_level]>0">
<
Font color="red">User Current Warning Level: {$user['warning_level']}</font><br />
<
a href="Warn.php?do=ViewWarnings&id=$user[userid]"  onclick="window.open('Warn.php?do=ViewWarnings&id=$user[userid]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank">View Existing Warnings for $user[username]</a>
</if>
        </
td>
</
tr>
<
tr>
    <
td class="alt2">Warned Post:</td>
    <
td class="alt2">
<
a href="showthread.php?p=$_GET[post]onclick="window.open('showthread.php?p=$_GET[post]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank">Review Warned PostPost ID$_GET[post]</a>

<if 
condition="$warning_multiwarns1<>''">
<
br><Font color="red">$warning_multiwarns1</font><br>
<
A HREF="Warn.php?do=ViewPostWarnings&post=$_GET[post]"  onclick="window.open('Warn.php?do=ViewPostWarnings&post=$_GET[post]','','width=1000, height=500, resizable=yes, scrollbars=yes'); return false;" target="_blank">$warning_multiwarns2</a></if></td>

</
tr>
<
tr>
    <
td class="alt1">Warning Selection:</td>
    <
td class="alt1"><select name="warningid" class="smallfont">
        <
optgroup label="Choose A Warning">
        
$warnopts
        
</optgroup>
    </
select></td>
</
tr>
<
tr>
    <
td class="alt2">
        
Moderator Comments:</td>
    <
td class="alt2"><input type="text" name="comment" size="50" class="bginput">
    </
td>
</
tr>
<
tr>
    <
td class="tfoot" align="center" colspan="2"><input type="submit" value=" Add Warning " class="bginput"></td>
</
tr>
</
table>
</
form>
<
br /> 

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

SamirDarji 10-11-2004 01:17 PM

Quote:

Originally Posted by sv1cec
...as I have no idea if you do like me adding features or you would prefer me to go do some other things.

I, for one, look at each of your mods with great anticipation. You've been able to take this hack to another level. Keep up the good work. I know that I'll be giving you a ton of feedback once I start really messing with this hack on my test server.

Malice 10-11-2004 10:45 PM

Looking over this hack just a tad, does it have NEW database tables? Basically altering the database.

xtreme-mobile 10-13-2004 07:20 PM

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

sv1cec 10-14-2004 03:38 AM

Quote:

Originally Posted by xtreme-mobile
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

Dean,

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

sv1cec 10-14-2004 04:02 AM

Quote:

Originally Posted by Malice
Looking over this hack just a tad, does it have NEW database tables? Basically altering the database.

The hack does use additional tables. Two of them if you follow my approach, three according to the original hack (if memory serves me right).

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

SamirDarji 10-14-2004 04:33 AM

Quote:

Originally Posted by sv1cec
But you can also have it in each and every post of every member, by altering the postbit/postbit_legacy template.

That's awesome! That's exactly what I'm planning to do.

xtreme-mobile 10-14-2004 03:34 PM

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 02:23 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.01535 seconds
  • Memory Usage 1,785KB
  • 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
  • (1)bbcode_php_printable
  • (5)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