Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Ad Information (IP Hash, Country, Username) Details »»
Ad Information (IP Hash, Country, Username)
Version: 1.00, by VA6DAH VA6DAH is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.2.x Rating:
Released: 06-06-2014 Last Update: Never Installs: 4
Uses Plugins
Re-useable Code Translations  
No support by the author.

This plugin will look like this, without the callsign field though. I wrote it for my forums (for the most part) and now sharing it with you. It is licensed to you under the standard MIT licence everyone knows and loves (Seriously... Do anything you want with the below. I don't care if you print it out, roll it up with your drug of choice, and smoke it) << - This is a joke

Also while I did make this for my Swap "n" Shop you can modify the code below to make if say just about anything. As for support I will try an help whenever possible.



How to install :
Admincp >> Plugins & Products >> Add New Plugin
  • Product : VBulletin
  • Hook Location : postbit_display_complete
  • Title : Anything that you want
  • Execution Order : 5
  • Plugin PHP Code

You may also want to change:
  • "<site>" to your sites url. (occurs twice in code)
  • "__HASH__" This is the salt for your hash, changing this value will make it much more harder to brute-force the hash. (occurs once in code)

PHP Code:
$show_hashed_ip_forumid = array();/* fill with nothing to enable on all section */     
if (isset($post) && isset($thread) && isset($post['ip']) && isset($thread['forumid'])) {     
    
$show_hashed_ip false;     
    if (array() == 
$show_hashed_ip_forumid) {     
        
$show_hashed_ip true;     
    } else if (
in_array($thread['forumid'], $show_hashed_ip_forumid)) {     
        
$show_hashed_ip true;     
    }     
    if (
$show_hashed_ip) {     
    
  
//do curl call to api for getting country name by ip   
  
$geo_api_url 'http://www.geoplugin.net/php.gp?ip='.$post['ip'];     
  
$ch curl_init();   
  
$timeout 5;   
  
curl_setopt($chCURLOPT_URL$geo_api_url);   
  
curl_setopt($chCURLOPT_USERAGENT"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");   
  
curl_setopt($chCURLOPT_RETURNTRANSFER1);   
  
curl_setopt($chCURLOPT_SSL_VERIFYHOST,false);   
  
curl_setopt($chCURLOPT_SSL_VERIFYPEER,false);   
  
curl_setopt($chCURLOPT_MAXREDIRS10);   
  
curl_setopt($chCURLOPT_FOLLOWLOCATION1);   
  
curl_setopt($chCURLOPT_CONNECTTIMEOUT$timeout);   
  
$data curl_exec($ch);   
  
curl_close($ch);   
    
  
$geo_code unserialize($data);     
  
$country $geo_code['geoplugin_countryName'];     
    
        
$post['message'] .= '   
<div style="margin-top: 25px;     
border: 1px solid green;     
padding: 8px;line-height: 20px;   
font-size: 11px;">   
    
<strong>This ad was posted by:</strong>  '
.$post['username'].'     
<strong>Country:</strong> '
.$country.'   
<strong>IP Hash:</strong> '
.md5(__HASH__.':'.$post['ip']).' <br />   
    
To inquire about this listing, please contact the seller directly as specified in the ad. <br />   
If no email address or phone was given, <a href="http://<site>/forums/member.php?'
.$post['userid'].'-'.$post['username'].'">click HERE to send '.$post['username'].' a private message</a>. <br />   
    
<site> assumes no responsibility for the accuracy of this listing</div>   
    
'
;     
    }     



Note : to enable it only on some subforums, replace this
PHP Code:
$show_hashed_ip_forumid = array();/* fill with nothing to enable on all section */ 
With this (for example sub forum ids are 5, 6, 10)
PHP Code:
$show_hashed_ip_forumid = array(5610);/* fill with nothing to enable on all sec 

Supporters / CoAuthors

    Show Your Support

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


    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 08:21 PM.


    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.03936 seconds
    • Memory Usage 2,232KB
    • Queries Executed 16 (?)
    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
    • (3)bbcode_php
    • (1)footer
    • (1)forumjump
    • (1)forumrules
    • (1)gobutton
    • (1)header
    • (1)headinclude
    • (1)modsystem_post
    • (1)navbar
    • (4)navbar_link
    • (120)option
    • (1)post_thanks_box
    • (1)post_thanks_button
    • (1)post_thanks_javascript
    • (1)post_thanks_navbar_search
    • (1)post_thanks_postbit_info
    • (1)postbit_onlinestatus
    • (1)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_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
    • tag_fetchbit_complete
    • forumrules
    • navbits
    • navbits_complete
    • showthread_complete