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)

NTLDR 09-01-2002 03:57 PM

Quote:

Originally posted by hypedave
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/ochroma/public_html/forums/admin/functions.php(308) : eval()'d code on line 41 [/B]
You haven't edited the code correctly ;)

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

Ice Man the warnconfig.php goes in the admin directory... also make sure that you edited the admin/functions.php correctly... regards...

g-force2k2

Gohan 09-01-2002 06:45 PM

Great hack! i love you :p
i'll asap installation it

Mr_P 09-01-2002 09:27 PM

Hack looks fine and shows on board but i cant warn no one as i get page not displayed

i can enter the details why they were warned then when i press return thats when i get no page so a path is wrong and i thinl ots this one

$fdname = "/VBB/"; // forum directory folder name

that is path to my vbb folder so where am i going wrong ?

Also Just relised from the pics in the first post that my warning box dont have the button GO on it .

I did all templates as well so not sure why the button aint showed.

g-force2k2 09-02-2002 01:28 AM

Mr_P did you change the global $gobutton template by any chance? because its the same gobutton as everywhere on the forums really... regards...

g-force2k2

eXtremeTim 09-02-2002 02:28 AM

Very Nice Hack :)

I will most definatly install this one.

Mr_P 09-02-2002 07:35 AM

nope aint changed the button and the go button appears on the forum as normal (just not on that warn box).
To be honest i would`nt ov even knew it was missing to i compared mine to the pics you posted at beginning of thread.

I re-did hack just in case i missed anything but still same

also $fdname = "/VBB/"; // forum directory folder name
is the above correct ?

Mr_P 09-02-2002 08:42 AM

got the button to show by robbing the following code from showthread and inserted it in here

PHP Code:

 <td bgcolor="#13486D"><smallfont color="#FFFFFF">Reason for Warning:<br><input type="text" name="reason" value="" maxlength="100" size="30">
$gobutton              $gobutton     <input type="image" src="https://vborg.vbsupport.ru/images/go.gif" border="0" 
align="absbottom">
   </
td></tr><tr

now when i enter data and warn them and then hit go i still get the page not displayed.

This has something to do with this dont it but i tried all sorts and it still page not displayed ........Any Ideas?

also $fdname = "/VBB/"; // forum directory folder name
is the above correct ?



Not Found
The requested URL was not found on this server

What file is it actually looking for when the Go button is pressed is it warn.php if so then the path above is correct to the vbb folder so warn should be found automatically.

Mr_P 09-02-2002 09:54 AM

nope sorry it fines the extra crap above was me when i was editing the code i forgot to remove excess after messing with it.
I have it all going - everything shows except when i click go i get page not found on this server - if i can solve that then hack is complete and cheers Erwin.

Erwin 09-02-2002 10:29 AM

Installed with no problems... with some minor modifications, specifically using my own JS window opening script. :) Thanks!

Erwin 09-02-2002 10:52 AM

Also, don't forget to add the following code to the warn_show and warn_add templates right at the top before any of the HTML:

Code:

<head>
$headinclude
</head>

This is so that the < normalfont> tags would work. :)

Gohan 09-02-2002 10:55 AM

Perfect working but one problem

my forum have not folder just only root folder
http://saxxon.squadcenter.de/

so must i change to?
$fdname = ""; // forum directory folder name

Erwin 09-02-2002 11:02 AM

No, use this:

$fdname = "/";

Obi-Wan 09-02-2002 11:34 AM

Quote:

Originally posted by muliman
I found a little Bug in the getinfo_warning template:

Here the original (getinfo_warning):

change to:

Now the link to "View User Warnings" can be found...

Greets,
muliman


Thx m8...was about to ask about it:)

Gohan 09-02-2002 03:01 PM

Quote:

Originally posted by Erwin
No, use this:

$fdname = "/";

Thank ya man!

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

thanks for the help Erwin ;)

btw Mr. P do you have this coding in the warn_add template?

PHP Code:

<form action="$PHP_SELFmethod=post>
<
input type="hidden" name="action" value="insert_warn"

because im not sure about why you're getting a blank page... its seems like the action isn't being carried through properly... regards...

g-force2k2

hypedave 09-02-2002 05:23 PM

Quote:

Originally posted by Goldknight


uh? Can you give your code of that?

welp that place is about to go through a major re do in a couple of days, so im not gonna worry about it right now. I have installed this on my test board thats going live anyday now

I have to problems

with my server being an NT IIS Server, what is the correct path I need for this coding

$fdname = "forum"; // forum directory folder name

I tryed c:\\folder\\forum location

but that didnt work

aslo when I click the warn user link
I get this following error

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

would it be because of my $fdname path???

g-force2k2 09-02-2002 05:33 PM

hyperdave for the directory problems try replace all instances of:

PHP Code:

/$fdname 

with:

PHP Code:

.. 

see if that fixes that problem... as for the warn user link... maybe because its javascript? im not sure...

Edit: you can try replace the javascipt link with:

PHP Code:

<a href='warn.php?s=$session[sessionhash]&action=add_warn&postid=$post[postid]'>[ Warn User ]</a

see if that works? regards...

g-force2k2

hypedave 09-02-2002 06:02 PM

hey I figured my problem out, it would help if I read the directions on where to upload files, dont me how I did this, but I uploaded all the files to the admin directory. any who going to make atest account and ban the heck out of it.

thanks for the speedy help, i'll beback if I finder more problems

g-force2k2 09-02-2002 06:21 PM

lol ;) glad that you figured it out hypedave :) enjoy man... have fun banning the heck out of the tester :p regards...

g-force2k2

hypedave 09-02-2002 06:24 PM

I got a addon request for you. Add an option to email the user to let him know his account has been banned, even if he has the option to recieve emails blocked, cause if you pm the user he cant check his pm if that feature is disabled for that banned group

thanks

Mr_P 09-02-2002 07:15 PM

seems no matter what i do as soon as i press the go button i get a url not found on this server error

my board is in a folder called vbb so this is correct path so unsure where to go now.

also i tried the different hyperlink as listed above and got nowhere with that.

$fdname = "/vbb"; // forum directory folder name

If i use following hyperlink i get following :

<a href='warn.php?s=$session[sessionhash]&action=add_warn&postid=$post[postid]'>[ Warn User ]</a>

Sorry but the post that you're trying to warn the user for doesn't exist! Please go back and confirm the postid.

ZiRu$ 09-02-2002 08:10 PM

DAMNNNN dogg.....your my favorite hacker now :)

congratz

[high]* ZiRu$ goes off to install it[/high]

Erwin 09-02-2002 08:28 PM

Quote:

Originally posted by g-force2k2
thanks for the help Erwin ;)
You're welcome. :)

ZiRu$ 09-02-2002 08:40 PM

....hmm.....MODERATORS see it....but I don't see it...I AM NOT A ADMIN....i am a custom group with super mod priviledges ????

ryancooper 09-02-2002 09:41 PM

looks cool, clicks install

Erwin 09-03-2002 12:14 AM

You need to edit the user permissions in warn.php in 2 spots - look for where all the usergroupid permissions are listed, and add your own.

g-force2k2 09-03-2002 12:16 AM

Mr.P where are you placing the link on the postibt? Cause the error you're recieving is an postid error meaning the postid doesn't exist... try putting one in... ie: postid=250

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

ZiRu$ 09-03-2002 01:46 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

yep.......thx i really need that

ALSO....in the ugh i forget it...It's the CONFIG php file it asks you for the directory of your forum

the default it "forum" but i have no sub-directory like vbulletin does......and if i remove it....it messes up

so thats 2 problems

g-force2k2 09-03-2002 01:50 AM

Zirus in the instances of /$fdname in the admin_warning.php just replace them with: .. thats should do the trick ;) regards... and i'll fix in the other usergroup for you if you like... just need a usergroupid? unless you can do it on your own? regards...

g-force2k2

Parker Clack 09-03-2002 02:58 PM

g-force2k2

I think this is a great hack.

Anyway of making this so that you send an email to the member instead of a private message or in addition to the private message?

Parker

ZiRu$ 09-03-2002 03:09 PM

Quote:

Originally posted by g-force2k2
Zirus in the instances of /$fdname in the admin_warning.php just replace them with: .. thats should do the trick ;) regards... and i'll fix in the other usergroup for you if you like... just need a usergroupid? unless you can do it on your own? regards...

g-force2k2

ok thx i'll try that........um......where in the hack do i put in the cutom id......let's just say the group is 99....how can i do it?

Mr_P 09-03-2002 04:26 PM

Quote:

Originally posted by Link14716
sure.

Add $post[warnlvl] to your postbit ;)

Okay finally managed to sort this hack and it works well so well done m8 but i would like to quote post above as the link dont work.

You need to put <b>$post[warninglvl] <-=- that</b>

I have mine set to 10 warning and your out so it looks like this

$post[warninglvl]/10

All in all top hack.

g-force2k2 09-03-2002 05:01 PM

glad to hear Mr.P Parker i'll work on an email addon extremely shortly...

Zirus i'll code up your addon as well once i get home from college :P regards...

g-force2k2

Parker Clack 09-03-2002 06:39 PM

In found a spot in the warn_show_warn template that is hardcoded that can give you some trouble in getting to the correct place.

You have:

<tr><td bgcolor="$backcolor" width="15%"><smallfont color="{pagetextcolor}"><b><a href="/forum/member.php?s=&action=getinfo&userid=$userid">$user name</a></b></smallfont></td>

The problem is with the:

<a href="/forum/member.php?

If your board's forum is not in the forum directory then the above link will not work.

Parker

ryans 09-03-2002 10:28 PM

I'm having problems too. I really need this to get working too. I've looked over everything numerous times.

Is it my user group permission?

1 Unregistered / Not Logged In Guest

2 Registered SRO Member
3 Users Awaiting Email Confirmation
4 (COPPA) Users Awaiting Moderation
29 Super Moderators Super Moderator
31 Moderators
28 super admin
33 Banned by Moderators
36 Banned By Warnings

My warnconfig looks like this:

$logsperpage = "20"; // warning logs to show per page
$fdname = "/web/docs/www.streetracing.org/htdocs/boards";
$reggroup = "2"; // usergroupid for registered users
$banlimit = "5"; // number of warings before user is banned
$banusergroup = "36"; // usergroupid of the banned group by warnings!
$allowmodwarn = "1"; // allows moderators to warn other moderators? (1 for yes :: 0 for no)
// +++++++ warning hack v1.0 configuration [ g-force2k2 ] +++++++

any clues?

do i have to edit my warn.php file? I'm running 2.27.

thanks!

ryan

g-force2k2 09-03-2002 10:39 PM

yeah ryans... if you look through my hack you have to replace all the usergroupid with the ones that fit your forum needs... if you want i can go through the list for you regards... im currenlty starting a version 2.0 to solve some issues like this and also to make it better... regards...

g-force2k2

Ice Man_00 09-03-2002 10:43 PM

Hey cool. Then th rest of us who had problems wait for the easier part one :p

Thx g-force2k2 you doing a great work

Cheers

g-force2k2 09-03-2002 10:47 PM

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] == 31 OR $bbuserinfo[usergroupid] == 28 OR $bbuserinfo[usergroupid] == 29) {
          
$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] == 31 OR $bbuserinfo[usergroupid] == 28 OR $bbuserinfo[usergroupid] == 29) AND ($userinfo[warninglvl] > 0)) {
    eval(
"\$getinfo_warning = \"".gettemplate("getinfo_warning")."\";");
  } else {
    
$getinfo_warning "";
  }
// +++++++ Warning Hack [ g-force2k2 ] +++++++ 

And then upload this as your new warn.php regards... this should do the trick :)

g-force2k2

g-force2k2 09-03-2002 10:49 PM

see above ryans :) regards... hopefully it works ;)

g-force2k2


All times are GMT. The time now is 01:16 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.01384 seconds
  • Memory Usage 1,860KB
  • 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_code_printable
  • (9)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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