Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#106 2011-04-08 17:31:27

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: [plugin] [ORPHAN] chh_related_articles

This is a really handy plugin for outputting a list of articles related to the current article by Keyword. Can anyone think why it might not be working in TXP 4.3.0? I think it was working fine for me, and I upgraded a bit ago, and just noticed it now seems to be outputting just the 3 most recent articles, for every article. Mysterious.

Offline

#107 2011-04-09 15:29:15

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: [plugin] [ORPHAN] chh_related_articles

Aha. I realized that this plugin is doing a simple match, and sorting the results by date or whatever you specify. What I really want is to sort by some kind of relevance. Like an article that shares 3 Keywords with the current article is more relevant than one that shares only 2 Keywords.

I got as far as checking out the MySQL functions MATCHAGAINST…but I’m stumped. Would anyone know how to modify this plugin to achieve sorting by relevance? Or more simply, how to just write the correct MySQL query?

Offline

#108 2012-01-17 12:07:55

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

Re: [plugin] [ORPHAN] chh_related_articles

ola nabrown78

did you come closer to the goal of relevance..? sounds interessting..

Offline

#109 2015-10-06 15:27:42

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 92
Website

Re: [plugin] [ORPHAN] chh_related_articles

I am looking for a plugin for related articles, something more flexible than the txp:related_articles tag. chh_related_articles would be fine but I cannot get the code anymore. can someone address me somewhere on the web or post the last version of the txt file here on the forum? or maybe there is a more recent (and not orphan) plugin with same features?
thanks for any help

Offline

#110 2015-10-06 15:35:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,384
Website GitHub Mastodon Twitter

Re: [plugin] [ORPHAN] chh_related_articles

Hi gilibaus

You could use native tags. Something like:

<txp:article_custom section='<txp:section />' category='<txp:category />'  limit="10" wraptag="ul" break="li" label="Related articles" labeltag="h3">
<txp:if_article_id>
<txp:else />
<txp:permlink><txp:title /></txp:permlink>
</txp:if_article_id>
</txp:article_custom>

Yet again, it depends what listings you want. Let us know and there is probably a way.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#111 2015-10-07 07:07:10

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 92
Website

Re: [plugin] [ORPHAN] chh_related_articles

Thank you colak, but I’ll leave native tags as a last option. I am looking for something more flexible out-of-the-box, I mean something to list related articles based on section, category, keyword or relevance. I cannot find a tool like that, so I was wondering if there is an updated version of chh_related_articles that can fit nicely into Txp 4.5.7

Offline

#112 2015-10-07 09:20:26

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: [plugin] [ORPHAN] chh_related_articles

gilibaus wrote #295430:

I am looking for a plugin for related articles, something more flexible than the txp:related_articles tag. … maybe there is a more recent (and not orphan) plugin with same features?

It’s not exactly (nor only) for related articles, but etc_search is more recent and yet not orphan. :) If you install it, go to “Extensions->Search settings” and create a search form (say, 1) with the article-context query

ID!=<txp:article_id /> AND {/^[\w\s\-]+$/::Keywords;/#(.+)/::Section='$1'} ORDER BY Title

Then calling

<txp:etc_search_results id="1" form="some_article_form"
	query='(<txp:keywords />) #<txp:section />' />

within an article (form) will output the keywords-related articles from the same section. You can add more chunks to the query for targeting by categories, author and so on.

Or switch to 4.6, where <txp:article_custom /> accepts exclude attribute:

<txp:article_custom exclude='<txp:article_id />' keywords='<txp:keywords />' ... />

Offline

#113 2015-10-07 19:05:36

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 92
Website

Re: [plugin] [ORPHAN] chh_related_articles

Got it: one way or another I will have to get my hands dirty with native tags and/or database queries ;) Thank you all for your suggestions.

Offline

#114 2017-03-06 05:33:49

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [plugin] [ORPHAN] chh_related_articles

Is there an update to this? chh_related_articles was really great because it covered many options of fields including custom fields.

(And thanks for the etc_search mention — won’t replace what I need for related articles, however I needed a live_search replacement :)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#115 2017-03-06 08:44:08

etc
Developer
Registered: 2010-11-11
Posts: 5,677
Website GitHub

Re: [plugin] [ORPHAN] chh_related_articles

alicson wrote #304420:

Is there an update to this? chh_related_articles was really great because it covered many options of fields including custom fields.

IIRC, we have extended match attribute in 4.6 to author, keywords, custom fields… Try something like

<txp:related_articles match="Category1, My_Custom_Field" />

(And thanks for the etc_search mention — won’t replace what I need for related articles, however I needed a live_search replacement :)

I’m sure it can replace what you need, just say what :-)

Offline

#116 2017-03-06 09:31:41

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [plugin] [ORPHAN] chh_related_articles

Oh yay! I’ll try txp:related_articles again, that will hopefully cover it.
Thanks!

**update: <txp:related_articles /> is perfect.

Last edited by alicson (2017-03-06 10:18:55)


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

Board footer

Powered by FluxBB