Loading...
 
Features / Usability

Features / Usability


File Gallery/Categories

posts: 18

I am working on a data archive site and would like to create pages listing the file galleries that are in a specific category only.

However I would like the format to be similar and as detailed as the list galleries page so the following syntax doesn't do it for me...

Category: Developer
{CATEGORY}
...Any ideas?


Also:

While viewing a list of files within a file gallery is there any way to have a column to record the file size?

Thanks in advance,
Neil

posts: 1092

> I am working on a data archive site and would like to create pages listing the file galleries that are in a specific category only.
>
> However I would like the format to be similar and as detailed as the list galleries page so the following syntax doesn't do it for me...
>

>
Category: Developer
{CATEGORY}
...Any ideas?

did you try the module mod-categories with type =file gallery

>
> Also:
>
> While viewing a list of files within a file gallery is there any way to have a column to record the file size?
It can be easy to add in templates/tiki-list_files_gallery.tpl , a column with [$imageschanges.filesize}

sylvie


posts: 18

Thanks for your help with the second part relating to file sizes Sylvie. I have managed to show the file size in a file gallery list. I will post how I did it below.

However, I'm still struggling with your suggestion of the mod-categories...

So far I have read the ModuleCategories page, and followed your instructions...

Implementation in 1.94

This is sort of a hack but if you want to make categories appear in your modules, then you can do the following. Thank you to sylvie

* Place mod-categories.php into /modules/mod-categories.php

* Place mod-categories.tpl into /templates/modules/mod_categories.tpl


However new to tiki as I am, I'm not sure how to proceed from here. Do I need to import this module in any way to use it? Can I call it in a similar way to the plugin?

Thanks again,
N


posts: 18

>While viewing a list of files within a file gallery is there any way to have a column to record the file size?

The Solution!

Thanks again to Sylvie who pointed me in the right direction...

It can be easy to add in templates/tiki-list_files_gallery.tpl , a column with [$imageschangesexternal link.filesize}

This is what i actually did....

When scanning the templates/tiki-list_files_gallery.tpl I noticed the following lines...

{if $gal_info.show_size eq 'y'}
< td style="text-align:right;" class="{cycle advance=false}">{$imageschanges.filesize|kbsize} 

This led me to investigate the tiki_file_galleries table in the database I discovered the field show_size. If this field is set to y a filesize field is shown in the tiki_list_file_gallery page as was required.

As I wanted this as a default I used the following line in mysql to set y as the default value...

ALTER TABLE tiki_file_galleries ALTER show_size SET DEFAULT 'y';

...I'm still looking to solve the first puzzle though (see my first post above) if anyone has any ideas...

posts: 1092


> This led me to investigate the tiki_file_galleries table in the database I discovered the field show_size. If this field is set to y a filesize field is shown in the tiki_list_file_gallery page as was required.
>
> As I wanted this as a default I used the following line in mysql to set y as the default value...
>
> ALTER TABLE tiki_file_galleries ALTER show_size SET DEFAULT 'y';
>
> ...I'm still looking to solve the first puzzle though (see my first post above) if anyone has any ideas...
>
>
Oops sorry - I saw too. It is in the admin-> of the gallery - you can display the file size or not on a gallery basis


posts: 18

Thanks Sylvie... Can you or anyone help me with how to use the mod-categories (I outline my confusion in my second post above) or have other ideas on how to do the following...

Thanks again

> I am working on a data archive site and would like to create pages listing the file galleries that are in a specific category only.
>
> However I would like the format to be similar and as detailed as the list galleries page so the following syntax doesn't do it for me...
>

>
Category: Developer
{CATEGORY}

>



posts: 18

Thanks Sylvie,

Idiots Guide below (as it took me a little time to work out where to put the .php and.tpl files...

1) Copy the PHP file (wikiplugin_files.php) to the following directory... lib\wiki-plugins

2) Copy the TPL file (wikiplugin_files.tpl) to the following directory... \templates\wiki-plugins

3) Use syntax set out in the following page pluginFiles


posts: 6

I tried this out, and i get a
"Notice: Undefined index: type /tiki-1.9.4/lib/wiki-plugins/wikiplugin_files.php on line 54"
Any suggestions?

posts: 6

Anyone got an idea?
Thanks!


posts: 18

I notice that I get the same error message on one of my tikis (a desktop Easyphp tiki 1.9.6 install) but not on my other site (runs on tiki 1.9.5 and IIS). I haven't figured out why yet.

I have used it successfully in the IIS install with the galleryId parameter but I haven't been able to use the categoryId parameter. It shows no records found whether there are files or not.

Perhaps if Sylvie is around, she might have some ideas?... rolleyes