Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 12,440
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.

Hire 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: 12,440
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.

Hire 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: 726
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: 12,440
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.

Hire 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: 726
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: 12,440
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.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#145 2011-02-20 15:51:04

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

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

Thanks :) !

Offline

#146 2011-02-21 23:50:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

I’ve found the subdir bug. Stupid mistake. For those that need it now before the official fix is available, find the following line of code in the smd_tag_name function (it’s around line 2878):

$dest = ($permlink_mode == 'messy' || !$cleanurls)
	? pagelinkurl(array('s' => $section, $urlnam => $tname, $urltyp => $smd_thistag['tag_type']))
	: '/'.$section.'/'.(($in_default) ? '' : $urlsec[0].'/').$smd_thistag['tag_type'].'/'.$tname;

And change it to:

$dest = ($permlink_mode == 'messy' || !$cleanurls)
	? pagelinkurl(array('s' => $section, $urlnam => $tname, $urltyp => $smd_thistag['tag_type']))
	: hu.$section.'/'.(($in_default) ? '' : $urlsec[0].'/').$smd_thistag['tag_type'].'/'.$tname;

Just a couple of characters difference at the start of the 3rd line there makes everything happy! Sorry about that oversight. I’ve fixed a few other minor things in my dev copy and have one last big issue to look at on behalf of jakob (a massive query explosion) then I’ll release v0.41 as a bugfix before starting work on any new features.


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

#147 2011-02-25 20:18:18

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

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

Bloke

I don’t recall this being reported, or covered in the docs, but perhaps I missed it. If so, my apologies.

I just installed smd_tags on a site with no article categories.

  • I enabled smd_tags, added three article tags, and went to the write tab. The tags didn’t appear anywhere.
  • I added a couple of categories, and the tags appeared.
  • I had the “link tag to categories” feature set to “off”, so I had not expected it to make a difference whether there were categories or not. Apparently that is not the case.

I would think that the ability to function independently would be preferred, but perhaps this is intentional?

fwiw

Mike

Last edited by maverick (2011-02-25 20:18:51)

Offline

#148 2011-02-26 17:02:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,440
Website GitHub

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

maverick wrote:

I would think that the ability to function independently would be preferred

Yes, definitely preferred. It’s a bug that I spotted last week actually and have fixed in the next version. Thanks for the report.


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

#149 2011-03-24 23:19:25

giz
Plugin Author
From: New Zealand
Registered: 2004-07-26
Posts: 433
Website GitHub Twitter

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

Hi Stef – I’m enjoying your plug-in and am only just starting to comprehend what can be done with it :-o

I’ve hit a problem which won’t go away: I’m trying to ‘page’ or ‘chunk’ my output from smd_related_tags:

<txp:smd_related_tags type="article" form="default" class="page1" section="projects" limit="8" />
<txp:smd_related_tags type="article" form="default"  class="page2"  section="projects" offset="8" limit="8" />
etc

Problem is, my limit isn’t working: I ask it to limit to 8 and it displays 3.

My tags are specified like so:

Commercial (2)
—Hospitality (0)
—Industrial (0)
—Offices (1)
—Retail (2)
Cultural (4)
Education (0)
Infrastructure (1)
Public (0)
Residential (25)
—Multi-Residential (9)
—Single Dwelling (16)

and so I suspect the plug-in is only counting root level tags.

Any suggestions as to what I’m doing wrong? The count is wrong whether I use a single smd_related_tags or not…

Can you provide me with an example of how you might use the _match=“tag_level” attribute? I’ve tried everything but the ‘really obvious’ approach…

Thanks

Offline

#150 2011-06-04 12:24:27

Dwayne
New Member
From: Hamburg, Germany
Registered: 2008-11-09
Posts: 7

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

First of all thanks for this plugin. It totally fits my needs for a better image management.

My plan is to tag some images in order to display them on my homepage. I guess the reason why I couldn’t query the tags URLs would be that I already manipulated my pages pretty much. But that’s I ok, since I do not want to make use of those pages.

I played around a bit with a form and the plugin specific template tags, especially smd_related_tags, but without any success. According to textpattern’s debugging information and the SQL queries only the tag name is missing. I did a cross check in PHPMyAdmin and the tag name is the only missing piece in the puzzle. Most likely the problem is that there are no URL params, right? Is there a way to query my tagged images or at least some tag informations without an article or section context?

Offline

Board footer

Powered by FluxBB