![]() |
Who Downloaded This Attachment?
This hack is pretty straightforward: it tracks the attachments your members download, and therefore allows people to view which people have downloaded which attachment. This may be expanded later into a more comprehensive, expanded "download center," but for now, it's just a small hack. :)
Screenshot? Surely. Attached to the next post. Online Demo? Here ya' go. This is a vBHacker hack, too. I highly encourage you to install vBHacker. I'll include a vBHacker-generated installation text file in the attached archive, though, so no one will be left out. Enjoy. Let me know if you run into any problems. |
Screenshot (a little fuzzy and the green is overly bright...I guess I used the wrong format or something). :)
|
Nice, as always, TWTCommish! I'll install it tonight. Great idea.
|
Greetings:
You forgot to include the whodownloaded.php file in the zip. |
Greetings:
You also forgot to include the sql statement to update the DB. |
I'm an idiot. :D I'll fix that now. Sorry everybody. I'm a moron.
|
Greetings:
Wow, no need to beat yourself up twice in one post! Heh, everything works great now, thanks. |
That demo you have is alittle strange, for it says there have been 24 downloads for that attachment, yet it tracks only TWTCommish. That is unless ofcourse TWTCommish downloaded the file 24 times. ;)
Anyway, its probably just a glitch or something. I'm gonna install it right now, real nice work =) |
Nope, no glitch: it's just that it can't track downloads that happened before the tracking system was put in place. :)
|
wow.. you rock... I just logged on to request this.. LOL;)
|
LOL. :laugh: Well, I guess I've got a supernatural sense of timing. Glad you like it.
|
ok.. i have a problem though.. the link doesn't work:(
|
You're gonna have to be a little more specific. :)
|
ok... at the bottom of the page.. it says there are errors on th epage.. when i click the link.. who has downloaded this.. nothing happens at all.. the error that i get from IE is this
Object Expected |
Hmmm. Did you remember to add the JS function to your headinclude template? Sounds like it's having trouble with the JS popup function...
|
i used vbhacker....
and i am checking it... and it appears it is there.. here is what it looks likek Code:
<script language="JavaScript"> |
same problem here
java popup doesnt work all code is there |
I know what's wrong. Don't use this:
Code:
<script language="JavaScript"> Code:
<script language="JavaScript"> |
WELL DONE
Works great now thanks for the great support |
Thanks! It works now
|
1. A suggestion: to store the dowload info into a new table instead of creating a new field in the user table.
2. The new whodownloaded table could contain the following info: - attachmentid - userid - dateline - ip 3. This way, we can also find out how many a particular user downloaded the same attachment, the date & time downloaded or the ip address (if needed for control purpose) 4. Moreover this can prevent bloating the $bbuserinfo variable as the download field can get quite big |
Well, I'd thought of all that already, hence this line in my original post:
Quote:
If anyone else seconds the idea to expand this hack, say so... :) |
anyway this is a great hack, well done :)
|
hi i get a 404 error :(
|
OK I have a Mutiple Attachments hack installed... when I click on the like.. I get this error...
Code:
Invalid SQL: SELECT counter FROM attachment WHERE attachmentid = undefined |
I don't know how you got the text "undefined" there. Did you modify any of the files?
As for the 404 error: make sure you upload the whodownloaded.php file to the main forums directory! |
nice job!!
did u ever think add the download times numbers?? |
Yeah, I thought of it, but decided to just start simple. I might expand this big time later on...if I ever finish the other 3 or so hacks I'm working on. LOL.
|
great hack. :)
i'll use it but a little modified. i'll make it visible only for mods and admins. |
]Your SQL-query has been executed successfully
SQL-query : ALTER TABLE user ADD COLUMN downloads TEXT NOT NULL Clicking on link (I have downloaded file to be sure it have some records) New window pop-ups ->>> Database error in vBulletin 2.2.4: Invalid SQL: SELECT u.userid, u.username FROM user u WHERE u.downloads LIKE "56%" OR u.downloads LIKE "%56%" OR u.downloads LIKE "%56" ORDER BY u.username ASC mysql error: Unknown column 'u.downloads' in 'where clause' mysql error number: 1054 Date: Saturday 13th of April 2002 02:42:16 AM Script: http://blablabla/forum/whodownloaded...ttachmentid=56 Referer: Any help please?... I rechecked twice if I edited/added everything right... |
]just checked MySQL database under user table
maybe this screenshot will tell you something... it doesn't to me... something telling me there's something wrong with this code: Code:
+-------------------------------------------------------------------------------------------------+ |
*cough*
|
]*cough* again... :(
|
]and again... :(
|
Please stop bumping...it's getting out of hand. :)
|
Aren't u the man who created this wonderfull hack?
|
Indeedy.
|
]well... I need some help if u have seen it... :( Can u please help me? As I said I rechecked everything (manual) twice... :(
|
I've looked only very briefly at your problem. I have 100% positively no clue as to what is wrong. If I were going to guess, I'd say maybe we're running different versions of MySQL, or something of the sort.
|
vBB 2.2.4 running on PHP v4.1.2 and MySQL v3.23.36.
|
All times are GMT. The time now is 04:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|