vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Warning System (Beta Version) (https://vborg.vbsupport.ru/showthread.php?t=95921)

TJFweb 10-26-2005 04:40 AM

There's a bug in this:
On the View Warnings AdminCP, remove warning and complete removal are linked as follows:

http://www.forum.com/forums//admin_w...4&orderstring=

they should be linked as ...forums/admincp/admin_warn.php...

Additionally, when I go to a user's profile in the main forum and I view their warnings, I cannot remove them as it tells me that there is an Invalid User ID.

kangta 10-26-2005 05:39 AM

I know what you mean about the large slabs, I'm the same way. :) I'll generally be able to figure out what's changed between what I have and what I'm supposed to replace it with and can hack it accordingly.

For some reason, this thing uses a customized error page and function. That's all fine and dandy, but I like everything to be as consistent as possible :D so I modified the warning system to use vB's "standard error" template. It's rather simple, to do so:

Find this code in the includes/functions_warning.php:
PHP Code:

function RunError($message)
{
    
// Theres probably some globals below not in use, uhm, who cares?
    
global $vbulletin$session$stylevar$_POST$vbphrase,$navbits,$show,$header;
    global 
$templatecache$db$vbulletin$style,$headinclude,$footer;
    global 
$tempusagecache$templateassoc$pmbox,$pmtext;
        eval(
'$warn_page .= "' fetch_template('warn_error') . '";');
    
$navbits construct_navbits($navbits);
    eval(
'$navbar = "' fetch_template('navbar') . '";');
    eval(
'print_output("' fetch_template('WARN') . '");');
    exit;


And replace it with this:
PHP Code:

function RunError($errormessage)
{
    global 
$vbulletin$session$stylevar$vbphrase$header;
    global 
$templatecache$db$style$headinclude$footer;
    
$pagetitle 'Advanced Warning System - Error!';
    eval(
'print_output("' fetch_template('STANDARD_ERROR') . '");');
    exit;


You'll notice I removed the globals that weren't needed... I basically played with each one until I found the ones that made the error pages work and the ones that didn't. You can change the text in the $pagetitle part to fit your forum or needs for the window title of the errors (these errors are used when you try to warn on a post that's already been warned assuming you have that disallowed, etc).

My advice to anyone who has a lot of modifications on their forum or a non-default skin would be... careful with the template edits ;) because with stuff like your postbit or memberinfo templates it's easy to mess stuff up if the code you're supposed to be replacing over isn't exactly as listed in the instructions.

Andreas 10-26-2005 06:13 AM

@TJFWeb
Changing the Colspan in this way will not work, view the page as a regular user :)
If you found a bug, please report it to the bugtracker.

RunError is already removed from the current developement build.

Darat 10-27-2005 08:32 AM

I was wondering if you could give me some advice on customising your hack? (Which in general is VERY good and thanks for making it available).

On the board I admin we don’t use the warning points to trigger suspensions or bans, so I've set everything to figures such as 9999 for number of warnings before someone is automatically banned.

However what I would also like to do is remove (from sight) all mentions of the warning points (not the number of warnings). I've edited postbit to remove the warning points totals, I’ve edited the PM and email templates so they don’t mention the points or points total. However I'm getting stuck on removing the columns that list the various warning points on the "View your warnings" page. Could you give me some pointers on what templates or files I need to edit and what to look for?

As a suggestion, and I've no idea how many people would also find this useful but perhaps a feature for a later version would be something like a "Use points system? - yes or no" and if no is selected the system doesn’t use the points system and all the related points stuff (bans and so on are deactivated).

sv1cec 10-27-2005 10:55 AM

If I understand that correctly, you have one warning point per warning, so your warnings number is equal to your warning points. Am I correct?

The templates which are used for showing the warnings are the warn_view?_....

You should also change the profile templates, so that they do not show the warning points.

Darat 10-27-2005 11:12 AM

Thanks for the reply - what I'm looking to do is remove the columns in teh screengrab attached.

The problem I have is that the view seems to be made up of several templates?

sv1cec 10-27-2005 11:19 AM

The templates are grouped together. In other words:

warn_view_top
warn_view_row
warn_view_end

are the group which shows the warnings. All three have to be edited to remove those columns, when a user checks his own warnings.

When an admin is checking a user warnings, then the templates are the warn_viewb_row, ...top and ...end.

I hope this helps.

Darat 10-27-2005 12:19 PM

Quote:

Originally Posted by sv1cec
...snip...

I hope this helps.

Thanks - that was enough info.

D.Ilyin 10-28-2005 05:26 AM

When i try to remove warnin from users (i'm have admin permisions):
_http://my.forum/Warn.php?do=RemoveWarning&id=1
I get the followin error:
Quote:

Error
An Error Has Occured!
An error has occured, the following message has been left below:
Invalid User ID Input
[ Back ]
What that mean?

UPDATED
Fogot.... Version AWS 3.5b4

sv1cec 10-28-2005 09:06 AM

I think that KirbyDE has not updated the distribution file to correct this error. Let's wait for him to answer this, if not, I can email you a different Warn.php file.


All times are GMT. The time now is 01:58 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.01903 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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