View Full Version : Files List v3.01
DWard
05-03-2004, 10:00 PM
Hey,
VERSION 3.01
[25/05/2004]
-----------------------------------------------
https://vborg.vbsupport.ru/external/2004/05/2.gif (http://everythingvb.com/licenses/fa-ld-lt/1.0/)
This Hack is released under an EverythingvB.com FullAttribution-LimitedDerivs-LimitedTranslation License (/licenses/fa-ld-lt/1.0/)
-----------------------------------------------
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.
Shows forum name and a link to the parent thread.
Ability to sort by forum name.
Set the amount of files to view per page.
An example of the hack can be found here:
http://www.collegepranks.co.uk/forums/fileslist.php
Note to current users about upgrading:
Replace your fileslist.php file with the new one.
Replace the attachment_view and attachment_view_bits with the ones in the install file.
FOR THE BEST AND QUICKEST SUPPORT TIME, PLEASE POST HERE (http://www.collegepranks.co.uk/forums/showthread.php?p=10615).
PLEASE CLICK INSTALL :)
FleaBag
05-04-2004, 05:50 PM
Excellent, thanks mate. :)
Vivi Ornitier
05-04-2004, 06:36 PM
is it possile to add who posted the attachment on there?
DWard
05-04-2004, 06:50 PM
I will look into it as a new function, then I will post the next version in about 2 weeks time
Oblivion Knight
05-04-2004, 07:06 PM
Any ideas on how this will affect server load?
There was a hack similar to this on vB2 that brought the server speed down to a snail's pace, and some hosts even banned the hack from being used.
DWard
05-04-2004, 07:08 PM
Its been fine for me, just 2 simple SQL queries operate on each page load, my web host hasnt mentioned any server load problem at all
PixelFx
05-04-2004, 07:38 PM
is it possible with this hack to upload attachments with out having to use a post somewhere first, then have it goto the catitory you choose above? Also with usergroup restrictions. Download counter etc?
I've been looking for something like your hack with the above for a while now. thanks for the hard work.
DWard
05-04-2004, 07:55 PM
Download counter is on it already where it shows how many views (downloads)...
Also the code for blocking certain usergroups is in the fileslist.php file, you just need to uncomment the code and enter in the usergroup ids you wish to deny access to.
The upload thing I will take down as another sugesstion for the next version in 2 weeks
Ryan Ashbrook
05-04-2004, 11:19 PM
Great mod. I'm definately installing. :)
Aurous
05-05-2004, 12:33 AM
Great work on Scrubs hack. Any chance of adding a jumpbox to view attachments from particular forums?
Boofo
05-05-2004, 05:38 AM
Looks good! I will definately install this when you get everything done. ;)
DWard
05-05-2004, 07:10 AM
Great work on Scrubs hack. Any chance of adding a jumpbox to view attachments from particular forums?There is a way I could do it, I will consider it, however it will only work on the new attachments because it will require another field on the attacment database of the location, because at the moment, as far as I am aware, there is no entry for the forum location.
Boofo
05-05-2004, 07:16 AM
Take a look at my forumdisplay stats hack. I pull out the attachments for each forum with the query in there. ;)
DWard
05-05-2004, 07:19 AM
I will give it some thought, just keep looking
Boofo
05-05-2004, 07:23 AM
Isn't that all you are wanting to do, list them on a per forum basis?
DWard
05-05-2004, 07:27 AM
Aurous wants me to display attachments from different forums, so they want to be able to select the forum from the list and display the attachments in that forum
Phalynx
05-05-2004, 07:28 AM
Nice Hack. Does is take care of permissions?
Boofo
05-05-2004, 07:29 AM
Aurous wants me to display attachments from different forums, so they want to be able to select the forum from the list and display the attachments in that forum
That should be easy to adjust the query in my hack for. ;)
DWard
05-05-2004, 07:55 AM
Nice Hack. Does is take care of permissions?
Do you mean blocking out certain usergroups of seeing the list... yes.
Also, when you try to view an attachment, the standard usergroup permissions take hold.
It's EXTREMELY slow on a dedicated Dual Xeon.... :ermm:
Maybe it's because we have 180.000 attachments...
DWard
05-05-2004, 09:57 AM
Yer thats probably why. As I say, it only calls 2 queries, works fine with my attachments.
----------------
Just a note to all, the example page for the hack may have a few errors here and there, as I am trying to add the new suggested features.
Pitman
05-05-2004, 01:45 PM
What about a way to specify what types of files to list (such as images) and putting them in a table with columns with a preview of the image?
ChrisSy
05-05-2004, 01:49 PM
does this work if your attachments are in the filesystem rather than the database?
DWard
05-05-2004, 02:43 PM
does this work if your attachments are in the filesystem rather than the database?
Yes, no matter where your attachments are, it will work.
DWard
05-05-2004, 02:44 PM
What about a way to specify what types of files to list (such as images) and putting them in a table with columns with a preview of the image?
Image thumbnails are another function to be added to the suggesstions list for the next version.
Aurous
05-05-2004, 04:14 PM
Dward, any luck with Boofo's suggestion?
DWard
05-05-2004, 04:17 PM
The 'who posted attachment' suggestion? not yet
DWard
05-05-2004, 04:21 PM
I havnt yet begun on the other sugesstions.
This is what people have suggested so far:
Sort by category, AND BY FORUM
Show the user who posted the attachment
Upload files in the file viewer
Show thumbnails of images
Boofo
05-05-2004, 04:22 PM
I think he means the attachments by forum idea. ;)
DWard
05-05-2004, 04:26 PM
OK i will work on that soon
Boofo
05-05-2004, 05:19 PM
OK i will work on that soon
If you need any help, pm me. ;)
SmartGnome
05-05-2004, 05:39 PM
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT COUNT(*) AS count
FROM vb3_ attachment
mysql error: Table 'adfs_vbgold.vb3_' doesn't exist
mysql error number: 1146
Date: Wednesday 05th of May 2004 08:37:33 PM
Script: http://anita.xxxx.nl/forum/fileslist.php?
Referer: http://anita.xxxx.nl/forum/
Username: SmartGnome
IP Address:
The table attachment do exist in my database, so I'm stucked :disappointed:
Greetz
Boofo
05-05-2004, 05:48 PM
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT COUNT(*) AS count
FROM vb3_ attachment
mysql error: Table 'adfs_vbgold.vb3_' doesn't exist
mysql error number: 1146
Date: Wednesday 05th of May 2004 08:37:33 PM
Script: http://anita.xxxx.nl/forum/fileslist.php?
Referer: http://anita.xxxx.nl/forum/
Username: SmartGnome
IP Address:
The table attachment do exist in my database, so I'm stucked :disappointed:
Greetz
In the filelist.php, you need to make this:
FROM ".TABLE_PREFIX." attachment
into this for each occurrance:
FROM ".TABLE_PREFIX."attachment
SmartGnome
05-05-2004, 06:16 PM
Thnx Boofo,
But now I get this one :disappointed:
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT attachmentid, filename, filesize, counter, dateline, postid FROM attachment ORDER BY 'filename' 'asc' LIMIT 0, 30
mysql error: Table 'adfs_vbgold.attachment' doesn't exist
mysql error number: 1146
Date: Wednesday 05th of May 2004 09:13:57 PM
Script: http://anita.adfs.nl/forum/fileslist.php?
Referer:
Username: SmartGnome
IP Address: 62.100.24.35
Aurous
05-05-2004, 06:22 PM
I think he means the attachments by forum idea. ;)
correct :)
Boofo, can you please look at this hack and maybe try to merge your hack with it?
Boofo
05-05-2004, 06:29 PM
Thnx Boofo,
But now I get this one :disappointed:
Database error in vBulletin 3.0.1:
Invalid SQL: SELECT attachmentid, filename, filesize, counter, dateline, postid FROM attachment ORDER BY 'filename' 'asc' LIMIT 0, 30
mysql error: Table 'adfs_vbgold.attachment' doesn't exist
mysql error number: 1146
Date: Wednesday 05th of May 2004 09:13:57 PM
Script: http://anita.adfs.nl/forum/fileslist.php?
Referer:
Username: SmartGnome
IP Address: 62.100.24.35
Use this filelist.php. It is all fixed for you. ;)
SmartGnome
05-05-2004, 06:38 PM
Boofo you're the greatest.. :applaude
Now it's working fine, will have a look into the file tomorrow to see what was wrong.
Many Tnx
Ad
Pitman
05-05-2004, 06:49 PM
I havnt yet begun on the other sugesstions.
This is what people have suggested so far:
Sort by category, AND BY FORUM
Show the user who posted the attachment
Upload files in the file viewer
Show thumbnails of images
What about arranging the files in columns? :)
DWard
05-05-2004, 07:35 PM
What about arranging the files in columns? :)
The whole idea of Files List is to keep the attachment look exactly as it is in posts, therefore looks like a standard vBulletin feature.
DWard
05-05-2004, 07:58 PM
I noticed on a few fileslist.php pages of yours, the last link on the page is on two lines.
Just open the pagenav template under Page Navigation in the templates list and do this:
find:
<if condition="$show['last']"><td class="alt1"
after add this:
nowrap="nowrap"
Then your done, doesnt go onto two lines then, I think its fine in IE anyway, but not in Mozilla
DWard
05-05-2004, 08:01 PM
Also SmartGnome, you may want the new collapse images, there on this site (vbulletin.org)...
They have no coloured background, the edges are transparent, so they will work well on your silver category title bars.
If you want them, I posted them on the vBulletin downloads section for vb3 on www.vbulletin.com/forum
Boofo
05-06-2004, 01:16 AM
Also SmartGnome, you may want the new collapse images, there on this site (vbulletin.org)...
They have no coloured background, the edges are transparent, so they will work well on your silver category title bars.
If you want them, I posted them on the vBulletin downloads section for vb3 on www.vbulletin.com/forum
Do you have a link for those?
Tim Wheatley
05-06-2004, 01:37 AM
I have a rather large amount of attachments... It'd be nice to use this, but I'm a little worried how it may effect my board...
Total Attachments: 163,632
Disk Space Used: 30,045.89 MB
Storage Type: Attachments are currently being stored in the filesystem
Average Attachment Filesize: 188.0 KB
Total Downloads: 22,612,198
Any thoughts? ;)
SmartGnome
05-06-2004, 06:55 AM
Do you have a link for those?
Here you go :cool: http://www.vbulletin.com/forum/showthread.php?t=103325&highlight=collapse+images
Boofo
05-06-2004, 07:46 AM
Here you go :cool: http://www.vbulletin.com/forum/showthread.php?t=103325&highlight=collapse+images
Thank you, sir. At least someone in here answers requests. ;)
I have a rather large amount of attachments... It'd be nice to use this, but I'm a little worried how it may effect my board...
Total Attachments: 163,632
Disk Space Used: 30,045.89 MB
Storage Type: Attachments are currently being stored in the filesystem
Average Attachment Filesize: 188.0 KB
Total Downloads: 22,612,198
Any thoughts? ;)
I have more than 180.000 attachments (around 77 GByte)....don't use this hack...
dstruct2k
05-06-2004, 01:29 PM
If this has a "SELECT * FROM attachment" query, it will cause MAJOR lag. You should be specific enough to SELECT all but the actual attached file, and it should be faster. Also, I haven't looked at the hack, but a "perpage" option that adds "LIMIT 30" or whatever to the query would speed it up tremendously.
DWard
05-06-2004, 01:35 PM
If this has a "SELECT * FROM attachment" query, it will cause MAJOR lag. You should be specific enough to SELECT all but the actual attached file, and it should be faster. Also, I haven't looked at the hack, but a "perpage" option that adds "LIMIT 30" or whatever to the query would speed it up tremendously.There is a perpage function on this hack.
Ronin Six
05-06-2004, 04:21 PM
This is getting very close to what I need DWard.
Not sure if there's already a hack for this, but I'd like to see the attachments grouped by User. The attachments are 99% images of my members' work, and I'd like to be able to arrange the images into a gallery where the attachments are sorted by user. But if a user has made no attachments, then an entry for that user is skipped.
More on the above... I have Photopost, and many of my users post their images there. I'd like them to use Photopost exclusively to upload images, but the attachment feature in vb is much more convenient for some and I don't want to force them to do all extra steps necessary to upload photos into photopost, start the thread, get the url for the image they uploaded in PP, the go back to the thread post the image. So in this case, a separate 'gallery' for vb attachments is needed. Unless of course PP can grab a user's attachments from the file system and import them into photopost right when they create the post in vb.
DWard
05-06-2004, 04:47 PM
This is getting very close to what I need DWard.
Not sure if there's already a hack for this, but I'd like to see the attachments grouped by User. The attachments are 99% images of my members' work, and I'd like to be able to arrange the images into a gallery where the attachments are sorted by user. But if a user has made no attachments, then an entry for that user is skipped.
More on the above... I have Photopost, and many of my users post their images there. I'd like them to use Photopost exclusively to upload images, but the attachment feature in vb is much more convenient for some and I don't want to force them to do all extra steps necessary to upload photos into photopost, start the thread, get the url for the image they uploaded in PP, the go back to the thread post the image. So in this case, a separate 'gallery' for vb attachments is needed. Unless of course PP can grab a user's attachments from the file system and import them into photopost right when they create the post in vb.
Hey 'Ronin Six',
In response to the first paragraph, usernames are now shown in the files list, which you can see here: http://www.collegepranks.co.uk/forums/fileslist.php. This version is due to be released here some time next week. The next thing I am working on, is the ability to show thumbnails of any images attached.
In response to the second paragraph, I'm not too sure about this, you will probably need to contact somebody else to see if they can help.
DWard
05-06-2004, 04:48 PM
USERNAMES NOW SHOWN IN THE FILELIST
Preview for next version: http://www.collegepranks.co.uk/forums/fileslist.php
SmartGnome
05-06-2004, 04:59 PM
USERNAMES NOW SHOWN IN THE FILELIST
Preview for next version: http://www.collegepranks.co.uk/forums/fileslist.php
Looks nice DWard.... for my forum the name is not so important, knowing in what forum the attachment belongs, should make the life of my mods easier :ermm:
Greetz
DWard
05-06-2004, 05:39 PM
ATTACHMENT THUMBNAILS FOR IMAGES IN THE FILELIST
Preview for next version: http://www.collegepranks.co.uk/forums/fileslist.php
DWard
05-06-2004, 06:25 PM
OK I have completed two objectives, however there are two left:
:: Upload files in the files list (wont be in the next version, but may in v3)
:: Sort by forum (looked at Boofos code, but it only counts the attachments in a forum, it does not list attachments by forum, because there is no forumid or field alike in the attachment table)
Aurous
05-06-2004, 07:19 PM
maybe we can add forumid just the way userid is added in the table?
DWard
05-06-2004, 07:26 PM
Yes its possible, but then it requires more queries to slow it down and requires further hacking of attachment posting file and extension to mysql db
DWard
05-07-2004, 09:46 AM
I will have a look in to it, but no promises that it will be in the next version, which will be released this weekend now!
DWard
05-07-2004, 11:28 AM
FleaBag, where did you get your hits counter at the bottom of pages?
I've been looking for a counter like that for ages, but cant be arsed 2 make one myself.
DWard
05-08-2004, 06:14 PM
get the new fileslist and tell me what you think!
SmartGnome
05-08-2004, 06:59 PM
I only changes the two templates and uploaded the new php file
Got this error now, the old version did work:
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.
Thanks Dan.
(edit)
Can this have something to do with my prefix vb3_ in the database ??
DWard
05-08-2004, 07:01 PM
I only changes the two templates and uploaded the new php file
Got this error now, the old version did work:
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.
Thanks Dan.
yer i see the problem, 2mins
DWard
05-08-2004, 07:04 PM
OK, i updated the actual ZIP file, but there is the fileslist file:
DWard
05-08-2004, 07:06 PM
tel me if that works plz
SmartGnome
05-08-2004, 07:11 PM
tel me if that works plz
Great !! Works fine now with the usernames at the end :laugh:
Hope for the far future there will be also the forum title there :grins:
Tnx Dan
DWard
05-08-2004, 07:48 PM
I'm working on it :)
DWard
05-08-2004, 07:53 PM
SuperGnome... please do this when you have some free time, it makes sure the next button is all on one line in your fileslist page number block:
https://vborg.vbsupport.ru/showpost.php?p=509323&postcount=40
Boofo
05-08-2004, 07:55 PM
I'm working on it :)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:
$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:
$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.
Here is the updated file.
DWard
05-08-2004, 07:59 PM
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 :)
Boofo
05-08-2004, 08:01 PM
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.
Natch
05-09-2004, 04:49 AM
ATTACHMENT THUMBNAILS FOR IMAGES IN THE FILELIST
Preview for next version: http://www.collegepranks.co.uk/forums/fileslist.php
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 ...
DWard
05-09-2004, 07:51 AM
If you read the literature, you will notice the thumbnails are shown in the IMAGES category only. And the thumbnails are only shown if you have them activated in the admin control panel.
DWard
05-09-2004, 07:55 AM
If you look at my fileslist which is EXACTLY the same as it is on here, apart from the skin:
http://www.collegepranks.co.uk/forums/fileslist.php?mode=images&sortby=filename
Notice the thumbnails are there. You must have image attachment thumbnails turned ON in the Admin Panel or else it will just show the filename.
Boofo
05-09-2004, 08:51 AM
If you look at my fileslist which is EXACTLY the same as it is on here, apart from the skin:
http://www.collegepranks.co.uk/forums/fileslist.php?mode=images&sortby=filename
Notice the thumbnails are there. You must have image attachment thumbnails turned ON in the Admin Panel or else it will just show the filename.
Then you forgot something because I have thumbnails turned on and I do not get anything but the file listing for them, too.
Natch
05-09-2004, 12:53 PM
I have thumbnails turned on, and I thought it might be as you said (about them only being active if you look @ images only) - but last time I looked @ your site, it showed ALT text for your images only - not thumbnails - and mine (see the link (http://www.mobileforces.org/forums/fileslist.php)) shows the default icon for images ...
I'm not trying to get stuck in mate - I'm just looking forward to a replacement for the old one for vB2 - I'm very appreciative of your efforts on this hack :) ok?
SmartGnome
05-09-2004, 06:04 PM
SuperGnome... please do this when you have some free time, it makes sure the next button is all on one line in your fileslist page number block:
https://vborg.vbsupport.ru/showpost.php?p=509323&postcount=40
Tnx Dan ... fixed now and ok
SmartGnome
05-09-2004, 06:06 PM
Then you forgot something because I have thumbnails turned on and I do not get anything but the file listing for them, too.
@Dan
The same with me. Have tried several other settings, but no thumsb.
BTW: On your site I see only the placeholders and no pics
DWard
05-09-2004, 07:17 PM
OK, ill look into it, it works fine on mine, I've attached a screenshot.
DWard
05-09-2004, 07:20 PM
Ah now I see why, you must be logged in to view the pictures (understandable). I will fix and tidy it up for tomorrow evening if thats ok?
Still dont think you will be able to view the thumbs if you are not logged in, not unless you have allowed guests to view attachments.
DWard
05-09-2004, 07:43 PM
If your images are displayed as thumbnails when you attach them, there is no problem.
I have thumbnails on, and my GD version is 2+
Boofo
05-10-2004, 01:13 AM
If your images are displayed as thumbnails when you attach them, there is no problem.
I have thumbnails on, and my GD version is 2+Same thing on my site. But I don't see any thumbnail code at all in the fileslist.php file that I have. How are you calling it?
Natch
05-10-2004, 03:29 AM
If your images are displayed as thumbnails when you attach them, there is no problem.
I have thumbnails on, and my GD version is 2+
I'm with Boofo - I'm logged in on my site, they display as thumbs in my fora showthreads, and no on the fileslist.php ...
GD2+ also ...
DWard
05-10-2004, 05:04 AM
OK, the thumbnail code is in the view_attachment_bits template. its an IF statement, I can take a look at it later n get back to you.
DWard
05-10-2004, 07:22 AM
OK, I think I have fixed the problem, replace the code in your attachment_view_bits template with this:
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 1 or $vboptions[attachthumbs] == 2">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
SmartGnome
05-10-2004, 08:11 AM
OK, I think I have fixed the problem, replace the code in your attachment_view_bits template with this:
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 1 or $vboptions[attachthumbs] == 2">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
Dan still no thums here. I have GD2+ and thumbs on in the settings. The thumbs in the posting are working fine since I started the board.
Later today I have more time and will have also a look in the code.
Tnx
DWard
05-10-2004, 08:22 AM
OK, when your a guest it cant show the thumbnail, but when your logged in it works, I will sort that later so it shows the filename when your a guest and the thumb when your logged in.
Works on your site tho:
SmartGnome
05-10-2004, 08:34 AM
OK, when your a guest it cant show the thumbnail, but when your logged in it works, I will sort that later so it shows the filename when your a guest and the thumb when your logged in.
Works on your site tho:
Well I don't understand it anymore :laugh:
You can see thumbs on my board, well me not. Login with Admin, Mod, Reg User and all didn't show thums, while I see the thumbs in the postings. I gave the link now to some users to have a look there.
:o
(edit)
I think that not allowing guests to see it is ok.
DWard
05-10-2004, 09:45 AM
OK, this is the latest view_attachment_bits template, it has the guest thing I was talking about.
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 2 and $bbuserinfo['userid']">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
DWard
05-10-2004, 09:48 AM
SmartGnome, have you pressed Ctrl+F5 to do a clean refresh to see if that works? It works really well when I use it.
Boofo
05-10-2004, 10:04 AM
OK, this is the latest view_attachment_bits template, it has the guest thing I was talking about.
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 2 and $bbuserinfo['userid']">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
If I use this one it doesn't work. If I use the one a few posts up it works, but then it also tried to show other attachments as thumbnails (i.e php, zip, etc).
Boofo
05-10-2004, 10:19 AM
Ok I fixed it for you again. The third line is what had to be changed.
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 1 or $mode == images and $vboptions[attachthumbs] == 2">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
Boofo
05-10-2004, 10:32 AM
I've also fixed the problem with unregistered users being able to view the files listing. On my board I have it set up the same way as the member's list. If they can view the member's list (which unregistered users can't) then they can view the files listing.
In fileslist.php
Find:
// EDITABLE ///////////////////////////////////////////////////////////////
// Change the the number below to the amount of files you wish to display per page
//
$perpage = '30';
//
// End of files per page script
// EDITABLE ///////////////////////////////////////////////////////////////
BELOW it add:
// permissions check
if (!($permissions['forumpermissions'] & CANVIEW) OR !($permissions['genericpermissions'] & CANVIEWMEMBERS))
{
print_no_permission();
}
DWard
05-10-2004, 10:46 AM
Yer dont make much difference for me, Boofo. The permission thing is quite good, even though guests are not allowed to view thumbs anway.
Need some feedback from current users.
DWard
05-10-2004, 10:54 AM
Unless anybody is having trouble, please do not use the template changes posted as they change so often and newer ones may have functions missing.
Please wait for a day when v2.02 is realeased.
Boofo
05-10-2004, 11:47 AM
The code I posted above doesn't allow them to view the file listing at all unless they are registered. That is way better than not being able to view just the thumbnails.
And if you don't add the $mode == image to the second part of that line, you get it trying to make thumbnails out of php and zip files in the allfiles area.
I hope in the next version you get the queries finally straightened around. They are a mess.
SmartGnome
05-10-2004, 11:59 AM
Still no thumbs at my site :tired:
@Boofo, also your mod give me no thumbs
@Dan, Yes I tried ctrl+F5. What I don't understand is that you can see them and I not <gggrrrr>
Boofo
05-10-2004, 12:03 PM
Still no thumbs at my site :tired:
@Boofo, also your mod give me no thumbs
@Dan, Yes I tried ctrl+F5. What I don't understand is that you can see them and I not <gggrrrr>You would only see them when you pick the Image listing with my mod. Do you have thumbnails everywhere else on your board?
Also, if you use a Firewall, try disabling that and see if you can see them then.
DWard
05-10-2004, 12:49 PM
Let me just add: Im confused!
SmartGnome
05-10-2004, 06:07 PM
@Boofo
You would only see them when you pick the Image listing with my mod. Do you have thumbnails everywhere else on your board?
Yes, thumbnails in the postings is working ok.
Also, if you use a Firewall, try disabling that and see if you can see them then.
Switch on or off make no difference.
@Dan
Let me just add: Im confused!
Don't hurry, I'm confused too :laugh The users can see at least the filenames and the usernames and if they click the filename they will see the attachment :tu
Natch
05-10-2004, 10:50 PM
Ok I fixed it for you again. The third line is what had to be changed.
<tr>
<td class="alt1" width="100%" align="center">
<div class="smallfont" style="text-align: left;">$attach[username] <if condition="$mode == images and $vboptions[attachthumbs] == 1 or $mode == images and $vboptions[attachthumbs] == 2">
<a href="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]" target="_blank"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attach[attachmentid]&stc=1&thumb=1" border="0" alt="Click image for larger version
Name: $attach[filename]
Views: $attach[counter]
Size: $attach[filesize]" /></a>
<else />
<img class="inlineimg" src="$stylevar[imgdir_attach]/$attach[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" />
<a href="attachment.php?attachmentid=$attach[attachmentid]" target="_blank">$attach[filename]</a> ($attach[filesize], $attach[counter] views)</div>
</if>
</td>
</tr>
Works for me mate :) only on the "Images" mode as said in the spec - but good work :)
Thanks as well DWard - looking forward to v2.01 :)
Question: how difficult would it be to have the list of attachments in rows as well as columns ... like a gallery ...
Currently (for any resolutions higher than 800X600, there is a whole lotta wasted screen real-estate ...
perfect!
Just ONE addon will be nice to see:
- add link to thred or post where is that file attached ;)
question for tumbs addon:
why some pictures are not shown? but they OK when i click on them... the size is not so big actually....
DWard
05-11-2004, 09:55 AM
try rebuilding your attachment thumbnails in the admin control panel under the maintenance menu on the left.
gmarik
05-11-2004, 11:05 AM
demo and screeens would be nice ... still nice one ...
DWard
05-11-2004, 01:19 PM
There is a demo, the link is on the first post.
(http://www.collegepranks.co.uk/forums/fileslist.php)
SmartGnome
05-12-2004, 05:37 PM
Hi Dan,
It's crazy but still no thumbs with me and my users.
I will install a clean testboard on a local machine to see what is wrong here. Perhaps a conflict between hacks, I don't know.
Is the following a typo in template "attachment_view"
$attachment_view_bits
</table>
</feldset>
</table
Cu
DWard
05-12-2004, 05:39 PM
Looks like it, doesnt make any difference, but I will fix it.
Boofo
05-12-2004, 07:06 PM
Any way to exclude private message attachments if we have that hack installed?
DWard
05-12-2004, 07:08 PM
I cant see one because it is the same as the normal attachments, there is no way of telling the location of the attachments, therefore no way to block unwanted or sort by forums.
Boofo
05-12-2004, 08:18 PM
That's ok, I'll fix it. ;)
DWard
05-13-2004, 10:35 AM
OK, not as many problems now I guess because there are barely any questions being posted about the new version.
Natch
05-13-2004, 01:28 PM
That's ok, I'll fix it. ;)
You'll share your code when you get it worted mate ?
Thanks for the new version DWard :)
Boofo
05-13-2004, 01:54 PM
You'll share your code when you get it worted mate ?
Thanks for the new version DWard :)
I'll PM you on my board with it. I won't be releasing any more code in this thread.
Natch
05-13-2004, 02:02 PM
I'll PM you on my board with it. I won't be releasing any more code in this thread.
Cheers :)
Smitty
05-14-2004, 07:52 PM
Cheers :)
Is there any way for the user, or to set the default, to list all files on one page (or more files per page) rather than multiple pages?
Excellent hack. I've been doing a monthly list and dumping the html output to a file, doing a bunch of tailoring so people could see what attachments there are:
http://Elsmar.com/level2/Attachments-List.html
So - I really, really appreciate this hack. Great job. The only thing I would really like to see is a link to the post the attachment is in.
Scrub
05-14-2004, 11:29 PM
I belive all that requires is a
<a href="$vboptions[bburl]/showpost.php?p=$attach[postid]">View Post</a>
It should go in the attachment_view_bits template somehwere. :P
Smitty
05-15-2004, 02:39 AM
That works to link to the post - Thanks! I appreciate it!
DWard
05-15-2004, 06:14 AM
Is there any way for the user, or to set the default, to list all files on one page (or more files per page) rather than multiple pages?
Excellent hack. I've been doing a monthly list and dumping the html output to a file, doing a bunch of tailoring so people could see what attachments there are:
http://Elsmar.com/level2/Attachments-List.html
So - I really, really appreciate this hack. Great job. The only thing I would really like to see is a link to the post the attachment is in. I will put page limits on the next version, which will be out on Wednesday 19th
Smitty
05-15-2004, 06:46 AM
I will put page limits on the next version, which will be out on Wednesday 19th
That would be great! Again, great job. This is really nice!
Erwin
05-15-2004, 11:57 AM
This is a very good idea. :) Well done.
DWard
05-17-2004, 01:56 PM
I am going to generate a drop list for the amount of files per page, what are you looking for?
Boofo
05-17-2004, 08:34 PM
DWard, you might want to see if you can find a way to use permissions in this. I had to take it down because attachments from private forums and PMs were showing up. Just a suggestion. ;)
Smitty
05-17-2004, 11:37 PM
I am going to generate a drop list for the amount of files per page, what are you looking for?
Yes. Exactly.
I'm a php / mysql idiot - can anyone tell me how to add Sort By Date to the sort dropdown?
As a quickie, I just want to say again how much I appreciate this hack and the additional help. This should have been 'built in', in my opinion, it is that important and relevant to so many of us with forums where attachments are an important part.
DWard
05-18-2004, 05:05 AM
Yer I know, it'll be in the next version tomorrow hopefully :)
DWard
05-18-2004, 04:53 PM
OK, just figured how to display and sort attachments by forum :)
Smitty
05-18-2004, 09:21 PM
OK, just figured how to display and sort attachments by forum :)
Excellent! Thank you!
paratek
05-19-2004, 03:35 AM
Nice Update DWard
SmartGnome
05-19-2004, 08:51 AM
Tnx for the new version Dan.
Will install it tonight at home and I wonder if the thumbs are showing up with me now :laugh:
DWard
05-19-2004, 09:15 AM
I've not made much of a change to thumbnails so I'm a bit doubtful still, but I will keep trying :)
FleaBag
05-19-2004, 02:02 PM
All working excellently on the latest version - it's great to see how the features have come along in this.
DWard
05-19-2004, 02:12 PM
Good... I'm happy I managed to get all the forums to display cos people were asking for that big time :)
Mijae
05-21-2004, 06:33 PM
Nice, works very well :D
DWard
05-23-2004, 07:39 AM
:) Any more suggestions for a next version?
Smitty
05-23-2004, 10:29 PM
:) Any more suggestions for a next version?
Add sort by Date to the 'Sort By' dropdown?
Aurous
05-24-2004, 04:48 PM
How do I NOT show files that are posted in certain private forums? and only show them in the list if you are a member of that private usergroup and have access to those private forums.
DWard
05-24-2004, 04:53 PM
I'll bear it in mind for the next version, it should be easy to do (within reason) but if not, maybe somebody else can help you on that one. For the permission side of things, i'm not too familiar with at the moment.
Aurous
05-24-2004, 04:59 PM
I'll bear it in mind for the next version, it should be easy to do (within reason) but if not, maybe somebody else can help you on that one. For the permission side of things, i'm not too familiar with at the moment.
Can you atleast tell me who can help me out here? I really like the hack, but it wont really serve the purpose if regular users can see files posted in private forums.
DWard
05-24-2004, 05:00 PM
Try Scrub or Boofo.
Aurous
05-24-2004, 05:02 PM
Thanks
DWard
05-24-2004, 05:14 PM
K, well I will keep looking for permissions for the next version anyway.
Ronin Six
05-24-2004, 05:35 PM
Great work DWard!
Not sure if it's because I'm not logged in (do you have a test user I can log in as?), but I get errors when I try to sort by user.
DWard
05-24-2004, 05:37 PM
Just noticed the problem myself, I'm on it now.
Boofo
05-24-2004, 07:00 PM
I'll bear it in mind for the next version, it should be easy to do (within reason) but if not, maybe somebody else can help you on that one. For the permission side of things, i'm not too familiar with at the moment.
You know, Dan, all you ever would have had to do was ask. I have helped you with straightening out the queries along the way and you never once gave even a simple thank you. I have no problem with lending a hand if you need it, you just need to ask and maybe even appreciate it once in a while. We could make this one hell of a hack. ;)
DWard
05-24-2004, 07:08 PM
You know, Dan, all you ever would have had to do was ask. I have helped you with straightening out the queries along the way and you never once gave even a simple thank you. I have no problem with lending a hand if you need it, you just need to ask and maybe even appreciate it once in a while. We could make this one hell of a hack. ;)Yer well cheers for the previous help, I'm just a bit taken with my other hack as well now, so its getting a bit difficult at the moment, what with coursework and everything.
Aurous
05-24-2004, 07:54 PM
OK, my thanks to all of you who worked on this! Especially Scrub, who actually came up with this hack in the beginning. (Oh and not to forget, I was the one who actually asked for this hack :D)
Boofo, I got your PM, looking fwd to your help with my issue.
Thanks.
Aurous
DWard
05-24-2004, 08:07 PM
Hopefully one day I will be good enough to create a hack from scratch, but I hope you will all agree I have developed the script of Scrubs very well?
I'm happy with myself so far, considering I have only had vBulletin for about 3 months.
Smitty
05-24-2004, 08:20 PM
Great work DWard!
Not sure if it's because I'm not logged in (do you have a test user I can log in as?), but I get errors when I try to sort by user.
I noticed that earlier today:
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT * FROM attachment AS attachment
LEFT JOIN user AS user ON (user.userid = attachment.userid)
INNER JOIN post AS post ON (attachment.postid = post.postid)
INNER JOIN thread AS thread ON (post.threadid = thread.threadid)
INNER JOIN forum AS forum ON (thread.forumid = forum.forumid) WHERE filename LIKE '%.gif' OR filename LIKE '%.jpg' OR filename LIKE '%.jpe' OR filename LIKE '%.jpeg' OR filename LIKE '%.bmp' OR filename LIKE '%.png' OR filename LIKE '%.psd'
ORDER BY username ASC
LIMIT 0, 400
mysql error: Column: 'username' in order clause is ambiguous
mysql error number: 1052
Date: Monday 24th of May 2004 08:38:49 AM
Script: http://elsmar.com/Forums/fileslist.php?mode=images&sortby=username&pageamt=4
Referer: http://elsmar.com/Forums/fileslist.php?mode=images&sortby=filename&pageamt=4
Username: Marc
Scrub
05-24-2004, 08:55 PM
Coming along nicely DWard. ;). LOL
Boofo
05-24-2004, 09:09 PM
Hopefully one day I will be good enough to create a hack from scratch, but I hope you will all agree I have developed the script of Scrubs very well?
I'm happy with myself so far, considering I have only had vBulletin for about 3 months.
Just remember, Dan, some of the best hacks ever released were done by more than one person. A little help once in a while doesn't hurt or take anything away from anyone. Sometimes others can spot the little things we miss. God knows I've missed my share of the little things and make more than my share of mistakes where soemone has helped me out. More often than not. ;)
DWard
05-25-2004, 04:55 AM
BUG FIX FOR USERNAME SORT
Either download the zip from the first post and use the new fileslist.php file or open your fileslist.php and do this:
Find:
$sorttype = 'username';
Replace with:
$sorttype = 'user.username';
Smitty
05-31-2004, 07:55 AM
Thanks for the fix! I really like this 'hack' and appreciate your sharing it.
Aurous
06-07-2004, 07:45 PM
any luck with file permissions? I would like non-registered users to see the page but not be able to download the attachments. There should be a way to fix this. This will only help promote sites that deal with files and non-registered users can see what they will expect from the site before signing up!
DWard
06-07-2004, 07:52 PM
any luck with file permissions? I would like non-registered users to see the page but not be able to download the attachments. There should be a way to fix this. This will only help promote sites that deal with files and non-registered users can see what they will expect from the site before signing up!
It should already be that way, it is on my site, so...
If your a guest, no thumbnails are displayed, just the filename is like the other attachments. And if you click on a filename, then it will bring a 'no permission' message up in a new window with a login bit on it.
Aurous
06-07-2004, 08:42 PM
oh does it work for other file types, like mpeg etc? I didnt really look at the code after your update. Maybe I should go through it again :-)
Smitty
06-10-2004, 07:15 PM
A user on my forum asked:
"I'm probably being a P.I.T.A. (pain in the...neck?) but is there a way you could search by Thread?
For example, I know that if I'm looking for something about audits I can search for that keyword but is there a way I can search for attachments that appear in the parent thread 'Auditing including ISO 19011' only?"
Any ideas?
DWard
06-10-2004, 07:21 PM
I can try to achive that later on in the Month, I will take a look, and get back to me later about it :)
Natch
06-11-2004, 12:54 PM
Any chance we can have it so that it only shows in the list the attachments you have permissions for - I know you say it shows the no_permission thing, but this is not ideal....
DWard
06-12-2004, 05:58 AM
Any chance we can have it so that it only shows in the list the attachments you have permissions for - I know you say it shows the no_permission thing, but this is not ideal....
I'm sure that will be easy enough, I can spend as long as I like when I finish college in a couple of weeks so I can tkae a look then if its ok :)
ChuanSE
06-12-2004, 06:14 AM
Guyz, i did all what i was supposed to do, and when i do fileslist.php, it just gives me a blank screen?
any ideas?
Aurous
06-12-2004, 03:36 PM
Hey DWard
I just found what I was looking for earlier. I want my guests to see what files we have to offer but they can only download it if they are the members of the site (set in usergroup permissions).
I just removed the following lines from the code:
if (!(CANGETATTACHMENT))
{
print_no_permission();
}
Just in case anyone else is looking for the same thing, you can simply remove those lines.
Cheers
Aurous
TheComputerGuy
06-18-2004, 11:45 AM
Guyz, i did all what i was supposed to do, and when i do fileslist.php, it just gives me a blank screen?
any ideas?
Sounds like template error, you might need to put the templates in there.
ChuanSE
06-19-2004, 05:22 AM
Sounds like template error, you might need to put the templates in there.
Hehehe, i took a look at them, caus i was sure i installed them.
ofcourse if ya call the attachement_... instead of attachment_... :p
thx m8
DWard
06-19-2004, 05:20 PM
ChuanSE, could you click install plese?!?!? :):)
ChuanSE
06-20-2004, 05:40 AM
OMG, mate, I always do it, seems I have forgotten it this time :/
* ChuanSE is sorry
* ChuanSE clicks install :D
ChuanSE
06-20-2004, 05:42 AM
Any chance we can have it so that it only shows in the list the attachments you have permissions for - I know you say it shows the no_permission thing, but this is not ideal....
This is indeed a very important issue...
Any updates yet?
Smitty
06-20-2004, 05:56 AM
Any chance we can have it so that it only shows in the list the attachments you have permissions for - I know you say it shows the no_permission thing, but this is not ideal....
Actually, it's what I want. I want people to be able to see all the file names so they 'know what they're missing'. They can see the filename but permissions keep them from actually downloading a file unless they have the appropriate permissions. So I guess it really depends upon what each person wants in their forum.
ChuanSE
06-20-2004, 06:02 AM
Then their should be a option to choose hiding or showing.
I have my reason not to show files to the public ;-)
Let's say i attach a doc in the admin (hidden) forum, it will appear in the list. Maybe the file can't be accessed, but the title alone can do some harm in some cases (imho)
bhutz
06-20-2004, 01:53 PM
This looks good and installed ok (I think/hope) :rolleyes:
In the install file it says...
## You must add the following TWO styles to your desired style: ##
## attachment_view, attachment_view_bits
I am guessing this means go to style manager and choose add new template so it appears like in the attachment
I tried add new child style but something just didn't seem right...gonna go and do some tests in my brand new forum with a file list, although to do this I think I'll need some attachments :o
Pitman
06-20-2004, 10:17 PM
I have modified the templates a bit and I was wondering if there was anyway to limit the attatchments to only get them from one forum? The forumid that I would like to pull them from is "26" if anyone can help me it would be greatly appreciated. :)
I have attached a screen shot of what I have right now, I would like to remove the "Forum:" box if at all possible ;)
Pitman
06-21-2004, 02:14 AM
A search feature would be great for this... it could search the filenames and display the ones that match. :)
DWard
06-21-2004, 04:34 AM
Some really kool suggestions, sorry I havn't replied much, but I have been snowed under with work lately, but in a week or so my priority can rest on this for a bit :)
Mijae
06-21-2004, 10:50 PM
Database error in vBulletin 3.0.0:
Invalid SQL:
SELECT * FROM attachment AS attachment
LEFT JOIN user AS user ON (user.userid = attachment.userid)
INNER JOIN post AS post ON (attachment.postid = post.postid)
INNER JOIN thread AS thread ON (post.threadid = thread.threadid)
INNER JOIN forum AS forum ON (thread.forumid = forum.forumid)
ORDER BY username ASC
LIMIT 0, 30
mysql error: Column: 'username' in order clause is ambiguous
mysql error number: 1052
Date: Monday 21st of June 2004 11:57:49 AM
Script: http://www.blank.com/forum/fileslist.php?mode=allfiles&sortby=username&pageamt=2
Referer:
Username: kannsational
IP Address: 172.196.14.15
Whazzat? I am using the first version of the hack.
Pitman
06-21-2004, 11:59 PM
I have modified the templates a bit and I was wondering if there was anyway to limit the attatchments to only get them from one forum? The forumid that I would like to pull them from is "26" if anyone can help me it would be greatly appreciated. :)
I have attached a screen shot of what I have right now, I would like to remove the "Forum:" box if at all possible ;)
Anybody gonna help me out with that? :(
bhutz
06-22-2004, 06:41 AM
Anybody gonna help me out with that? :(
From what I am guessing to remove the forum box you would have to edit something in the 'attachment_view_bits' template as this is what I understand determines the layout of your output. Post 'attachment_view_bits' template here maybe? No gurantees I will be able to do it but worth a shot.
Also I think I would need to some how limit the attachments where the attachments are coming from, any ideas anyone?
Pitman
06-22-2004, 03:01 PM
Well, I can get it to only display the attachments from a certain forum, but it doesn't count right. It will only take out the ones that's not in that forum and display what it has left out of the number that was already pulled. I can't seem to get the counting to work with a specific forum :(
bhutz
06-22-2004, 05:01 PM
Well, I can get it to only display the attachments from a certain forum, but it doesn't count right. It will only take out the ones that's not in that forum and display what it has left out of the number that was already pulled. I can't seem to get the counting to work with a specific forum :(
What did you do to get it to only show certain files from a certain forum? Have you made it so you can select multiple forums?
Pitman
06-22-2004, 05:06 PM
You can block what it displays, but the numbering and all will be messed up the way that I did it, it counts how many attatchments it's going to display first and splits up the pages by that count. I can't figure out how to make it only count from a specific forum, mainly because the attachments doesn't store what forum they are from and I don't know much about PHP and SQL and stuff.
DWard
06-23-2004, 04:32 AM
I will look into it
Mijae
06-23-2004, 08:55 PM
Anyone want to help me?
bhutz
06-23-2004, 08:56 PM
try user.username
Vivi Ornitier
06-24-2004, 05:15 AM
is it possible to sort the attachments by date? lik the most recent tot he oldest and vice versa?
DWard
06-24-2004, 07:53 AM
Yes, it's not on the current version, but will be on the next.
Mijae
06-29-2004, 01:40 AM
????
Natch
06-29-2004, 01:49 AM
????
Upgrade - or listen to those who offer assistance ...
chenge:ORDER BY username ASCto: ORDER BY user.username ASC
Or use the latest version of the script
DWard
07-05-2004, 03:06 PM
OK, any modifications you would like for the next version, please mention below. There are a few bugs in the code, but very few as far as I am aware. There will be an admin control panel area for the next version, which will give you more flexibility.
Cheers,
Dan.
Pitman
07-05-2004, 05:13 PM
OK, any modifications you would like for the next version, please mention below. There are a few bugs in the code, but very few as far as I am aware. There will be an admin control panel area for the next version, which will give you more flexibility.
Cheers,
Dan.
Ability to pull attachments from a specific forum
DWard
07-29-2004, 07:30 PM
Ability to pull attachments from a specific forumWorking on it :)
Functions to expect from new version:
Ability to retireve attachments from a specific forum
Non-retrieval of private attachments
alapo
08-03-2004, 04:13 AM
Hey DWard. Your script would be PERFECT for those looking for a vbulletin gallery. It just needs two little features (one of which I cant do). The ability to just list certain users photos with thumbnails. With this feature, your program would have "personal galleries".
The second would be maybe an optional skin which has like 5 thumbnails horizontally by 5 vertically and lists info below. Would be great if you could try on the sort feature, as listing it in "gallery style" is something I might be able to do.
DWard
08-03-2004, 05:43 AM
Hey DWard. Your script would be PERFECT for those looking for a vbulletin gallery. It just needs two little features (one of which I cant do). The ability to just list certain users photos with thumbnails. With this feature, your program would have "personal galleries".
The second would be maybe an optional skin which has like 5 thumbnails horizontally by 5 vertically and lists info below. Would be great if you could try on the sort feature, as listing it in "gallery style" is something I might be able to do.
Theres some things I would need to do.
I would need to give users the ability to upload images to the gallery, which may be difficult but ive not looked. Then I will need to be able to list all users of the forum so you can click on one and see the pictures.
I can see it working, but theres a few things I will need to learn about before I can do it. But if I can do it, that would be the first ever vB photo album, as most of the others just have compatability with vb.
Theater
08-03-2004, 08:40 PM
Is there a way to limit access to the mod itself by usergroup? If for example you only wanted paid subscription members to have access since they'll obviously consume more bandwidth with the easier access of files. I don't have time to read word for word all 13 pages of posts, but saw "file storage" mentioned a few times. I use this, so would I still be able to use this mod? Thank you! :)
DWard
08-04-2004, 08:57 AM
Watch out for the new version out soon. I will try to include an admin panel for the next version.
Smitty
08-06-2004, 03:55 PM
I hesitate to add this because I'm very happy with it all in all. I personally use it a lot and I know people coming to my site do as well. Before this 'hack' I made lists in the admincp and copied the source, edited it, added links and ended up with a static html file I linked to to show people what attachments there are. So - this has been very nice for me.
Using it a lot, I find the link to 'Parent Thread' in the listing would be much more convenient if it was a link to the actual post the attachment is in rather than to the thread. Some of the threads in my forums are rather long so finding the post with the attachment can take a minute or so of going through several pages or more.
Oh - and for the admin to be able to 'omit' specific forums from the listing.
Sadie Frost
08-11-2004, 05:42 PM
I hesitate to add this because I'm very happy with it all in all. I personally use it a lot and I know people coming to my site do as well. Before this 'hack' I made lists in the admincp and copied the source, edited it, added links and ended up with a static html file I linked to to show people what attachments there are. So - this has been very nice for me.
Using it a lot, I find the link to 'Parent Thread' in the listing would be much more convenient if it was a link to the actual post the attachment is in rather than to the thread. Some of the threads in my forums are rather long so finding the post with the attachment can take a minute or so of going through several pages or more.
Oh - and for the admin to be able to 'omit' specific forums from the listing.
I second that - making only the attachments you have permission to view show up in the list. :)
CarCdr
08-11-2004, 06:20 PM
I second that - making only the attachments you have permission to view show up in the list. :)
https://vborg.vbsupport.ru/showthread.php?t=66800
DWard and I should probably get together and merge these two hacks. DWard -- PM me if that strikes you as a good idea.
Smitty
08-11-2004, 09:42 PM
Definitely. No doubt about it. Combine them. Now I'm excited!
NietzscheKid
08-11-2004, 09:50 PM
Definitely. No doubt about it. Combine them. Now I'm excited!
Me too!! This would indeed be amazing! :)
CarCdr
08-12-2004, 01:03 AM
I'll be talking to DWard about it. As far as I am concerned, anyone can take my code and do whatever the heck they want with it. I don't get attached to such things. It ain't rocket science. :)
Question:
As far as I can tell, the only feature in the current Files List that is not in Attachment Browser, is the ability to list files by category, such as graphics files.
Is there anything else to consider for a possible merge of these scripts?
ChuanSE
08-12-2004, 05:13 AM
i won't use this untill those permissions issues are solved.
CarCdr
08-12-2004, 11:21 AM
i won't use this untill those permissions issues are solved.
Attachment Browser already handles permissions. Eventually, I expect that the two hacks will merge, so at this point, it matters little which one you use.
gvtexas
08-20-2004, 05:39 PM
This is a terrific addition, Dan, compliments to the chef!
I'm trying to think how I can use it for my needs, and hopefully your new version might address some of these, or others might have an idea how to use FL for this specific use:
Control what forums are included or excluded in FL (as in, include 21, 23, 26 or exclude 21, 23, 26, etc.)
Use the file list within a section more like a post than a full page (in this use FL acts as a sticky master list for that forum's attachments and wouldn't appear on the navbar or in userCP)
Forum IDs passed as part of the url: /forumlist.php?forum_id=26 (not correct, but shows what I mean)
Cheers,
Gary
DWard
08-20-2004, 05:50 PM
I'm having some difficulty with making a list of forums to chose from etc, but to only include certain forum id's is pretty simple. I will take a look.
I'm having some difficulty with making a list of forums to chose from etc, but to only include certain forum id's is pretty simple. I will take a look.
How?
Haven't looked much into the hack but
INNER JOIN " . TABLE_PREFIX . "forum AS forum ON (thread.forumid = 70) ".$something_filetypes."
does not work. Well actually it does, the problem is that it returned the same attachment over and over.
DWard
08-21-2004, 08:14 PM
Try adding this at the end of ".$something_filetypes."...
OR thread.forumid LIKE '70'
3dfly
09-19-2004, 08:29 PM
As it is possible to show a images from a forum ID-15 or ID-15,ID-17 for example
I need only Thumbnail from gallery forums.
Can you help me ?
Thanks :)
DWard
09-20-2004, 11:51 AM
Yer, do you mean in a separate location, like on the homepage for www.collegepranks.co.uk.
You will need to regsiter but you'll see what I mean.
Jesus Chio
09-29-2004, 02:59 PM
Im getting this error, any help will be appreciated!
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/.sites/48/site10/web/foros/includes/init.php on line 517
Unable to add cookies, header already sent.
File: /home/.sites/48/site10/web/foros/includes/init.php
Line: 517
DWard
09-29-2004, 04:10 PM
Honestly not sure
Jesus Chio
09-29-2004, 04:41 PM
OK, here is what I did:
Uploaded the file as ASCII trough FTP
Added the two templates in the style im using
edited the files, added the lines
then tried to run the /forum/filelslib.php and got that error,
ANY clue or help, again will be appreciated...
BTW its not appearing anywhere
www.jeeperos.com/foros
Jesus Chio
09-29-2004, 05:31 PM
Come awn, anyone???
Hey,
[left][size=4][b]VERSION 3.01[size=2]
[25/05/2004]
I've installed the hack... it appears to be a really good one however i have a slight problem after installation.
1. my forum location is http://thalforum.com/forums
2. I've dropped the fileslist.php file @ http://thalforum.com/forums and the filelist works fine from there BUT if the users click on file list from my hompage which is www.thalforum.com then I get page cannot be displayed.
I guess this is because it is looking for file;ist.php which it cannot find but even if i drop it under www.thalforum.com/... i cannot get it to work.
btw, i am using CMPS for my homepage.
any help will be appreciated.
viks
viks
Working on it :)
Functions to expect from new version:
Ability to retireve attachments from a specific forum
Non-retrieval of private attachments
Did these above features ( as well as the admincp controls ) ever make it into the release, or is this hack no longer worked on ?
Smitty
12-29-2004, 12:16 PM
Looks abandoned to me.
DWard
12-29-2004, 01:56 PM
I've not had too much time to work on the hack at present. Unfortunately I wont have too much time until around summer :(
Smitty
10-03-2005, 10:35 AM
I've not had too much time to work on the hack at present. Unfortunately I wont have too much time until around summer :(
Anyone thinking of taking on an update to this for vBulletin 3.5 release?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.