Loading...
 
Features / Usability

Features / Usability


Re: Adding Fields to File Gallery Descriptions

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

There are no comments at this time.

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