[REQ] Simple WhatIsMyIP Page

There You Go Enjoy Dude
This is a simple WhatIsMyIP page.

Installation (2.0):
  1. Upload the attached "whatismyip.php" to your root forum folder (where index.php).
  2. Create a new template, called WHATISMYIP, and put this content:
    Code:
    $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>
  3. Upload "admincp/whatismyip.php" to "admincp/whatismyip.php".
  4. Upload the "ipinstall.php" to you forum's root directory (where index.php), and run it.
  5. Open: includes/xml/cpnav_vbulletin.xml.
  6. Find:
    Code:
      <navoption displayorder="10">
       <phrase>vbulletin_options</phrase>
       <link>options.php?null=0</link>
      </navoption>
  7. Add Below:
    Code:
      <navoption displayorder="10">
       <text>WhatIsMyIP Page</text>
       <link>whatismyip.php</link>
      </navoption>
  8. Edit the setting at the AdminCP (Category: vBulletin Options, Entry: WhatIsMyIP Page).
  9. 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
 
"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"
from vbulletin.org
 
try inserting them in the database by hand.. goto phpmyadmin and create this manualy

$db->query("CREATE TABLE `whatismyip` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ebabled` INT NOT NULL ,
`ipinfo` LONGTEXT NOT NULL
);");
$db->query("INSERT INTO `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.
 
Back
Top