Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2007-12-07 15:34:59

rad
New Member
Registered: 2007-12-07
Posts: 1

Re: [plugin] [ORPHAN] chh_related_articles

BUG FIXED
as a reply to the numerous post about the error messages this pluging creates.

Here instruction how to fix:

go edit

chh_article_lib. about halfway through the code you will find the “lAtts” function. This function gives an array of variables default values. The problem is that in this code not all the variables of the array are listed. you find the right bit of code in chh_related_articles (open as edit): the same funciton (lAtts) appears at the very beginning of the code. copy-paste the full array of variables into chh_article_lib, and thereby replace the partial array in the code.

good luck ;)

Offline

#74 2007-12-07 18:13:51

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

Re: [plugin] [ORPHAN] chh_related_articles

rad, you must be some kind of an angel ;))
Yesterday I thought of asking someone for the adoption of this wonderful plugin.
This works for 4.0.5, you mean?


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

Offline

#75 2007-12-07 18:21:41

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: [plugin] [ORPHAN] chh_related_articles

I’m following along with great anticipation.

This one really gets my vote for inclusion in the TXP core.
I’m sure that will never happen…but I’ve been Christmas shopping this week and have “wishlists” on my mind.

)


Tom

Offline

#76 2007-12-07 19:39:38

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

Re: [plugin] [ORPHAN] chh_related_articles

rad, if I do as you advise, the breakclass attribute will be gone. Is this OK?

When I was looking for “breakclass”, I found the line beginning with $atts = array_intersect_key at the very bottom of the plugin code. What about this attribute list, does it also have to reflect the changes?


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

Offline

#77 2008-04-08 07:26:47

derola
Member
Registered: 2006-03-09
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

Thank you for this great plugin.

I use the plugin and works fine and show me all the related articles in a list but I’m trying to show the related articles separated by category (by example)

Now
Race 1 article
…. hotel 1
…. hotel 2
…. restaurant 1

Desired
Race 1 article
…. hotels
……….. hotel 1
……….. hotel 2
…. restaurants
……….. restaurant 1

Each articles has a Category (hotel or restaurant) and custom fields “carrera_directorio” (example: marathon) and “tipo_directorio” (example: restaurant).

Who are the correct way to show related articles as desired.

Thanks

Offline

#78 2008-04-08 08:19:49

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

Re: [plugin] [ORPHAN] chh_related_articles

As far as I know the only way to achieve this is to use several instances of the tag, each one restricted to one category.


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

Offline

#79 2008-04-08 08:24:28

derola
Member
Registered: 2006-03-09
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

uli dijo:

As far as I know the only way to achieve this is to use several instances of the tag, each one restricted to one category.

I try to do this but don’t works :( Can you put an example?

Thank you

Offline

#80 2008-04-08 09:23:16

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

Re: [plugin] [ORPHAN] chh_related_articles

derola, I’m afraid I was too quick. By its nature any related article tag takes only the category of the current article, compares it to the list of existing articles and displays just those ones matching the criterion. Even txp:related_articles does so.

Have you tried something like …

Hotels
<txp:related_articles match=“Category1”/>

Restaurants
<txp:related_articles match=“Category2”/>

…with both categories being a subcategory of the current article’s category?

CAN NOT WORK! Sorry I couldn’t help you any further. But they have an excellent “How do I …” forum here ;)

Last edited by uli (2008-04-08 09:35:56)


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

Offline

#81 2008-04-08 13:27:17

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

Re: [plugin] [ORPHAN] chh_related_articles

Hi Derola,
Are you trying to output a list of hotels and restaurants near a certain race, where the race is an article, and each hotel or restaurant is an article? Sounds tricky…how are you relating the two at the moment? I didn’t quite understand your post, but maybe <txp:if_different> might be of help?

Offline

#82 2008-04-08 13:59:04

derola
Member
Registered: 2006-03-09
Posts: 21

Re: [plugin] [ORPHAN] chh_related_articles

nabrown78 dijo:

Hi Derola,
Are you trying to output a list of hotels and restaurants near a certain race, where the race is an article, and each hotel or restaurant is an article?

Yes and I would like to list hotels separately from restaurants.

Any idea or other plugin to make this?

Offline

#83 2008-04-08 14:22:07

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

Re: [plugin] [ORPHAN] chh_related_articles

Derola,
What about using neighborhoods/locations to relate the races and restaurants/hotels — I’m assuming that’s the real relationship? So category1 for each article would be whether it is a race, restaurant, or hotel, and the category2 would be the neighborhood. Then you could output a list of hotels and restaurants in the race article’s neighborhood. You could use <txp:if_different /> to sort them. If you haven’t used that tag before, it’s a little hard to get the hang of but can really come in handy. Check out graphicPush’s tutorial. If you need to slot any hotel or restaurant into more than one neighborhood, you might be able to use rss_unlimited_categories. Does any of that make sense?

Offline

#84 2008-04-08 22:03:33

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

Re: [plugin] [ORPHAN] chh_related_articles

Over and over again it turns out: morning wasn’t made for me ;) This should work (see article_custom, example 3):

Hotels
<txp:article_custom form="gastro_list" category="hotels" />

Restaurants
<txp:article_custom form="gastro_list" category="retsaurants" />

with the “gastro_list” article form containing:
<p><txp:permlink><txp:title /></txp:permlink></p>


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

Offline

Board footer

Powered by FluxBB