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
  #52  
Old 08-24-2005, 01:10 PM
laycomp laycomp is offline
 
Join Date: Mar 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Because of large attachment db file we'll first need to take measures in case we run into problems but I'll let you know ...I hope to be able to install some time next week. Thank you.
Reply With Quote
  #53  
Old 08-24-2005, 01:30 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by laycomp
Because of large attachment db file we'll first need to take measures in case we run into problems but I'll let you know ...I hope to be able to install some time next week. Thank you.
Because of...??
Rule #1 of vbulletin is:
ALWAYS make a backup of a database before modifying it.
...No matter how small or large the site is.
.....ALWAYS!!!

As long as you have a backup, reverting to it is simple.
Simple as that.


But I STILL do not recommend attempting this on a live site yet.
At this point, in my estimation, you should be testing with a test site.
This doesn't go for "my hack" ... it goes for vbulletin in general.


If you MUST play with a live site, then I STRONGLY recommend waiting until vbulletin RC3 comes out .... and my subsequent release which will follow it .... so you will be able to read my product's onscreen installation messages!!! Currently this is NOT POSSIBLE but Mike from Jelsoft was kind enough to address this issue and I'll need to see his new fix before I can recode my display messages.
Reply With Quote
  #54  
Old 08-25-2005, 03:56 AM
laycomp laycomp is offline
 
Join Date: Mar 2003
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hehe... you are right about that!

thanks for the "backup" "backup" and "backup" tips

I'd still like to try, this way it'll get me ready for rc3 and your release.

Anyone else trying this? I don't see many comments from you other folks here.
Reply With Quote
  #55  
Old 10-16-2005, 07:47 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work with 3.5 Gold ?
Reply With Quote
  #56  
Old 10-16-2005, 09:38 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Far as I know ... Yes .... but hold off.
I will release next version within the next 7 days.
I promise!!

Here's just a few things you can look forward to
  • Brand new AdminCP Nav Catagory with a few hotlinks.
  • Brand new Admin Search capabilities.
  • Brand new editing /deleting capabilities for each stored download.
  • Shows total stats for your search.
  • Sort by any column (ascending or descending).
  • Pick number of matches to show per page.
  • Go to 1st, previous, next, or last page with one click.
  • Hover userid and fileid numbers to see the stored username and filename.
  • Click download's id number to edit that entry.
  • Checkbox column for mass deleting.
  • Ability to import at your own discretion at any time you wish (not that this is a good thing since it's only meant to be a one time shot).
Take note that ALL of that refers to the admin side.
I don't think I've changed the normal interface (in forum posts).

Far as I can tell ... it all works.
But it still needs tweaking.

And I hate releasing too many "different versions" because unfortunately I usually change way too much inbetween versions ... so people give up on trying to follow my code when I release too many versions .... therefore I'm trying hard to not let that happen to this and/or any other products of mine.


All I can say is I learned a buttload in the last couple months and all of my hacks are in the process of being updated (whodownloaded is top priority for me).
Reply With Quote
  #57  
Old 10-16-2005, 09:44 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool

Thank you and courage
Reply With Quote
  #58  
Old 10-16-2005, 09:50 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Allan,

Can you post the last language pack for this?
I'd really like to see one if that is possible.

I think I've doubled the phrases and I'd like to make it as easy for you folks as I can.
Reply With Quote
  #59  
Old 10-17-2005, 11:33 AM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did not translate the current version (rc2), to speak to you about what version ?, gold ?
Reply With Quote
  #60  
Old 10-18-2005, 07:30 PM
Mr Blunt Mr Blunt is offline
 
Join Date: Jan 2004
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Allan
I did not translate the current version (rc2), to speak to you about what version ?, gold ?
Currently all my phrases are inside my product XML and install with my product.
I only know English, so that's all you will ever get from me.

If you want the next version to "not do this", you have to tell me how you want my files formatted.

Do you want the phrases inside the product AND a seperate language pack?
Do you want them in ONLY a language pack?
Do you want them ONLY in the product XML?

I only asked for a past example because I learn best by examples.

I'm asking because I read a request here at vb.org somewhere (in which Allan posted he wanted to see this happen) that asked authors give a seperate language pack with their products, but it wasn't clear if they should be completely left out of the product.xml file.

If I understand the product system correctly (that means please correct me if I'm wrong), I think I "need" to have my phrases inside the product.xml so they install in the "master language" ... in which case a seperate English language pack would be redundant and even confusing since english forums wouldn't need the file.

Help??
Reply With Quote
  #61  
Old 10-18-2005, 08:20 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ONLY a language pack
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 01:37 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.05350 seconds
  • Memory Usage 2,345KB
  • 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
  • (2)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
  • (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