Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#661 2010-01-22 17:12:51

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

Re: tru_tags: A tagging plugin for textpattern

Nathan Andreas markup is here. There he starts to explain his performance problems.

Nathan, FYI: I massively reduced the use of tru_tags tag clouds on my page. But not because clouds are not working but I don’t see too much sense in tag clouds anymore.

Right now I only use article specific tag output in single article pages and in article lists. The only clouds I offer are on the tag page itself: the huge cloud and the related tags cloud.

Do you remember that I wanted to have A-Z tag index pages?

What about a little core code conference with wet and bloke to discuss an extra table for keywords?


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

Offline

#662 2010-01-22 20:30:42

whocarez
Plugin Author
From: Germany/Ukraine
Registered: 2007-10-08
Posts: 305
Website GitHub Twitter

Re: tru_tags: A tagging plugin for textpattern

I made some tests with xcache (1.2.2 debian and 1.3.0 self compiled), but it has no effect on this issue.

For articles, the relevant debug output is the following.

<!-- Runtime:    7,9147 -->
<!-- Query time: 0,267597 -->
<!-- Queries: 43 -->
<!-- Memory: 4315Kb, <txp:title /> -->
[SQL (0,0001518726348877): select * from tru_tags_prefs where 1]
				<txp:tru_tags_if_has_tags>
					[SQL (0,00051212310791016): select Keywords from textpattern where ID='2124' AND Keywords <> '']
					[<txp:tru_tags_if_has_tags>: true]
					<txp:tru_tags_from_article texttransform="capitalize" />
						[SQL (0,00011491775512695): select name from txp_section where searchable != '1']
						[SQL (0,052505016326904): select Keywords from textpattern where Keywords <> ''and Section != ''and Section != 'error_default' and Section != 'tag' and Section != 'kontakt' and Section != 'artikel_senden' and Section != 'test' and Section != 'feeds' and Section != 'newsletter' and Section != 'unsubscribe' and Section != 'mitarbeit' and Section != 'service' and Section != 'drucken' and Section != 'newsletter_real' and Status >= '4' and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00')]
				</txp:tru_tags_if_has_tags>

maybe I should make some other tracing with strace or xdebug, but I´m not sure for what I should looking for in trace/debug outputs and what parameters are useful ….

Last edited by whocarez (2010-01-22 20:31:11)

Offline

#663 2010-02-08 14:54:49

geroldbraun
Member
Registered: 2010-01-19
Posts: 19
Website

Re: tru_tags: A tagging plugin for textpattern

How can i list articles associated to a special tag? In the usage description i read that it is possible to “List all the tags associated with an article” – what i need is the other way round. Background: i want to show on my homepage the youngest 3 blog-articles tagged with “newsletter”.


Smile, Breath, Go slowly – Thich Nhat Hanh

Offline

#664 2010-02-08 15:52:54

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

Re: tru_tags: A tagging plugin for textpattern

  1. http://www.rainskit.com/reference/497/trutags-usage-instructions#tru_tags_handler
  2. http://textbook.textpattern.net/wiki/index.php?title=article, arguments: limit, keywords

In general: Please inhale all the descriptions for all the Textpattern template tags and all the tru_tags template tags.

Code example for a) tag section page template and b) tag search output:

<txp:tru_tags_if_tag_search>
  <txp:output_form form="txp_tru_tags_if_tag_search_list" />
<txp:else />
<txp:tru_tags_handler form="tagpost" sort="Posted desc" limit="100" />

RTMF, meaning ‘it definitely helps’ :-)

Edit: BTW, you should think about using a category ‘newsletter’ instead of a tag. IMHO a tag is more like a very brief excerpt of the content (DE: Vergleich mit Etikett an einer Ware) and a category is more like a structural element eg like an aisle or orientation sign in a supermarket. Edit :) You will need txp:article_custom to list articles by category.

Edit II: (DE) Gerold bei Dir auf der Seite läuft doch schon ‘tag search result page’. Du brauchst also eigentlich nur die txp:article-Frage zu klären. Egal ob mit tag oder category.

Last edited by merz1 (2010-02-08 16:14:26)


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

Offline

#665 2010-02-08 17:43:14

geroldbraun
Member
Registered: 2010-01-19
Posts: 19
Website

Re: tru_tags: A tagging plugin for textpattern

Thank you merz1. (Ich denke, hier sollte ich auf Englisch antworten, damit alle verstehen, um was es geht, oder?)

I know my rtfm :) and i did. First i tried for days <txp:linklist category=“xyz”> which does [Edit:] not only work with link-categories and not with article-categories.[/Edit] Then i thought it must be possible with tru_tags which i already use and i dived into every description. Without any luck to find a solution. Only then i dared asking here ;)

Meanwhile i discovered txp:article_custom as you suggest it. I never thought that one could make lists with it. Anyway, i found a solution. Thanx again.

Last edited by geroldbraun (2010-02-08 18:13:47)


Smile, Breath, Go slowly – Thich Nhat Hanh

Offline

#666 2010-02-17 16:26:51

BotBot
New Member
Registered: 2010-02-17
Posts: 2

Re: tru_tags: A tagging plugin for textpattern

Hey there,

so, this is my first post in this forum.
I recently started to renew my whole homepage, moved my blogspot to textpattern and set up a fast and clear little website.
Everything is now included and thanks to textpattern I made a custom layout without all the fancy stuff. It all worked out pretty well, with my basic css/html/php knowledge.

Also the tru_tag plugin works well. But i want to change the list layout.
At the moment, it´s defined by <ul> and <il> as far as I see.

My question is.

Can I cange it somewhere in the plugin itself?
. I only don´t want to have the discs in front of the tags.

or

How do I change it via css or txp tags?

There are attributes given in on the instruction page, but where to put them. There aren´t any examples.

I also want to have a small counter in () brackets.

Would be great if you could answer these little question.

Best
Chris

Offline

#667 2010-02-17 18:40:44

BotBot
New Member
Registered: 2010-02-17
Posts: 2

Re: tru_tags: A tagging plugin for textpattern

Cancel everything I wrote in the last post.

I always put the attributes after the wrong tag. (D´oh)

Problem solved :-)

Offline

#668 2010-02-18 00:54:06

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

Re: tru_tags: A tagging plugin for textpattern

Those are my favorite type of problems :)

Offline

#669 2010-02-26 16:48:54

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

Re: tru_tags: A tagging plugin for textpattern

All – after the birth of my son, I had a chance to look at whocarez’ performance problems, and it turns out I introduced a major (and stupid) performance problem in tru_tags v3.5. The problematic code is/was designed to work around a problem with setting the activeClass CSS tag when people used hyphens in their tag names, and it does work around that problem, but it also introduced this major performance problem. (Fairly low benefit for a major cost, eh?)

In essence, the performance problem is that any time a list of tags is rendered (e.g. for an article or for a cloud) tru_tags is re-doing the query that is used to generate the whole cloud. On a site with hundreds of articles and tags, this can be a major performance hit.

I’m still working through the problem with whocarez, but I wanted to let you all know that you might want to downgrade to v3.4, if you are having performance problems, until I can release a v3.7. I will attempt (with whocarez’ help, I hope) to fix this problem and to generally improve performance in any other areas that need it, before releasing v3.7. Note, though, that with the baby I don’t have a lot of spare time for this :)

Thanks,
Nathan

Offline

#670 2010-02-26 16:55:36

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

Re: tru_tags: A tagging plugin for textpattern

P.S. – instead of downgrading to v3.4, you could also modify the v3.6 code yourself. It would re-introduce the bug with the activeClass (for users who have hyphens in their tags) but that will only affect you if you:

1. Use the activeClass CSS tag in your stylesheets
2. Have tags with hyphens in them

So if you don’t fall into that situation, or you don’t care about that bug, you can fix the performance problem by modifying v3.6 as follows:

In the tru_tags_render_cloud() function, there is a line (line #443 in the source, if that helps) that currently says:

$tag_search_tag = tru_tags_tag_parameter(array(‘striphyphens’ => ‘lookup’));

Change that line to say:

$tag_search_tag = tru_tags_tag_parameter(array());

That should do the trick (for now).

Offline

#671 2010-02-27 13:43:13

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

Re: tru_tags: A tagging plugin for textpattern

OK, thanks Nathan. In my case it was line #410 and if you search for the expression you must use:

$tag_search_tag = tru_tags_tag_parameter(array('striphyphens' => 'lookup'));

My TXP 4.2.0 was working with tru_tags 3.6 like a charme and still is :)


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

Offline

#672 2010-03-21 02:03:33

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: tru_tags: A tagging plugin for textpattern

OK, I’ve been a long-time user (since v2.3), but I simply cannot get tru_tags 3.6 to show articles in a tag search using TXP 4.2.0.

I have a section called “tag”, and a corresponding page called “tag”. Inside the page template, there is this:

<txp:tru_tags_if_tag_search>
  <h2>Articles Under the Tag <em><txp:tru_tags_tag_parameter /></em></h2>
  <dl id="taglist">
    <txp:tru_tags_handler 404redirect="0" form="tag"  />
  </dl>
</txp:tru_tags_if_tag_search>

Something is working because <txp:tru_tags_tag_parameter /> outputs the correct tag name. But I cannot get any articles to show from <txp:tru_tags_handler />, and if I remove the 404redirect="0" attribute, I get a 404 every single time. I simple do not understand what I am doing wrong here.

UPDATE:

It seems this might be a deeper issue. I tried building a simple search form, and I cannot get TXP to display results for anything. Any clues here?

Last edited by kevinpotts (2010-03-21 03:52:01)


Kevin
(graphicpush)

Offline

Board footer

Powered by FluxBB