Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#697 2010-09-13 09:46:01

jens31
Plugin Author
From: munich / dtschermani
Registered: 2008-08-25
Posts: 183
Website

Re: tru_tags: A tagging plugin for textpattern

hm. dunno. pressed the reload button a zillion times. then edited all the articles and the wrong tags were gone.
strange (..but whatever..). thanks for your time.

Offline

#698 2010-12-10 09:15:52

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 277
Website

Re: tru_tags: A tagging plugin for textpattern

A while ago – after some time of debugging and measuring – I found a solution for my performance problems. Maybe it is not only useful for me and Nathan can integrate it in the official version. Tested on Textpattern 4.2 und 4.3.
Find it here:
tru_tags-3.7-alpha.txt

Mainly I changed the following in tru_tags_related_tags_from_search:

- $all_tags = array_merge($all_tags, tru_tags_trim_tags($article_tags));
+ foreach(tru_tags_trim_tags($article_tags) as $i) {$all_tags[] = $i;}

and in tru_tags_cloud_query

- $all_tags = array_merge($all_tags, tru_tags_trim_tags($temp_array));
+ foreach(tru_tags_trim_tags($temp_array) as $i) {$all_tags[] = $i;}

It brought me a significant performance boost!!
The hint was from here:
http://www.bitbybit.dk/carsten/blog/?p=203

A minor change is to replace array_key_exists() with isset
as this guy recommends: http://drupal.org/node/24501

in tru_tags_get_tags_for_article

- if (array_key_exists($tags_field, $rs)) {
+ if (isset($rs[$tags_field])) {

in tru_tags_related_tags_from_search

- if (array_key_exists($tags_field, $a)) {
+ if (isset($a[$tags_field])) {

in tru_tags_cloud_query

- if (array_key_exists($tags_field, $row)) {
+ if (isset($row[$tags_field])) {

Hope it helps someone else ….

Last edited by whocarez (2011-10-23 12:20:44)

Offline

#699 2011-01-07 19:33:00

Jaro
Member
From: S/F
Registered: 2004-11-18
Posts: 89

Re: tru_tags: A tagging plugin for textpattern

I’m having an interesting problem with this plugin. Here is what I do:

1.) I import articles with future publishing date using the jmd_csv plugin

2.) When the day comes the article is published automatically

3.) When I click on a tag that was assigned to an article the tag page is not found

4.) But when I manually republish the article (i.e. hit the Publish button) the tag page is found

Any ideas why this is happening?

Offline

#700 2011-01-22 04:02:42

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

Re: tru_tags: A tagging plugin for textpattern

Jaro, a few questions:

1) I assume your import CSV file had a column labeled “Keywords”?

2) Can you give me a few examples of exactly what was in that column in the input CSV file?

3) Can you give me a few examples of exactly how you specified the future publish date, in the CSV file?

Offline

#701 2011-02-07 07:28:27

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

Re: tru_tags: A tagging plugin for textpattern

I just created a tag archive page similar to the one on your site, truist. My only problem is that I have so far been unable to limit the output. The archive page shows every single tag and because I have many it takes a while to load and the page is very long. How can I resolve this?

<txp:tru_tags_archive listform="tag_archive" wraptag="ul" break="" class="unorderedList" limit="50" />

That’s my code for generating the archive. My “tag_archive” form is very similar to yours, using <txp:if_different /> to group the articles. But the limit attribute here does nothing.

Offline

#702 2011-02-07 16:46:33

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

Re: tru_tags: A tagging plugin for textpattern

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.

Offline

#703 2011-02-24 18:53:41

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: tru_tags: A tagging plugin for textpattern

Hi tru
2 questions (apologies if they’ve been asked/answered before, just checked the last few pages):
One, I’m trying to include the tag on the page header, but I must be doing something wrong cause it’s not working:

<txp:if_section name="tag">
<h2>Items tagged <txp:search_term /></h2>
  <txp:tru_tags_handler listform="search_results"/>
</txp:if_section>

<txp:search term> outputs nothing in this context. am I misunderstanding what I should do?

the other issue is I seem to be having the same problems with characters showing up as unicode encodings as another user previously had. This, again, does not happen in the regular search.

I get output like this (link to screenshot )

Any clues as to what’s going on?

thanks!

Last edited by kemie (2011-02-24 19:52:52)


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#704 2011-02-25 09:57:53

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

Re: tru_tags: A tagging plugin for textpattern

Inside the general condition <txp:if_section name="tag">:

  1. Use <txp:tru_tags_if_tag_search> to deliver output for a tag search (…/tag/search_term).
  2. Use <txp:tru_tags_tag_parameter striphyphens="1" /> to show the keyword you are searching for.

Check the details in the tru_tags documentation.


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

Offline

#705 2011-02-25 12:00:31

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: tru_tags: A tagging plugin for textpattern

thanks, merzi,that worked. i guess i misunderstood the docs..

any thoughts on the unicode chars?


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#706 2011-02-28 05:44:32

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

Re: tru_tags: A tagging plugin for textpattern

kemie – do you have a link to when the previous user was having that problem? I remember the problem, and I remember it took a long time to figure it out, but I think we did figure it out (here in this forum). I think it had something with using textpattern’s search result tags on a tru_tags query result page. Basically, that just doesn’t work :) Are you doing that?

Offline

#707 2011-02-28 09:13:26

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: tru_tags: A tagging plugin for textpattern

Hi Tru,
thanks a lot for looking in.
The post is #69 on this page:
http://forum.textpattern.com/viewtopic.php?id=15084&p=69

I am using <txp:search_result_excerpt /> on the form I use to display results, I guess that’s what’s causing the problem? should I use <txp: exceprt> instead?


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#708 2011-02-28 09:25:09

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: tru_tags: A tagging plugin for textpattern

answering my own question, yep, txp:excerpt works perfectly, no problems with characters. would have been sliiiightly nicer to have the search result excertp, but this is more than good enough.
Thanks for the help!


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

Board footer

Powered by FluxBB