Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
[Naxon] Simple WhatIsMyIP Page Details »»
[Naxon] Simple WhatIsMyIP Page
Version: 2.1, by Naxon Naxon is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 08-27-2007 Last Update: 09-18-2007 Installs: 17
DB Changes Template Edits
Code Changes Additional Files  
No support by the author.

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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 09-09-2007, 12:59 PM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll check that soon...
Reply With Quote
  #23  
Old 09-10-2007, 01:24 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ruger View Post
Same thing here.
yep- same problem here:

Code:
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
Reply With Quote
  #24  
Old 09-13-2007, 12:38 AM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ Will be fixed soon.
Reply With Quote
  #25  
Old 09-19-2007, 12:45 PM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ipinstall.php Fixed !!
Reply With Quote
  #26  
Old 09-19-2007, 12:50 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Naxon View Post
ipinstall.php Fixed !!
cool - I'll give it a try and let you know.
Reply With Quote
  #27  
Old 09-19-2007, 01:09 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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_database
I tried running the install.php, hoping that would take care of this, but I received this error:

Quote:
Database error in vBulletin 3.6.8:

Quote:
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_database
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:

Quote:
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_database
BTW - IMO, if you are going to let people rely on an installer script, I suggest having an "uninstall" option as well.
Reply With Quote
  #28  
Old 09-19-2007, 01:32 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
PHP Code:
$globaltemplates = array(
    
// 'WHATISMYIP',
); 
its commentet out??
Reply With Quote
  #29  
Old 09-19-2007, 07:12 PM
Naxon Naxon is offline
 
Join Date: Oct 2006
Location: Israel
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo View Post
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...
Reply With Quote
  #30  
Old 09-19-2007, 07:25 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04975 seconds
  • Memory Usage 2,306KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_php
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete