Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2006-03-25 16:35:32

pospel
Member
From: Ukraine
Registered: 2004-02-23
Posts: 40
Website

Re: tru_tags: A tagging plugin for textpattern

Hey, truist, any news about new feutures? ;)

Offline

#50 2006-03-25 17:46:33

bluearc21
Member
From: US.VA
Registered: 2004-02-24
Posts: 62
Website

Re: tru_tags: A tagging plugin for textpattern

Yeah, I really like how Flickr doesn’t include tags with only 1 photo attached in their “top tags cloud”. This back to you question of if it should be included functionality in the tru_tags plug.

Thanks for the great plugin!


“If you build it, they will come.”

Offline

#51 2006-03-26 00:25:36

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

Re: tru_tags: A tagging plugin for textpattern

Sorry about the delay, folks. Life got in the way. But I come bearing good news: the release of tru_tags v1.4, with all the recently-discussed features, implemented backwards-compatably. Specifically:

Do you mean how tags with more than one word are shown as tag%20name in the url?

This feature had me tearing my hair out for hours, until I realized that I had changed the textpattern code in a way that conflicted with the plugin change. Tags with spaces now generate urls like <code>http://www.example.com/tag/tag-with-spaces/</code>. (This should work with messy urls, but I haven’t tested it.) Tags with dashes also work. If you happen to have one tag like <code>first tag</code> and another like <code>first-tag</code>, they’ll act like they’re the same thing in the tag search. Note that if you made the change to the textpattern code to allow multiple tags to be specified in the url, this feature won’t work. (This was why I was tearing my hair out.)

Yes, I meant just plain list like without any html tags. Something like switching tag output adding attribute generatelinks=“off/on”.

tru_tags_from_article and tru_tags_list (and thereby tru_tags_cloud and tru_tags_handler) now support <code>generatelinks=“0”</code>. If you set this, each tag is now wrapped in a <code>span</code> instead, to give me a place to put style and class attributes.

you can add to every tag class definitions like: class=tagStyle01, class=tagStyle02, class=tagStyle03 and so on

It finally clicked (after examining the source of various other tag clouds) how this should work. Each tag now has two classes set, one for smallest/medium/largest, and one for it’s “step”. For example, a given tag might be tagged with <code>class=“tagSizeSmallest tagSize1”</code>. You can use this in conjunction with the new <code>setsizes=“0”</code> attribute to have complete control over the styling of your tag cloud.

Note that all the old default behaviors still work, so you don’t have to use any of this.

I’m also thinking of adding feature whereby the smallest tags (e.g. those with only 1 use) could be hidden.

The new <code>mintagcount</code> and <code>maxtagcount</code> will filter out any tags with fewer/greater associated articles.

Also, someone posted a comment to my site asking about support for getting the tags into the RSS/Atom feeds. That turns out to be another textpattern annoyance, but there is a hack to make it possible. See the comments on my site for a link and instructions.

As always, the documentation has lots more detail. Remember turn switch clean urls back on, after you upgrade!

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

Offline

#52 2006-03-26 12:16:01

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: tru_tags: A tagging plugin for textpattern

works like a charm! thanks for the update.

Offline

#53 2006-03-31 21:48:07

pospel
Member
From: Ukraine
Registered: 2004-02-23
Posts: 40
Website

Re: tru_tags: A tagging plugin for textpattern

Havent checked it yet, but big thanks for your work, truist! :)

Offline

#54 2006-04-06 07:37:46

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Re: tru_tags: A tagging plugin for textpattern

Greetings,

I’m trying to get tru_tags running.

I’ve done everything that’s writen at the documentation. The taging works. tru_tags_from_article does display the tags related to the article BUT I can’t figure out how to display the tag cloud.

tru_tags_handler isn’t displaying anything even in the tag section and tru_tags_cloud doesn’t work either.

Can somebody help me?

Here are the errors it returns:

tag_error <txp:tru_tags_cloud/> -> Warning: max() [function.max]: Array must contain atleast one element on line 166

tag_error <txp:tru_tags_cloud/> -> Warning: min() [function.min]: Array must contain atleast one element on line 167

tag_error <txp:tru_tags_cloud/> -> Notice: Undefined variable: tags_html on line 211

tag_error <txp:tru_tags_cloud/> -> Warning: join() [function.join]: Bad arguments. on line 1417

Last edited by Souljacker (2006-04-06 08:08:14)

Offline

#55 2006-04-06 11:46:42

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

Re: tru_tags: A tagging plugin for textpattern

Souljacker – the problem is that tru_tags_list (the thing that generates the cloud) isn’t finding any tags in the database. Can you give examples of exactly how you’re calling tru_tags_handler and tru_tags_cloud? Are you using the Keywords field? Have you modified the plugin code or the textpattern code?

Offline

#56 2006-04-06 13:36:55

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Re: tru_tags: A tagging plugin for textpattern

Hi

I’ve used the Keywords field. I’ve checked the DB and the fields are there.

Here’s how I’m using the tags

<code>
<txp:if_section name=“tag”> <txp:tru_tags_handler />
<txp:else /> <txp:article limit=“20” />
</txp:if_section>
</code>

Offline

#57 2006-04-06 15:56:49

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

Re: tru_tags: A tagging plugin for textpattern

I’m just randomly guessing at things here, but:

  • Are the tagged articles marked as ‘published’? tru_tags will filter out tags for draft and future-dated articles
  • Have you set the mintagcount or maxtagcount attributes?
  • Are you textpattern databases/columns named something unusual? (Which version of TXP are you running?)
  • Where do you see these errors – in the page itself, or in your server logs? Are there any other errors in your server logs?
  • Does the “tag search” work? (e.g. when you click on a tag in an article, does it display all the articles associated with that tag?)

Offline

#58 2006-04-06 20:09:42

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

  • Are the tagged articles marked as ‘published’? tru_tags will filter out tags for draft and future-dated articles

Yes.

  • Have you set the mintagcount or maxtagcount attributes?

No, is it necessary?

  • Are you textpattern databases/columns named something unusual? (Which version of TXP are you running?)

No. I’m using version 4.0.3 default installation.

  • Where do you see these errors – in the page itself, or in your server logs? Are there any other errors in your server logs?

I’ve set Production Status to “Debugging”

  • Does the “tag search” work? (e.g. when you click on a tag in an article, does it display all the articles associated with that tag?)

Yes, it does.

Pretty strange … can’t figure out what it is :(

Offline

#59 2006-04-06 22:55:37

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

Re: tru_tags: A tagging plugin for textpattern

(it’s not necessary to set mintagcount or maxtagcount)

More thoughts:

  • You didn’t quite answer the question about where the errors show up, but I’m assuming that you’re seeing them at the top of your web page. Do you have access to your web server logs, and if so, are there any additional errors there?
  • What version of PHP are you using? (4 or 5) Are you using Apache? What version? (1.3 or 2)
  • Is your site running in clean url mode, or messy url mode?
  • Have you done any of the things from Step 7 of the instructions (where it tells you how to turn on clean tag urls)? If so, please UNDO all that stuff and see if that fixes it.
  • Are the appropriate sections marked as “searchable”? (See admin -> presentation -> sections). (I may have just discovered a bug related to this!)

Offline

#60 2006-04-06 23:18:29

Souljacker
Member
From: Terra Brasilis
Registered: 2005-06-20
Posts: 47
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

  • Are the appropriate sections marked as “searchable”? (See admin -> presentation -> sections). (I may have just discovered a bug related to this!).

Well, you have ^^ It was it. It still displays a warning message at the top of the page while in debugging mode:

<script>
tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: titlecount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: displaycount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: titlecount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: displaycount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: titlecount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: displaycount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: titlecount on line 205

tag_error <txp:tru_tags_handler/> -> Notice: Undefined variable: displaycount on line 205
</script>

It works now, though :)

Thank you very much!

Offline

Board footer

Powered by FluxBB