Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#256 2013-08-04 09:02:25
Re: smd_tags: unlimited article, image, file and link taxonomy
Thanks Tie, Thanks Stef,
I was working on other projects but it’s working well now…
I’m wondering if the smd_related_articles list could work with a form that provide a particular class to the first article with the if_first_article tag. Actually, it’s not working for me now but there’s probably a way ; there’s always a way with Txp. I’ll work on it but it’s not really important. I’m just wondering… ;-)
Edit: I tried to remove a tag which was in use and I get these messages (in french) :
Erreur interne “You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 1”.
and then…
Désolé. Cette action ne peut être poursuivie. smd_tags smd_tags_delete ne présente pas de sécurité suffisante dans ce contexte.
Removing tags works fine when not in use.
Last edited by NicolasGraph (2013-08-04 11:35:42)
Offline
#257 2013-09-21 08:46:45
Re: smd_tags: unlimited article, image, file and link taxonomy
whaleen wrote:
I’ve abandoned txp:categories, tru_tags, custom_fields, and rss_unlimited_categories and have chosen to rely solely on smd_tags
This is kind of my direction too, though I’m not abandoning custom_fields. Especially if CFs are going to get better, as hoped. I can’t answer your question (sorry), but simplifying need for several plugins to just one is always a good move, I think.
And with Bloke’s plugins, being there’s many of them in my use, I’ve started losing the distinction between his tags and core’s; it’s like they’re all core. The Txp community would be in a world of shit if it ever lost Stef and/or support on his plugins. That’s one reason I’d like to see some of them that provide essential high power/value capabilities — like tags, bio, user manager, tabber — integrated.
Hey, a boy can dream.
Offline
#258 2013-09-21 23:48:20
Re: smd_tags: unlimited article, image, file and link taxonomy
Destry wrote:
The Txp community would be in a world of shit if it ever lost Stef and/or support on his plugins.
Indeed.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
#259 2013-11-13 19:03:21
Re: smd_tags: unlimited article, image, file and link taxonomy
Great plug-in, Stef. I find more uses for it with every new site I develop ;-).
I have a couple of questions:
Is there an alternative way of accessing the ‘Remove prefs †’ and ‘Rebuild tags †’ etc panel?
The ‘quick Shift’ whilst refreshing prefs doesn’t work for me (Safari thinks I want to add the link to my Reading List, and Chrome simply looks the other way :-o ). My installation is ignoring the ‘Permit parent tag selection’ setting and I’m looking for a way of getting it working again without a rigmarole…
Master parent tag
I need global tags for my next project, but can’t figure out how to work its magic. I try entering something into the field… and nothing happens.
My install thus far is minimal:
- No Article, File or Link tags are defined.
- Image:
- PROPORTIONS (parent category)
- Crop Landscape
- Crop Portrait
- Crop Square
- Maintain proportions
- PROPORTIONS (parent category)
Things are working well up to this point.
I set Master parent tag to ‘GLOBAL’ in prefs. When I switch to the management panel I see no reference to a parent tag called GLOBAL. The only content page showing any tags at all is the image edit page – the tags panel in the article-write tab is empty.
Am I missing something dumb, or is my installation wack?
Thanks!
Offline
#260 2013-11-14 22:01:10
Re: smd_tags: unlimited article, image, file and link taxonomy
giz wrote:
Is there an alternative way of accessing the ‘Remove prefs †’ and ‘Rebuild tags †’ etc panel?
I’ve just got rid of the stupid shift holdy-down thing in my development version and replaced it with a toggle link to show / hide the extra buttons. I’ll post it up once I get the hard-coded lang strings converted to a Textpack.
I set Master parent tag to ‘GLOBAL’ in prefs. When I switch to the management panel I see no reference to a parent tag called GLOBAL.
OK, I think this is a conceptual thing and is due to my stupid naming of the feature. A master (or ‘global’) tag is one that is selectable on the admin panel(s) regardless of the category tree in force. As you may have found, you can link tags to categories, which is fine and dandy but sometimes you want a hardcore set of tags available that transcend the category.
In other words, no matter what category someone selects, the master / global tags will always be available to assign to the content.
What the preference allows is for you to nominate one of your existing tags (or tag parents) as this master tag or tag tree. You still need to go and create the tag that you have nominated for each of the content types in which you want it to be available. And if you want other tags to be persistently available you nest them below the master tag.
Perhaps ‘persistent tags’ would be a better description for the feature? Any ideas on a better name?
Remember that your tag title and tag name don’t have to match — they only do so by default. One thing you might find is that the order of the tags in the dropdown list isn’t desirable. For example, assume your master tag is called Language and you have sub-tags of English, German and Spanish. When you visit the Article panel you see that master tag list is available for selection. If you choose a category that has tags assigned to it, those tags will appear alphabetically above or below the master tags, depending on their names. You might not want this: perhaps you always want the master tags to appear at the top of the list. In which case, set your master tag name (not Title) to 0 or _master or something that will mean it appears before ‘a’ in the alphabet. If you set the Master tag pref to match that name, your master tags will always appear first. You could do the same in reverse if you wanted them to always appears last in the list: call the master zzz_persistent or something.
One other thing of note: if you set Permit parent tag selection to Yes then the parent master tag (‘Language’ in the example above) becomes selectable as a tag too. With that preference set to No, the parent tag just becomes an unselectable tag placeholder for the tags in its tree.
Does that kind of explain things better? Or have I completely bamboozled you now?
Last edited by Bloke (2013-11-14 22:03:18)
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
#261 2013-11-14 22:55:47
Re: smd_tags: unlimited article, image, file and link taxonomy
Thanks, Stef. Your explanation fits with what I expected the plugin to do, but it aint doin’ it for me… :-o
I’ll delete the plugin and its tables in the database and try again…
.
You mentioned the ‘linking tags to categories’ functionality. I’ve never gotten my head around how to use this, and it bugs me! I’ll work my way through this thread to see if I can enlighten myself.
Update1
Something does appear to be wack: after a clean re-install, I set up the prefs to my liking ( Permit parent tag selection set to No, Enter Tags using Text list, all other settings left at defaults) and parent tags eg. PROPORTIONS in my tag pool remain selectable.
Update2
My tag-pool is set up like so:
- Article
- KAA
- Sustainability
- KAA
- Image
- KAA
- PROPORTIONS
- Crop Landscape
- Crop Portrait
- Crop Square
- Maintain Proportions
- TREATMENT
- Superimpose Caption
- File
- Link
I’ve set up KAA as the Master Parent Tag. (= Kennedy Associates Architects)
What I expect to happen is to see the tag Sustainability when I’m in the image edit tab. I don’t – I see an empty KAA parent tag…
You mentioned “And if you want other tags to be persistently available you nest them below the master tag”. To my mind this is what I’m doing, but I gather I’m wrong!
I can go and add a Sustainability tag under Image:KAA and everything will work, but I’m looking for a way for my client to enter a tag once and be done with it…
.
I’m off to investigate the ‘linking tags to categories’ functionality’ to see if they are the answer…
(Thanks for the lengthy explanation BTW)…
Last edited by giz (2013-11-14 23:58:09)
Offline
#262 2013-11-17 22:38:02
Re: smd_tags: unlimited article, image, file and link taxonomy
giz wrote:
You mentioned the ‘linking tags to categories’ functionality. I’ve never gotten my head around how to use this
It’s quite subtle, and is the central idea behind smd_tags so I’ll take a little time to explain it in more detail. Grab a cuppa.
The plugin tries to address the main weaknesses in traditional tag-based taxonomy:
- Free-form tag creation by a user base leads to tag duplication, explosion and ultimately dilution of tag power. Think typos, plurals, and people categorizing a ‘design’ article as ‘layout, ‘wireframe’, ‘wireframes’, or ‘wireframing’. Over time, this diversification or ‘spreading thin’ of tags and different ways of each user thinking about tagged content reduces their usefulness.
- Structured tagging runs the risk of people not finding a tag to suit and just selecting ‘misc’ or (equally bad) categorizing something in a random or ‘nearly’ category just because none of the others fit.
- Tag explosion can create good, well-structured diversification if kept in check, but it still means the tag pool may become unwieldy. More tags to search through to find the perfect one means people just opt for the best fit because it takes too long to wade through them all.
The degree with which the plugin solves these issues is open to debate at present, but I strive to tackle them by allowing a half-way approach between free-form tagging and structured tagging. You can chose whether to use free-form tagging, or assisted free-form tagging, fully structured tagging, or sub-divided structured tagging. Or any combination thereof to suit your application.
The way the plugin tackles point (3) is via category-to-tag linking. Imagine you have 500 article tags. That’s a vast pool and your user base cannot (and, more importantly, should not) be expected to trawl them to find the perfect tag(s) to pin to an article they wrote entitled The religious implications of The Matrix. Arguments can rage all week whether 500 tags is too many in the first place, but say you have that many.
If you, as tag designer, link a tag tree to a category, it allows authors to filter the tags based on the article’s chosen categor(y|ies). Thus if they decide that their article category is ‘religion’, and you have already pre-defined that the ‘religion’ category maps to a more specialised subset of your 500 tags that all relate to ‘religion’, your article author is presented with a far smaller set of tags from which to choose. Thus if the tag suite is well-defined, you have more likelihood of them assigning a relevant set of tags to the article, thus your site visitors have more chance of finding what they want to read.
That’s the theory, at least. With that in mind, let’s revisit the global / master / persistent tag notion. We currently only have four types of content in Textpattern: article, image, file, and link. Initially, I tried to allow you to create a 5th ‘type’ called ‘master’ or ‘global’ which means you can set up one tag tree which is then available to all the other four content types. Sadly, that’s not possible with the way the plugin is structured and actually makes for an unnecessarily complicated and inflexible workflow (I tried it and abandoned the idea after a few months). Perhaps if the plugin was re-engineered it could become a reality.
Anyway, going back to ‘The Matrix’ article, if we selected ‘religion’ as a category and saw the filtered set of article tags, the idea is that we would also see, and be able to select from, the set of master tags. Thus you could have a core set of tags which are applicable to all your potential articles, and your authors can always choose from those, as well as any tags from the pool that are displayed as a result of the category filter.
The way I have facilitated this feature is to allow you to nominate a tag tree as ‘global’. In some ways it’s more flexible than a single global tag set, because it allow you to turn on or off the global tag feature per content type by simply omitting that tag tree from a particular type.
What it all boils down to is that the act of seeing a master tag set is at least a two-step process:
- Visit the smd_tags prefs and decide on a tag that is going to house your master tag set
- Visit one or more content types, create a tag with exactly the same name as your nominated master tag, then create a tag tree beneath this master tag.
You may elect to make your master article tag tree identical to your master image tag tree, for example. But you don’t have to. As long as the name of the master tag matches the one you nominated in the prefs, the tags beneath it can be anything you like. In your case, with KAA as your master tag, you need to set up the Sustainability tag in both article and image content types for it show up, because you want them to be the same. Other people might decide that master tags for Images differ from those for Articles, and in fact shouldn’t appear at all for Links.
There is no way round it at the moment because in the interface each tag suite is a separate entity for each content type. Maybe one day I’ll be able to offer the ability to ‘copy’ tag trees from one type to another, or even to tie together tags of some content types so they automatically duplicate to each other as you create the set in one content area. That does present a few difficulties, e.g. what if you create a master tag in an article that already exists in the image tag pool? Does it reassign the image tag to the master parent? Does it ignore it and leave it assigned in the old position? Or flag a warning and let you choose at the point of creation? Or…
I’m now questioning my choice of terminology. It’s not a master tag that works across content types, it’s a master tag holder that you can use to transcend any category filtering that may have taken place when the tags are assigned to the content.
Ultimately, it doesn’t address your immediate needs (create tag once, have it appear everywhere) but I hope it at least sheds some light on the process and thinking behind the plugin, demonstrating that it is behaving as I intended: albeit not how my poor terminology might indicate.
Last edited by Bloke (2013-11-17 22:39:57)
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
#263 2013-11-17 23:06:47
Re: smd_tags: unlimited article, image, file and link taxonomy
Ooh: thanks, Stef: just what I was looking for: a good top-down view of the tagging / categorisation process. It must have taken an age to write :-o
Ultimately, it doesn’t address your immediate needs
Maybe not, but it still gives me a shitload of flexibility. I’m off to play with it all ;-)
Thanks again.
Offline
#264 2013-11-29 20:45:11
Re: smd_tags: unlimited article, image, file and link taxonomy
Back again with more questions!
Given a default TXP and smd_tags installation…
Two articles share the same section and tag:
- Subject 1
- section: articles
- tag: tag-a
- Subject 2
- section: articles
- tag: tag-a
and with this snippet of code in my default page:
<txp:article>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<txp:smd_related_tags />
</txp:article>
I get this output in article_list i.e. when visiting default:
<h2><a href="articles/subject-1">Subject 1</a></h2>
<h2><a href="articles/subject-2">Subject 2</a></h2>
and this if I click on one of my links: i.e. individual_article
<h2><a href="articles/subject-1">Subject 1</a></h2>
<a href="articles/subject-2">Subject 2</a>
<h2><a href="articles/subject-2">Subject 2</a></h2>
<a href="articles/subject-1">Subject 1</a>
I expect to see related tags showing in both article_list and individual_article mode, but they only display when viewing individual_articles.
I know I can use a tag_list to pick up the tag relation to each article, but it feels like a long-winded way of achieving what I’m after…
Am I missing something? :-o
Thanks, Stef!
Offline
#265 2013-11-29 21:46:47
Re: smd_tags: unlimited article, image, file and link taxonomy
giz
Don’t think you’re missing anything. I just did what you described (at least I think I did: correct me if I’m wrong) and here’s what happened. Let me know if it differs to what you see, because it seems to work in both places for me:
- Set Section Articles to use default Page template.
- Write article 1 in Section Articles, pick a category and choose one tag from the list (because I have cat->tag mapping on).
- Write article 2 in Section Articles, pick same category and same tag.
- In my default Page template, add
<txp:article> <h2><txp:permlink><txp:title /></txp:permlink></h2> Related: <txp:smd_related_tags /> </txp:article> - View site
On site.com/articles I see:
<h2>Article 1</h2>
Related: Article 2
<h2>Article 2</h2>
Related: Article 1
And if I click on any of the 4 links I see an individual article at site.com/articles/article-1, something like this:
<h2>Article 1</h2>
Related: Article 2
It seems to be the complete inverse of yours, but it’s doing what I’d expect. In other words, on a list page, show the list of articles in the section and display the title and related articles of each. Then when you go to individual article context, show only one (individual) article and the related articles from that one.
If yours is doing the opposite, that’s very odd. Unless you have a typo or unclosed tag somewhere, I’d expect it to behave properly, If you temporarily strip your page back to bare bones, does it behave then (without smd_related_tags)? And does it work in its bare bones form if you then add <txp:smd_related_tags /> back in? Can you then add tags back in chunk by chunk to see at what stage it stops working?
Last edited by Bloke (2013-11-29 21:48:53)
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
#266 2013-11-29 23:04:26
Re: smd_tags: unlimited article, image, file and link taxonomy
Thanks, Bloke
I’m doing all this on a bare-bones default page (and it behaves itself without smd_related_tags inserted).
- Set Section Articles to use default Page template. check
- Write article 1 in Section Articles, pick a category and choose one tag from the list (because I have cat->tag mapping on).
I want cat->tag mapping off, but for the experiment I set it to on / set my tag ‘s Linked cat field to ‘Hope for the Future’. check - Write article 2 in Section Articles, pick same category and same tag. check
- In my default Page template, add <txp:article> <h2><txp:permlink><txp:title /></txp:permlink></h2> Related: <txp:smd_related_tags /> </txp:article> check: no dumb typos!
On site.com/articles I see:
<h2>Article 1</h2>
Related:
<h2>Article 2</h2>
Related:
And site.com/articles/article-1 it works as expected:
<h2>Article 1</h2>
Related: Article 2
.
Wot the?
Everything else appears to be working fine. TXP diagnostics are sweet.
I can do this, but I’d rather not:
<txp:article>
<h2><txp:permlink><txp:title /></txp:permlink></h2>
Related: <txp:smd_tag_list><txp:smd_tag_name link="1" /></txp:smd_tag_list>
</txp:article>
and I get:
<h2>Article 1</h2>
Related: <a href="mysite.com/articles/article/tag-a">Tag A</a>
<h2>Article 2</h2>
Related: <a href="mysite.com/articles/article/tag-a">Tag A</a>
(You’ll notice that I’m using articles,smd_tags as my Trigger(s) for tag lists field).
Any suggestions as to what I should poke my debug stick at?
Last edited by giz (2013-11-29 23:08:06)
Offline
#267 2013-11-30 22:19:25
Re: smd_tags: unlimited article, image, file and link taxonomy
Stef kindly had a look at my TXP installation and figured out what was wrong:
bloke wrote:
It is indeed down to the way you’re using it on the front page. I
forgot that the smd_related_tags “section” attribute defaults to “the
current section”. On the home page, there is no section, so you need
to tell the tag which section your articles are in. It’s not very good
at guessing :-)
You can either hard-code it, or get the current article’s section like this:
<txp:smd_related_tags section='<txp:section />' />
That did the trick!
Thank you Stef, both for your amazingly useful plugins and your untiring dedication in fielding all these questions.
Offline
#268 2014-01-22 22:34:05
- saccade
- Plugin Author

- From: Neubeuern, Germany
- Registered: 2004-11-05
- Posts: 521
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi all
Great plugin and very useful, but on a 4.5.5/0.50-install I ran into problem yesterday:
On my normal pages there is a smd_tags_list working fine showing all tags as a way of navigation.
On a tag landing page I first have a conditional like this
<txp:smd_if_tag_list> <txp:smd_tag_list wraptag=”“ break=”“> <h2><txp:smd_tag_name title=“1” />:</h2> <txp:smd_related_tags wraptag=“ul” break=”“ section=”“ >
<li class=“clearfix”><h3><txp:permlink><txp:title /></txp:permlink></h3> <txp:sac_article_thumbnail type=“Thumbnail” link=“artikelbild” class=“align-left” />
<txp:if_excerpt><txp:excerpt /><txp:else /><txp:body /></txp:if_excerpt></li>
</txp:smd_related_tags> </txp:smd_tag_list>
</txp:smd_if_tag_list>
- which does nicely what it should: Show the tag name and list all articles related –
then an smd_tags_list is following as on my normal pages – which now only lists the one tag called (this may be intended).
So far I had only the problem how to get the later smd_tags_list to list all tags, not only the one which the landing page was called with
But now I tried another thing and behaviour got strange:
I tried to set the full smd_tags_list before the smd_related_tags-list.
Now it shows indeed all tags (different from the use after smd_related_tags)
but
the above cited smd_related_tags-result is affected by this: It now doesn’t list solely the tag which the landing page was fetched with, but it lists ALL tags as h4 – though only the called tag with articles related
and the following (I didn’t delete it for I was testing the whole thing) smd_tags_list didn’t show only the one tag called (as so far), but also lists all tags now.
So, does smd_tags_list modify what is seen by smd_related_tags?
Is there a workaround?
best regards
Offline
#269 2014-05-22 12:20:31
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_tags: unlimited article, image, file and link taxonomy
Hi, I dont understand how setup a tag list non context dependant. I want in my sidebar a list with all my articles tags …
Offline
#270 2014-05-23 08:17:36
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: smd_tags: unlimited article, image, file and link taxonomy
Solution : smd_query do the job with a little SQL select.
Offline