Loading...
 
Features / Usability

Features / Usability


Re: How to allow download of pictures from a tracker?

posts: 1563 Germany

Hello Pak,

I think I found it. Put the following code on a wiki page (mind: tablesorter will only work in List from Tiki15 onwards). Make sure, to activate Unified Search if not on by default.

Adopt where you find "tracker_field_test_title" or "tracker_field_test_files" to "tracker_field_your_permanent_fieldname".

That should work then.

Two columns:

Copy to clipboard
{LIST()} {pagination max=5} {filter field="tracker_id" content="6"} {OUTPUT(template="table")} {column field="title" label="Title" mode="raw"} {column field="image" label="Image with Download" mode="raw"} {tablesorter server="n" sortable="type:reset" tsortcolumns="type:text|type:text|" tsfilters="type:text|type:text|" tspaginate="max:10"} {OUTPUT} {FORMAT(name="title")}{display name="tracker_field_test_title" format="objectlink"}{FORMAT} {FORMAT(name="image")} {display name="wikiplugin_img" format="wikiplugin" fileId="tracker_field_test_files" thumb="box" default="fileId=10"} {display name="tracker_field_test_files" format="trackerrender"} {FORMAT} {FORMAT} {LIST}


Three columns:

Copy to clipboard
{LIST()} {pagination max=5} {filter field="tracker_id" content="6"} {OUTPUT(template="table")} {column field="title" label="Title" mode="raw"} {column field="image" label="Image" mode="raw"} {column field="download" label="Download" mode="raw"} {tablesorter server="n" sortable="type:reset" tsortcolumns="type:text|type:text|" tsfilters="type:text|type:text|" tspaginate="max:10"} {OUTPUT} {FORMAT(name="title")}{display name="tracker_field_test_title" format="objectlink"}{FORMAT} {FORMAT(name="image")} {display name="wikiplugin_img" format="wikiplugin" fileId="tracker_field_test_files" thumb="box" default="fileId=10"} {FORMAT} {FORMAT(name="download")} {display name="tracker_field_test_files" format="trackerrender"} {FORMAT} {FORMAT} {LIST}


Best regards,
Torsten

EDIT: attached screenshot

EDIT 2:

The field of type "files" must have the visibility option set to "Links" (which is default).
Then the {display name="tracker_field_test_files" format="trackerrender"} shows the download link of the image/file.

{display name="wikiplugin_img" format="wikiplugin" fileId="tracker_field_test_files" thumb="box" default="fileId=10"} then sorts out the image display ... I guess this should work similarly with a video (which I need soon) ... although at this point it seems not to work to mix image and video, respectively different file types.

But hold on, in case if that would be necessary, there would still be a more advanced way to get it done: a template file could be associated with the List plugin and as a .tpl can contain Smarty syntax, it should be possible to sort out different file types (wikiplugins conditional to the file type) with {if} {elseif} {else} {/if} ... I am pretty sure ;-) .

Regards

There are no comments at this time.