This new hack gives you the function of grouping all your attachments in one single list, divided into pages and with the option of viewing files by category, eg Video Clips, Archives and Excecutables etc.
All installation instructions are provided in the install file, and modification details are in the php file included in the zip. All images used for some files are also attached.
Any problems, queries or errors, please report here or PM me so I can sort them out as soon as possible, to ensure this hack is to your standards.
Current key functions:
Lists all attachments and spans over pages. You can specifiy the amount of attachments per page.
Specify usergroups who you do not wish to view the attachments.
Set out the same as attachments in posts, with icon, size and views.
Categories, so you can quickly view one type of file.
Display username.
Sort by username or filename.
If enabled, images category shows thumbnails.
Table row colours altered to make it easier to read username.
I only changes the two templates and uploaded the new php file
Got this error now, the old version did work:
Code:
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT * FROM vb3_attachment LEFT JOIN user ON (user.userid = attachment.userid) ORDER BY filename asc LIMIT 0, 30
mysql error: Table 'adfs_nl_-_vbgold.user' doesn't exist
mysql error number: 1146
Date: Saturday 08th of May 2004 09:55:28 PM
Script: http://anita.adfs.nl/forum/fileslist.php?
Referer:
Username: SmartGnome
IP Address: 62.100.24.35
With the earlier version you gave me another filelist.php cause of same sort of probs.
DWard, I have fixed your file. You really had some things messed up in it, sorry to say. You CAN'T put table prefixes on userid variables. This:
PHP Code:
$attachment_data = $DB_site->query("SELECT * FROM ".TABLE_PREFIX."attachment LEFT JOIN ".TABLE_PREFIX."user ON (".TABLE_PREFIX."user.userid = ".TABLE_PREFIX."attachment.userid) ".$soundclips_filetypes." ORDER BY ".$sorttype." asc LIMIT " . ($minlimit-1) . ", $perpage"); }
Should be this:
PHP Code:
$attachment_data = $DB_site->query(" SELECT * FROM ".TABLE_PREFIX."attachment AS attachment LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = attachment.userid) ".$soundclips_filetypes." ORDER BY ".$sorttype." ASC LIMIT " . ($minlimit-1) . ", $perpage");
And also, anytime you query more than one table in a query, ALL tables have to have the table AS table to it when someone has a table prefix in their db.
I know its all over the place, it works, just need to get smartgnome to try out the new file to make sure it works, because the fixed file is how it was before i changed it, and supregnome had problems with that.
I promised everybody that I would get the cod out by 2night so I had to post it pretty much how it was
I know its all over the place, it works, just need to get smartgnome to try out the new file to make sure it works, because the fixed file is how it was before i changed it, and supregnome had problems with that.
I promised everybody that I would get the cod out by 2night so I had to post it pretty much how it was
That's because he has a table prefix and you need to use the table as table in queries with more than one table.
Wasn't this version going to include Thumbnailed Images ??
It's a great hack - but this was what I was waiting for (installed today and it's not there) ... I don't wanna +++++ (by any means) but was just wondering if it might have been an oversight ...