Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2011-02-03 16:19:52

sacripant
Plugin Author
From: Rhône — France
Registered: 2008-06-01
Posts: 472
Website

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

Hello smd_tags users,

To make a portfolio (a portfolio section), I explore the different Plug’ins available.
After a quick discovery of smd_tags, I’m already stuck.

I want to build a list of all tags (navigation list) used by articles of “portfolio” section (some tags are also used in articles of “blog” section).
The list should give the hierarchy of tags from the parent “realisations”:

  • Realisations
    • Domaine
      • Print
      • Web Site
      • Web Appli
    • Competences
      • Illustration
      • Photogtaphie
      • Logo
      • Web Design
      • Developpement Web
    • Outils
      • Drupal
      • Textpattern

To give :

In a section context,

<txp:smd_tag_list parent="realisations" exclude="realisations" sublevel="all">
    <txp:smd_tag_name title="1" link="1" />
</txp:smd_tag_list>

does nothing, but that’s OK in a article tag to display the article’s tags

Offline

#122 2011-02-04 13:05:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

sacripant wrote:

I want to build a list of all tags (navigation list) used by articles of “portfolio” section

That’s a pretty tall order for most tagging plugins because, by design, they are generally only for displaying tags that are in use. smd_tags is also set up that way but through the magic of code I’m pretty sure the new version can generate a ‘tree’ tag list with some cunning. Let me go away and try it out on my latest version and I’ll get back to you on whether it works or not.

BTW, I know I promised yesterday but the delay on the latest version is in the rss_unlimited_categories / tru_tags import feature. In the final stages of testing I threw a vast number of tags at it and the plugin timed out. Since that may leave your tag table in a bad way I’m going to switch it over to using an AJAX mechanism (like smd_thumbnail does).

Once that’s out the way I swear I’m going to release this and peel the long-standing ‘beta’ sticker off it, even though I still have some of piemans’s and aswihart’s requests left outstanding. At least this version will be the stake in the ground and I’ll fold those things in as we go from here.


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

#123 2011-02-05 21:08:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

OK, here it is then. Goodbye beta shackles and welcome to the bright light of taxonomy gone massive. Over 1000 lines more code than the last release and hopefully it’s not all gone to waste.

Here’s the lowdown on v0.40:

  • Added live search and multi-edit functions so you can perform deletions, parent tag assignments and category linking to hordes of tags at once. Would be interested to know how the performance holds up here as I’ve not soak tested it with masses of tags but it should be fast enough providing you don’t have, like, 3000 tags or something and want to operate on them all at once
  • Added tag import feature from tru_tags and rss_unlimited_categories so you can copy your hard graft over to smd_tags and see if you like it
  • Enabled delimited,tag,entry,… for even faster tagging on the admin side
  • Added sort, showall and flavour to smd_tag_list for tree and tag cloud support; added lettername, lettertitle and weight items to smd_tag_info for building alphabetic tag groups and clouds (sacripant: check out Example 1 in the plugin help)
  • Added style to smd_tag_name and smd_tag_count (NOTE: smd_tag_name’s title attribute is now 1 by default)
  • Added ‘list’ and ‘group’ tag display options for the management pane, which will help if you either hate tables or have large tag hierarchies
  • Fixed URL handler and smd_tag_name to support per-section tag lists, clean URL syntax, and enabled multiple trigger words (all thanks jakob)
  • Fixed rogue slashes in cat lists
  • Fixed warnings in smd_related_tags
  • Fixed tag lists when no linked cats selected and then category changed — only valid tags for the selected categories are saved
  • Fixed bug in smd_if_tag (again!) when using non-eq tests
  • PHP 5.3 compatibility fix (thanks birdhouse)
  • Changed table collation to utf8_general_ci and improved unicode support
  • Probably other stuff I forgot to note along the way

I realise that this release (sadly) doesn’t encompass the recent findings and feature requests of aswihart and pieman (among others) but I had to stick a stake in the ground and get it out there now so I can build on it with incremental stuff in a more timely manner. The trouble was I’d made so many admin side changes and fixes that each time I delved further into using it in anger I found other little niggles that just had to be tended to which snowballed into other things until it was Feature Creep Central. Last week was the breaking point so I froze any further changes, fixed up what I had and cut the loose cords pending further investigation.

Hopefully I’ll be able to factor in some of the recent stuff soon; creating a bi-directional tag tree was trickier than I’d hoped (in terms of performance) but I intend to pursue it and see if I can make it workable.

Before submitting a report here, please may I ask that you check the top of the plugin code to see if it’s already on the todo list. Some of the things there aren’t ‘bugs’ as such, just annoyances or things that I need to verify, or that require a preference setting so you can work the way you want. By all means tell me of any problems or success stories you have (even if it seems I know about it) because it often leads to better ideasin the long run. I’ve spent the past week hammering this thing with as much as I can and weeding out the remaining strangeness so hopefully it’s pretty solid, but if there’s anything at all that you notice, please let me know.

Anyway, enough of my prattling. I hope you find this plugin useful and it alows your sites to do more as a result.

Happy taggin’


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

#124 2011-02-05 23:37:37

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

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

Stef

I hate to be the first to post w/ problems. Especially w/ all your hard work. Sorry abt. that.

I just upgraded from v0.31 on a site I’ve got in-development. The tags show under Extensions -> smd_Tags -> Manage Tags. But on Content -> Write, neither the select list or the text list show any tags.

What should I try?

Thanks

Mike

Last edited by maverick (2011-02-05 23:38:27)

Offline

#125 2011-02-05 23:43:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

maverick wrote:

on Content -> Write, neither the select list or the text list show any tags.

Have you set the preference for Linking tags to categories on? Prior (bug-laden, imho) behaviour was that you could see all tags regardless of category. New behaviour means that you only see the tags that you’ve assigned to categories. If you have not assigned any tags to categories or have not selected any categor(y|ies) in the Write/Images/Files/Links tab then you won’t see any tags.

So, best guess is that you turn off Link tags to categories if you’re not using that feature. Or set up the tag->cat links to suit (once you do that, selecting a category fetches the permitted tags via AJAX).

Hope that helps.

EDIT: I should have mentioned this in the plugin help. Drat!

EDIT2: if this is a problem then maybe I should offer an option to show all tags regardless of category setup, but since the whole point behind the cat->tag system is to reduce the amount of tags your users see so they can feel less overwhelmed by a sea of tags, I’d have to be convinced by some excellent arguments to revert the behaviour or add such an option.

Last edited by Bloke (2011-02-05 23:47:27)


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

#126 2011-02-05 23:47:38

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

Bloke — Wow! What a beast of a plugin, the functionality you have introduced here is very impressive, thank you for all your hard work. My earlier requests are a tall order for anyone to address. As with many other Txp plugin developers, I’m continually amazed that anything I say on this forum even gets considered. I look forward to trying out the plugin soon, and I will be sure to provide any meaningful feedback. Thanks again.

Offline

#127 2011-02-05 23:54:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

aswihart

Thanks for the props on the plugin.

I’m continually amazed that anything I say on this forum even gets considered

Oh I listen to everything… don’t necessarily act on it all in a timely fashion, but I listen, and it guides my thinking :-) So please keep up asking, requesting, testing and bending my code.

Actually, a great colleague of mine once uttered some wise words on the topic of developing software:

I can do anything in software. I just can’t do everything.

Too true!

Last edited by Bloke (2011-02-05 23:56:07)


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

#128 2011-02-06 02:07:26

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 959
Website

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

Bloke wrote:

best guess is that you turn off Link tags to categories if you’re not using that feature.

Thanks Stef!

That was it. Several test tags were in, and I had turned on the link to categories, but was going to let my client associate the tags to categories.

EDIT: I should have mentioned this in the plugin help. Drat!

Whew! I was feeling bad I missed that :)

I’d have to be convinced by some excellent arguments to revert the behaviour or add such an option.

I can see two situations:

  1. You have an article with no categories assigned, but still would like to have a set of tags available for it.
  1. This may be even more of a feature request – I have situations where some tags should be ONLY available to certain categories, and tags that are more “global” – and should be available to any category. Which would cover the first scenario.

Thanks again

Mike

— oh and definitely ditto on the thanks for the hard work on a monster plugin, but an really great one!

Last edited by maverick (2011-02-06 02:08:28)

Offline

#129 2011-02-06 12:21:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,524
Website

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

maverick wrote:

That was it.

Cool. And ‘phew’ :-)

You have an article with no categories assigned, but still would like to have a set of tags available for it.

Maybe yes. But hypothetically — and programmatically — how would I differentiate between a fresh article where you had yet to select any categories (and wanted to retain the cat->tag links to avoid your client having to wade through tag soup when they did select one) vs an article that was intentionally not categorised, or one that the person had forgotten to categorise and later went back and did it?

The only way I can think of doing this would be to have a preference in the plugin that you could switch ‘on’ which would put a link next to the tag area, like ‘Show all tags’. If your client clicked that, then it would override the current category selection (in fact, totally ignore it, whether you had selected some or not) and retrieve the entire list via AJAX.

I’d have to build some special logic to also detect that you’ve chosen to override the cat->tag precedence on this article when you save it, and somehow store that information alongside the article so that next time you loaded the article up for editing it woudn’t revert to limiting your tag set. Hmmmmm. Seems a lot of work for limited gain, but if it’s a common enough practice then I might have to bite the legs off it.

tags that are more “global” – and should be available to any category

Hehe, yep. Item #1 on the “How the hell do I do that?” list in the plugin source header :-)

I tried a while ago and failed at it. But now the new tag logic is available and things are a bit cleaner under the hood I might be able to figure it out. If I do it’ll make a debut in a future version for sure.

Last edited by Bloke (2011-02-06 12:21: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

#130 2011-02-06 18:14:16

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

Sorry for jumping in the discussion without having tried the new plugin (i’m using tru_tags and fits my need for now, but I trust in your work, so I may need your plugin in the future), but let me understand: using tags only if associated to categories shouldn’t be a different things than real tags? I remember from holy books that tags are flat, whereas categories could have a tree/subtree structure. And the tags associated to categories sounds like a faceted taxonomy.

So, if this is how your plugin works, I see big potential for implementing multiple taxonomies and faceted navigation, but find confusing to call them tags. More: I think your plugin and tru_tags could live aside.

Am I seeing wrong, here?

Offline

Board footer

Powered by FluxBB