Version: 1.00, by TWTCommish
Developer Last Online: Dec 2022
Version: 2.2.x
Rating:
Released: 04-01-2002
Last Update: Never
Installs: 60
No support by the author.
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.
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.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Like I said, I have no clue. But obviously all the commands have worked. I think this is a server side issue, and not really an issue with the hack, perhaps. I don't know what version of PHP or MySQL I'm running offhand, and I'm not up to finding out just yet.
As nakkid did, I enabled it only to Admin/Mods.
Besides, as suggested here,
Quote:
Originally posted by WallStreat 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
[...]
i tried to modify myself with a stand-alone table to keep downloads.
A table containing attachid/userid as key, then a counter for multiple-times downloaded
attachments, and as requested dateline and ipaddress of the lastest download by that user.
First look, I should use code like this in attachment.php to add values to that table:
PHP Code:
//HACK: Who downloaded attachment
if (!$attdl=$DB_site->query_first("SELECT * FROM attachment_download WHERE attachmentid='$attachmentid' AND userid='$bbuserinfo[userid]'") ) {
$usercounter=1;
} else {
$usercounter=$attdl[counter]++;
}
$ipaddress=getenv("REMOTE_ADDR");
$DB_site->query("REPLACE INTO attachment_download (attachmentid,userid,counter,dateline,ipaddress) VALUES ('$attachmentid','$bbuserinfo[userid]','$usercounter','".time()."','$ipaddress')");
//HACK: Who downloaded attachment
If would and with the agreement of TWTCommish, we could go ahead all together to modify the whodownloaded.php file (and templates) to read such a table...
I installed this hack and now when people reply to a post there post is put on top of the posts instead of below. I know that in the admin cp there is an option for this but it is not the problem. Any one know what is?
Also, most of the new post indicators are always on now as well, and it never changes.