Loading...
 
Features / Usability

Features / Usability


Adding Fields to File Gallery Descriptions

posts: 758 United States

Tiki 14.1
PHP Version 5.6
Theme: Tikinewt
www.thepatriotwoodwiki.org

Dear folks, can you tell me if there is a way to add fields for file descriptions? Here is an example I'd like to replicate at http://collections.si.edu/search/tag/tagDoc.htm?recordID=saam_1995.29
As you can see there are fields for description, copyright, medium, dimensions and more. How can I achieve this for our file uploads, mainly images?
Thanks!

posts: 1563 Germany

imho with a tracker

I would turn around the thinking (which is one reason why our heads are round => to be able to turn around our thinking) and make a tracker with a files field.

The files field you connect to a file gallery, which makes it happen, that you can still access the images via the file gallery, if you want or need.

But same time you can create arbitrary fields, a nice upload form, arbitrary display pages with pretty tracker / template pages etc.

You can start easy anextend to any advanced stage.

If you need more information, just shout back.

Regards,
Torsten

posts: 758 United States

I was afraid you were going to say Trackers! :-)

Man Mr. Torsten, that is one philosophy I am having a hard time getting my head around is the Tiki trackers, I have visited Tiki for Smarties and read our own tutorials here, and I am having a hard time understanding how they work and the different parts that are needed to make them work. But I am open minded, and ready to learn. I'll have to read up again on Trackers, they seem to be a major mainstay of Tiki. So I guess I need to learn how to use them sooner than later.

posts: 758 United States

I am making progress! I am able to create a regular tracker but a Pretty Tracker is a differnt thing, it seems a tad more complicated. But baby steps! The only problem now is how do I make it default to the image upload for the file gallery?

Thanks Torsten!


posts: 1563 Germany

Hi John,

it is a different thinking, how it works.

You mainly need the file gallery for the case, you need to access the files via a file gallery. More exactly it is useful to have the files in a file gallery to be able to use the wikiplugin "files", to show and pre-filter files on wikipages.

see: PluginFiles

Likely it is enough or more appropriate to manage the files from the tracker and to use e trackerfilter or the templates to filter them.

Upload by endusers should be done on a tracker form (pretty tracker form) made with a wikipage and the usual display likely aswell, if setup by an admin for the enduser.

First you build it technically with the tracker in the standard tecchie alike mode and after that you create a pretty tracker form with a template.

The file gallery is mostly irrelevant for the whole setup, if we are leaving aside the facts that you should use one specific file gallery for each one tracker and that the permissions and settings of the file gallery must be set appropriately.

Pretty tracker is in fact simply another wording for using some basic smarty syntax together with either 'wikisyntax on a wikipage' or with 'html in an external file (*.tpl) on the server' (ex. uploaded via ftp) and connecting this as template with another wikipage, where a wikiplugin displays some content of a tracker.

Start with wikisyntax and a template page and let's the html on *tpl files aside fr today (we consider the first as basic Pretty tracker use and the latter as advanced mode ;-) ).

You can use a template aswell for creating a form to submit conten to a tracker as for displaying the content of the tracker.

You need two things:

(1) a wikipage with a wikiplugin like plugin "TRACKER" for a form or plugin "trackerlist" to display a table (see the related wikipages)

Plugin trackerlist can be made sortable and there is another very advanced plugin: the [http://doc.tiki.org/PluginList|List Plugin], which leave aside for now.

In the wikiplugin on page (1) there is a parameter "wiki" which refers to another wikipage, wich represents the template for the display (2)

The template, is using

Copy to clipboard
{$f_12} or {$f_PermanentName}
representing placeholders for the fields of the tracker which you are referring to (1).


Why or how this?

Example tracker form:

When you use a wikiplugin "TRACKER" on a wikipage, the tracker form is shown in a standart display mode very similar to the tecchie alike standart tracker display => one field per row and not really formatted.

No option for adding comments / extra text, color, bold or italic or for putting certain fields in a table or wrapping fields in responsive divs, etc.

BUT noworries: all this you can define in the template.

The wikipage used as template (2) should contain the same fields as the wikiplugin on the referring wiki page used to display the tracker form (1).

When you put a number of fields into a box or into table in the template (2), the form will be shown on the wikipage (1) in the same way.

So the template is not showing any content and has no value for the enduser, but it tells the initial wikipage to display differently than in standart mode (standart = no custom template).

Example trackerlist:

The trackerlist on a wikipage (3) and the related template on another wikipage (4) interact in the same way. When you or your users access the wikipage (3), the tracklist plugin (if the parameter is defined correctly) will look up the template on the other wikipage (4) to check how it shall display each item and then it displays all results in he same custom way.

This way you could for example display a list of boxes and each box contains an image and descriptions in a predefined way. Each content of the box will have the same structure and might contain the formatting which was defined with wikisyntax in the template.

Obviously the template contains only one example of one single tracker item without values, but instead the tracker field placeholders

Copy to clipboard
{$f_12} or {$f_PermanentName}

So in other words, the template is an example for the trackerlist, which then shows all items in the way the template defines. The example (the template) contains the wikitext and all custom text which is to be used in every item in the same way, whilst the field placeholders represent the content which is item-specific.

Example of a template:

Copy to clipboard
{DIV(class="row")} {DIV(class="col-sm-4")} {$f_imgs_image} {DIV} {DIV(class="col-sm-6")} ||__Woodworker:__| {$f_imgs_name} __born:__| {$f_imgs_birthday} __died:__| {$f_imgs_dead} __country:__| {$f_imgs_country} __no. of items built:__| {$f_imgs_no_items}|| {DIV} {DIV} __Description:__ {$f_imgs_description}


or with Id numbers instead of permanent names:

Copy to clipboard
{DIV(class="row")} {DIV(class="col-sm-4")} {$f_12} {DIV} {DIV(class="col-sm-6")} ||__Woodworker:__| {$f_13} __born:__| {$f_17} __died:__| {$f_20} __country:__| {$f_19} __no. of items built:__| {$f_18}|| {DIV} {DIV} __Description:__ {$f_42}


Hint:

To make a website which uses Pretty Trackers easy to maintain, you should name the displaying page and it's template page as self-explaining as possible and likely you should name both similarly, to make obvious that one is the template for the other.

Best is to think about a naming convention or a naming system alike for example:

wikipage for displaying the content: "ThisIsMyContent" and

wikipage for the template: "ThisIsMyContentTemplate"

where the first contains the trackerlist plugin and the second the placeholders for the fields and optionally text and wikisyntax. Mind that text on the template page will be displayed with each item.

Naming example or a tracker form:

"ThisIsMyPrettyForm" and "ThisIsMyPrettyFormTemplate".

Mind the parameter "wiki" !!!

The PluginTracker on the page (1) "ThisIsMyPrettyForm" MUST contain the parameter wiki="ThisIsMyPrettyFormTemplate"

And the PluginTrackerlist on the page (3) "ThisIsMyContent" MUST contain the parameter wiki="ThisIsMyContentTemplate".

Mind aswell, that if you did setup right, that every change on the template wikipages (2) and (4) will change how (1) and (3) will be displayed after the next pageload (ex: pressing F5 or press control-F5 if you want to clear the browsercache)

I think, now you likely got the principle, for that you can try again on your own.

If you still have problems, just mention.

Next week we will try to limit the tracker view to wikipage for non-admin users and to get a custom itemdisplay working.

Best regards and do not hesitate to ask further.

Torsten

posts: 758 United States
Torsten, I cannot thank you enough for taking the time to explain the process and the examples you have laid out that specifically target my use case. This is so awesome!I feel like I should be paying you for this counsel session. I have much to absorb here, and I am reading it now, and this weekend I'll put it to practice and I'll check back in to let you know of my progress, thank you so much Torben.
posts: 1563 Germany

Please John, revisit my prevoius post.

I did find a few typos and the structure was broken on o reasons: the noparse wikisyntax seems not to work with CKE's WYSIWYG, which is active in this forum and the external wiki links seems not to work in this setup aswell.

Thus I replaced with the code plugin and I used normal external links.

The post should be more clear nond easier to understand.

I am glad, that my description seems to be helpful for you.

Best regards,

Torsten

 

posts: 758 United States
Thank you completely Torsten, I cannot express my gratitude enough, thanks thanks and thanks! I am working on this now.

posts: 758 United States
Just a check in here Torsten, I have not dropped the ball on this! I took a break from Tiki for some Beta testing with other platforms for our wiki. I intend on returning when I fire back up our Tiki site and continue with the work. I just did not want you to think I jumped completely out and forgot about this. Thanks Torsten!
posts: 1563 Germany

Hi John,

not a problem at all. Everyone of us sometimes need a rest. Good when you hear at yourself and stop exhausting from time to time. Fees the brain and make resolving tasks and fulfilling dreams much more likely and efficient than it was with endless exhausting self-destroyment.

I wish you a happy new. year.,
kind that you thought about mentioning a 'hello' ;-)

Torsten


posts: 758 United States

Hello back Torsten, I hope all has been well with you, I am here again and I think for good now. I have been jumping around and seeing what is out there. The world of wiki's is incredible, most with so much to offer. This is the third time I went out into the world and came back to Tiki to load up yet another website using Tiki, I keep coming back!
I am here to stay, Tiki is very addicting with all it has to use and all the configurations, and from the front end user point of view, our forum community likes Tiki for it's ease of editing and WYSIWYG. So I think we are here to stay this time, can't wait to jump back in and get rolling on the reason for this original topic, I need to get my mind re-wrapped around trackers once again, I was almost there when I took a break. Thanks for all Torsten.


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