Loading...
 

Tikiwiki-devel (mailman list mirror)


Tracker template parameters?

posts: 126

Does anybody already stumbled in this problem? I have a pretty tracker template, with a custom jquery script, and wanted to use it to several group trackers (they are all clones of each other). The problem is each tracker field has a different fieldId, so I would need to have one template for each (but as there will be a lot of groups, so that would be counterproductive if I needed to edit them all). Tried using permanent names, but they need to be unique. Next move was to think of a permanent name as a combination of the name and the trackerid, like 32_login for tracker 32, and in tracker 33 33_login. but I cant get the template to accept parameters. Tried already the php arguments to access the template but no success. Tried also to use the as a parameter for the permanent name.

Another issue would be how to addres in jquery all those fields, because in the end they all became ins_XX. My idea was to create a div inside each field with an id, and target that with jquery. (this I think should work without problems)

One solution would be to use only one tracker, but I`m going to use it as group trackers, and the user can be member of multiple groups, so I would need to develop something to check if the user already has a corresponding entry to the group he is, and not let him create another duplicate entry, but let users who has no entry associated to that group to create a tracker item.

Preety confusing?

Thanks folks

Fernando


(PS: posted this on forum too: https://tiki.org/forumthread60046 <https://tiki.org/forumthread60046>)

Hi Fernando,

For starters, I have to admit that I've never used "Group Trackers", though
I've seen the feature. I've just never come across a situation where I felt
I needed to.

What is it that you are trying to do with them?

Every user is in the "Registered" group and can also be a part of
additional groups. The individual groups themselves don't necessarily need
trackers if all you're doing is tracking the same information across all
groups. I generally just associate the tracker with the Registered group
so that every user tracked once. Then through the item in the User Tracker,
you can see which groups a particular user belongs to and filter based on
the groups field.

If you had extra fields you wanted to track for particular groups (eg. for
an "Authors" group, you might want to track bio, publishing house, books
written, etc - whereas you wouldn't track those for other groups), I could
see creating a group tracker for those. (But even that I'm not sure is the
use case for the group trackers - again, i've never really looked into them)

If you can elaborate a bit on what your objective is with a simplified
example, I can set up an example via screencast and share with you.

Pat





Patrick Proulx
IT Project Manager
Synergiq Solutions
613-325-0533

www.synergiqsolutions.com

On Wed, Jun 22, 2016 at 1:16 PM, Fernando Vergos Torres <
fernandovergostorres at gmail.com> wrote:

> Does anybody already stumbled in this problem? I have a pretty tracker
> template, with a custom jquery script, and wanted to use it to several
> group trackers (they are all clones of each other). The problem is each
> tracker field has a different fieldId, so I would need to have one template
> for each (but as there will be a lot of groups, so that would be
> counterproductive if I needed to edit them all). Tried using permanent
> names, but they need to be unique. Next move was to think of a permanent
> name as a combination of the name and the trackerid, like 32_login for
> tracker 32, and in tracker 33 33_login. but I cant get the template to
> accept parameters. Tried already the php arguments to access the template
> but no success. Tried also to use the as a parameter for the permanent name.
>
> Another issue would be how to addres in jquery all those fields, because
> in the end they all became ins_XX. My idea was to create a div inside each
> field with an id, and target that with jquery. (this I think should work
> without problems)
>
> One solution would be to use only one tracker, but I`m going to use it as
> group trackers, and the user can be member of multiple groups, so I would
> need to develop something to check if the user already has a corresponding
> entry to the group he is, and not let him create another duplicate entry,
> but let users who has no entry associated to that group to create a tracker
> item.
>
> Preety confusing?
>
> Thanks folks
>
> Fernando
>
> (PS: posted this on forum too: https://tiki.org/forumthread60046)
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> ___
> TikiWiki-devel mailing list
> TikiWiki-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

posts: 126

Hello Patrick,

Sorry for taking so long to answer back, got stuck in some things here.

I`m doing a collaborative community for college students.

I`ll explain a bit of what I`m trying to do. In my website every user register, and fills a user tracker (with name, address, contact info,…) , that is associated with the registered group.
After this initial registration, the user can become part of the group corresponding to his course (or multiple ones, if he attend or attended to other courses). For each course registration, I wish to track the college name, year of entrance…
As each user can become member of more than one group, two options came through. Have only one tracker with all the registration info, but I would need to develop some custom code to limit one tracker item for each user for each course (as I could not use the "one tracker item per user"), and figure a way to access this info when needed (as potentially more than one tracker item would be associated to a specific user).
The other way would to make one tracker for each course. Everything would work well if I could use the same permanent name for the same tracker fields in the different trackers, but that just breaks everything.Then what i thought was to make a pattern for tracker field names, like course_field_name, so that I could make the template first compute the course, and then look for the right tracker fields. But for some reason I could not find out it was not possible.

Tried a lot of combinations, like \{$f_{$smarty.get.page|lower}_tracker_field}, {$f_{$page}_tracker_field}, {$f__tracker_field\}.

PS(the tracker will be accessed from the group homepage, that is the group name, that is why I use the \{{page}\})

The first one was the closest one to work, when it was used with a proper \{$f_course_tracker_field\} also in the template, it showed up. But didn`t work alone.

Tried also to send a parameter in the url to the wiki template page, like template?course=abc
but the tracker plugin doesn`t recognise the page.

I`m kind of stuck now. Maybe will load a tracker plugin without a tracker template, and use jQuery to place the fields in the right places. Don`t have any other idea right now.

If you have any light you could share, would be much appreciated!

Thanks for the help!

Fernando


> On Jun 22, 2016, at 9:47 PM, Patrick Proulx <patrick@synergiqsolutions.com> wrote:

>
> ou are trying to do with them?
>
> Every user is in the "Registered" group


Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.