Go to main content

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: 479
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: 11,250
Website GitHub

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

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: 976
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: 11,250
Website GitHub

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

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: 976
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: 11,250
Website GitHub

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

#131 2011-02-06 18:23:07

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

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

What about a flag for some tags to mark them as ‘globals’, and if you don’t select a category on the Write page, you’ll still have access to these, and will continue to have access after choosing one also. Not sure if that is a very flexible solution, just a thought, seems like programming-wise it might not be as challenging as some other potential methods.

Offline

#132 2011-02-06 19:29:21

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

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

Zanza wrote:

I remember from holy books that tags are flat, whereas categories could have a tree/subtree structure

I’ve rewritten the bible :-)

My tags can be classically flat if you wish (no association with any other tag/cat). Or they can be trees. Or they can be associated with a category (even subcats), whereby every sub-tag is also affiliated with that category.

Thus selecting, say, widgets from one of the category dropdowns filters the tag list to only include tags that you have pre-designated as useful when referring to widgets. Meaning you have a limited taxonomy to choose from — based on category — out of a potential pool of a lot more. Which should hopefully mean more tags used that make sense, instead of people creating new tags because they can’t be bothered to wade through the entire set. Having 200 articles with about five virtually unique tags in each makes a mockery of tagging, imho. So my goal was to bring slightly more structured taxonomy to TXP’s table.

Of course, free form tagging is available (in a fashion) if that’s your poison. You can use TextArea+ mode, with autocomplete, which means as you start typing it suggests tags from the available list (optionally based on category of course). But you are also permitted to create new tags in this mode — the only mode that this is allowed — and they are created under the current category (#1 in the case of articles). You can also optionally create them under a subtag at this stage if you wish.

The idea was that you could set up your tagging system however it makes sense for you and your clients: classic list, select list, textarea, or textarea with tag creation, flat tags, subtags, category linked tags, and so on. You could use them as tags to augment the categories or even hide TXP’s category fields, tell my plugin to use a select dropdown as the input method and then you essentially have rss_unlimited_categories but with a lot finer control and some incredibly detailed and powerful public side tags. Hopefully in some future universe, there’ll be global tags that work across content types. Which brings me to…

aswihart wrote:

What about a flag for some tags to mark them as ‘globals’

Compelling argument on the surface. Not thought it through entirely so it might work, thanks for the idea.

I was originally going with a new group that had no article, image, link or file type. i.e. the type was empty. You could set these up as you see fit on a new, fifth, radio-selectable panel and such tags would transcend all others, appearing in all lists. Category-linking would not be possible of course because categories are set up per type, but that’s a small price to pay imo.

With your proposition the global flags would be distributed throughout the tags, so my first hurdle would be how to signify a global tag in the management panel. Maybe a [*] after its name or something would do the trick. Secondly, it would mean that global tags could come from any type. i.e. you could define an Article tag called ‘landscape’, mark it global but if you didn’t already have an image tag called ‘landscape’ then I’d have to inject it into the markup under that type upon save. This means that I’m writing the same tag 4 times to the screen (all tags are inserted at page load time for all types) which adds bloat to the page. EDIT: Also, if you have your globally-flagged article tag as a sub-tag, do I have to create the same structure beneath the other 4 types so the globals are at the same level?

The ideal scenario might be to make the entire page work in an AJAXy way: add a tag via AJAX and when it returns that it’s done, squirt it into all the other tabs so it’s visible as you move from one view to the next. Not sure if that’s better or worse than the current full-page submit system. Will have to give it some thought.

Thanks again for the notion. It might trigger some more ideas, which is the name of the game.

Last edited by Bloke (2011-02-06 19:34:19)


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

Board footer

Powered by FluxBB