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)

ryans 09-03-2002 11:01 PM

Awesome, that puts the links in there. But 2 problems. The links show click here:

View Users Warnings:
http://www.sromagazine.com/boards/ja...t:showwarnings(15668)

and
Warn User:
http://www.sromagazine.com/boards/ja...pt:addwarnings(252222885)

I did edit the showthread

{htmldoctype}
<html>
<head><title>$bbtitle - $thread[title]</title>
$headinclude
<script language="javascript" type="text/javascript">
<!--
function aimwindow(aimid) {
window.open("member.php?s=$session[sessionhash]&action=aimmessage&aim="+aimid,"_blank","toolbar=n o,location=no,menubar=no,scrollbars=no,width=175,h eight=275,resizeable=yes,status=no")


}
// -->

<!-- Warnings Hack v1.0 [ g-force2k2 ] -->
function showwarnings(userid) { window.open
("warn.php?s=&action=show_warn&userid="+userid,
"show_warn", "toolbar=no,scrollbars=yes,resizable=yes,width=600 ,height=350"); }
function addwarnings(postid) { window.open
("warn.php?s=&action=add_warn&postid="+postid,
"add_warn", "toolbar=no,scrollbars=yes,resizable=yes,width=350 ,height=150"); }
<!-- Warnings Hack v1.0 [ g-force2k2 ] -->

</script>
</head>

ryans 09-04-2002 04:30 AM

any suggestions on this? When I click the link (View Users Warning) it clicks to:

http://www.sromagazine.com/boards/ja...arnings(19653)

bonnmac 09-04-2002 08:30 AM

Quote:

Originally posted by g-force2k2
Zirus if you want another usergroup included you have to add them... i can show you how to go about this if you like... regards...
g-force2k2 [/B]

Hi g-force2k2...

Could you please tell me how to add another usergroup? I've installed the lesser admin hack and I'd like to add that group to the ones that have permissions. The user groupid is 8...

Thanks :)

X-Fan 09-04-2002 10:21 AM

Apologies in advance if this has been asked before, but how is it possible to have the number of warnings that's displayed in postbit and on the userinfo page made public so that all users can see them? I'd like for those that have been warned to know how many warnings they've got.

g-force2k2 09-04-2002 11:11 AM

bonnmac i can create it for you if you like...

X-Fan simply but in your postbit...

PHP Code:

Warning Level$post[warninglvl

regards...

g-force2k2

bonnmac 09-04-2002 11:27 AM

Quote:

Originally posted by g-force2k2
bonnmac i can create it for you if you like...
regards...
g-force2k2

That would be greatly appreciated. Thanks... :)

X-Fan 09-04-2002 11:32 AM

Thanks!

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

Quote:

Originally posted by bonnmac


That would be greatly appreciated. Thanks... :)

okay whats the exact usergroupid and what permissions do you want them having? ability to warn moderators etc? regards...

g-force2k2

bonnmac 09-04-2002 01:25 PM

It's usergroup id # 8 and I'd like them to have full permissions like admins do. Please. And Thanks. :)

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

i will have it done later today right now i have to get back to doing my classwork :p but i'll have it done asap regards ;)

g-force2k2

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

ZiRu$ 09-05-2002 12:14 AM

Quote:

Originally posted by g-force2k2
Zirus i'll code up your addon as well once i get home from college :P regards...

g-force2k2

???????? hehe

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

my bad mate... i'll do it now :p regards...

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] == OR $bbuserinfo[usergroupid] == 99) {
          
$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] = "";
        } 

open member.php

find:

PHP Code:

if(($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 7) AND ($userinfo[warninglvl] > 0)) {
    eval(
"\$getinfo_warning = \"".gettemplate("getinfo_warning")."\";");
  } else {
    
$getinfo_warning "";
  } 

replace with:

PHP Code:

if(($bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == OR $bbuserinfo[usergroupid] == 99) AND ($userinfo[warninglvl] > 0)) {
    eval(
"\$getinfo_warning = \"".gettemplate("getinfo_warning")."\";");
  } else {
    
$getinfo_warning "";
  } 

And then i'll do the php file right away ;) sorry man... college is >_O btw im working on version 2 it'll be much more versitile... regards...

edit: just upload the new warn.php to the forum directory ... regards again...

g-force2k2

bonnmac 09-05-2002 02:46 AM

Quote:

Originally posted by ryans


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.

Thanks very much! That fixed the problem. Much appreciated :)

X-Fan 09-05-2002 09:44 AM

Quote:

Originally posted by g-force2k2
regards hope that works :)
Looks like it worked indeed, thanks gf!

thefreestyler 09-05-2002 09:50 AM

Hello
I have just installed your lovely hack but when i click on a on view warm for a member who haven't yet any warming the following message appears:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in c:\easyphp\www\public_html\forums\warn.php(32) : eval()'d code on line 1

Can you tell me if its a bug or me who have made mistake

thank you

g-force2k2 09-05-2002 05:07 PM

thefreestyle can you attach the warn.php file? thanks in advance... i will debug it if necessary... regards...

g-force2k2

thefreestyler 09-05-2002 05:59 PM

hy g-force2k2 for the file it's the same as in the zip you have attached may be i have made a mistake when i installed it

please tell me if it works fine for you when a member have no warm and you click on view warm if so i will reinstall
thank you in advance
regards

g-force2k2 09-05-2002 07:24 PM

not really sure thefreestyler it seems fine on my side? have any idea if you made any changes to the php file? because its saying that there's a parse error with the file... regards...

g-force2k2

thefreestyler 09-06-2002 09:42 AM

ok thank you for your help i will reinstall it

Matt87 09-06-2002 08:46 PM

You say that I can't edit it, that means I can't even modify it to fix the postbit template more nicely? :(

NTLDR 09-06-2002 08:48 PM

Quote:

Originally posted by Matt87
You say that I can't edit it, that means I can't even modify it to fix the postbit template more nicely? :(
g-force2k2 means that you can't make and release addons or distribute the code without his consent.

Modifying the post bit will be fine ;)

Matt87 09-06-2002 08:52 PM

k ;)

So I can modify templates, just not release add ons? ok

I guess this goes the same for the total time online hack too

Vile 09-06-2002 09:06 PM

Great hack, works like a charm:)

Parker Clack 09-06-2002 09:38 PM

g-force2k2:

Do you have a time frame for version 2.0? I really look forward to seeing what you have done for the next version and having the ability to email a member a warning.

Thanks,
Parker

g-force2k2 09-06-2002 11:20 PM

Matt87 NTLDR is correct ;)

Parker Clack... release will be later tonight :) its looking extremely nice at this point :) will include and upgrade instructions from version 1.0 and it will require deleting all the templates but it will come with an installer this time ;) regards...

just having my man beta test it and all :) i already did but don't want to pass anything up :p regards...

Expect major modifications Parker... this is 2.0 not 1.1 :p not but seriously its looking really nice... alot more configurable and alot more optimizeable for everyone ;)

g-force2k2

Chris M 09-07-2002 12:04 PM

Cool!:)

I cant wait!:)

Satan

CJi 03-25-2003 07:04 PM

I seem to be missing a file? warnconfig.php is not in the zip?

Shane_2k 03-30-2003 06:43 PM

will this work with 2.2.2 has any one tryed

thanks

Willard Reece 12-07-2003 06:38 PM

Quote:

Originally Posted by CJi
I seem to be missing a file? warnconfig.php is not in the zip?


yes really i see that myself..

whats up????


All times are GMT. The time now is 01:12 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.01611 seconds
  • Memory Usage 1,880KB
  • 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
  • (12)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (39)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