PDA

View Full Version : Mini Mods - [Naxon] Simple WhatIsMyIP Page


Naxon
08-27-2007, 10:00 PM
This is a simple WhatIsMyIP page.

Installation (2.0):

Upload the attached "whatismyip.php" to your root forum folder (where index.php).
Create a new template, called WHATISMYIP, and put this content:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
$headinclude
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header
$navbar
<!-- Start Main Script -->
<if condition="$naxon[ipenabled] == '1'">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat">
WhatIsMyIP
</td>
</tr>
<tr>
<td class="thead">
Your IP Address
</td>
</tr>
<tr>
<td class="alt1" align="center" valign="middle">
<b><h1>Your IP Is <font color="orange">$naxon[ip]</font></h1></b>
</td>
</tr>
<tr>
<td class="thead">
Information About IP
</td>
</tr>
<tr>
<td class="alt1">
$naxon[ipinfo]
</td>
</tr>
</table>
<else />
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat">
WhatIsMyIP
</td>
</tr>
<tr>
<td class="alt1">
The Administrator has turned off the WhatIsMyIP Page.
</td>
</tr>
</table>
</if>
<br /><br />
<div class="smallfont" align="center">
$naxon[ip_rights]
</div>
<!-- End Main Script -->
$footer
</body>
</html>

Upload "admincp/whatismyip.php" to "admincp/whatismyip.php".
Upload the "ipinstall.php" to you forum's root directory (where index.php), and run it.
Open: includes/xml/cpnav_vbulletin.xml.
Find:

<navoption displayorder="10">
<phrase>vbulletin_options</phrase>
<link>options.php?null=0</link>
</navoption>

Add Below:

<navoption displayorder="10">
<text>WhatIsMyIP Page</text>
<link>whatismyip.php</link>
</navoption>

Edit the setting at the AdminCP (Category: vBulletin Options, Entry: WhatIsMyIP Page).
Have Fun :)Versions:
1.0: Released.
1.1: Added a NavBit.
2.0: Added AdminCP Nav, Control from the AdminCP (enable \ disable, IPInfo Text).
2.1 (Current): Fixed installer (ipinstall.php).

This is a very simple "mod", but usefull ;) .
I tookthe information about the IP from Wikipedia, so change it ;)

Naxon
08-28-2007, 04:11 PM
Version 2.1 Released:
Fixed installer (ipinstall.php).

DieselMinded
08-28-2007, 05:03 PM
Demo?

wizardan
08-28-2007, 06:54 PM
Demo?
I'll second that:)

johnrizz
08-28-2007, 09:40 PM
simple... Thanks! **installed**

Naxon
08-28-2007, 10:22 PM
Thank's, I uploaded a screenshot, sorry for the quality ^^"
Thank's to Stone0075 for the 2nd screenshot, better quality :)

nir
08-28-2007, 11:19 PM
Thanks

Naxon
08-29-2007, 12:58 AM
Thanks
Please put my copyrights back !! :mad:

FreshFroot
08-29-2007, 01:19 AM
and the point of this hack is...?

Really Naxon, so far your hacks have been alrighty, though I REALLY urge that if you want to make a HUGE impact. Go back with the SEO hack you were making, because I think it will have the best impact and results. Also, it's a hack that I think will be most wanted if you can create it.

Naxon
08-29-2007, 01:28 AM
I don't have a time for my SEO hack right now.
I'm finishing my university project in a few days, and than I'll continue my SEO hack...

Hornstar
08-29-2007, 08:13 AM
Thanks, I will look out for version 2 which will have more features :)

gforce75
08-29-2007, 09:10 AM
Thanks.

Naxon
08-30-2007, 05:03 PM
Any ideas for the next version?

Naxon
08-30-2007, 10:57 PM
Updated: From: 1.0. To: 1.1.
Added a NavBit.

Naxon
08-31-2007, 10:56 AM
Version 2.0 Released:
Added AdminCP Nav, Control from the AdminCP (enable \ disable, IPInfo Text).

Twisted Chaos
09-04-2007, 02:13 AM
hey do you mind if i modify this add-on alot???

I have vast experience in vBulletin Products and I think this could be expanded alot to fit everyones needs...

Settings within the actual admincp would include...

- IP Display Syntax
-- Color, Font, Size, Bold, Italic, Underlined, Strike-through (Basically ALL regular options for displaying text on a page)

- Slight Template Modifications

- Page Viewing Options (Display in Who's Online Page.. Etc..)

- My IP in postbit Add-On
(User will see their IP only visible to them only in their own postbits, wont even show to anyone but them... so user will see "My IP: x.x.x.x" in post bit but wont see anything about IP's in other users...)

Example: If i were Naxon I would see

Naxon
Administrator

Join Date: Jan. 1, 2000
Posts: 26
My IP: x.x.x.x

------------------------------------------------------------

SilverSkull
Member

Join Date: Jan. 2, 2000
Posts: 300000000

and If i were SilverSkull i would see

Naxon
Administrator

Join Date: Jan. 1, 2000
Posts: 26

------------------------------------------------------------

SilverSkull
Member

Join Date: Jan. 2, 2000
Posts: 300000000
My IP: x.x.x.x

I have alot more suggestions but this is just an example.
Permission to edit this hack and place Naxon as Originator requested.

ruger
09-04-2007, 07:07 AM
Running 3.6.8 and had problems with the ipinstall.php file giving errors. Never had any problems on other progs like this. Deleted all.

Naxon
09-05-2007, 03:57 PM
What is the problem?

Cornie
09-06-2007, 06:42 PM
the problem is


Invalid SQL:
INSERT INTO `vbulletin`.`whatismyip` (
`id` ,
`enabled` ,
`ipinfo`
)
VALUES (
'1', '1', 'An IP address (Internet Protocol address) is a unique address that certain electronic devices use in order to identify and communicate with each other on a computer network utilizing the Internet Protocol standard (IP)—in simpler terms, a computer address. Any participating network device—including routers, computers, time-servers, printers, Internet fax machines, and some telephones—can have their own unique address.
<br />
<br />
From WikiPedia ?'
);;

MySQL-Fehler : Table 'vbulletin.whatismyip' doesn't exist
Fehler-Nr. : 1146
Datum : Thursday, September 6th 2007 @ 09:38:59 PM
Skript : http://www................/forum/ipinstall.php
Referrer :
IP-Adresse : 84.191.56.117
Benutzername : Cornie
Klassenname : vb_database

ruger
09-06-2007, 11:49 PM
Same thing here.

Naxon
09-09-2007, 12:59 PM
I'll check that soon...

yoyoyoyo
09-10-2007, 01:24 AM
Same thing here.
yep- same problem here:

Database error in vBulletin 3.6.8:

Invalid SQL:
INSERT INTO `vbulletin`.`whatismyip` (
`id` ,
`enabled` ,
`ipinfo`
)
VALUES (
'1', '1', 'An IP address (Internet Protocol address) is a unique address that certain electronic devices use in order to identify and communicate with each other on a computer network utilizing the Internet Protocol standard (IP)?in simpler terms, a computer address. Any participating network device?including routers, computers, time-servers, printers, Internet fax machines, and some telephones?can have their own unique address.
<br />
<br />
From WikiPedia ?'
);;

MySQL Error : INSERT command denied to user 'user_database'@'localhost' for table 'whatismyip'
Error Number : 1142
Date : Sunday, September 9th 2007 @ 09:19:17 PM
Script : http://mysite.com/forum/ipinstall.php
Referrer :
IP Address : 19.70.983.047
Username : Bozo
Classname : vb_database

Naxon
09-13-2007, 12:38 AM
^ Will be fixed soon.

Naxon
09-19-2007, 12:45 PM
ipinstall.php Fixed !!

yoyoyoyo
09-19-2007, 12:50 PM
ipinstall.php Fixed !!cool - I'll give it a try and let you know.

yoyoyoyo
09-19-2007, 01:09 PM
Database error in vBulletin 3.6.8:

Invalid SQL:
UPDATE `whatismyip` SET `enabled`='1', `ipinfo`='' WHERE `id`='1';

MySQL Error : Unknown column 'enabled' in 'field list'
Error Number : 1054
Date : Wednesday, September 19th 2007 @ 08:53:01 AM
Script : http://mysite.com/forum/admincpx/whatismyip.php?do=update
Referrer : http://mysite.com/forum/admincpx/whatismyip.php
IP Address : XX.XX.XXX.XXX
Username : Administrator
Classname : vb_databaseI tried running the install.php, hoping that would take care of this, but I received this error:

Database error in vBulletin 3.6.8:

Invalid SQL:
CREATE TABLE `whatismyip` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ebabled` INT NOT NULL ,
`ipinfo` LONGTEXT NOT NULL
);;

MySQL Error : Table 'whatismyip' already exists
Error Number : 1050
Date : Wednesday, September 19th 2007 @ 08:56:28 AM
Script : http://mysite.com/forum/ipinstall.php
Referrer :
IP Address : XX.XX.XXX.XXX
Username : Administrator
Classname : vb_databaseI went to my ACP and ran the SQL query: DROP TABLE `whatismyip` and tried to run the install script again and received this error:

MySQL Error : Unknown column 'enabled' in 'field list'
Error Number : 1054
Date : Wednesday, September 19th 2007 @ 09:01:44 AM
Script : http://mysite.com/forum/ipinstall.php
Referrer :
IP Address : XX.XX.XXX.XXX
Username : Administrator
Classname : vb_databaseBTW - IMO, if you are going to let people rely on an installer script, I suggest having an "uninstall" option as well.

ragtek
09-19-2007, 01:32 PM
1. for what you need a own database for these values? put them into the vb settings(but i think they aren't necessery)
the one thing is a phrase, the enable part could be with vb settings
2. why you don't get the template per globaltemplates? $globaltemplates = array(
// 'WHATISMYIP',
);
its commentet out??

Naxon
09-19-2007, 07:12 PM
I tried running the install.php, hoping that would take care of this, but I received this error:

I went to my ACP and ran the SQL query: DROP TABLE `whatismyip` and tried to run the install script again and received this error:

BTW - IMO, if you are going to let people rely on an installer script, I suggest having an "uninstall" option as well.
I can't understand why it isn't working... for me it works perefectly...
I'll check this out...

ragtek
09-19-2007, 07:25 PM
because this puts the table_prefix befor the name!
and you aren't using the table_prefixes, so the script can't find the table