Loading...
 
Features / Usability

Features / Usability


File Gallery

posts: 4
Is there anyway to modify thre file galerry to be able to have pictures as previews of what is being downloaded. I am using mine for 3d models and would like renders of these models without having to force people to look somewhere else.
posts: 1001 Canada
Of course it can be done. The cool thing is, it also involves codingwink

posts: 63 United Kingdom

Sounds like a good idea

I'm working towards using my site for suimilar purposes (Downloading 3D scene filess etc) and a preview image WOULD be a great idea for users who are browsing the file gallery.

At the moment I'm slowly authoring HTML pages and Wiki pages which have images as links to the file-gallery items so that users can just click the image and get the download.

I'm thinking that, probably the way to go would be something along the lines of creating an image gallery which uses the storage methods and location of the file galleries, LISTS as a file gallery (You could probably MOD the file galleries to do this) but also includes the "Upload thumbnail" feature, so that you could specify the file and an image to represent it, then users could browse this gallery like an image gallery but instead of enlaging the iamge, it would initiate the download.

A cheapskate method might be to modify the image gelleries, so that you can upload any file ( admin > Image Galleries > "Uploaded images must match regex": Nothing), upload a thumbnail as you would a non-standard image format, and make a custom gallery viewer which lists out files with thumbnail, description and download link.
Kinda like the file gallery listing but with thumbnails instead of icons.

Another method would be to re-hash the method which tiki chooses the icon image for the given file type so that;

When the file is uploaded, you can specify an image for it if you wish. These images get stowed away renamed to be;
file name of uploaded file.image_extension
then, when it comes to listing out the gallery, we then simply check if there is an image with the name if the download file, otherwise we use the default icon image as per usual.
This method could be simplified by limiting the image regex thingy to - say - gif files, then we would only have to look for galllery_file_name.gif and if we fail to find it, we can use the existing icon system.

Alternatively, you could just add a record to each file entry in the database to reference an image in the image gallery, then when we list out the filegallery content, if this number exceeds a null value - like 0 or -1 - we get the image from the image gallery using the default "to include this in a wiki or html page" method using the specified index, otherwise the usual icon applies.

Maybe using this method we could use the thumbnail image from the image gallery (with the specified reference), then you could upload a program, a screengrab of the software in use, use the thumbnail of the screenshot as the download link, but a full screengrab from the same image gallery reference to advertise or demo the software in a Wiki or HTML page.

Maybe I'll have a crack at this later, I'm only learning PHP and stuff a little at the moment. I'm mostly teaching myself by pulling tikiwiki apart.

Sound like useful stuff?
Would be interested to hear more on the subject, if anyone else has anything to offer?

RW


posts: 63 United Kingdom

Did you ever try this?

Cause I've managed to get it working on my site, in a simple sort of way;

http://www.invasion-force.co.uk/files

Some of the galleries have it implemented some dont,

The Test gallery currently exists demoing the thumbnails at work.
I'll upload a copy of the modded files there So you can see more than one file with a thumbnail AND you can swipe them for your site, if you're happy with that.

I'll also write up the mod somewhere on this site and link it back herem that way you can see what I've done and how it works.

PreviewFileGalleriesMOD

Hope that's of help

RW


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting