Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2011-02-06 19:57:20

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

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

I hadn’t considered the fact that you are dealing with the 4 different tag / Category trees, and I can only try to imagine how much more complex this makes developing the plugin.

More often than not I’ve wished that Txp just had one unified Category tree for all the content-types: article, image, link, file; but, obviously there are many times when you want different categories for each type. IMHO it would be very helpful if in the next version of Txp, we had the addition of a ‘global’ Category tree like this.

Your support for four different category / tag trees is ambitious and really awe-inspiring, but I would be curious to know what percentage of people would be content with a version of smd_tags with a single tag-tree which related to a single global category tree, for tagging up all the different content-types (smd_tags_lite?). My guess would be that most Txp sites are not complex enough to demand separate Category / Tag trees for the various content-types, and that the existing content-type-specific categories would be enough to augment a global category / tag system, if such a thing existed, but I may well be wrong on that.

Offline

#134 2011-02-06 20:31:31

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

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

aswihart wrote:

it would be very helpful if in the next version of Txp, we had the addition of a ‘global’ Category tree like this.

I’d certainly like to see that too.

My guess would be that most Txp sites are not complex enough to demand separate Category / Tag trees for the various content-types

You’re probably right. But on the occasion you do need it, the good thing is that smd_tags is available to deliver. And all the other stuff — tag filtering, multi-tag editing, the public side tags, etc — needs to be available anyway regardless of which types you are using. So I doubt the plugin would be that much ‘lite-er’ :-\

When I get global tagging in place there’s always the option of not bothering with the other 4 tabs. Just don’t use category filtering and set all your tags up as globals. You get simple tagging, but from a fixed tag set (or the option to add your own if you trust your clients to do this and not make tagging useless in the process!)

What I may do in light of your comment (thank you) is add the ability to switch off the various admin-side tag tabs so if you’re not using file and image tagging then you can remove them from the list. That cuts down page load time and complexity. I’ll still keep the separate checkboxes for showing the tag lists on the relevant content pages though — you may will be setting tagging up on a live site and want to get all the tag hierarchies up and running before unleashing them on your clients.

As a bit of background, the idea for this plugin came about when I was writing a record label site. Inside a file_download_list I wanted to simply list articles and images that were related to the current download. A sort of “while you are here downloading, you might like to find out about when the band did x,y,z. Oh, and here are some backstage pics and album artwork for you to check out / order”. That just wasn’t possible without a heavy naming convention burden so I figured integrated cross-content taxonomy was the way to go (less overhead than cross-content custom fields) : smd_related_tags was the public tag I conceived to deliver that goal. It required a little admin side functionality to support that tag. And 3500 lines of code later…

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


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

#135 2011-02-07 16:33:56

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

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

Steph, thanks for this update.
I am still far from having understood its operation here is my feedback and questions after some testing:

tag tree

Your example 1 ( linked tag tree) works well. I then wanted to try

<txp:smd_tag_list parent="realisations" exclude="realisations" sublevel="=0">
	:: <txp:smd_tag_name title="1"  /> 
		<txp:smd_tag_list parent='<txp:smd_tag_name title="0" />' exclude='<txp:smd_tag_name title="0"  />' >
			:::: <txp:smd_tag_name title="1" />
		</txp:smd_tag_list>
</txp:smd_tag_list>

But I have no sub-list

Url and rewriting

In localhost, my url : http://localhost/textpattern-4.3.0/

One clic on
<txp:smd_tag_name link="1" title="1" section="portfolio" cleanurls="0" />

http://localhost/textpattern-4.3.0/portfolio/?smd_tag=tag_name&smd_tagtype=article
OK, I have the list of results

One clic on
txp:smd_tag_name link="1" title="1" section="portfolio" />

http://localhost/portfolio/smd_tags/article/tag_name
NOT FOUND. ‘textpattern-4.3.0’ has disappeared from the url.

and if I enter manually
http://localhost/textpattern-4.3.0/portfolio/smd_tags/article/integration-web
404 Not Found (page error-default)

Tag count

smd_tag_count displays the results on the entire table. Is it possible to display only the number of result of a section ?

Tag name

I can not display the tag name selected. Can not use tag_name outside a tag_list (as <txp:category />)

<txp:smd_if_tag_list >
   <h2>tag_info : <txp:smd_tag_info item="title" /></h2>  <!-- NOTHING -->
   <h2>tag_name : <txp:smd_tag_name /></h2>	<!-- NOTHING -->
   <hr />
   <h2>smd_related_tags :</h2>
   <txp:smd_related_tags>
      <h1><txp:title /></h1>
      <txp:smd_tag_list parent="realisations" exclude="realisations" sublevel="all">
         <txp:smd_tag_name title="1" link="1" />
      </txp:smd_tag_list>
      <hr />
   </txp:smd_related_tags>

And a little bug

When creating a new tag (with Accented letter)
tébâdö (title) -> tbd (name)
and should be
tébâdö -> tebado

Ndank-ndank mooy japp golo ci naay

Offline

#136 2011-02-07 20:41:10

jpdupont
Member
Registered: 2004-10-01
Posts: 752

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

Stef,
I have the same errors as sacripant.
I try on a copy of a site where I use rss_unlimited_categories.
Importation from rss_uc works fine.

My site is in a subdirectory

  • Original = mysite.com/blog
  • Copy = mysite.com/blogtest

I simply copy the example from the help to list the tags from one article. The tags are correctly listed but the links are not ok :

  • http://www.mysite.com/smd_tags/article/premier-degre : the blogtest part of the url is missing
  • OK if I try to add the missing part of the url AND if the smd_tags section is created …

Last edited by jpdupont (2011-02-07 20:51:29)

Offline

#137 2011-02-07 22:06:59

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

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

jpdupont wrote:

My site is in a subdirectory

Ah, that’ll be the problem then. I didn’t try it on subdirs, drat. I’ll go and play with it on a subdir install and fix it. For some reason I thought the internal TXP mechanism (hu) would take care of it for me. Maybe it doesn’t or I’ve been a bit drastic with the regex knife. I’ll get to the bottom of it asap sorry about that.

sacripant wrote:

I have no sub-list

OK, I never thought anyone would be nesting tag lists inside tag lists. That’s a pretty confusing way of working! It means for every outer tag you then go and get all the tags under it. Which I thought would be the same as getting the entire tree in a single list. If you want to treat certain levels differently inside the list, smd_if_tag will allow you to do that using the level attribute. Let me see if I can figure out what you’re trying to do and why it can’t be done in a single smd_tag_list.

smd_tag_count displays the results on the entire table. Is it possible to display only the number of result of a section ?

No. A tag is ‘in use’ by a number of items, and that’s it. We’re not limited to articles in smd_tags and a ‘section’ has no bearing in files, images and links. There may be a way I could offer an attribute that only applies to articles of a particular section, but it may a) be confusing to only have an attribute that applies to 1/4 of the tag system, and b) need some serious work on the way tags are managed internally.

As far as I can tell, tags are supposed to be site wide — a taxonomy for your site that allows people to tag things across the broad spectrum of your content and allow visitors to find related content irrespective of section. I appreciate that smd_tags blurs the line a little and allows some wacky stuff that acts like categories, but it really is just tagging with a different pair of trousers.

If you’re going against the tagging ideal and only allowing people to find things in the current section then please would you let me know the use case so I may consider it in terms of a concrete example that fills visitors’ needs? If I can get my head round it then maybe I can do something to help.

I can not display the tag name selected

You’re right smd_tag_name cannot be used ‘outside’ the tag list. But what is to stop you doing this (untested) in exactly the same way you wrap <txp:images> around the article image to get its extended info, even though it may only return a list of 1 item:

<txp:smd_if_tag_list >
   <txp:smd_tag_list break="" wraptag="">
      <h2>tag_info : <txp:smd_tag_info item="title" /></h2>
      <h2>tag_name : <txp:smd_tag_name /></h2>
   </txp:smd_tag_list>
   <hr />
   <h2>smd_related_tags :</h2>
...

When creating a new tag (with Accented letter) tébâdö (title) -> tbd (name)

As mentioned in the documentation, this is a current limitation of auto-tag, and it suggests that you turn it off if you are using non-ascii character sets. If the tag name is blank when you click ‘Create’ (or hit Enter), TXP will ‘dumb down’ the tag’s title far more effectively than my plugin’s jQuery system can. A blank tag name on save will use the same mechanism as on the Categories panel to auto-create the name, so you should get the same results as you do when creating Categories.

Hope that helps. I’ll take a look at the sub-dir URL bug when I get a moment.


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

#138 2011-02-08 10:49:26

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

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

Thank you Steve for your detailed answers

OK, I never thought anyone would be nesting tag lists inside tag lists. That’s a pretty confusing way of working! It means for every outer tag you then go and get all the tags under it.

Sorry, but I already had done worse than that :P .
I’ve already nested category_list, as one can find examples here or here
I thought tag_list had the same behavior as category_list.

I just wanted a list and a sublist :

<ul>
	<li class="level0"> Parent tag
		<ul>
			<li class="level1"> children </li>
			<li class="level1"> children </li>
			…
		</ul>
	</li>
</ul>

But a definition list will be fine…

If you’re going against the tagging ideal and only allowing people to find things in the current section

Exactly.

Txp natively only has 4 content types (articles, images, links, files). In my project, I have a section called “blog” and one called “portfolio “. A “creation” is a different content type than a “article of blog” and I wished allows a filtering by tags for each content type (filter only for articles of blog, filtering only for the portfolio) . And why not a “advanced search” function with a filtering by tags on all types of content.
But it is true that the usage of tags to rethink the role of sections, categories. I’ll rethink the site hierarchy.

As mentioned in the documentation, this is a current limitation of auto-tag, and it suggests that you turn it off if you are using non-ascii character sets.

Sorry, I learn English with your documentation, and my understanding is limited

Offline

#139 2011-02-08 11:05:10

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

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

sacripant wrote:

I’ve already nested category_list

OK, makes sense. It’s certainly something that’s not outside the scope of the plugin, and sub-lists are an acceptable HTML structure so the plugin should allow you to do that. My guess is that the nested smd_tag_list is probably destroying the environment from the outer smd_tag_list (or ignoring it, or something). I’ll certainly look into allowing nested lists if I can figure out a suitable test environment on my server to prove the concept and trial it.

allows a filtering by tags for each content type (filter only for articles of blog, filtering only for the portfolio)

I see. Filtering by type is fairly easy because you can set up tags under each content type and URL filter them independently — even if they have the same name:

site.com/smd_tags/article/portfolio
site.com/smd_tags/file/portfolio

Filtering across content types is not possible directly from the URL (yet). Global tags would allow that in a certain capacity, so in some distant future it may be possible. The only way you can achieve it now is with smd_related_tags: simply take the URL’s tag (via an smd_tag_list) and use smd_related_tags as a query engine to ‘find’ other resources that match the URL tag.

But, as you have found, the tag counts will always be for all tags of that type. The only place you’ll probably spot any inconsistency is with articles because of the way you can slice and dice by section / category which you can’t do with the other content types. I just looked in the code and found I’d made myself a note above smd_tag_count that reads: “TODO: think about per-section / per-category counts”. Not sure if I can do it but it’s something I thought to consider!

Sorry, I learn English with your documentation, and my understanding is limited

Eeek, then it is me who should apologise for the state of my documentation! If you are learning English from my docs then I fear the worst :-p


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

#140 2011-02-08 12:25:56

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

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

Upon installing smd_tags in a fresh install of 4.3.0 i get the following error message:

SELECT command denied to user ‘…’@‘localhost’ for table ‘COLUMNS’ select COLLATION_NAME from INFORMATION_SCHEMA.COLUMNS where table_name = ‘smd_tags’ AND table_schema = ‘…’ AND column_name = ‘name’ textpattern/lib/txplib_misc.php(525) : eval()’d code:625 safe_field() in /…/textpattern/lib/txplib_db.php on line 89

Below that it still says: “Thanks for installing smd_tags. Happy tagging!”

So is that plugin installed correctly or not?

Thank you for any insights!

(I’ll donate later)

Last edited by jayrope (2011-02-08 12:32:49)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#141 2011-02-08 12:32:31

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

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

jayrope wrote:

SELECT command denied … select COLLATION_NAME from INFORMATION_SCHEMA.COLUMNS

Nuts. Well, it’s just saying that it can’t query the schema info to find out if your smd_tags tables need to be upgraded or not. I guess your MySQL user account is only allowed standard select privs and not to query the table meta info (I didn’t know that was possible, so thanks for reporting this: I’ll see if I can track down a fix).

But since that part of the plugin is only for upgrades and you’re on a fresh install, the UTF8 collation will have been set up already. So you’ll be good to go. If the smd Tags panel appears ok then it’s installed fine because it checks the tables when you visit the plugin’s tab.

(I’ll donate later)

Many thanks in advance :-)


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

#142 2011-02-08 12:36:13

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

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

Bloke, that was quick! I’ll use Paypal (although i hate it :)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#143 2011-02-20 15:17:41

jpdupont
Member
Registered: 2004-10-01
Posts: 752

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

>>> My site is in a subdirectory
Ah, that’ll be the problem then. I didn’t try it on subdirs, drat. I’ll go and play with it on a subdir install and fix it.

Hi Stef,

Have you some fix for the subdirs bug ?

Offline

#144 2011-02-20 15:23:27

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

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

jpdupont wrote:

Have you some fix for the subdirs bug ?

Not yet. Haven’t had a chance to look at it this week. Will try and find some time next week.


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