Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] chh_related_articles
Coke,
I need to output related articles for only category2 is that possible or could you add that? Often I don’t want articles to match both categories only one or the other.
Last edited by tinyfly (2006-04-05 20:52:04)
Refresh Dallas and other Refreshing Cities.
Offline
#32 2006-04-06 05:11:52
- Shaliza
- Member
- Registered: 2006-01-22
- Posts: 59
Re: [plugin] [ORPHAN] chh_related_articles
Great plugin!
Offline
#33 2006-04-09 23:03:35
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] chh_related_articles
on a Windows server, always getting this error when installing the plugin:
<code>PHP has encountered an Access Violation at 01334802 <?php
function chh_related_articles($atts) {
global $thisarticle, $pretext;
require_plugin(‘chh_article_lib’);
I had the server restarted but no change. I understand this is likely a Windows-PHP issue, but thought I’d bring it to your attention … other plugins (including chh_article_custom) load fine
edit to get around the prob, installed the plugin via the plugin cache dir (refer to Zem’s plugin tutorials) and it works fine
Last edited by nardo (2006-04-12 00:09:10)
Offline
#34 2006-04-12 00:07:50
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: [plugin] [ORPHAN] chh_related_articles
would it be possible to add reference to an article’s title when checking relationships?
relation="title->keywords"
as an example: if you had main events, each with satellite programs, the latter could just add their respective main event’s title in the keywords … there wouldn’t be a need to add the main event’s title to its own keywords as well
(I realise there’s workarounds, e.g. using categories, but in one case, this wasn’t possible)
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Thanks for this plugin!
But I can´t figure out how to use it on my frontpage (article list). The thing(?) is that I have the related articles in a different div than the article content. You can see it in the middle of the header on my site (piece of paper with clip)
As allways, it seems like a simple thing to do, but I´m lost in the dark…
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Thanks for this plugin!
This plugin supporting pagination? Article on page… Standart TXP tag navigation </txp:newer> not working :(
Offline
Re: [plugin] [ORPHAN] chh_related_articles
It should support pagination. Can you post your code?
Offline
Re: [plugin] [ORPHAN] chh_related_articles
yes
<code>
<txp:chh_article_custom section=“section_one,section_two…” sortby=“Posted” sortdir=“desc” listform=“cat_article_list” limit=“15” />
<txp:newer> <<— </txp:newer> | <txp:older> —>> </txp:older>
</code>
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Somebody knows why does not work?
Offline
Re: [plugin] [ORPHAN] chh_related_articles
Can this plugin be used in conjunction with wilshire’s unlimited categories plugin?
Offline
Re: [plugin] [ORPHAN] chh_related_articles
is there a way to “tweak” the code so that the list of related articles uses “category2” instead of the “title” when linking to the related articles?
for example, I have articles for an artist’s statement, bio, and resume
each article is assigned two categories:
category1 = the artist’s name
category2 = bio, statement, or resume
the title of the article is Artist’s Name – Bio (or statement, or resume – depending on what it is)
I don’t want the title show up in the related articles list because it is too long and obviously on the artist’s page (artist name not needed)
I just want the related articles list to list each article by it’s category2 designation (Bio, Statement, or Resume)
I am using vdh_flickr to display the artist’s images. On the thumbnails page (this uses a form within the article body of the artist’s gallery), I have placed the following chh_related_articles tag:
<code><txp:chh_related_articles form=“artist_materials” labeltag=“materials” break=“li” wraptag=“ul” /></code>
the form, arist_materials is:
<code><txp:permlink><txp:category2 /></txp:permlink></code>
the problem: nothing appears on the page (not even the vdh_flickr thumbnails) when I use form=“artist_materials” — if I use listform=“artist_materials” (or if I exclude the form attribute), a list appears on the page, but it is not using the artist_materials form (it seems to just ignore it and use the default <code><txp:permlink><txp:title /></txp:permlink> </code> listform)
Maybe there is an easier way to accomplish what I need. If not, the easiest solution I can think of is to somehow alter the chh_related_articles code so that it will, by default, list the permalink to an article using the article’s category2 instead of title.
thanks to anyone who might be able to help!
Last edited by photonomad (2006-06-24 17:40:47)
Offline
#42 2006-07-15 22:49:53
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: [plugin] [ORPHAN] chh_related_articles
Great job on this plugin, takshaka!
I have used it so much that I have reached the limits of its usefulness. All I have is one request…
It would totally rock if you could call up articles from other categories. For example, I am trying to reach articles whose custom field matches the current article, but belong to various different categories. In an ideal world, this would work
<code><txp:chh_related_articles relation=“custom_1” category=“Dates,Tours,Favorites”/></code>
Instead I am using your custom->keywords trick which works but is sort of confusing for my clients.
I would be willing to donate some funds for the cause. Hope your PHP hasnt gotten rusty :)
Offline
#43 2006-07-16 14:49:07
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: [plugin] [ORPHAN] chh_related_articles
photonomad, don’t know if it’s still useful, but here’s my piece of advice for your problem :
Prefer using three sections (bio, statement and resume) and naming each article by the artists name. Also, don’t forget the relation attribute in the chh_related_articles tag. In this case it would be
<code>
<ul>
<txp:chh_related_articles relation=“title” form=“artist_materials”/>
</ul>
</code>
the form, arist_materials would be:
<li><txp:permlink><txp:section /></txp:permlink></li>
You’ll be better off by avoiding the combination of forms and tagging attributes.
Last edited by guiguibonbon (2006-07-16 14:50:13)
Offline
Re: [plugin] [ORPHAN] chh_related_articles
I’m having a bit of trouble getting chh_related_articles to work for me. What I have is a list of articles, all with Category1 = About and Category2 = Sub. Now I have another group of articles also with Category2 = Sub, but with Category1 = Difference.
Setting chh_related_article with attributes section = ?, relation=category (default), listmode=all, should (AIUI), give me a list of the first articles, but exclude the second articles, as Category1 doesn’t match. Unfortunately, I get a list of both articles.
I think I’ve traced the problem to chh_sql_category, which ignores the $conjunction var, producing a union where I need an intersection. I’ve tried replacing the line in c_r_a where c_s_category is called, and replaced it with a string where I’ve replaced the OR with AND, and I get the results I want.
Unfortunately, I start to lose consciousness following the code – not to mention that I don’t want to start playing with the chh_article_library in case other parts of the webbuild start to unravell.
In any event, I thought I’d mention. I managed to find a work-around by using the custom fields instead. But this is a work-around.
If you’d like to see what I’ve done, I still have the files available. If it would help.
Cheers,
John Anderson
Soaring Penguin
Offline
#45 2006-11-04 16:24:12
- leith1
- New Member
- Registered: 2006-08-21
- Posts: 6
Re: [plugin] [ORPHAN] chh_related_articles
I’m also having trouble with the related articles. I’m trying to relate articles using the built in article Keyword field. I have used:
<txp:chh_related_articles relation="Keywords" />
in a single article form to display related articles by keyword. The TXP is in debugging mode and from the output it looks like the tag is being processed but no output results. Can you suggest something?
<txp:article form="single" limit="1" category="||||cat||||" />
[SQL (0.001426): select *, unix_timestamp(Posted) as uPosted from txp_textpattern as textpattern where ID = 7 and Status = 4 limit 1]
[article 7]
[SQL (0.000939): select Form from txp_txp_form as txp_form where name='single']
[Form: single]
<txp:title/>
<txp:author link="1" />
[SQL (0.000557): select RealName from txp_txp_users where `name` = 'jsadler' limit 1]
<txp:posted/>
<txp:chh_related_articles relation="Keywords" />
<txp:body/>
<txp:article form="section_home_archive" offset="1" limit="500" sortby="Title" sortdir="asc" />
</bc>
Offline