Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2005-12-20 22:32:44

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Oops. I’m going to set a record for most public revisions in a day — that’s three. Thanks, tinyfly.

Offline

#12 2005-12-23 19:03:26

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 92
Website

Re: [plugin] [ORPHAN] chh_related_articles

Hey, takshaka, this is a really useful plugin, thank you for making it available.

Offline

#13 2006-01-05 22:30:47

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_related_articles

Very great plugin! Thank you.

One question for keywords: how can you separate words?

eg. “credit spread”, “equity”

I would like to get only related articles which have “credit spread” oder “equity” and not “credit” or “spread”. Is the comma separating?

When I get the plugin right, it will use either labels, wraptags etc. or forms? How can I get a label, when I use an article form? Could you integrate a conditional “if related articles” tag? This would be really great!

Offline

#14 2006-01-06 17:50:54

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Just separate the words or phrases with commas: “credit spread,equity”. There should be no space before or after the comma (this will change; the next revision will ignore leading/trailing whitespace).

Also keep in mind that keywords are matched by substring, so that “equity” will also match “home equity” and “gender equity,women’s rights”.

EDIT: You can now use the strict attribute to force exact matches.

Could you integrate a conditional “if related articles” tag?

I take it you don’t want the label (or whatever text) to show unless there are articles listed. That is a problem with all article_custom style form-based lists.

To that end, I wrote a conditional tag (chh_if_not_empty) that I’ve been using myself. Perhaps I should make it available as a plugin, neh?

NOTE: This plugin has appeared, though with a different name: chh_if_data

Last edited by takshaka (2006-02-07 22:39:43)

Offline

#15 2006-01-06 18:55:47

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: [plugin] [ORPHAN] chh_related_articles

Thanks for your anweser.

To that end, I wrote a conditional tag (chh_if_not_empty) that I’ve been using myself. Perhaps I should make it available as a plugin, neh?

Perhaps you can even integrate that to your plugin :-)

Offline

#16 2006-02-07 06:40:31

theonlydrew
Member
Registered: 2006-01-10
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

Is it possible to restrict only articles with the “words” listed in custom fields. For instance, there is a currently listed article and I want the related_article tag to list articles that are the same in category, and also have a certain word within a listed articles specified custom field.

If that makes sense. Basically the articles should only list if they have the matching category (this is how they are related), but only those that have a specified “word” listed in a specified customfield, will show. Ummm I basically just repeated myself. Hope you know what I mean! THanks.

Offline

#17 2006-02-07 21:00:11

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Right now, the plugin does not allow you to restrict article listings based on specified keywords or custom field values like chh_article_custom (or txp:article_custom, for that matter). But because it uses the same function library as chh_article_custom, it is something I should add once I have time.

You can, however, specify more than one relation, so that articles will be shown that have the same category and custom field keywords, which may or may not be good enough for your application:

<txp:chh_related_articles relation="category,SomeCustomField" listmode="all" custommode="list" />

Gag. Why did I not make custommode="list" by default? I hate adding that every time.

Offline

#18 2006-02-08 05:39:51

theonlydrew
Member
Registered: 2006-01-10
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

Look forward to the update.

Will give ——— txp:chh_related_articles relation=“category,SomeCustomField” listmode=“all” custommode=“list” —— – Some thought.

Thanks a bunch! Again!

Offline

#19 2006-02-10 23:33:14

Freshmango
New Member
From: Braunschweig, Germany
Registered: 2004-06-14
Posts: 7
Website

Re: [plugin] [ORPHAN] chh_related_articles

What a great plugin …

But I have one little problem. Everything works fine until I throw a <code>time=“any”</code> or <code>time=“future”</code> into <code><txp:chh_related_articles /></code>. With <code>time=“any”</code> only past articles are displayed. With <code>time=“future”</code> there will be no article.

Any ideas?

Last edited by Freshmango (2006-02-11 01:09:06)


<a href=“http://dennisfrank.info” title=“Dennis Frank gestaltet – Portfolio” style=“display: block; background:#efefef; color: #545454; float: left; padding: .5em; border: 1px none #9f9f9f; text-decoration: none;”><span style=“border-bottom: 1px solid #9f9f9f;”>Dennis Frank portfolio</span></a>

Offline

#20 2006-02-11 21:43:47

takshaka
Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Ah, I forgot to remove the hard-coded SQL when I added the time attribute.

Fixed: chh_related_articles 0.41

Offline

Board footer

Powered by FluxBB