The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Whodownloaded_IP with Dates Details »» | |||||||||||||||||||||||||
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:
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
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:
And the order of steps is important, so please be careful. Whodownloaded_IP Files To Upload:
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> 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_attachmentmoderated FIND THE LAST: Code:
</tr> 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> FIND THE LAST: Code:
<if condition="$show['br']"><br /><br /></if> 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> v-1.0.0 - July 29th, 2005:
mr_blunt@sbcglobal.net Supporters / CoAuthors Show Your Support
|
Comments |
#2
|
||||
|
||||
Any way to have the button only show for certain usergroups? Maybe a setting?
|
#3
|
|||
|
|||
#5 in my to-do list
In the meantime, the plugin is easy to edit. Might LOOK tough, but it's not. Edit the Product XML file before installation (or edit the plugin itself after, whichever). Add something like this in the VIEWING plugin somewhere: PHP Code:
Only thing you have to be careful about is nesting the IF'S. With my one big nest, the first condition that succeeds will exit the "nest". And you don't need to use my "one nest" either. You can have a seperate conditional at the bottom!! Example you could add a conditional at the end and if that condition is met it will override any previous condition which might/might not have been met. If that didn't make sense, say so. |
#4
|
|||
|
|||
Wow, great release!
By the look of the screens it looks like you've done a great job on the d/l stats, congratulations man! ...I think this calls for "beers on the house!" Thanks MrBlunt, I look forward to installing this soon ...thanks again and I will report back. |
#5
|
|||
|
|||
I'm too much of a perfectionist so I'm still not happy with my work yet.
I really don't like having the usernames underneath the dates. Just doesn't look right at all IMHO. But that's just cosmetic stuff that hopefully I'll conquer soon. Here's my dilema with that if anyone can help: One username with his count next to it, but many dates so I can't eval the username beforehand because I don't know if his individual count is complete until I check next row's username. I understand how to build seperate evals but I couldn't figure out how to join them correctly after that user is complete. If I could merge two different evals from within php, then I would create 3 eval vars ... one for name, one for dates, and the third merges the two together and unset the first two after it verifies this is the "next user" .... so that we can start processing on the next name from the long list. |
#6
|
|||
|
|||
Great Job Mr. Blunt
Many thanks for this great hack. |
#7
|
|||
|
|||
The downloads were correctly logged in vb3_blunts_whodownloaded_ip
But when I click on the "Who downloaded button" I get the following information: Quote:
|
#8
|
|||
|
|||
Hmmm, I'm stumped.
The "no user found" means your getting to the point in the code where we query my DB table and no data was returned from the table for the attachmentid number which was input. This means all your settings and permissions are in good shape or we wouldn't have gotten that far into the code. 1) I hope you aren't expecting to see data from downloads PRIOR TO latest installation of v100 (previous versions or not) because I haven't gotten that far yet (#1 & #2 in my to-do list) 2) You say "they were correctly logged" ... Are you saying you went into phpmyadmin and "browsed" through the table manually and verified that the correct attachmentid number (I call it FILEID) and such was written to AND IS currently sitting in my table for the file you downloaded? 3) I hate to quote things that were erased, but my email notification which had your original post mentioned a database error ... and since the error was quoted, it wasn't included in the email so I don't know what the specific error said. If you could repost that database error for me, maybe it will give me a clue as to why my query isn't returning a result (feel free to remove the IP's from the message as I don't need or want that info). |
#9
|
|||
|
|||
Now all works fine. I have changed nothing. But it works now. :speechless:
|
#10
|
|||
|
|||
Mr. Blunt, I am using vb2 which is already using Commish's Hack. Soon I will attempt to upgrade to vb3. What would be the best way to install your hack so that I can still keep OLD attachments under the watchful eye of your WhoDownloaded IP hack? I have a huge db, 2 gigs ...mmm.. any tips or suggestions?
Regards~ |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|