Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2006-03-11 02:06:31

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

Re: tru_tags: A tagging plugin for textpattern

gdtroiano, you and I are proving why pair programming is such a great thing. I hadn’t even though of using rewrite rules to make clean urls work. It’s hacky, but I got it working :)

I’ve posted a new version (v1.2), with support for clean urls (if you modify .htaccess), <code>rel=“tag”</code>, and showing tag counts in the <code>title</code> attribute. All of it is backwards compatible, and will behave like it used to if you don’t change anything.

I’ve also added a tiny bit of documentation to indicate that <code>tru_tags_handler</code> will take all the <code>tru_tags_cloud</code> attributes.

Please read the documentation about clean urls before using them. You have to modify your .htaccess file and the plugin (in one easy place) to make it work.

Download here and read the instructions here.

OIZee, the issue with the pagination is another side-effect of the <code>doArticles()</code> reuse, and there’s nothing I can do about it. It will show all the tagged articles (no matter how many!) on one page.

Offline

#26 2006-03-11 08:25:36

OIZee
Member
From: Denmark
Registered: 2006-03-10
Posts: 11
Website

Re: tru_tags: A tagging plugin for textpattern

Well, that’s the problem. It doesen’t show more that the first 10. It would be fine if it just showed all of them, but it doesn’t.

I have checked again and i have 12 articles in one of my tag-categories, but only 10 are shown with “?s=tag&t=thetagname”.

Thanks for the quick reply :-)

Regards
Brian

Offline

#27 2006-03-11 11:33:38

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

Re: tru_tags: A tagging plugin for textpattern

is there any way to make swedish character to work in tags?

Offline

#28 2006-03-12 03:37:09

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

Re: tru_tags: A tagging plugin for textpattern

You’re a lifesaver. I was getting 404 errors so I had to fiddle with the .htaccess to get it working on my sever, but I finally did it.

Another question: Is it somehow possible to use an < txp:else /> statement with the tru_tags_if_tag_search tag? I ask because I would like to customize the title, but I’m already using the ob1_title plugin and I would like to continue to do so.

Thanks for all the help!

Offline

#29 2006-03-12 20:46:57

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

Re: tru_tags: A tagging plugin for textpattern

It doesen’t show more that the first 10

I figured out the problem. doArticles() uses a default <code>limit</code> of “10”. You can override that yourself by passing <code>limit=“1000”</code> to <code>tru_tags_handler</code>, or you can upgrade to 1.3 (see below).

Is it somehow possible to use an < txp:else /> statement with the tru_tags_if_tag_search tag?

txp:else should have been working with tru_tags_if_tag_search, all along. I did notice that txp:else support wasn’t enabled for tru_tags_if_has_tags, and fixed that (but didn’t test it). You may be running into a textpattern bug where it won’t let you use nested txp:else’s in certain circumstances (I can’t remember what they are). I ran into that problem, and it seems that the general solution is to use multiple forms to hold the if’s. That’s how I got around it on my site.

And in other news, I released a new version (v1.3) that bumps the default <code>limit</code> to 1000 when doing a tag search, fixes txp:else support with tru_tags_if_has_tags, and fixed/documented a minor bug with the section keyword and tru_tags_handler.

Download here

Offline

#30 2006-03-12 21:44:41

OIZee
Member
From: Denmark
Registered: 2006-03-10
Posts: 11
Website

Re: tru_tags: A tagging plugin for textpattern

Thank you! Works fine now. Great plugin, keep up the good work :-)

Regards
Brian

Offline

#31 2006-03-13 02:30:09

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

Re: tru_tags: A tagging plugin for textpattern

txp:else should have been working with tru_tags_if_tag_search, all along. I did notice that txp:else support wasn’t enabled for tru_tags_if_has_tags, and fixed that (but didn’t test it). You may be running into a textpattern bug where it won’t let you use nested txp:else’s in certain circumstances (I can’t remember what they are). I ran into that problem, and it seems that the general solution is to use multiple forms to hold the if’s. That’s how I got around it on my site.

Now it’s working. Thanks! Now I can die happy.

Offline

#32 2006-03-13 11:57:02

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

Re: tru_tags: A tagging plugin for textpattern

is there any way to make swedish character to work in tags?

I don’t know. I don’t think I’ve done anything to prevent it, so if you’re having problems it may be a Textpattern problem. Have you tried it? Can you tell me what is going wrong?

Offline

#33 2006-03-13 14:22:25

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

Re: tru_tags: A tagging plugin for textpattern

Nathan, the plugin is splending :)

But i have some problems using it, perhaps you can tell me what i do wrong.
I’ve lattest 1.3 version and setup clean URLs accroding your instructions, created tag section.
But when i open on my blog URL something like /tag/internet/ – i receive TXP 404 error – Unknown Section. When i disable cleanURLs – all seem work ok.

Last edited by pospel (2006-03-13 14:23:01)

Offline

#34 2006-03-13 14:30:22

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

Re: tru_tags: A tagging plugin for textpattern

I’m not sure if it helps anyone else, but I had to alter Nathan’s .htaccess code to get it working on my site. I had to replace this line:

I had to replace the x % x % with an actual ampersand(&) like so:

RewriteRule ^tag/(.+)/$ ?s=tag&t=$1

Don’t know if it will help anyone else but…

Offline

#35 2006-03-13 15:13:39

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

Re: tru_tags: A tagging plugin for textpattern

gdtroiano wrote:

RewriteRule ^tag/(.+)/$ ?s=tag&t=$1

Seems like it works for me! Thanks! :)

Offline

#36 2006-03-13 15:31:10

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

Re: tru_tags: A tagging plugin for textpattern

Another issue. How i can customize the output of /tag/tagname pages (i.e. tag search)? It output articles using some weird form. I want it do my way, customizing /tag/tag_name output. Any hints?

update:

Ah, it uses default form. Well, I think it should be possible to override output form for tag search.

Last edited by pospel (2006-03-13 15:39:50)

Offline

Board footer

Powered by FluxBB