Textpattern CMS support forum

You are not logged in. Register | Login | Help

#101 2009-08-17 10:05:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,179

Re: [plugin] [ORPHAN] chh_related_articles

wraptag="p"?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#102 2009-08-17 11:53:32

ronan
Member
From: luzern (schweiz)
Registered: 2008-05-02
Posts: 53
Website

Re: [plugin] [ORPHAN] chh_related_articles

wraptag don’t include the label. but thanks for your input.

Offline

#103 2009-08-17 16:36:59

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,179

Re: [plugin] [ORPHAN] chh_related_articles

ronan wrote:

wraptag don’t include the label.

Sorry, I obviously still don’t understand.

Do you mean labeltag="p"? If this is not helpful, there’s chh_if_data in order to remove empty <p>s from your code example …


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#104 2009-08-17 16:45:00

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] chh_related_articles

Or variable and if_variable :)

<txp:variable name="hasarticles" value='<txp:chh_related_articles relation="keywords" limit="1" />' />

<txp:if_variable name="hasarticles" value="">
<txp:else />
	<p><txp:chh_related_articles relation="keywords" label="Verwandte Artikel: " labeltag="strong" limit="5" break=", " /></p>
</txp:if_variable>

Last edited by Els (2009-08-17 16:45:55)

Offline

#105 2009-08-17 18:20:57

ronan
Member
From: luzern (schweiz)
Registered: 2008-05-02
Posts: 53
Website

Re: [plugin] [ORPHAN] chh_related_articles

uli labeltag wrap the label only, wraptag the article-output. i need a solution to wrap both in a element. the was, when no articles exist, the p-element was empty. els your awesome, it works like a charme :)

thanks!

Offline

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

nabrown78
Member
From: Boston, MA, USA
Registered: 2006-10-04
Posts: 289
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: Boston, MA, USA
Registered: 2006-10-04
Posts: 289
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: Milan, Italy
Registered: 2013-08-14
Posts: 57
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: 7,103
Website

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.org | hblack.net | LABS | State Machines | NeMe @ github

Offline

Board footer

Powered by FluxBB