Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2005-11-06 16:44:11

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Hey Wilshire,

Is there any chance that the category (or is it categories?) attribute from rss_suparchive could be added to rss_suparchive_bycat? (the plugin help for rss_suparchive refers to the attribute as “category” but uses “categories” in the code example btw ;-) I’m looking to make a list of category links using showcatsonly="1", but there’s some I want to exclude (a couple of my categories are used for post language).

If there’s an obvious way to do this I’m missing please let me know

peace – boblet

Offline

#62 2005-11-14 05:37:01

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Is there a way to change the sort order with rss_suparchive_bycat (as in make in ascending instead of descending)?


bludrop studios .::. Creative Expression

Offline

#63 2005-11-15 05:17:12

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

> blumie607 wrote:

> Is there a way to change the sort order with rss_suparchive_bycat (as in make in ascending instead of descending)?

try the methods discussed in sorting article lists – they are for txp:article_custom but should work with this too

peace – boblet

PS try something like this: sortby="extract(day from Posted) ASC"

Last edited by boblet (2005-11-15 05:41:27)

Offline

#64 2005-11-15 05:27:55

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

I tried these sortby="Posted" sortdir="asc" and they didnt work.

It works for rss_suparchive, I think, but not for rss_suparchive_bycat

Last edited by blumie607 (2005-11-15 05:31:06)


bludrop studios .::. Creative Expression

Offline

#65 2005-11-15 05:38:05

boblet
Member
Registered: 2005-08-08
Posts: 53

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

How to make a list of articles that match the current article’s Category1 AND Category2, eg for a “what’s related” list on an individual article, when using Cat1 for article category and Cat2 for article language.

I wanted to list ‘related’ articles that match both categories of the current article – anything that’s in the same category and has the same language. useartcat1/2 lists match only one category (ie will give both language versons), and useartcats list articles matching either Category1 or Category2 (ie everything in the same language from any category in addition to the same Category1). Here’s what I changed (/hacked/butchered…)

from $rsc = getRows($q,""); to

<code>$rsc = getRows($q,”“);
$rscCat2 = $rsc[‘0’]; // the array order is reversed, so the first object is actually Category2
$rscCat1 = $rsc[‘1’];</code>

and from $scsql = $noidsql. " (category1 = '" . doSlash($catname) . "' or category2 = '" . doSlash($catname) . "')" .$secsql. " AND status=4 $posted ORDER BY section, posted desc"; to

<code>$scsql = $noidsql. “ (category1 = ‘” . doSlash($rscCat2[‘name’]) . “’ AND category2 = ‘” . $category2 . “’)” .$secsql. “ AND status=4 $posted ORDER BY category1, posted desc”;</code>

I call it using useartcat1 which matches the article’s category, then added the article’s $category2 to restrict to articles in the same language:
<txp:rss_suparchive_bycat form="a-recent-articles" showcats="0" section="articles" useartcat1="1" wraptag="ul" />

no doubt ugly, but it’s working. Note that this might stuff up other plugin functions, as $catname is used in some other places. Now I’ll need to hack in category attribute support for category lists I guess :-/

peace – boblet

PS Wilshire, there’s only extract($atts); at the top of function rss_suparchive_bycat, so initially I was getting lots of errors. Adding extract($pretext); seemed to help things – it’s in function rss_suparchive_menu, but not function rss_suparchive_bycat.

Last edited by boblet (2005-11-15 05:47:08)

Offline

#66 2005-12-21 20:50:32

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

I’m trying to use this plugin to limit the number of sections in the list but everytime i enter section=“anything” it displays nothing. Anyone have an idea of why this could be happening? Thanks.

Offline

#67 2005-12-27 01:16:35

edemay
Member
From: Montréal
Registered: 2005-08-16
Posts: 27
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Wilshire — great plugin. It works like a charm.

The only thing I wish was implemented was the ability to sort posts (and categories too i guess) by alphabetical order. I’m suspecting a lot of people are using textpattern (and this plugin) for other stuff than simple blogs. An alphabetical list of articles by topic (category) would seem quite natural for such a plugin. Is there a way to easily hack this into it?

Anyways, keep up the good work. Happy holidays.

Offline

#68 2006-01-04 03:37:29

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

edemay – Find this line:

<code>$scsql = $noidsql. “ (category1 = ‘” . doSlash($catname) . “’ or category2 = ‘” . doSlash($catname) . “’)” .$secsql. “ AND status=4 $posted ORDER BY section, posted desc”;</code>

and change the order by clause. To order by title, use this:

<code>$scsql = $noidsql. “ (category1 = ‘” . doSlash($catname) . “’ or category2 = ‘” . doSlash($catname) . “’)” .$secsql. “ AND status=4 $posted ORDER BY section, title”;</code>

Offline

#69 2006-01-07 20:47:56

edemay
Member
From: Montréal
Registered: 2005-08-16
Posts: 27
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Thanks wilshire, just what I was missing. Works like a charm!

Offline

#70 2006-04-03 22:32:46

Cowboy_X
New Member
Registered: 2004-10-27
Posts: 4

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Is there a way to use suparchive to show posts by a particular author? I tried…
txp:rss_suparchive author=“joe” /
…and didn’t get anywhere. Actually, I can’t figure out what that author attribute does at all.

Offline

#71 2006-10-10 04:12:49

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

HELP!

Suparchive_bycat is doing something real weird. On a certain section (events), it is only showing TWO categories. I do not understand why this is happening. It is fine with a different section (news), and it is fine with suparchive. But, for some reason, suparchive_bycat is restricting itself, on this particular section, to only 2 categories (instead of many more).

If you could let me know what’s wrong, that would be great. If you want to see the site, wilshire, you can email me…

THANKS!


bludrop studios .::. Creative Expression

Offline

#72 2006-12-02 00:32:56

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

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Hi all,
I have a list of category links created by:

<txp:rss_suparchive_bycat section="article" linktosection="archive" showcatsonly="1" />

This functions great, and creates urls such as:

http://www.peaceofmindorganizing.com/blog/archive/?c=Knitting

The only thing is, though I’ve set linktosection=“archive”, and the url appears to be linking to the archive section, the default section is being used instead. I’m feeling totally braindead right now – can anyone help?

Offline

#73 2007-09-25 16:44:06

zoltandragon
Member
Registered: 2007-04-30
Posts: 47

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

Hi, my problem is that while I have the showexcerpt=“1” – i.e. set active – no excerpt shows up in the list. (Yes, I do have excerpts filled in, and even the rss_auto_excerpt plugin is activated.)

Any help appreciated :)

Offline

#74 2007-10-04 17:06:38

dmarino
Member
From: Southern New Hampshire
Registered: 2007-06-15
Posts: 18
Website

Re: [plugin] [ORPHAN] rss_suparchive_bycat - related articles by category

I’m trying to use rss_suparchive_bycat and I’ve almost got it working how I want it (www.iamdanielmarino.com/blog – the category section). I don’t want the numbers appearing next to the categories. I’m currently using:

Code:

<txp:rss_suparchive_bycat section=“blog” linktosection=“archive” showcatsonly=“0” showcatcount=“0” limit=“9999” />

I thought that the showcatcount=“0” would get rid of the numbers, but it doesn’t seem to do anything…

Any ideas?

Thanks

Offline

Board footer

Powered by FluxBB