Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#709 2011-02-28 13:44:12

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

Re: tru_tags: A tagging plugin for textpattern

Glad it worked out. The problem is that textpattern’s implementation of search_result_excerpt is designed to specifically to look for the ‘q’ parameter of the search, so when that is missing, it behaves strangely and tries to say that every whitespace character was what you searched for, and the HTML gets all messy. But if I set ‘q’, textpattern will just do a regular search, on top of the tru_tags results. So there’s no way for the plugin to be “compatible” with search_result_excerpt.

Offline

#710 2011-02-28 15:00:15

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

Re: tru_tags: A tagging plugin for textpattern

Nathan, your answer would be a good point in the non existing tru_tags FAQ/Wiki where we could point people to :)

kemie, the TXP full text search result excerpt isn’t really good output for a keyword search.

  • The easiest example is a photo blog where keywords are used as a meta description for photos.
  • And even in a text centric installation meta keywords don’t have to be bound to body text.
    • Example is a rant where I use a nickname but tag the article with the correct name.

Last edited by merz1 (2011-02-28 15:00:57)


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

Offline

#711 2011-03-05 11:07:46

th3lonius
Member
From: Iowa City, IA
Registered: 2010-02-09
Posts: 67
Website

Re: tru_tags: A tagging plugin for textpattern

truist wrote:

th3lonius – huh, I hadn’t thought of that case. tru_tags_archive does accept the limit attribute, but it doesn’t do what you’d expect with it. What happens is that tru_tags_archive is looping over the tag list, asking textpattern to generate a list of all the articles tagged with each tag, and it passes the limit attribute to textpattern each time.

So the limit attribute (in your example) is effectively saying to only show tags that have 50 or fewer articles associated with them. That’s probably all your tags :)

I haven’t tested this, but I’ll bet if you set limit to 1 (or some other low number), you’ll see that the archive page is missing any tags that were only associated with a single article. Maybe that’s actually more desirable than just arbitrarily limiting the page to the first 50 tags?

If not, I can see how it would be reasonable to expect the limit attribute to just limit the tag list to that many tags; please let me know.

You might also consider using caching on that page (maybe asy_jpcache ?) so only the first user to hit it (after an update) has to deal with the long long time.

Thanks for the response, truist. I put this problem aside at the time and then completely forgot that I made this post! Eliminating any tags associated with a single article may be a good idea, but it still leaves me with many many tags. My aim is to create a multiple page tag archive. Is there any way to pass a “pageby” declaration like the one used for txp:article_custom? I would just like to display tags alphabetically with maybe 25 per page. Thanks!

Offline

#712 2011-03-05 15:11:50

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

Re: tru_tags: A tagging plugin for textpattern

No, sorry, there’s no such feature at the moment. I’ll add it to my list, for someday

Offline

#713 2011-03-16 19:57:57

metamezzo
New Member
From: yonder flodden wall
Registered: 2010-09-04
Posts: 5

Re: tru_tags: A tagging plugin for textpattern

Thanks truist for this great plugin!

Just like to post here for those who are easily boggled (like yours truly) when no tag cloud or list is displaying using either tru_tags_cloud or tru_tags_list … make sure the section parameter (Presentation > Sections) displaying the page has its “Include in site search” parameter set to Yes.

(^_^)

Offline

#714 2011-03-16 20:18:39

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

Re: tru_tags: A tagging plugin for textpattern

metamezzo, thanks for the comments and the helpful advice. One clarification, though – the section that needs to be searchable is the one that has the tagged articles, not the one that has the tru_tags functions. (Unless your tru_tags functions are in the same section as your articles, then yes, that one section needs to be searchable.)

I also (finally!) updated the usage instructions to clarify this, at the bottom of step 5

Offline

#715 2011-07-08 14:04:58

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: tru_tags: A tagging plugin for textpattern

I have to install tru_tags in an web site running under Textpattern version 4.0.7. However, I try to convince the owner to update to the newest version. Does the Plug-In work with Textpattern 4.4.1?

Offline

#716 2011-07-08 18:01:05

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

Re: tru_tags: A tagging plugin for textpattern

Does the Plug-In work with Textpattern 4.4.1?

Yes


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

Offline

#717 2011-07-08 20:12:43

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: tru_tags: A tagging plugin for textpattern

Thank you, Markus.

Offline

#718 2011-07-11 17:06:05

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: tru_tags: A tagging plugin for textpattern

Could anyone familiar with the intestines of this plugin post an example code limiting the number of tags displayed by tru_tags_cloud, when working with articles from all sections or alternatively within just one section?
<txp:tru_tags_cloud limit="10" />
or similar doesn’t seem to work here on txp 4.4.1 with tru_tags v 3.6 installed.
Instead it always shows all tags, that have been used before.

EDIT: I’m sorry, my bad. <txp:tru_tags_cloud listlimit="10" /> works, but i can’t really find out, which of the (hundreds of) tags are being selected. I found keep=“random” though and will experiment on…

Sorry to have posted so soon.

Last edited by jayrope (2011-07-11 17:10:50)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#719 2011-07-12 01:25:23

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

Re: tru_tags: A tagging plugin for textpattern

jayrope – search this page for “listlimit” and you’ll see everything there is.

Offline

#720 2011-08-12 13:09:49

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: tru_tags: A tagging plugin for textpattern

Hi Nathan (or anyone),

I’m having a little trouble getting my head around your documentation to know if this is possible or not. But…

I have things setup much like you hav described in Steps 2 and 3 in your docs. So far so good—when you’re in the “blog” section with a single article context, you see the “keywords”, and they are linking to the tag section. Good.

But here’s where it falls apart for me. If I’m on a blog article and see those keywords in context (the tru tags), and I click one, I expect to see a list of articles on the tag section that have that keyword assignment. Then if I click one of those article titles (now in context of the tag section), It takes me to the full article in the section where the article is assigned (e.g., blog). This is the same model I use for articles between the blog and archive sections (but using categories, not keywords) and it works fine.

Problem is, I can’t seem to get any article list to display on the tag section, and I’m sure it’s because I’m unclear about your attribute allowances. (You could use a few examples of that in your docs, btw, as clues to help people know if they’re on the right track).

So, starting from the blog section, here is the relevant template snippet…

 <txp:if_section name="tag">
                 <txp:tru_tags_handler showcounts="1" />
           <txp:else />
                <txp:article form="blog-article" limit="1" />
</txp:if_section>

Here is the relevant snippet from the indicated form="blog-article"

<txp:tru_tags_if_has_tags>
           <p class="ia">Tags: <txp:tru_tags_from_article /></p>
</txp:tru_tags_if_has_tags>

This all works okay, except the showcounts="1" attribute in the handler tag doesn’t do anything on the keywords that are pulled; no counts are added. ??

Then on the tag section page, as per the “step 2” doc…

<txp:if_section name="tag">
               <txp:tru_tags_handler section="blog" listform="blog_titles" wraptag="ul" break="li" limit="100" />
         <txp:else />
               <txp:article form="blog-article" limit="1" />
</txp:if_section>

Here is where I expect to see a simple list of all articles (titles only in this case) that are associated with the keyword clicked on in the blog section context. But I get a blank page. Honestly, I don’t understand the structure of this snippet. For example, I don’t know that I even need the article call after else, but it’s not outputting anything either way.

If I remove all the attributes on the handler tag, I get some kind of full article output, but it doesn’t make sense and I don’t even know where the code is coming from that structure the content, because it’s not from the forms indicated anywhere in my code. In any case, the docs say the handler tag can use any regular Txp article attributes, but….?

Assuming this worked at this point, what then needs to happen is a user can click a title in the list, and be taken to the full article in context of the native section (i.e., blog).

Is this not what tru_tags can do for me?

Offline

Board footer

Powered by FluxBB