Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-02-07 06:40:31

theonlydrew
Member
Registered: 2006-01-10
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

Is it possible to restrict only articles with the “words” listed in custom fields. For instance, there is a currently listed article and I want the related_article tag to list articles that are the same in category, and also have a certain word within a listed articles specified custom field.

If that makes sense. Basically the articles should only list if they have the matching category (this is how they are related), but only those that have a specified “word” listed in a specified customfield, will show. Ummm I basically just repeated myself. Hope you know what I mean! THanks.

Offline

#17 2006-02-07 21:00:11

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Right now, the plugin does not allow you to restrict article listings based on specified keywords or custom field values like chh_article_custom (or txp:article_custom, for that matter). But because it uses the same function library as chh_article_custom, it is something I should add once I have time.

You can, however, specify more than one relation, so that articles will be shown that have the same category and custom field keywords, which may or may not be good enough for your application:

<txp:chh_related_articles relation="category,SomeCustomField" listmode="all" custommode="list" />

Gag. Why did I not make custommode="list" by default? I hate adding that every time.

Offline

#18 2006-02-08 05:39:51

theonlydrew
Member
Registered: 2006-01-10
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

Look forward to the update.

Will give ——— txp:chh_related_articles relation=“category,SomeCustomField” listmode=“all” custommode=“list” —— – Some thought.

Thanks a bunch! Again!

Offline

#19 2006-02-10 23:33:14

Freshmango
New Member
From: Braunschweig, Germany
Registered: 2004-06-14
Posts: 7
Website

Re: [plugin] [ORPHAN] chh_related_articles

What a great plugin …

But I have one little problem. Everything works fine until I throw a <code>time=“any”</code> or <code>time=“future”</code> into <code><txp:chh_related_articles /></code>. With <code>time=“any”</code> only past articles are displayed. With <code>time=“future”</code> there will be no article.

Any ideas?

Last edited by Freshmango (2006-02-11 01:09:06)


<a href=“http://dennisfrank.info” title=“Dennis Frank gestaltet – Portfolio” style=“display: block; background:#efefef; color: #545454; float: left; padding: .5em; border: 1px none #9f9f9f; text-decoration: none;”><span style=“border-bottom: 1px solid #9f9f9f;”>Dennis Frank portfolio</span></a>

Offline

#20 2006-02-11 21:43:47

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Ah, I forgot to remove the hard-coded SQL when I added the time attribute.

Fixed: chh_related_articles 0.41

Offline

#21 2006-02-12 01:23:59

Freshmango
New Member
From: Braunschweig, Germany
Registered: 2004-06-14
Posts: 7
Website

Re: [plugin] [ORPHAN] chh_related_articles

Now it works. Thanks!

Oh wait …

It seems that <code>chh_if_data</code> is not working any more with <code>chh_related_articles</code> inside. :-(


<a href=“http://dennisfrank.info” title=“Dennis Frank gestaltet – Portfolio” style=“display: block; background:#efefef; color: #545454; float: left; padding: .5em; border: 1px none #9f9f9f; text-decoration: none;”><span style=“border-bottom: 1px solid #9f9f9f;”>Dennis Frank portfolio</span></a>

Offline

#22 2006-02-12 04:52:00

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

I’m using the two together myself. Post your problem in the chh_if_data thread. Be sure to copy/paste the <txp:chh_if_data></txp:chh_if_data> block you are using.

Offline

#23 2006-02-12 23:30:11

rbe
Member
Registered: 2006-02-12
Posts: 27
Website

Re: [plugin] [ORPHAN] chh_related_articles

takshaka, I’m having a problem getting the match by custom field to work… I’ve tried the very basic tag <code><txp:chh_related_articles relation=“custom_1” custommode=“list” /></code> and its not returing everything. I added two articles, both with the word 1928d in the custom_1 field (its name is piano in the admin settings). I’m not getting the related article to showup, however when I use <code><txp:chh_related_articles relation=“keywords” custommode=“list” /></code> and put 1928d in the keywords it works just fine. I’d prefer to use the custom_1 field if possible. I have the tag in a page, rather than an article form – that was the only place I could get anythign to work! Thanks in advance for any help!!!

Offline

#24 2006-02-13 05:47:19

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Looks like specifying custom fields by “custom_n” is not working. I made some changes recently that must’ve wrecked it. I’ll look into that.

You can, however, specify the custom field by name, so relation="piano" should work.

Offline

#25 2006-02-13 05:54:56

rbe
Member
Registered: 2006-02-12
Posts: 27
Website

Re: [plugin] [ORPHAN] chh_related_articles

Hmmm… I tried the <code>relation=“piano”</code> and it didn’t pan out either… Thanks for the quick response! I really appriciate the help; let me know if there is anything I can do to make it easier on your side to track it down. Thanks again!

Offline

#26 2006-02-13 15:32:36

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

Okay. Fixed by version 1.04 of chh_article_lib.

Offline

#27 2006-02-13 22:32:44

rbe
Member
Registered: 2006-02-12
Posts: 27
Website

Re: [plugin] [ORPHAN] chh_related_articles

THANK YOU takshaka… That worked perfectly! I really appriciate it. You are on top of it!

Offline

#28 2006-03-01 22:41:57

psimsy
Member
From: Londinium
Registered: 2004-12-27
Posts: 13

Re: [plugin] [ORPHAN] chh_related_articles

Hi
I am using your plugin in a form to return a list on related articles but it seems to be ignoring the category=“cuttings” and section=“press-releases”

I want to build 2 lists 1 related articles of a cat and one related to a section. eg..
<code><txp:chh_related_articles category=“cuttings” label=“Cuttings” />
<txp:chh_related_articles section=“press-releases” label=“Press releases” /></code>

Is it possible to use it twice in a article form and why would it be ignoring the cat /sect?

any help would …well help. p

Offline

#29 2006-03-03 00:17:26

takshaka
Archived Plugin Author
From: Below the Manson-Nixon line
Registered: 2004-06-02
Posts: 97
Website

Re: [plugin] [ORPHAN] chh_related_articles

psimsy wrote:
I want to build 2 lists 1 related articles of a cat and one related to a section. eg..

Maybe there is a misunderstanding. If you just want to list some articles in the category “cuttings”, then all you need is <txp:article_custom category="cuttings" form="whatever" />. The same goes for the section.

With chh_related_articles (or txp:related_articles for that matter), you don’t specify a category in the tag, it is chosen based on the category or categories of the current article.

Offline

#30 2006-04-01 11:26:41

vesam
New Member
Registered: 2005-08-14
Posts: 4

Re: [plugin] [ORPHAN] chh_related_articles

Hi,

to make short story even shorter: I’m in progress of making multilinual site and as I need a two level navigation and have section to work as language selection I’m looking at having chh_related_articles to work as 2nd level of navigation.

Now only caveat is that the current article is not shown in the related list (naturally) and I was wondering if there would be a way / quick hack to have it to display in the list? (together with glx_hl_current_article and custom list form I would get a list of articles in the same category as the one displayed with current article hilighted in it).

Thanks

  • * * * Edit: this woks like lighting a smoke while waiting a bus. Right after posting this I took another look on the plugin code and changed line 178 to:

$where = “Status = ‘4’” .

After the change it works like I wnt to. Now all I need is a plugin that would output a list of categories, hilight the current category by the one you are currently viewing and would print a link to the “first” article in the category…

Last edited by vesam (2006-04-01 12:32:39)

Offline

Board footer

Powered by FluxBB