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)
-   -   vbulletin-ip Plotter (https://vborg.vbsupport.ru/showthread.php?t=42340)

DrkFusion 08-16-2002 07:50 PM

Quote:

Originally posted by Boofo
Drk, you're more than welcome to install this at my forums. ;)


Bring it :banana:
Drk

Also Guys if you want a link to download GD, you can find it at
http://www.boutell.com/gd/

Drk

Boofo 08-16-2002 07:51 PM

PM me with what you need and we can get it done. :)

Quote:

Originally posted by DrkFusion

Bring it :banana:
Drk

Also Guys if you want a link to download GD, you can find it at
http://www.boutell.com/gd/

Drk


Schorsch 08-16-2002 07:56 PM

please tell me, what the heck is GD ????

I'm on a Linux Server!

cu
Schorsch

beemer 08-16-2002 08:01 PM

DRKFusion, in your instructions you state that the mod directory permissions should be 777. Can you tell me what you mean by that, is this a UNIX term?

DrkFusion 08-16-2002 11:04 PM

Yes its unix term, don't worry about it for windoes servers. Boofo...pm me the info :) My net connection is getting knockd off every few minutes, so I can't go through with pming you lol.


Schorsch:

GD, is a special program that is installed on servers that will allow you to manipulat the image in real time, with out opening it into a image editor then exporting it. I have included a link above go and read about it.

Test this on your servers, it might work without GD :D
Drk

DrkFusion 08-16-2002 11:53 PM

OK NOTE, TO PEOPLE WHO GET THE DB_MYSQL.PHP ERROR.

Ignore it, it is nothing harmful, its just differences in time offset, because of the logs.

The error will look similar to
Code:

Notice: Undefined offset: 1 in /home/boofo/public_html/forum/admin/db_mysql.php on line 84

Notice: Undefined offset: 1 in /home/boofo/public_html/forum/admin/db_mysql.php on line 97

Notice: Undefined offset: 1 in /home/boofo/public_html/forum/admin/db_mysql.php on line 84

Notice: Undefined offset: 1 in /home/boofo/public_html/forum/admin/db_mysql.php on line 97

If you also see a broken image, open the readme file and scroll down the the bottom and read teh instructions.

you will only get A BROKEN IMAGE IF YOU DON'T HAVE GD ENABLED, SO IF YOU WANT THIS TO WORK, READ THAT PART ;)

Enjoy

Sketch 08-18-2002 12:58 AM

can I simply ask (since I'm lazy and don't feel like analyzinbg the php on a sunday evening :D) what the secret to mapping the IP is....what PHP function/combo of functions? The reason I ask is this has been something that has come up over at SitePoint about how to analayze where an IP is from.....and I have no idea. Thishack would be useful to apply elsewhere in a non-hack place. :D

Thanks
Aaron

KarateKid 08-19-2002 05:38 PM

wow,

thats a really good hack.

I'll install it! :)

Schorsch 08-20-2002 03:13 AM

seems to work fine, thank you !

has the leave out of this GD thing and instead using css any disadvantages ?

If not, why don't you do this hole hack completley without this GD thing ?

cu
Schorsch

beemer 08-20-2002 05:14 PM

Does anyone know how to use css instead of GD? I am running vbulletin on Win2k server and since I'm not a seasoned C++ programmer, I am not sure how to add GD? I would love to use this hack if I can. Anyone else get it working on a Win2K server? Thanks,

NTLDR 08-20-2002 05:18 PM

Quote:

Originally posted by beemer
Does anyone know how to use css instead of GD?
In ipconf.inc change:

PHP Code:

$trygd "1"

To:
PHP Code:

$trygd "0"

This will then use CSS, this works fine for me.

beemer 08-20-2002 07:06 PM

Thanks NTLDR, still getting a CGI script error. Can't seem to figure this one out???

NTLDR 08-20-2002 07:53 PM

I'll try this on my IIS server and see if it will work, I know the CSS works fine under appache and linux.

UPDATE:

It works fine for me under IIS 5.1 with PHP 4.2 installed using the CSS method, what errors are you getting?

beemer 08-20-2002 08:25 PM

I'm getting a CGI error that says :

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

So a new question, when using IIS5 are css sheets enabled by default or do I have to install some msdn peice to make them work? I am using PHP4.2 but I'm not sure what mean when you say you installed it using the CSS method?

NTLDR 08-20-2002 09:19 PM

I just followed the instructions for the hack, but made $trygd=0; other then that I made no other changes, are you running PHP as an ISAPI or as a CGI exe?
I allways used to get the error on the Admin CP home page with IIS.

beemer 08-21-2002 05:07 PM

Ok, finally got ticked off and rebuilt my web server. Everything working great now! Nice hack, very usefull!

scottct1 08-21-2002 06:57 PM

It works however I am gettiing the following error when it plots the screen (the error is at the bottom of VBipplot.php

Notice: Undefined variable: encoding in /home/dbstalk/public_html/admin/adminfunctions.php on line 44

Any ideas?

DrkFusion 08-22-2002 01:28 AM

There may be errors like this because of differences in server setup, and server preferences.

So if the plotter works, and it plots the ip ok, then its nothing to wory about.

Boofo 08-22-2002 01:34 AM

Drk, my server seems to be set up with GD. Is there a way around the errors that show up for the time probelm? :)

Also, how can I put the dir for the files in the Admin dir instead of the mod dir and still make it work like it does now, buddy? ;)

Quote:

Originally posted by DrkFusion
There may be errors like this because of differences in server setup, and server preferences.

So if the plotter works, and it plots the ip ok, then its nothing to wory about.


DrkFusion 08-22-2002 01:44 AM

That is very easy, take out the links in mod/index.php, move the file vbipplot.php and everything in the ..locatio folder into the admin folder.
It should look something like this

admin/vbipplot.php
admin/{thelocationfolder}

Now then edit admin/index.php find ../mod/vbipplot.php and change it to vbipplot.php

in user.php in the admin directory find ../mod/vbipplot.php and replace it with vbipplot.php find it again I believe and replace with vbipplot.php.

Now uhh I forgot the changes i made to your forums hehe, so any instances of../mod/vbipplot or mod/vbipplot to admin/vbipplot or just ipplot.

Its farely easy

Boofo 08-22-2002 03:06 AM

Ok, Drk, I moved everything and changed all of the links and it works fine except now every-time I run it from the on-line.php on the site, It makes me login to the Admin CP first before it shows. Any way to bypass that?

Brad 08-23-2002 12:45 AM

nice hack m8

DrkFusion 08-23-2002 03:42 PM

Boofo:
did you edit it in the Whos Online? The Link? If so, then you got to edit one of the php files included in the zip.

Hmm..I will check it out, but Im suer vbipplot.php is me best bet. There may be file includes telling it to go yo mod folder.

Boofo 08-23-2002 05:40 PM

It goes to the plotter window fine, it just asks for my login password to the admin dir every-time I do now, is all. Once I give it, it will allow me to go there again and again without the password having to be entered again. Cookies, maybe? :)

Quote:

Originally posted by DrkFusion
Boofo:
did you edit it in the Whos Online? The Link? If so, then you got to edit one of the php files included in the zip.

Hmm..I will check it out, but Im suer vbipplot.php is me best bet. There may be file includes telling it to go yo mod folder.


DrkFusion 08-23-2002 06:04 PM

Maybe...I will talk to you when I get back, I am going out of down for few days.

Bye!

Boofo 08-23-2002 06:12 PM

Don't forget to bring me back a souvenir, Drk. :)

Quote:

Originally posted by DrkFusion
Maybe...I will talk to you when I get back, I am going out of down for few days.

Bye!


NTLDR 08-23-2002 09:09 PM

Quote:

Originally posted by Boofo
It goes to the plotter window fine, it just asks for my login password to the admin dir every-time I do now, is all. Once I give it, it will allow me to go there again and again without the password having to be entered again. Cookies, maybe? :)
This is true of all files in the admin directory that include admin/global.php and use cpheader(); and cpfooter(); Its a security feature in vB.

Boofo 08-23-2002 09:17 PM

That makes sense. I supose I could move it all to the forum root directory. That wouldn't hurt anything would it? No one but the admin should see it even from there, should they?

NTLDR 08-23-2002 09:35 PM

It won't hurt being there, however you need to remove the cpheader(); and cpfooter(); lines as that will cause parse errors.

If you do move it into the forums directory I suggest that you add this code after require('./global.php'); so that only admins can view the page, and everyone else gets the no permission error.

PHP Code:

if ($bbuserinfo[usergroupid]!=6) {
show_nopermission();



Boofo 08-23-2002 10:43 PM

Good idea, although, with it set up like it is, I think only Admins can view IPs on my site already, so it should be set to go if I move it there. The show nopermissions is a good safety catch though. :)

Let me ask you this...how could I do the permissions for like it is set for in the Admin CP, for whoever I have it set for to be able to see IPs?

Quote:

Originally posted by NTLDR
It won't hurt being there, however you need to remove the cpheader(); and cpfooter(); lines as that will cause parse errors.

If you do move it into the forums directory I suggest that you add this code after require('./global.php'); so that only admins can view the page, and everyone else gets the no permission error.

PHP Code:

if ($bbuserinfo[usergroupid]!=6) {
show_nopermission();




NTLDR 08-23-2002 11:20 PM

You would need to add another field to the usergroup table and a few lines to your usergroup.php and modify the show_nopermission code.

[sql]ALTER TABLE usergroup ADD canplotip SMALLINT (6)[/sql]

Find:

PHP Code:

makeyesnocode("Can view board","canview",1); 

And add after:

PHP Code:

makeyesnocode("Can view Plot IP?","canplotip,1"); 

And find:

PHP Code:

$DB_site->query("INSERT INTO usergroup (usergroupid,title,usertitle,cancontrolpanel,canmodifyprofile,canviewmembers,canview,showgroup,cansearch,canemail,canpostnew,canmove,canopenclose,candeletethread,canreplyown,canreplyothers,canviewothers,caneditpost,candeletepost,canusepm,canpostpoll,canvote,canpostattachment,ismoderator,canpublicevent,canpublicedit,canthreadrate,cantrackpm,candenypmreceipts,maxbuddypm,maxforwardpm,canwhosonline,canwhosonlineip,cangetattachment)
    VALUES (NULL,'"
.addslashes($title)."','".addslashes($usertitle)."',$cancontrolpanel,$canmodifyprofile,$canviewmembers,$canview,$showgroup,$cansearch,$canemail,$canpostnew,$canmove,$canopenclose,$candeletethread,$canreplyown,$canreplyothers,$canviewothers,$caneditpost,$candeletepost,$canusepm,$canpostpoll,$canvote,$canpostattachment,$ismoderator,$canpublicevent,$canpublicedit,$canthreadrate,$cantrackpm,$candenypmreceipts,$maxbuddypm,$maxforwardpm,$canwhosonline,$canwhosonlineip,$cangetattachment)"); 

And replace with:

PHP Code:

$DB_site->query("INSERT INTO usergroup (usergroupid,title,usertitle,cancontrolpanel,canmodifyprofile,canviewmembers,canview,canplotip,showgroup,cansearch,canemail,canpostnew,canmove,canopenclose,candeletethread,canreplyown,canreplyothers,canviewothers,caneditpost,candeletepost,canusepm,canpostpoll,canvote,canpostattachment,ismoderator,canpublicevent,canpublicedit,canthreadrate,cantrackpm,candenypmreceipts,maxbuddypm,maxforwardpm,canwhosonline,canwhosonlineip,cangetattachment)
    VALUES (NULL,'"
.addslashes($title)."','".addslashes($usertitle)."',$cancontrolpanel,$canmodifyprofile,$canviewmembers,$canview,$canplotip,$showgroup,$cansearch,$canemail,$canpostnew,$canmove,$canopenclose,$candeletethread,$canreplyown,$canreplyothers,$canviewothers,$caneditpost,$candeletepost,$canusepm,$canpostpoll,$canvote,$canpostattachment,$ismoderator,$canpublicevent,$canpublicedit,$canthreadrate,$cantrackpm,$candenypmreceipts,$maxbuddypm,$maxforwardpm,$canwhosonline,$canwhosonlineip,$cangetattachment)"); 

And change the code I gave above to:

PHP Code:

$permissions=getpermissions();
if (!
$permissions[canplotip]) {
  
show_nopermission();


Then you can select which usergroups can plot ips ;)

Boofo 08-23-2002 11:27 PM

Shouldn't this?:

Code:

makeyesnocode("Can view Plot IP?","canplotip,1");
actaully be this?:

Code:

makeyesnocode("Can view Plot IP?","canplotip",1);

NTLDR 08-23-2002 11:37 PM

It does work both ways actually (which is odd, I done it the way I posted for a hack and it works), although the change you have made would be the correct way to do it ;)

Boofo 08-23-2002 11:40 PM

Thank you. now, is the default set at on for usergroups or off?

NTLDR 08-23-2002 11:42 PM

By default it is off for all usergroups ;)

Boofo 08-23-2002 11:56 PM

You forgot to tell me about this in the usergroups.php.

Code:

makeyesnocode("Can view Plot IP?","canplotip",$usergroup[canplotip]);
and isn't there another spot for an update db query or something?

NTLDR 08-24-2002 12:01 AM

Sorry Boofo, its 2AM here and I'm kinda tired, I forgot those sections from the text file, the other query you need to replace is:

PHP Code:

$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,showgroup=".intval($showgroup).",cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip,cangetattachment=$cangetattachment WHERE usergroupid=$usergroupid"); 

With:

PHP Code:

$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,canplotip=$canplotip,showgroup=".intval($showgroup).",cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip,cangetattachment=$cangetattachment WHERE usergroupid=$usergroupid"); 


Boofo 08-24-2002 12:16 AM

That's ok, I found it and put it in there. :) Thanks for getting me that far though. Are you ready for this? I think I found a way to fix that error everyone keeps getting with the time problem. Since I moved it to the root dir, there are no more error showing up on the page and it comes up a lot faster now. The only thing is, the background of the page is white now instead of the Admin CP default. Any way to add that back in? Or some kind of background, anyway? Also, you said to take out the cpheader and cpfooter lines right? I want to make sure there is no security risk.

Also, when I was talking about the permissions, I meant the permissions to view IPs. It is probably better this way, but can it be made to just follow the View IP addresses permissions?

Boofo 08-24-2002 02:39 AM

Also, does anyone know how to have the IP address show in the getinfo template for the profile?

NTLDR 08-24-2002 07:24 PM

Quote:

Originally posted by Boofo
The only thing is, the background of the page is white now instead of the Admin CP default. Any way to add that back in?
Add some where between <head> and </head> in the HTML:

Code:

<link rel="stylesheet" href="cp.css">
That will use the ACP colours.

Quote:

Also, you said to take out the cpheader and cpfooter lines right? I want to make sure there is no security risk.
If you have the code I mentioned earlier it will work only for those users with have canplotip set to 1.

Quote:

Also, when I was talking about the permissions, I meant the permissions to view IPs. It is probably better this way, but can it be made to just follow the View IP addresses permissions?
Use this code for that:

PHP Code:

$permissions=getpermissions();
if (!
$permissions[canwhosonlineip]) {
  
show_nopermission();




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.01432 seconds
  • Memory Usage 1,875KB
  • 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
  • (5)bbcode_code_printable
  • (12)bbcode_php_printable
  • (11)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
  • (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