Lockdown Hack Version 2.2.0:
-----------------------------
Made for: vBulletin 2.2.0
Originally by: w0rf
Revised by: DaRacne Shaitan (http://share4free.cjb.net)
Description: Allows you to hide IPs and PATHS in certain forums until the user replies.
-----------------------------
INSTRUCTIONS:
-----------------------------
1) Upload ftpdata.php into your admin folder
2) In a browser, go to http://yoursite.com/admin/ftpdata.php.
3) follow instructions bellow (The dashed lines are for organization, DO NOT INCLUDE THEM!)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>> Edit newthread.php >>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Find:
-----------------------------
$DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."','".time()."','$forumid','1','0','".addslashes($postusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$iconid','$visible','$attachcount')");
$threadid=$DB_site->insert_id();
Below that add:
-----------------------------
// IP&PATH-Hack - Add data when not both empty
if (($ip != '') || ($path != '')) {
$DB_site->query("INSERT INTO ftpdata (threadid,ip,path) VALUES('$threadid','".addslashes($ip)."','".addslashes($path)."')");
}
Find:
-----------------------------
if ($bbuserinfo[showvbcode] && $allowvbcodebuttons)
$vbcode_buttons = getcodebuttons();
getforumrules($foruminfo,$permissions);
Below that add:
-----------------------------
// IP&PATH-Hack - Activate only on "selected" forums(2)
if ($forumid!=0) { //0 = All forums
eval("\$ippathform = \"".gettemplate("newthread_ippathform")."\";");
}
else {
$ippathform='';
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>> Edit showthread.php >>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Find:
-----------------------------
$postbits .= getpostbit($post);
Replace it with:
-----------------------------
if ($counter%2==0) {
$post[backcolor]="{firstaltcolor}";
$post[bgclass] = "alt1";
} else {
$post[backcolor]="{secondaltcolor}";
$post[bgclass] = "alt2";
}
// find first new post
if (isset($bbuserinfo[lastvisit])) {
if ($post[dateline]>$bbuserinfo[lastvisit] and $firstnew==0) {
$firstnew=1;
$post[firstnewinsert]="";
} else {
$post[firstnewinsert]="";
}
}
$post[postdate]=vbdate($dateformat,$post[dateline]);
$post[posttime]=vbdate($timeformat,$post[dateline]);
if ($wordwrap!=0) {
$post[title]=dowordwrap($post[title]);
}
if ($post[attachmentid]!=0 and $post[attachmentvisible]) {
$post[attachmentextension]=strtolower(getextension($post[filename]));
if ($post[attachmentextension]=="gif" or $post[attachmentextension]=="jpg" or $post[attachmentextension]=="jpeg" or $post[attachmentextension]=="jpe" or $post[attachmentextension]=="png") {
if (($viewattachedimages) and ($bbuserinfo[userid]==0 or $bbuserinfo[showimages])) {
eval("\$post[attachment] = \"".gettemplate("postbit_attachmentimage")."\";");
} else {
eval("\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
}
} else {
eval("\$post[attachment] = \"".gettemplate("postbit_attachment")."\";");
}
} else {
$post[attachment]="";
}
if ($post[edituserid]!=0) {
if ($post['edituserid']!=$post['userid']) {
$edituser=getuserinfo($post[edituserid]);
} else {
$edituser = $post;
}
$post[edittime]=vbdate($timeformat,$post[editdate]);
$post[editdate]=vbdate($dateformat,$post[editdate]);
eval("\$post[editedby] = \"".gettemplate("postbit_editedby")."\";");
} else {
$post[editedby]="";
}
if ($post[dateline]>$bbuserinfo[lastvisit]) {
$post[foldericon]="";
} else {
$post[foldericon]="
";
}
if (!$forum[allowicons] or $post[iconid]==0) {
if ($showdeficon) {
$post[icon]='
';
}
} else {
/*
unset ($iconwidth);
unset($iconheight);
$imginfo=@getimagesize($post[iconpath]);
if ($imginfo[2]==1 or $imginfo[2]==2) { // We have a .gif or .jpg
$iconwidth = "width=\"$imginfo[0]\"";
$iconheight = "height=\"$imginfo[1]\"";
}
*/
$post[icon]="
";
}
if ($post[userid]!=0) {
if ($showonline) {
unset($onlinestatus);
if ($post[sessionuserid]>0) {
eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");
} else {
eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");
}
}
if ($post[avatarid]!=0) {
$avatarurl=$post[avatarpath];
} else {
if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
} else {
$avatarurl="";
}
}
if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
$post[avatar]="";
} else {
eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
}
if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
$jointime = (time() - $post[joindate]) / 86400; // Days Joined
if ($jointime < 1) { // User has been a member for less than one day.
$postsperday = "$post[posts]";
} else {
$postsperday = sprintf("%.2f",($post[posts] / $jointime));
}
$post[joindate]=vbdate($registereddateformat,$post[joindate]);
if ($post[showemail] and $displayemails) {
eval("\$post[useremail] = \"".gettemplate("postbit_useremail")."\";");
} else {
$post[useremail]="";
}
$userinfo=$post;
if ($post[icq]!="") {
eval("\$post[icqicon] = \"".gettemplate("icq")."\";");
} else {
$post[icq]="";
}
if ($post[aim]!="") {
eval("\$post[aimicon] = \"".gettemplate("aim")."\";");
} else {
$post[aim]="";
}
if ($post[yahoo]!="") {
eval("\$post[yahooicon] = \"".gettemplate("yahoo")."\";");
} else {
$post[yahoo]="";
}
if ($post[homepage]!="" and $post[homepage]!="http://") {
eval("\$post[homepage] = \"".gettemplate("postbit_homepage")."\";");
} else {
$post[homepage]="";
}
if ($post['receivepm'] and $enablepms==1) {
eval("\$post[pmlink] = \"".gettemplate("postbit_sendpm")."\";");
} else {
$post[pmlink] = "";
}
eval("\$post[profile] = \"".gettemplate("postbit_profile")."\";");
eval("\$post[search] = \"".gettemplate("postbit_search")."\";");
eval("\$post[buddy] = \"".gettemplate("postbit_buddy")."\";");
if ($post[showsignature] and $allowsignatures and trim($post[signature])!="" and ($bbuserinfo[userid]==0 or $bbuserinfo[showsignatures])) {
if (!isset($sigcache["$post[userid]"])) {
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
eval("\$post[signature] = \"".gettemplate("postbit_signature")."\";");
$sigcache["$post[userid]"] = $post[signature];
} else {
$post[signature] = $sigcache["$post[userid]"];
}
} else {
$post[signature] = "";
}
} else {
$postsperday=0;
$post[username]=$post[postusername];
$post[usertitle]="Guest";
$post[joindate]="Not Yet";
$post[posts]="N/A";
$post[avatar]="";
$post[profile]="";
$post[email]="";
$post[useremail]="";
$post[icqicon]="";
$post[aimicon]="";
$post[yahooicon]="";
$post[homepage]="";
$post[findposts]="";
$post[signature]="";
$onlinestatus="";
}
// do ip addresses
if ($post[ip]!="") {
if ($logip==2) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
}
if ($logip==1) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
}
if ($logip==0) {
$post[iplogged]="";
}
} else {
$post[iplogged]="";
}
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
//highlight words for search engine
if (isset($highlight)) {
if ((isset($postid) and $postid==$post[postid]) or !isset($postid)) {
reset($replacewords);
while (list($key,$val)=each($replacewords)) {
$post['message']=preg_replace("/(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)/si", "\\1
You need to reply, To see the IP and PATH!!!'; } } } eval("\$postbits .= \"".gettemplate("postbit")."\";"); >>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>> Edit editpost.php>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>> Find: ----------------------------- } if ($bbuserinfo[showvbcode] && $allowvbcodebuttons) $vbcode_buttons = getcodebuttons(); Below that add: ----------------------------- if (($threadinfo[forumid]!=0) && $isfirst) { //0 = All forums $ftpdata=$DB_site->query_first("SELECT ip,path from ftpdata WHERE threadid=$threadid"); $ip=$ftpdata['ip']; $path=$ftpdata['path']; eval("\$ippathform = \"".gettemplate("newthread_ippathform")."\";"); } else { $ippathform=""; } Find: ----------------------------- $DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'"); $DB_site->query("DELETE FROM searchindex WHERE postid=$postid"); indexpost($postid); Below that add: ----------------------------- // IP&PATH-Hack - Update/Add/Delete ip&path Like edited - FIRST post/selected forums(2) ONLY if (($threadinfo[forumid]!=0) && $isfirst) { //0 = All forums if (($ip == '') && ($path == '')) { $DB_site->query("DELETE FROM ftpdata WHERE threadid='$threadid'"); } else { $ftpdata=$DB_site->query_first("SELECT ip,path from ftpdata WHERE threadid=$threadid"); if (($ftpdata['ip'] != '') && ($ftpdata['path'] != '')) { $DB_site->query("UPDATE ftpdata SET ip='".addslashes($ip)."',path='".addslashes($path)."' WHERE threadid='$threadid'"); } else { $DB_site->query("INSERT INTO ftpdata (threadid,ip,path) VALUES('$threadid','".addslashes($ip)."','".addslashes($path)."')"); } } } >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>> Edit /admin/functions.php >>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Find: ----------------------------- $postids.=$post['postid'].","; $attachmentids.=$post['attachmentid'].","; } Below that add: ----------------------------- // IP&PATH-Hack - CLEAN UP when thread is deleted $DB_site->query("DELETE FROM ftpdata WHERE threadid='$threadid'"); >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>> edit editpost Template: >>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Find: ----------------------------- $posticons $vbcode_buttons Below that add: ----------------------------- $ippathform >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>> edit newthread template >>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Find: ----------------------------- $posticons $vbcode_buttons Below that add: ----------------------------- $ippathform >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>> edit postbit template >>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Find: -----------------------------
IP: $ftpdata[ip]
PATH: $ftpdata[path]
$ftpdata[ip]$ftpdata[path]