Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#649 2009-07-01 20:23:27

floodfish
Member
From: Brooklyn, NY
Registered: 2007-01-11
Posts: 155
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Works perfectly, makks! Thank you.

Offline

#650 2009-07-28 19:09:27

Soutpiel
New Member
From: London
Registered: 2009-07-28
Posts: 7

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Apologies if this has already been covered, but I can’t seem to find any info on this problem …

I’ve installed the latest version (rss_unlimited_categories patch 0.7.4p8) and all seems to be working well at first. The multiple category field shows up, I can select more than two, hoorah! (I notice at this point that the old TXP category 1 and category 2 drop-downs are still there, but I assume this is okay if I ignore them.)

When I view an article on the website, it displays its multiple categories as it should. Hoorah again.

The problem comes when I try to display articles by list (with the “rss_unlimited_categories_list” tag). Previously (when using the old tag and the default 2 categories) I had summary/listings pages generated from each category in a clean URL “/section/category” format, and this worked fine. In fact it still does work — but only for the OLD “official” categories assigned with the default category drop-downs. Furthermore, when I look under the Categories tab, under Article Categories, the number behind each tag also only reflects the number assigned in the default drop-downs. The new categories all show (0).

I’m hoping I’ve just overlooked some simple thing …

Offline

#651 2009-07-30 22:17:27

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

I believe there is a different way of category storage in the DB for the plugin.

Take a look at the installation instructions where the plugins author mentions that adding this plugin to an exisiting site (with already established categories) that some DB updates are needed as follows:

INSERT INTO textpattern_category (article_id, category_id) SELECT t.id, c.id FROM textpattern t LEFT JOIN txp_category c on t.category1 = c.name where c.type = 'article' and t.category1 != '';

INSERT INTO textpattern_category (article_id, category_id) SELECT t.id, c.id FROM textpattern t LEFT JOIN txp_category c on t.category2 = c.name where c.type = 'article' and t.category2 != '';

I had the sam problem some time ago but I don’t remeber exactly what I did but I did have this link saved in my notes. I’m not that knowledgeable about DB structure but I do know that you are extracting two different DB contents per different screen views. So joining the two places categories are stored should clear it all up. Wish I could tell you more but I’m pretty sure this is a good place to start.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#652 2009-07-30 22:46:28

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Soutpiel wrote:

Furthermore, when I look under the Categories tab, under Article Categories, the number behind each tag also only reflects the number assigned in the default drop-downs. The new categories all show (0).

I’m hoping I’ve just overlooked some simple thing …

that ‘0’ you see for every category (created by rss_unlimited_categories) in the categories admin area has ALWAYS been like that. i don’t think this has ever been addressed since the years this plugin has been available. i guess it really hasn’t bothered that many people?

i use aro_myadmin plugin and modified it to correctly count the categories that were created by this plugin…no idea how to do it for the native admin categories tab though

Offline

#653 2009-07-31 09:44:53

Soutpiel
New Member
From: London
Registered: 2009-07-28
Posts: 7

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

whaleen: Many thanks, I suspect you’re right. But I must admit this scares me a bit. I know nothing about databases and don’t want to break the whole site! Plus I have no idea how to implement those SQL statements. I’ll look into it…

iblastoff: Thanks, this looks useful. You’re right, I’m not that concerned by the count showing up incorrectly, but is there any chance the aro_myadmin plugin will fix the other problem? ie. At the moment when a user clicks on a “new” category, this returns no results — so TXP is only recognising the “old” default categories assigned by the drop-downs in the Write tab.

Offline

#654 2009-09-08 14:31:19

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

rss_unlimited_categories patch 0.7.4p10

Changes:

0.7.4p9

  • change default for attribute “linktosection” in rss_unlimited_categories_filedunder tag. (was: “article”, now: Current section)

0.7.4p10

  • Small BugFix (admin side)

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#655 2009-09-08 17:05:15

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Hi makss,

can you patch it again?

The populateArticleData($rs) expect some new variables as uExpires and uLastMod. But these are not defined by the plugin and a warning will be thrown out.

Affected plugin function: rss_unlimited_categories_article_list($atts)

All

$rs = safe_row("*, unix_timestamp(Posted) as uPosted", "textpattern", $q2);

have to be

$rs = safe_row("*, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod", "textpattern", $q2);

now.

Many thanks.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#656 2009-09-08 18:57:17

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

trenc wrote:

The populateArticleData($rs) expect some new variables as uExpires and uLastMod. But these are not defined by the plugin and a warning will be thrown out.

Thanks for patch, done in 0.7.4p11

rss_unlimited_categories patch 0.7.4p11


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#657 2009-09-09 01:08:31

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

Soutpiel wrote:

Furthermore, when I look under the Categories tab, under Article Categories, the number behind each tag also only reflects the number assigned in the default drop-downs. The new categories all show (0).

iblastoff wrote:

that ‘0’ you see for every category (created by rss_unlimited_categories) in the categories admin area has ALWAYS been like that. i don’t think this has ever been addressed since the years this plugin has been available. i guess it really hasn’t bothered that many people?
.
i use aro_myadmin plugin and modified it to correctly count the categories that were created by this plugin…no idea how to do it for the native admin categories tab though

rss_unlimited_categories patch 0.7.4p12b

  • Added display count the categories in admin categories tab
  • Added “Display only in sections” See Extensions tab

Last edited by makss (2009-09-09 13:10:57)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#658 2009-10-04 21:50:28

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

makss wrote:

Now added new attribute andcategory, use it. rss_unlimited_categories patch 0.7.4p6

Am I right in assuming that this allows me to say:

<txp:rss_u_c section="whatever" category="red" andcategory="blue" form="whatever" />

Will only show articles which belong to both categories red and blue and not show articles that only belong to one of these categories alone.

My task is to show articles which belong to a combination of categories based on logic like: “If it has both then show it.” “If it has only one don’t because the relatedness is what we are looking at.”

Is this new andcategory supposed to help me do this? Is there another good TXP way?


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#659 2009-10-06 14:59:04

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

whaleen wrote:

Will only show articles which belong to both categories red and blue and not show articles that only belong to one of these categories alone.

More try way:

<txp:rss_uc_article_list section="whatever" andcategory="red,blue" form="whatever" />

.

Another sample with attributes category and andcategory

<txp:rss_uc_article_list section="whatever" category="cat1,cat2,cat3" andcategory="cat4,cat5,cat6" form="whatever" />

Show articles if article categories (cat1 OR cat2 OR cat3)AND(cat4 AND cat5 AND cat6)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#660 2009-10-06 16:15:38

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories

This (naturally) returns every ‘red’ article and every ‘blue’ article:

<txp:rss_uc_article_list section="mysection" category="red,blue" form="article_list" />

This returns nothing:

<txp:rss_uc_article_list section="mysection" andcategory="red,blue" form="article_list" />

It seems the andcategory attribute is not working.

However:

<txp:rss_uc_article_list section="mysection" andcategory="red" form="article_list" />

does work in the same way as category (when only one category is defined).

I’m all patched up to the present with your work. I’m going to look at possible conflicts with other plugins now.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

Board footer

Powered by FluxBB