Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[plugin] [ORPHAN] chh_related_articles
chh_related_articles is an enhanced version of txp:related_articles that can determine “relatedness” not just by comparing article categories, but also via keywords, authors, and/or custom fields. Additionally, fields may be mapped to different fields for comparison. You could, for example, find all articles with a custom field that matches any of the keywords from the current article.
Because my docs are a bit sketchy, I was going to wait until I could write some examples before announcing it here. But some people are already downloading it, so I might as well go ahead and make it official.
For a quick example, this is an actual tag I am using:
<txp:chh_related_articles relation="related->keywords" custommode="list" section="?" excerpted="y" sortby="Title" sortdir="asc" wraptag="ul" break="li" label="related" labeltag="p" />
This means, in a mouthful, “list all excerpted articles in the current section, sorted by Title, with keywords that match one of the terms in the custom field named related.” Whee…
Little update: the plugin now can use an article form for list output instead of just the standard wraptag/break stuff.
Last edited by takshaka (2005-12-08 00:58:00)
Offline
Re: [plugin] [ORPHAN] chh_related_articles
takshaka,
Thanks! I have a site this will fit perfectly with. Yaaa!
Offline
Re: [plugin] [ORPHAN] chh_related_articles
i hope to try this, thanks for the plugin
EDIT: worked flawlelssly – using the keyword example as that’s what I wanted to use. thanks again
Last edited by sekhu (2005-12-08 14:36:43)
Offline
Re: [plugin] [ORPHAN] chh_related_articles
i doesn’t work on a article list page, just in a individual article page. is there a way do make it work on a article list page?
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Okay, I’ve made a couple of bugfixes. The tag now returns results on any article page or whenever it is included in an article form (for use in article lists).
Try the latest version
Offline
Re: [plugin] [ORPHAN] chh_related_articles
THANKS, it works great! :D
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Takshaka,
This plugin is awesome! Thank you so much. I am having a small issue when I use the tag to call a form from within a form.
This is inside a form called “artist”<code>
<div class=“releasesSM”></div>
<txp:chh_related_articles section=“releases” relation=“artist_name” form=“releases_excerpt” />
</div>
<div class=“artistname”><h6><txp:custom_field name=“artist_name” /></h6></div><div class=“artistbody”><txp:body /></div></code>
everything works fine, except once it processes the form “releases_excerpt” no other TXP tags get parsed.
so essentially the form will process the chh_related_articles tag, but any tags after that don’t work.
any ideas? It doesn’t seem to matter what’s inside the “releases_excerpt” form…if it calls a form at all , the subsequent tags don’t work.
using 4.0.2
Thanks for the help.
—
Tom
Offline
Re: [plugin] [ORPHAN] chh_related_articles
I had suspected such a problem would exist, but my shoddy testing didn’t manifest it. Thanks for doing my work. :)
At any rate, this shiny new version should take care of it.
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Ah! All is well. Many, Many thanks for the great plug-in and speedy response. Excellent work!
Cheers,
—
Tom Reno
Gainesville, Florida
Offline
Re: [plugin] [ORPHAN] chh_related_articles
takshaka-
relation=“author” was not working for me so after looking through your code I found a bug. At around line 80 where it says $search_words[] = $current_article['author'];
it should be $search_words[] = $current_article['authorid'];
Thanks for the great plugin.
Refresh Dallas and other Refreshing Cities.
Offline
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
Re: [plugin] [ORPHAN] chh_related_articles
Hey, takshaka, this is a really useful plugin, thank you for making it available.
Offline