The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vBulletin Attachment Downloads Tracker - Help needed
The idea seems simple: track which users have downloaded vBulletin attachments.
Currently, only the views count on attachments is kept in the database, through the "attachmentviews" table. Goals: :up: 1. Extend the database to include a table "attachmentsdownloaded" that records information on users who have downloaded attachments $db->query_write("CREATE TABLE ".TABLE_PREFIX."attachmentdownloaded (userid int(10) unsigned NOT NULL default 0,attachmentid int(10) unsigned NOT NULL default 0,dateline int(10) unsigned NOT NULL default 0,ipaddress varchar(20) NOT NULL default '',PRIMARY KEY (userid,attachmentid),KEY dateline (attachmentid,dateline),KEY ipaddress (ipaddress)) 2. Modify the "attachment.php" or any other file to record users information whenever the attachment views counter is updated? if (!$vbulletin->GPC['thumb'] AND connection_status() == 0 AND $lastbyte == ($attachmentinfo['filesize'] - 1)) { $db->query_write("INSERT INTO ".TABLE_PREFIX."attachmentdownloaded (userid, attachmentid, dateline, ipaddress) VALUES ($vbulletin->userinfo['userid'], $attachmentinfo[attachmentid], TIMENOW, IPADDRESS) "); } 3. List attachments downloaded for each user I have tested 1 & 2 but got the error: "Internet Explorer cannot download the file ?attachment.php?..."??? Any help or a quick mods on this is highly appreciated. |
#2
|
||||
|
||||
Something like this? Who Downloaded This Attachment
|
#3
|
|||
|
|||
Quote:
:up: Thanks Lynne, much appreciated. The mod you just referred to is perfect. It?s indeed what I have been looking for. Thanks again. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|