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

Reply
 
Thread Tools
Whodownloaded_IP with Dates Details »»
Whodownloaded_IP with Dates
Version: 1.2.0, by Mr Blunt Mr Blunt is offline
Developer Last Online: Sep 2006 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 07-28-2005 Last Update: 12-11-2005 Installs: 49
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Welcome to Mr Blunt's "Whodownloaded_IP" Series for vBulletin 3.5.2


This is FREE CODE AND CAN BE used, abused, and released as desired!!
I only ask it REMAIN FREE - unless maybe you compensate me as well??
If any code looks familiar, I'm sorry and ASSURE YOU it's coincidence!!

Paypal Donations are graciously accepted if you like this script.
I'm just a broke amateur who enjoys writing free stuff (for now).
Donations goto my - Help Rebuild My PC Fund.
But the script is free if your broke too ... So enjoy it either way!!


mr_blunt@sbcglobal.net

Please email me for comments, questions, or anything else on your mind.
Put the exact word "Whodownloaded" in subject to get by my spam filters!
My nick "Mr Blunt" is also at www.vbulletin.org & www.vbulletin.com
Support thread: https://vborg.vbsupport.ru/showthread.php?t=93167


IMPORTANT KEY NOTES:
This script REQUIRES vBulletin 3.5.0 or above and was tested with vb 3.5.2
Failure to upload all files to server WILL PRODUCE DATABASE ERRORS.
Install "Product" file as a "PRODUCT" ... not as a "PLUGIN" or "STYLE".


Features of Whodownloaded_IP:
  1. Log fileid & userid for EVERY download.
  2. Optionally log date, username, filename for easy tracing after deletions.
  3. Optionally log IP's and ALT_IP's (ALT_IP could be the IP behind a proxy).
  4. File deletions won't delete OUR info, so admins can still backtrack.
  5. Customizable width of popup so admins & members get different sizes.
  6. Customizable viewing permissions for the popup.
  7. Customizable phrases for non english forums.
  8. The button to open popup is easy to add to templates.
  9. Click any name in the popup to view user's profile.
  10. Click file date in the popup to view the post where the file is located.
  11. Hover the paperclip by dates to get downloads id# for easy referencing.
  12. Template edits are "additions", not "modifications", so no conflictions.
  13. Powered by one 3rd party database table, a few vBulletin addon fields.
  14. Admins can now search database by any criteria (partial terms are OK).
Whodownloaded (PRE-IP-v100) Uninstallation Procedures
JUST IN CASE YOU HAVE ANY OF MY OLD vb3.0.x VERSIONS:
Uninstall any "NON-IP" version before installing this.
vBulletin PHP FILE: attachment.php -- (307 versions edited this)
3rd Party PHP FILE: whodownloaded.php
vBulletin TEMPLATE: postbit_attachment
vBulletin TEMPLATE: headinclude
3rd Party TEMPLATE: whodownloads
3rd Party TEMPLATE: whodownloadsbit
3rd Party TEMPLATE: whodownloads_error
3rd Party TEMPLATE: whodownloads_error_nop
vBulletin DATABASE TABLE: user
3rd Party DATABASE FIELD: user.downloads
  1. Revert my old code out of "postbit_attachment" template.
  2. Revert my old code out of "headinclude" template (if still there).
  3. Revert all other templates listed (that deletes them).
  4. Delete the whodownloaded.php file.
  5. vB350 gave a new attachment.php so forget about that old file, forever.
  6. DO NOT DELETE OLD "downloads" FIELD UNTIL WE TRANSFER DATA TO NEW TABLE!
  7. DO NOT DELETE OLD "downloads" FIELD UNLESS NO OTHER HACKS ARE USING IT!!
  8. NEVER DELETE VBULLETIN'S "USER" TABLE ... NEVER EVER!!!!!!!!
Whodownloaded_IP Installation/Upgrade Procedures:
  1. For non-English forums - EDIT product phrases in the Product XML.
  2. UPLOAD & Overwrite all files from the UPLOAD folder to your server.
  3. IMPORT 'product_blunts_whodl_ip.xml' and select "Allow Overwrite".
  4. MERGE 'style_blunts_whodl_ip.xml' over your styles (ignore version).
  5. SET controls in AdminCP 'Usergroup Permissions'.
  6. SET controls in AdminCP 'vBulletin Options'.
  7. DONE ... Hope You Enjoy It!!!
NOTE: If you have other hacks that edit a same STYLE TEMPLATE, then SKIP STEP #4 AND manually edit templates as listed further down.

Test it and come back to the file's vbulletin.org forum support thread and CLICK INSTALL so I can alert you when this hack gets important updates. NO, I DO NOT SPAM!!! Alerts will only be sent AFTER major changes!!


Whodownloaded_IP Uninstallation Procedures:
  1. Revert (or remove code from) any templates which you added button to.
  2. Delete file 'includes/xml/bitfield_blunts_whodl_ip.xml' from server.
  3. Delete file 'includes/xml/cpnav_blunts_whodl_ip.xml' from server.
  4. Delete PRODUCT 'Whodownloaded_IP' from AdminCP Products.
  5. Read Screen & Click button if you want to delete data table (optional).
  6. Delete file 'blunts_whodownloaded_ip.php' from server.
  7. Delete file 'admincp/bitfield_blunts_whodl_ip.xml' from server.
  8. Delete file '/images/attach/blunts_whodl_vertical.bmp' from server.
  9. Done ... Thank You For Checking It Out!!!
Do NOT uninstall prior versions before v120 is installed.
And the order of steps is important, so please be careful.


Whodownloaded_IP Files To Upload:
  1. /blunts_whodownloaded_ip.php
  2. /admincp/admin_blunts_whodl_ip.php
  3. /images/attach/blunts_whodl_vertical.bmp
  4. /includes/xml/bitfield_blunts_whodl_ip.xml
  5. /includes/xml/cpnav_blunts_whodl_ip.xml
Whodownloaded_IP Product File Contents:
File Name: product_blunts_whodl_ip.xml
Product ID: blunts_whodl_ip
Title: Whodownloaded_IP
Version: 1.2.0

3rd Party PLUGIN: Whodownloaded IP - Enable Bitfields
3rd Party PLUGIN: Whodownloaded IP - Enable Viewing
3rd Party PLUGIN: Whodownloaded IP - Enable Logging
3rd Party MASTER PHRASES: 65 Phrases with 'blunts_whodl_' prefix
3rd Party MASTER TEMPLATE: blunts_whodownloaded_ip_main
3rd Party MASTER TEMPLATE: blunts_whodownloaded_ip_namebit
3rd Party MASTER TEMPLATE: blunts_whodownloaded_ip_datebit
3rd Party DATABASE TABLE: blunts_whodownloaded_ip
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.whodownloaded_ipid
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.userid
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.username
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.filename
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.fileid
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.ipaddress
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.alt_ip
3rd Party DATABASE FIELD: blunts_whodownloaded_ip.dateline
3rd Party DATABASE FIELD: usergroup.bluntswhodlpermissions
3rd Party DATABASE FIELD: settinggroup.blunts_whodl
3rd Party DATABASE FIELD: settings.blunts_whodl_popisactive
3rd Party DATABASE FIELD: settings.blunts_whodl_poplarge
3rd Party DATABASE FIELD: settings.blunts_whodl_popsmall
3rd Party DATABASE FIELD: settings.blunts_whodl_logwhat


Whodownloaded_IP Style File Contents:
File Name: style_blunts_whodl_ip.xml
OVERWRITES these 4 standard vBulletin templates:

vBulletin Template: modifyattachmentsbit (November 1st, 2005)
vBulletin Template: postbit_attachment (Aug 20th, 2005)
vBulletin Template: postbit_attachmentmoderated (Aug 20th, 2005)
vBulletin Template: postbit_attachmentthumbnail (Aug 20th, 2005)

Use these manual template edit instructions if you use other hacks!!

Template: modifyattachmentsbit
FIND THIS:
Code:
<div class="smallfont">$post[postdate] <if condition="!$show['detailedtime']"><span class="time">$post[posttime]</span></if></div>
ADD THIS BELOW IT:
Code:
<if condition="$show['blunts_whodl_width']"><div class="smallfont"><input type="button" class="button" value="$vbphrase[blunts_whodl_who_downloaded]" tabindex="1" onclick="window.open('blunts_whodownloaded_ip.php?$session[sessionurl]fid=$post[attachmentid]','blunts_whodownloaded_ip','toolbar=no, scrollbars=yes, resizable=yes, width=$show[blunts_whodl_width], height=450, top=50, left=50'); return false;" title="$vbphrase[blunts_whodl_who_downloaded]: $post[attachmentid]" /></div></if>
Template: postbit_attachment
Template: postbit_attachmentmoderated
FIND THE LAST:
Code:
</tr>
ADD THIS BEFORE IT:
Code:
<td><if condition="$show['blunts_whodl_width']"><input type="button" class="button" value="$vbphrase[blunts_whodl_who_downloaded]" tabindex="1" onclick="window.open('blunts_whodownloaded_ip.php?$session[sessionurl]fid=$attachment[attachmentid]','blunts_whodownloaded_ip','toolbar=no, scrollbars=yes, resizable=yes, width=$show[blunts_whodl_width], height=450, top=50, left=50'); return false;" title="$vbphrase[blunts_whodl_who_downloaded]: $attachment[attachmentid]" /></if></td>
Template: postbit_attachmentthumbnail
FIND THE LAST:
Code:
&nbsp;<if condition="$show['br']"><br /><br /></if>
ADD THIS BEFORE IT:
Code:
<if condition="$show['blunts_whodl_width']">
	<if condition="is_browser('ie', '5.5')">
		<input type="button" class="button" value="$vbphrase[blunts_whodl_who_downloaded]" tabindex="1" onclick="window.open('blunts_whodownloaded_ip.php?$session[sessionurl]fid=$attachment[attachmentid]','blunts_whodownloaded_ip','toolbar=no, scrollbars=yes, resizable=yes, width=$show[blunts_whodl_width], height=450, top=50, left=50'); return false;" title="$vbphrase[blunts_whodl_who_downloaded]: $attachment[attachmentid]" style="writing-mode:tb-rl" />
	<else />
		<a href="blunts_whodownloaded_ip.php?$session[sessionurl]fid=$attachment[attachmentid]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="button" src="$stylevar[imgdir_attach]/blunts_whodl_vertical.bmp" alt="$vbphrase[blunts_whodl_who_downloaded]" border="1" title="$vbphrase[blunts_whodl_who_downloaded]: $attachment[attachmentid]" /></a>
	</if>
</if>
Version History:

v-1.0.0 - July 29th, 2005:
  1. Initial vb350 release which adds ip & date logging to old vb3 hack.
v-1.0.5 - August 9th, 2005:
  1. Prevent logging of non-thumbnail image views (images loaded by showthread).
  2. Use escape_string to clean dB insertion variables during dB writes.
  3. Moved names above users date/IP list.
  4. Added paperclip hover target to show id# of the logged download.
  5. Added phrase 'blunts_whodl_download_id' for use in hover paperclip.
  6. Added vertical button BMP FILE for non-IE users (next to thumbs).
  7. Added vertical button WITH CODE for IE users (next to thumbs).
  8. Tweaked the popup's gui layout to give some nice borders.
  9. Cut the dB reading down to 2 queries.
  10. Began building up the 2 queries & other things for future search features.
  11. Set the php environment & pre-cache templates.
  12. URL input (was attachment=X) is now fid=X (fid is attachmentid or fileid).
v-1.0.7 - August 20th, 2005:
  1. Added the time of download to any dates shown.
  2. Added 'bitfield_blunts_whodl_ip.xml' (upload to 'INCLUDES/XML' folder).
  3. Added 'bluntswhodlpermissions' field to vB's 'usergroup' table.
  4. Added 5 Custom Usergroup Permissions to AdminCP (and phrases for them).
  5. Added 10 Custom vBulletin Options to AdminCP (and phrases for them).
  6. Added comments to the installation process to be echoed back to user.
  7. Added code to seek/transfer data from old whodownloaded hacks to new table.
  8. Repaired the integer fields in our dB table to be INT(10) and UNSIGNED.
  9. Modified the internal product templates again (they install themselves).
  10. Modified STYLE file again (you can keep using v105's if you want to).
  11. Changed all but one global phrase to be in my own 'phrase group'.
  12. Shuffled some things around in the PHP script.
  13. Renamed style and product files to conform with the other underscores.
v-1.1.0 - November 1st, 2005:
  1. Tweaked all of the "product codes" for (hopefully) the final time.
  2. Added a new AdminCP Nav Group (left column) with hotlinks to key features.
  3. Added a search engine for admins who have permission to control plugins.
  4. Added ability for admins to manually edit/delete entries from database.
  5. Importing & Deletion of old 3.0.x data can optionally be done at any time.
  6. Deletion of main database table is now optional during uninstallation.
  7. Found another template that can use a button (modifyattachmentsbit).
v-1.2.0 - December 12th, 2005:
  1. MANDATORY FIX to correct issues which made 1.1.0 incompatible with vb351+ .... I strongly recommend updating this product before upgrading to vb351 or vb352, if you haven't yet.
  2. Moved a lot of the install code from the product file to the admin file.
  3. Condensed the rest of the install/uninstall code.
  4. Changed the format of all files from Windows to UNIX.
  5. Updated all the screenshots (zip file has 11 pics so are not shown).
  6. Removed the Beta Tag from the product.
To Do and/or Wish List:
  1. I'm still looking for someone to help me add better language support.
Known Bug List:
  1. Installation messages are english only since code installs before phrases.
  2. Non-IE5.5 shows horizontal href text next to thumbs IF THE BMP isn't found ... which looks REALLY dumb ... so make sure you upload the BMP to the proper folder on your server!!
Credits:
  1. Mostly Jelsoft for their dedication and "easy to read & modify" code!!
  2. vbulletin.com, vbulletin.org, & php.com for their excellent resources!!
  3. The MEMBERS and MODS who MAKE these forums great resources!!
  4. Special SHOUT to MarcoH64 and Andreas for help when I needed it.
  5. AND OF COURSE TWTCommish for his original v2 whodownloaded hack!!

mr_blunt@sbcglobal.net

Supporters / CoAuthors

Show Your Support

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

Comments
  #112  
Old 02-14-2006, 09:26 PM
nanaimobar nanaimobar is offline
 
Join Date: Nov 2005
Location: Canada
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everything installed easily except when clicking on Quick Search Engine in Admin panel a 404 error occurs. I checked forum url in options panel, was ok, then changed url to main site to see if that made any difference. Didn't. Still get 404 error with main web site address for "Return to site". Database has no errors, and no errors reported by vbulletin.
Suggestions?
Reply With Quote
  #113  
Old 02-15-2006, 09:50 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nanaimobar,

Sounds like you didn't upload all the files that came inside my "upload" folder to your server.

Or that you maybe didn't upload them all to the correct folders.

Or that you did upload them, but maybe your normal "admincp" is not named that, in which case you need to put the contents of that folder (the file named admin_blunts_whodl_ip.php) in whatever that renamed admin folder is.
.
Reply With Quote
  #114  
Old 02-17-2006, 10:27 PM
nanaimobar nanaimobar is offline
 
Join Date: Nov 2005
Location: Canada
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Mr. Blunt,

I had renamed my admincp folder (I've fined myself 5 dollars for making such a simple mistake as not connecting the dots, so to speak) so I moved your file to the correct folder on my server and....
now I get an error code, which doesn't all paste into here for some reason, that begins with "SCU$" and follows with a dozen or more letters and squiggles that make no sense to me.

All other files are in their correct place as everything else appears in the admin section of vbulletin, and seems to work.

I shall spend this weekend fiddling about and see if I can get this too work and report back.
Reply With Quote
  #115  
Old 03-02-2006, 10:55 AM
The Realist's Avatar
The Realist The Realist is offline
 
Join Date: Oct 2001
Location: UK
Posts: 842
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working 100% on VB 3.5.4.

Nice hack indeed and glad I found it now.

Well done.
Reply With Quote
  #116  
Old 03-07-2006, 02:44 AM
Replicators's Avatar
Replicators Replicators is offline
 
Join Date: Jul 2005
Location: Jamestown, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Everything seems to installed 100% correctly as in no errors at all!!

But nothing works, i get all the options and stuff in the acp, i have it set to on, usergroups are set, but when i go to forum there is no "Who Downloaded" thing anywhere. I looked in the usercp and nothing. The template edits are there, but it seems the forum is ignoring this mod for some reason and i don't know why.
Reply With Quote
  #117  
Old 03-12-2006, 03:23 AM
berayiwu5 berayiwu5 is offline
 
Join Date: Feb 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for coming up with this hack. But for some reason, "Who Downloaded" doesn't appear beside attachments. Nor does it show up in the Attachments section in my User CP under "Date." I have vBulletin 3.5.4.

Your help is greatly appreciated.

Actually, I don't quite understand step 4 of the installation: "MERGE 'style_blunts_whodl_ip.xml' over your styles (ignore version)." I just imported it using Add/Import from the Product Manager. Does it have something to do with it?
Reply With Quote
  #118  
Old 03-13-2006, 06:23 AM
Replicators's Avatar
Replicators Replicators is offline
 
Join Date: Jul 2005
Location: Jamestown, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just figured out my problem.

@berayiwu5
You probably have the plugin accelerator installed right? Well rebuild your plugins and it should work fine >8)
Reply With Quote
  #119  
Old 03-13-2006, 01:41 PM
berayiwu5 berayiwu5 is offline
 
Join Date: Feb 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicators
I just figured out my problem.

@berayiwu5
You probably have the plugin accelerator installed right? Well rebuild your plugins and it should work fine >8)
Thanks for your suggestion. No, I haven't installed the plugin accelerator. Is it safe? I can't afford to mess up the database. I only know how to follow instructions. I don't know anything about coding.
Reply With Quote
  #120  
Old 03-15-2006, 02:12 AM
berayiwu5 berayiwu5 is offline
 
Join Date: Feb 2006
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK. I finally got it working. It's an omission on my part. Thanks. Great hack.
Reply With Quote
  #121  
Old 04-11-2006, 02:57 PM
MaLTRaiN MaLTRaiN is offline
 
Join Date: Feb 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excuse me... is this retroactive? Thanks..!!!
Reply With Quote
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 02:15 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.04976 seconds
  • Memory Usage 2,340KB
  • Queries Executed 26 (?)
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
  • (6)bbcode_code
  • (1)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete