Textpattern Forum

You are not logged in. Register | Login | Help

#91 2010-04-13 15:52:41

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

If I wrote that importer, would that cover it?

Yes :) tru_tags is using the default TXP keywords data field.

A ‘MySQL order’ would simply (?, not sure we are talking Bloke thingies here :) do a one time import into the appropriate smd_tags table fields.

Regarding the future I have two wishes:

  1. Better support for tagging in a well performing way inside TXP core. I have no idea yet how much database power this beast smd_tags sucks in at the moment.
  2. The boolean logic request I had in the very beginning (buried somewhere in the tru_tags thread). Looks like you are on a good way with this :)

Right now I run smd_tags in passive mode just to have a look at the help from time to time :)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#92 2010-04-14 13:20:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,835
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

merz1 wrote:

I have no idea yet how much database power this beast smd_tags sucks in at the moment.

Actually, for all the code it’s suprisingly light. On a page it runs one big query which returns everything there is to know about the tags in the current context. It makes arrays indexed in various different ways (for speed to save me having to search through them later) and then goes about normal TXP business.

Whenever it hits an smd_tags tag it uses these global arrays to read out the relevant info wherever possible. The exceptions are:

  • to get the content counts in smd_tag_list
  • to get related items in smd_related_tags

The latter runs one extra query in total to grab the related content; the counts, however, consume one quick query per matching tag to grab the number of times that tag is used. There may be some cacheing I can do somewhere to optimise the number of count queries I do — I’ll have to look into that — but I’m pleased with the client side performance considering the amount of power it delivers.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#93 2010-04-14 13:43:15

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

@Bloke You see me hooked up (proper English?).

Hand over the keywords2smd_tags sync tool and you see me playing with the beast a little :)

  1. Initial import of existing tags from keyword field
  2. Proper sync keywords2smd_tags and/or vice versa

I am offering a couple of keywords so this could be fun to play with.

Thanks! :-)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#94 2010-04-17 07:35:14

NicolasGraph
Member
From: Strasbourg, France
Registered: 2008-07-24
Posts: 142
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke a écrit:

As far as I’m aware, tag translation is not currently possible. A workaround might be to maintain two tag lists — one for each language — under a tag with the same name as the language itself (e.g. en-gb and fr-fr). With some cleverness (and perhaps linking the tags to a category?) you may be able to only show one set of tags depending on which current language is set. I’ve never tried it so I don’t know how far you’ll get, but it might be worth a shot. If I can help in this regard in the next version of the plugin, I will do what I can.

Ok, Thanks Bloke !

Finally, for the public side, I added new values in txp_lang tab for every tags and translate with MLP.
In my linklist form I used <txp:text item=’<txp:smd_tag_info item=“name” />’ /> to diplay the en-gb or fr-fr tags.

It doesn’t work for the admin side but I simply add a bilingual title tag in smd_tags management.

If it can help someone…

Last edited by NicolasGraph (2010-04-17 11:38:06)


Nicolas

Offline

#95 2010-06-07 14:17:44

NicolasGraph
Member
From: Strasbourg, France
Registered: 2008-07-24
Posts: 142
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Hi, is it possible to display an entire smd_tag_list (independant to the context) ?

Thanks


Nicolas

Offline

#96 2010-06-07 14:27:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,835
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

NicolasGraph wrote:

is it possible to display an entire smd_tag_list (independant to the context) ?

Not easily at the moment, no. You’ll be wanting the smd_tag_cloud function that’s not been written yet :-(


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#97 2010-06-10 13:53:14

NicolasGraph
Member
From: Strasbourg, France
Registered: 2008-07-24
Posts: 142
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

OK, Thanks Stef.

My solution :

<txp:smd_tag_list wraptag="" break="">
<txp:smd_tag_name wraptag="txp:if_different">
<txp:smd_tag_name title="1" link="1" /><br />
</txp:smd_tag_name>
</txp:smd_tag_list>

It allow me to display all smd_tags used.

Edited for code display — Bloke
Thanks! — NicolasGraph

Last edited by NicolasGraph (2010-06-10 18:05:09)


Nicolas

Offline

#98 2010-06-10 14:11:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,835
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

NicolasGraph

Wow, I think you win the prize for “most innovative misuse of the wraptag attribute ever” award :-) I’d never even considered putting a TXP tag in there, let alone using if_different like that. Brilliant!

Shame about the tonne of <br /> tags you get in the output due to all the duplicate tags that are ignored, (can a break="" help anywhere?) but I guess you can use CSS to hide them.

I suspect Els and maniqui, among others, might be interested in adding this technique to their tag arsenal :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#99 2010-06-10 14:24:00

NicolasGraph
Member
From: Strasbourg, France
Registered: 2008-07-24
Posts: 142
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Bloke a écrit:

Wow, I think you win the prize for “most innovative misuse of the wraptag attribute ever” award :-) I’d never even considered putting a TXP tag in there, let alone using if_different like that. Brilliant!

Hi hi, thank you !

Shame about the tonne of <br /> tags you get in the output due to all the duplicate tags that are ignored, (can a break="" help anywhere?) but I guess you can use CSS to hide them.

I don’t know if I understand very well, because the following line <txp:if_different><br /></txp:if_different> allow me to not display <br /> if tag is ignored and I think break is not supported by smd_tag_name… No?

Last edited by NicolasGraph (2010-06-10 14:28:24)


Nicolas

Offline

#100 2010-06-10 14:34:49

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: smd_tags: unlimited article, image, file and link taxonomy

Stef wins a price for pointing all lights away from him towards a brilliant (performant?) workaround which only covers Stefs ass for not having a core ‘tag list’ output :)

And yes, as far as I understand txp:if_different a br will only be inserted when a tag is different.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB