vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Warnings System Hack v1.0 (https://vborg.vbsupport.ru/showthread.php?t=42972)

bonnmac 09-04-2002 01:40 PM

NP Take your time. Classwork is important. :) I just appreciate the fact that your willing to take the time to help me. Once again I might add.

g-force2k2 09-04-2002 01:57 PM

btw ryans... im not an expert at javascript so im not sure... make sure that you hacked the admin/functions.php and the showthread.php regards...

g-force2k2

g-force2k2 09-04-2002 02:03 PM

bonmac...

open admin/functions.php

find:

PHP Code:

// +++++++ Warning Hack [ g-force2k2 ] +++++++
        
if($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) {
          
$post[warnings] = "<b>Warning Level:</b> $post[warninglvl]&nbsp;<a href='javascript:showwarnings($post[userid])'>[ View User Warnings ]</a>&nbsp;<a href='javascript:addwarnings($post[postid])'>[ Warn This User ]</a>";
        } else {
          
$post[warnings] = "";
        }
// +++++++ Warning Hack [ g-force2k2 ] +++++++ 

replace with:

PHP Code:

// +++++++ Warning Hack [ g-force2k2 ] +++++++
        
if($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 8) {
          
$post[warnings] = "<b>Warning Level:</b> $post[warninglvl]&nbsp;<a href='javascript:showwarnings($post[userid])'>[ View User Warnings ]</a>&nbsp;<a href='javascript:addwarnings($post[postid])'>[ Warn This User ]</a>";
        } else {
          
$post[warnings] = "";
        }
// +++++++ Warning Hack [ g-force2k2 ] +++++++ 

open member.php

find:

PHP Code:

// +++++++ Warning Hack [ g-force2k2 ] +++++++
  
if(($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) AND ($userinfo[warninglvl] > 0)) {
    eval(
"\$getinfo_warning = \"".gettemplate("getinfo_warning")."\";");
  } else {
    
$getinfo_warning "";
  }
// +++++++ Warning Hack [ g-force2k2 ] +++++++ 

replace with:

PHP Code:

// +++++++ Warning Hack [ g-force2k2 ] +++++++
  
if(($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 8) AND ($userinfo[warninglvl] > 0)) {
    eval(
"\$getinfo_warning = \"".gettemplate("getinfo_warning")."\";");
  } else {
    
$getinfo_warning "";
  }
// +++++++ Warning Hack [ g-force2k2 ] +++++++ 

last but not least upload the new warn.php in replacement of the older one... (attached below)

hopefull that'll do the trick bonmac :) regards and enjoy...

g-force2k2

bonnmac 09-04-2002 03:45 PM

Thanks g-force! But I'm sorry to bug you again. After applying the new settings I'm getting this error?

"The requested URL /forums/java script:addwarnings(162) was not found on this server"

Any ideas? It worked before?

ryans 09-04-2002 03:57 PM

Quote:

Originally posted by bonnmac
Thanks g-force! But I'm sorry to bug you again. After applying the new settings I'm getting this error?

"The requested URL /forums/java script:addwarnings(162) was not found on this server"

Any ideas? It worked before?

that's pretty much the same error i get. :)

ryans 09-04-2002 04:51 PM

Quote:

Originally posted by bonnmac
Thanks g-force! But I'm sorry to bug you again. After applying the new settings I'm getting this error?

"The requested URL /forums/java script:addwarnings(162) was not found on this server"

Any ideas? It worked before?

Ok I figured it out. Edit function.php and where you made the changes, change "java script" to "javascript". This is done in two place i believe.

g-force2k2 09-04-2002 06:00 PM

thank you much ryans :) i will apply the changes ;) im currently working on version two at the moment since it was very popular :p this one will be easier to configure and alot more expansive if you can believe that :) regards...

g-force2k2

kaost451 09-04-2002 08:58 PM

this is one of the best hacks I've seen, very nice.

X-Fan 09-04-2002 11:26 PM

g-force2k2, after adding...

PHP Code:

$post[warninglvl

...to my postbit template, now admins and mods don't get the links to warn the user. Any idea why this might have happened?

g-force2k2 09-05-2002 12:13 AM

X-Fan just remove the $post[warninglvl] from the postbit template then open admin/functions.php

find:

PHP Code:

        if($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) {
          
$post[warnings] = "<b>Warning Level:</b> $post[warninglvl]&nbsp;<a href='javascript:showwarnings($post[userid])'>[ View User Warnings ]</a>&nbsp;<a href='javascript:addwarnings($post[postid])'>[ Warn This User ]</a>";
        } else {
          
$post[warnings] = "";
        } 

replace with:

PHP Code:

if($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) {
          
$post[warnings] = "<b>Warning Level:</b> $post[warninglvl]&nbsp;<a href='javascript:showwarnings($post[userid])'>[ View User Warnings ]</a>&nbsp;<a href='javascript:addwarnings($post[postid])'>[ Warn This User ]</a>";
        } else {
          
$post[warnings] = "<b>Warning Level:</b> $post[warninglvl]";
        } 

regards hope that works :)

g-force2k2


All times are GMT. The time now is 04:17 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.01269 seconds
  • Memory Usage 1,775KB
  • 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
  • (7)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
  • (1)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