Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#433 2008-06-02 16:40:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: tru_tags: A tagging plugin for textpattern

I notice two things:

  1. hello mom is also showing up on your blog page and on individual (blog) article pages
  2. you seem to be using /title as URL mode, not /section/title

Could any of this be related?

Offline

#434 2008-06-03 02:03:45

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

Re: tru_tags: A tagging plugin for textpattern

Markus – I don’t think there’s a simple way to do what you want. It wouldn’t be too hard to add a “tru_tags_if_tag” function, but I can’t promise that I have time to make a new version myself (I’m traveling this week, then moving next week). I really wish I could, just to offer a small ‘thanks’ for all your help here on the forums, so I’ll try. Stay tuned…

ywhickam / Els – I think Els may have found the issue – I’ve never tested tru_tags with /title mode. And I can imagine that your “if_section” call always fails, if the URL isn’t used to indicate the section. I’m not sure what happens if you switch modes (even temporarily) though – but I imagine it’s safe :) Can you try that and see if it fixes it? I’m not sure what to do, though, if that does fix it – tru_tags is built on the assumption that you can call it whenever you want to do a tag search (and usually that is indicated by the URL including the “tag” section) – so without sections in the URL, I’m not sure what to do.

Offline

#435 2008-06-03 10:37:42

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: tru_tags: A tagging plugin for textpattern

Thanks Nathan. It’s not urgent, just a request by a client.

But ‘add a “tru_tags_if_tag”’ will for sure enhance your plug-in furthermore :)


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#436 2008-06-03 19:02:59

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

ywhickam / Els – I think Els may have found the issue – I’ve never tested tru_tags with /title mode. And I can imagine that your “if_section” call always fails, if the URL isn’t used to indicate the section. I’m not sure what happens if you switch modes (even temporarily) though – but I imagine it’s safe :) Can you try that and see if it fixes it? I’m not sure what to do, though, if that does fix it – tru_tags is built on the assumption that you can call it whenever you want to do a tag search (and usually that is indicated by the URL including the “tag” section) – so without sections in the URL, I’m not sure what to do.

I just switched it to /section/title mode and it still doesn’t work. I’ve left it up that way so you can see for yourself. I will change it back in a few days so as not to create too many error pages from links back to my site.

It sounds like you don’t really have a solution for my issue. It may be time for me to give up hoping using the plugin. :(

Offline

#437 2008-06-03 19:11:19

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

Re: tru_tags: A tagging plugin for textpattern

No, don’t give up yet! That would be very sad!

At this point, I’m fairly convinced that the problem is in your page/form code, not in tru_tags. The biggest clue is that the “hello mom!” is appearing on all blog pages – that indicates a problem with the “if_section” call, not with tru_tags. I’d say to try to figure that problem out first. (Are you nesting “if_section” calls? Nested if’s of the same type don’t work.)

I’ve had great success in the past helping people debug tricky problems by logging into their site and poking around. I promise not to break anything :) If you want me to do that, please send credentials to truist-20080603@truist.com.

Offline

#438 2008-06-04 12:50:31

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

(Are you nesting “if_section” calls? Nested if’s of the same type don’t work.)

Ding! Ding! Ding! We have a winner! lol

So, I learned something new today. Fixing this fixed the plugin. Thank you for being patient and working this out with me. I really appreciate it. :)

Offline

#439 2008-06-04 15:45:56

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

Re: tru_tags: A tagging plugin for textpattern

When I wrote that line, I realized that it was probably the source of the problem all along. I’m glad we found it :)

As it turns out, this bug will be fixed in the upcoming 4.0.7, so in a few months this wouldn’t have been a problem. Amusing that we were caught by it now.

Offline

#440 2008-06-04 18:16:10

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: tru_tags: A tagging plugin for textpattern

Well, releases don’t always come out on schedule. :)

Oh, and I meant to mention, plug in works just fine with /title.

Thanks again! :)

Offline

#441 2008-06-05 04:55:48

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

Re: tru_tags: A tagging plugin for textpattern

All – I am very quietly announcing the undocumented release of tru_tags v3.2. I’ve finished and tested the code but I won’t have a chance to get the documentation updated for about two weeks, so I’m putting it out there now for anyone who wants to try it :)

This release was inspired by my trying to give Markus the feature he asked for (and I did!) and then I got carried away…

Features:

  • For Markus: tru_tags_if_tag_search now accepts a “tag” parameter that lets you ask “am I searching for tax XYZ?”. That should do what you want.
  • For everyone: it is now possible to make a tag-based “archives” page. It needs serious documentation, but I’ll give you the short version here:
    • It follows the basic model of the FAQ entry (you’ll need a new section, a new form, and possibly a new page)
    • The new section needs to make a call to “tru_tags_archive”. (You’ll need a new page, or an “if_section” in an existing page, to do this.) This function takes all the standard tru_tags_cloud attributes (although some will be irrelevant). You will almost certainly want to set the “listform” attribute to the name of your new form.
    • In the new form, use the “if_different” tag as shown in the FAQ, but inside that tag you’ll want to use “tru_tags_current_archive_tag” to create the tag heading. By default, tru_tags_current_archive_tag will just return the tag name, but it also accepts an attribute (“link”) that if set to “1” will tell it to return a complete URL for that tag.
    • Check your page titles – you may need to handle this new section differently. (Do whatever you did for the “tag” section.)
    • You can see an example at http://www.rainskit.com/archive/
  • For Els: tru_tags_tag_parameter now takes a new value for the “striphyphens” attribute. If you specify “lookup” (txp:tru_tags_tag_parameter striphyphens=“lookup”), tru_tags will look up the actual tag used in the articles and return it. That will preserve whatever dashes or spaces you used. (This resolves an old feature request.)

Notes:

  • I’ve been telling people for a long time that they can use the “searchform” attribute for tru_tags_handler to specify the form that will be used for the results. Somewhere along the way, the Textpattern code changed so this won’t work any more. Instead, you’ll need to use the “listform” attribute. In this release, though, I made tru_tags check to see if you specified “searchform” and if so, it switches it to “listform” (if that isn’t already specified), so it should fix any currently-broken sites.
  • I deprecated the tru_tags_search_parameter function, now that txp:search_term exists. My function still works, but it will generate a warning (if you aren’t set to ‘production’ mode).
  • I’ve figured out how to fix the problems with article list limits and the older/newer links, for tru_tags searches. (I haven’t implemented the fix yet, though!) I think something changed in the Textpattern code, because I noticed an obvious way to do it that I’m pretty sure wasn’t there before. So that feature is now at the top of my list for the next release of tru_tags.
  • I added a few links to reference materials on the admin/extensions/tru_tags tab, and a paypal link :)

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

Offline

#442 2008-06-05 15:36:47

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: tru_tags: A tagging plugin for textpattern

“For Markus:” Ouch, blushing red as bold as you you formatted it ;) Thanks a lot Nathan!!! And Yes, it works.

> I won’t have a chance to get the documentation updated for about two weeks

I have put it on alarm for June 20th.

> striphyphens=“lookup”

Nice detail for the Dutch among us (It’s soccer time in Europe again :).

> older/newer links, for tru_tags searches

Great! I am waiting for that.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#443 2008-06-05 16:08:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

For Els: tru_tags_tag_parameter now takes a new value for the “striphyphens” attribute. If you specify “lookup” (txp:tru_tags_tag_parameter striphyphens=“lookup”), tru_tags will look up the actual tag used in the articles and return it. That will preserve whatever dashes or spaces you used.

Oooh, you remembered! Many many thanks! :)

Offline

#444 2008-06-05 16:27:04

WebKat
Member
Registered: 2007-01-16
Posts: 301

Re: tru_tags: A tagging plugin for textpattern

This is awesome. Can you give an example of the form you used on your archive?



WebKat

Offline

Board footer

Powered by FluxBB