Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2006-05-19 12:49:12

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

Re: [plugin] [ORPHAN] chh_related_articles

It should support pagination. Can you post your code?

Offline

#38 2006-05-19 13:05:33

advertizer
New Member
Registered: 2006-03-03
Posts: 7
Website

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> <<&mdash; </txp:newer> | <txp:older> &mdash;>> </txp:older>
</code>

Offline

#39 2006-05-22 02:57:05

advertizer
New Member
Registered: 2006-03-03
Posts: 7
Website

Re: [plugin] [ORPHAN] chh_related_articles

Somebody knows why does not work?

Offline

#40 2006-06-05 11:40:19

arkham
Member
Registered: 2005-03-27
Posts: 102
Website

Re: [plugin] [ORPHAN] chh_related_articles

Can this plugin be used in conjunction with wilshire’s unlimited categories plugin?

Offline

#41 2006-06-24 17:39:25

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

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

#44 2006-09-05 19:40:28

SPenguin
Member
From: London, UK
Registered: 2006-07-13
Posts: 14
Website

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

#46 2006-11-08 16:17:10

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

Re: [plugin] [ORPHAN] chh_related_articles

I have also used <txp:chh_related_articles relation="Keywords" /> , but I get a long list of “tag errors”, seemingly one for each possible attribute, that look like this:
tag_error <txp:chh_related_articles limit="4" relation="keywords" break="li" wraptag="ul" section="article" /> -> Textpattern Notice: Unknown tag attribute: section on line 582

I know this plugin works beautifully on another site I did, with Txp 4.0.3 – I’m wondering if it’s not yet compatible with 4.0.4?
Anyone have a similar problem?

Offline

#47 2006-11-08 17:27:18

reid
Member
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: [plugin] [ORPHAN] chh_related_articles

If the tag is actually outputting the results you want (and it probably is), this is a false warning … and … “Warnings are only shown in Testing and Debug modes, they won’t be displayed when your site is set to Live” in admin > preferences.


TextPattern user since 04/04/04

Offline

#48 2007-01-12 19:49:37

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: [plugin] [ORPHAN] chh_related_articles

Is there an attribute or setting for this plugin that would display all related articles in a category including the article being actively viewed in an individual article.

I don’t want the list to change every time I select an article from the list. I want it to remain static.


Art Rogue – Fine Art Photography

Offline

Board footer

Powered by FluxBB