Go to main content

Textpattern CMS support 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: 12,440
Website GitHub

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. Bleeding-edge code available on GitHub.

Hire 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
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
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
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

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

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
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
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

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

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
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
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

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

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
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
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

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

#101 2010-06-10 14:51:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

NicolasGraph wrote:

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

My bad, you’re right. I put your code in an article and hadn’t turned off textile round the tag so I was getting tonnes of BRs in the output.

and I think break is not supported by smd_tag_name… No?

Correct. It’s not an attribute because it’s a single tag.

merz1

Hehehe. I just never figured anybody would want to list all the tags unless it was as part of a cloud. The tag_list and all other tag_ functions are context sensitive for that reason.

By way of an update, I’ve spent another month or so on this plugin behind the scenes and it now has:

  • an rss_unlimited_categories and tru_tags import screen
    • import tags to root or any parent tag
    • if using rss_uc, it allows you to choose the parent cat to start at
  • live tag search by name, title, parent, or linked category
  • multi-edit capabilities on filtered tags:
    • delete
    • assign to parent
    • link to category
  • popup multi-edit reports to show you what just happened

And a few more minor bug fixes. I’m currently refactoring the delete/assign functions so they are more efficient. They were originally conceived for single operation so calling the functions one by one for each tag is s-l-o-o-o-o-o-o-w. Once that’s out of the way I’ll publish it.

Last edited by Bloke (2010-06-10 14:51:50)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#102 2010-06-10 16:02:02

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Bloke wrote:

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

Hehehe. I’ve seen the txp-tag-as-break-attr-value rrick before. I think it was Els that did it.
In this case, using if_different as value is totally brain-melting. I can’t follow it.

Good trick (if I only understood it), NicolasGraph!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#103 2010-06-10 16:38:55

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

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

I can’t follow it.
Good trick (if I only understood it), NicolasGraph!

It’s thinking backward like the new TXP tag ‘what was it’s name’.
The wrapping (!) if_different ‘break’ envelope is empty until if_different spits out a br AND the next tag name shows up before it.

Stef

tru_tags import screen

Import or sync the ‘keywords’ field?
Import is nice until someone (me) has to update (and check) all the forms where field ‘keywords’ is used.
Eg the form which is appended by tru_tags to my feed (?). Will it work?


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

Offline

#104 2010-06-10 17:52:21

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

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

Stef, I was wrong with <txp:if_different><br /></txp:if_different>.
I’ve update my post and it works now.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#105 2010-06-10 22:34:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

merz1 wrote:

Import or sync the ‘keywords’ field?

Import. What’s the point of syncing them and keeping them constantly synced? As far as I can see, there’s no benefit in having tru_tags and smd_tags working side by side. If all you want is tags in articles, single-tag filters and a full list of tags beneath your keywords box, then you don’t need smd_tags. tru_tags is the perfect choice (and isn’t still in beta after N years!)

If, however, you want to embark upon slightly more structured tagging (not compulsory, but it’s possible) of all content types and you want your visitors to be able to explore interactions between the types or do multi-tag filtering then smd_tags is the way to go. The import is simply a convenient means of not having to enter all the article tags again; they are preserved in the articles they are already assigned and created if they don’t exist already.

There’s nothing to stop you running the import again to update the two systems, but I envisaged that after you’ve imported them you turn off tru_tags or rss_uc. If you want to take advantage of the power of smd_tags you need to change your tags in your forms anyway (smd_where_used to the rescue!) otherwise there’s little point in using smd_tags.

Perhaps I don’t understand how you intend to employ smd_tags. It doesn’t use keywords at all and I don’t intend to make it do so. How would you leverage the two plugins side by side? I’ve never used tru_tags so I don’t know anything about a form that it automatically adds to feeds. Isn’t a feed just a list of article titles/excerpts that allows someone to decide if they want to click and read the full article? Why would they want to click on a tag in a feed and, more to the point, what would it do if they did? (sorry for my ignorance here)

My only exposure to feeds has been the standard article ones or custom XML feeds to serve/export to other systems. If I ever need a feed that the built-in tags can’t deliver I write one in a dedicated section or use rah_external_output. If there’s an alternative mechanism for integrating extra data into a stock TXP feed and it’s actually useful for visitors, I’d love to find out how.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB