Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 11,250
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.

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: 11,250
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.

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: 11,250
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.

Txp Builders – finely-crafted code, design and Txp

Offline

#106 2010-06-13 07:35:58

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

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

Hi Stef. Thanks for clarifying the import/sync question.

I have to think (decide) about the point more structured tagging though. Multi-tag filtering is definitely on my wish list from the very first beginning.

Re. ‘feed attachment’: Nathan is using a convenient TXP hook to attach individual content to feed items as explained in Customize your RSS and Atom feeds.


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

Offline

#107 2010-06-13 08:37:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,250
Website GitHub

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

merz1 wrote:

I have to think (decide) about the point more structured tagging though.

Yes. It’s a sort of trade-off because out of the box smd_tags works more like rss_uc where you define the tags that people can choose from and they are limited to using those tags. However, the TextArea+ input system allows free-form tagging a bit like tru_tags insofar as your authors are allowed to add new tags. And you can create new sub-tags by specifying the parent as well if you wish, e.g. parent-->child.

You don’t see the long list of clickable tags in TextArea+ mode but you can use the jQuery autocomplete plugin to help find tags that are already defined and thus avoid near-duplicates being created (e.g. sort vs sortable). I believe tru_tags solves this by allowing you to define synonym tags, which is both a blessing and a curse. A blessing because you can create other synonyms such as order => sort (smd_tags won’t do that), but (I think) you are always on the back foot with regards your user base who may define tags first which you then have to sanitize afterwards…. unless you can pre-empt their every tagging whim!

Multi-tag filtering is definitely on my wish list from the very first beginning.

It’s partly done. I think OR filtering is done but I struggled with AND filtering. I’ll have another go at that some time because it’d be insanely useful.

Nathan is using a convenient TXP hook to attach individual content to feed items

Hey, that’s neat; thanks for the link. Might have to steal borrow that idea one day :-)

Last edited by Bloke (2010-06-13 08:38:36)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#108 2010-06-13 15:39:09

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

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

Stef, thanks again for your thoughts. Just two more thoughts to add some more ‘colour’ to the import/sync discussion:

(I know the following is possible with smd_tags as well.) Well, my strategy towards using tags/keywords is stamped with ‘free’ as in ‘free from any structure’ which also follows the (semantic?) model of Textpattern where categories are ‘free from sections’ as are keywords. I kind of have a personal unease with jamming the tags into a content structure (even if possible). So for now I am happy with the free flying keywords (and the two categories restriction / and tru_tags features) but of course I see cases where I would need more structure.

Which brings me back to your statement:

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.

In the very beginning of the tag feature discussion I was looking for a plug-in which would blow up the feature list what could be done with the keywords field. As simple as that. I always wanted to have the possibility to rollback to the TXP core features related to the keywords field. Maybe this is stubborn but I like to stay with TXP core tables & field set as long as possible :)


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

Offline

Board footer

Powered by FluxBB