Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2006-03-07 04:18:52

truist
Plugin Author
From: Ohio, USA
Registered: 2004-11-09
Posts: 256
Website

Re: tru_tags: A tagging plugin for textpattern

I’ve bumped the plugin to v1.0. The only feature change was to support multiple sections in the “section” attribute of tru_tags_cloud. Beyond that, I added text to the code and help about the copyright, license, and ran_tags.

Download v1.0 here

Last edited by truist (2008-07-03 12:07:57)

Offline

#12 2006-03-07 17:06:05

gdtroiano
Plugin Author
From: Highland Park, NJ
Registered: 2005-01-29
Posts: 59
Website

Re: tru_tags: A tagging plugin for textpattern

Is it just me or do the class and breakclass attributes not work?

Offline

#13 2006-03-07 21:33:42

p_see
Member
Registered: 2006-02-24
Posts: 17

Re: tru_tags: A tagging plugin for textpattern

Class attributes don’t work for me too.

??p_see – why do you want the different url? Just so it is “completely messy” rather than “partially messy”? Is one better than the other? (I’m not criticizing – I’m wondering if I should make the change.)??
I changed the url just because the native’s url don’t work with messy. Thus I have to “fix” the URL. It is just a troubleshooting report. It would be better, I can imagine, if url was “partally messy”, but working with messy.

I would like to make a suggestion: it would be practical to have a popup list in the advanced options with all the existing tags (like the popup categories). When selecting a tag in the popup it woulb be added in the keywords area. I don’t know if it is difficult to implement…

@+

Last edited by p_see (2006-03-07 21:38:43)

Offline

#14 2006-03-07 22:38:48

Rigel
Member
From: España
Registered: 2005-09-02
Posts: 99
Website

Re: tru_tags: A tagging plugin for textpattern

Hi truist,

how I can use a custom field like in ran_tags?

thanks!

Offline

#15 2006-03-08 00:55:14

truist
Plugin Author
From: Ohio, USA
Registered: 2004-11-09
Posts: 256
Website

Re: tru_tags: A tagging plugin for textpattern

Is it just me or do the class and breakclass attributes not work?

They do work, if you specify a wraptag and/or a break. For “class” to work, you have to specify a wraptag that is a html tag. For “breakclass” to work, you have to specify a break that is a html tag. The common case is:

<code>txp:tru_tags_from_article wraptag=“ul” break=“li” class=“ul_class” breakclass=“li_class”</code><br><br>

If you don’t specify a wraptag then there’s nowhere to put the class, and if you don’t specify the break the default break is a comma, which isn’t an html tag, and therefore can’t have an attribute.

changed the url just because the native’s url don’t work with messy

By “don’t work” you mean that the tag search isn’t working? If so, I’ll fix it right away :)

would be practical to have a popup list in the advanced options with all the existing tags

I’ll bet it’s quite possible. I’m going to keep it in mind for a “version 2,” as I don’t have time to dig into admin plugins just yet.

how I can use a custom field like in ran_tags

I’m sorry to say that you can’t. Part of the simplicity of the code is that it depends on the Textpattern code, which only uses the Keywords field.

If you weren’t using the Keywords field for anything else, but did still want to use a custom field for tru_tags, you could modify the Textpattern code to do so. But that seems like an unusual case.

Last edited by truist (2006-03-10 00:40:38)

Offline

#16 2006-03-08 02:14:39

p_see
Member
Registered: 2006-02-24
Posts: 17

Re: tru_tags: A tagging plugin for textpattern

Messy URL
As I say in my first post:
This is the type of url we got :<code>http://mysite/tag?t=nikon </code>

So the tag search don’t work because the “tag section” is not called. We must have instead: <code>http://mysite/?s=tag&t=nikon</code>
This is why I have changed the 2 lines of the path url like this:
<code>$url = ‘http://’ . $siteurl . $path_from_root .’?s=’. $tagsection . ‘&t=’;</code>

would be practical to have a popup list in the advanced options with all the existing tags
I’ll bet it’s quite possible. I’m going to keep it in mind for a “version 2,”
Good!

Offline

#17 2006-03-08 15:04:08

gdtroiano
Plugin Author
From: Highland Park, NJ
Registered: 2005-01-29
Posts: 59
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

They do work, if you specify a wraptag and/or a break. For “class” to work, you have to specify a wraptag that is a html tag. For “breakclass” to work, you have to specify a break that is a html tag.
If you don’t specify a wraptag then there’s nowhere to put the class, and if you don’t specify the break the default break is a comma, which isn’t an html tag, and therefore can’t have an attribute.

Brilliant. I should have figured that out. Thanks!

Not sure if this was being planned, but I had the need to output a list of the tags and how many articles are associated with each tag—like a category list. I just copied and modified the tru_tags_cloud function to create a tag called “tru_tags_catlist” Here’s the modified plugin (the new function is at the bottom): tru_tags.txt

Offline

#18 2006-03-09 17:24:14

himynameisjonas
Plugin Author
From: Sweden
Registered: 2004-10-15
Posts: 21
Website

Re: tru_tags: A tagging plugin for textpattern

i have a little problem, when i click a tag, for exampel sun, you get a list with all tag with sun in the name, like sunshine, sunne and so on…

Offline

#19 2006-03-10 03:22:16

truist
Plugin Author
From: Ohio, USA
Registered: 2004-11-09
Posts: 256
Website

Re: tru_tags: A tagging plugin for textpattern

I’ve published a new version, with a lot of (backwards compatible) changes. They are:

  • p_see – I finally got what you were talking about, and incorporated your change. tru_tags will now work on sites that are configured to use messy urls.
  • gdtroiano, your change was a great idea. I incorporated it, but not by adding a whole copy of tru_tags_cloud. Instead, I’ve made a new function (tru_tags_list) that can generate any sort of list – a cloud, a bulleted list, with/without tag counts, and with/without font-size changes. tru_tags_cloud now just calls tru_tags_list with appropriate defaults. If you want to upgrade, you should just be able to switch your “tru_tags_catlist” call over to say “tru_tags_list showcounts=“true”“. There are some other fancy customization options there, if you want them :)
  • As part of the rework of tru_tags_cloud, I added two new attributes: minpercent and maxpercent. These let you control the generated font-size percentages. They default to 100 and 200 (which is what they were hard-coded to before).

himynameisjonas, your problem is another side-effect of reusing the Textpattern code. It does a “like” match on the tags, which will match substrings. Sorry :-(

Finally, I’ve updated the features list to include these new features, and a list of all the issues/bugs/missing features I’m aware of. (I’ve also updated the usage instructions.)

Download v1.1 here

Last edited by truist (2008-07-03 12:07:37)

Offline

#20 2006-03-10 11:06:45

p_see
Member
Registered: 2006-02-24
Posts: 17

Re: tru_tags: A tagging plugin for textpattern

Hi, I had difficulties to explain because of my poor English.
The w3.validator ask to change the <code>’&t=’</code> (in the url) to <code>’& amp;t=’</code>. (Without the space beetwen “&” and “amp;”).
You can add this small modification for next the release.
As far as I can say Tru_tag is small, easy and beautiful.
Thanks again.

Offline

Board footer

Powered by FluxBB