[geeklog-devel] new auto tags in gl2.1
Wim Niemans
niemans at nlbox.com
Tue May 27 04:55:57 EDT 2014
Thanks, Tom, for clarification. Let me rephrase my problems with understanding:
‘type’ is either the name of the plugin, either what is listed in the type-column of the topic assignments table.
Examples: article, staticpage, link, block, gallery, captcha, menu
Please do correct me here.
‘id’ is the id known by and interpreted by the plugin.
The plugin can interpret the ‘id’ in it’s own way ? There must be a doc explaining what plugin expects what ‘id’ ?
It seems clear that current core plugins expect in ‘id’ a value that is known on forehand when the auto tag is input. In which case this auto tag is nothing more that the story link, unless it analyses the article text to get related_items from it (and becomes vulnerable for recursion).
‘include’ is very obscure. It says: include all related types of items found. Is that magic?
Testing reveals that this auto-tag, when used with type:article, either (include: is empty) displays one link to the story with the specified ‘id’, either (include:plugin) lists ‘no related items found', either (include:article) lists all the stories found in the topic of the story with the specified id (in other words: it’s siblings in the topic tree). And the latter is just one level deep: it does not list the topics found, neither the stories within the found topic-depth.
Anyway, what I was looking for, is a PLG_call to trigger all the plugins to spit out related information (links, xref’s, comments) based on the actual content of the type that contains the auto tag. Of course, I could implement a auto tag myplugin:related doing this, but must lack the title, id and meta information.
Wim
On 26 May 2014, at 23:48, Tom <websitemaster at cogeco.net> wrote:
>>> Both auto tags could be very useful for plugins and need some clear
> documentation.
>
> True... This only works for items that are assigned topics. With the default
> Geeklog install this includes articles and staticpages
>
> [related_items:id type:plugin max:max_items_listed trim:max_length
> include:plugin]
>
> related_items: - Id of item you want to display related items for
> type: - the name of the plugin (article, staticpages, etc...) that the id is
> for (since ids may not be unique). This is what is stored in the type column
> of the topic_assignments table.
> max: - max number of items to display
> trim: - max character length of item titles
> include: - default of this is to include all related types of items found.
> You can specify only to return certain related items.
>
> Related_topics works in the same way and returns a list of all topics that
> the item belongs to. You can see this in action on the article display page
> by the "Filed Under" caption
>
> When listed the items I believe the autotags use the standard COM_makeList
> function found in lib-common.
>
> Tom
>
>
>
> -----Original Message-----
> From: geeklog-devel [mailto:geeklog-devel-bounces at lists.geeklog.net] On
> Behalf Of Wim Niemans
> Sent: May-26-14 5:15 PM
> To: Geeklog Development
> Subject: [geeklog-devel] new auto tags in gl2.1
>
>
> Two new auto tags are introduced: related_items and related_topics.
>
> The related_topics auto tag is processed by the story/topic, but the
> processing of related_items auto tag gives plugin a change to to add
> content.
> However it is not clear where this content is inserted, and it is also not
> very clear what the interface is.
> It seems that the glTypes, like article, link, etc, are not handed to the
> plugins at all.
> The syntax [related_items:id type:plugin max:max_items_listed
> trim:max_length include:plugin] is confusing. F.i. what is 'plugin' (2x) ?
> And what is 'id' referring to?
> Than the auto-tag must be inserted in the story text, but will not display
> there?
>
> Both auto tags could be very useful for plugins and need some clear
> documentation.
> Whenever these auto tags make it into a proper plugin call, it would be wise
> to include the (calling) id and title in the interface since these fields
> should be enough to generate related_links.
>
> Thoughts?
>
> Wim
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://eight.pairlist.net/mailman/listinfo/geeklog-devel
>
More information about the geeklog-devel
mailing list