Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#457 2007-07-20 15:28:26
- amyng
- Member
- Registered: 2007-01-05
- Posts: 55
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hi Matthew,
Thanks for the answer—I’ve just downloaded the plugin and am off to experiment!
x
Amy
Offline
#458 2007-07-20 15:38:58
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Ramen Angel wrote:
The spaces that show up in inline category lists are caused by Textpattern.
In the textpattern directory, in the file taghandlers.php, find the function doWrap. See how “n” (newline, defined in lib/txplib_html.php) is being inserted at various points. If your separator is a comma or similar, here is the culprit:
return ($wraptag) ? tag(join($break.n, $list), $wraptag, $atts) : join(n.$break, $list);
If you haven’t set a wraptag, the newline goes before your separator, which results in the mysterious space. So, either set a wraptag, or delete the second newline (“n” plus the adjacent period). The newline is only there to format the HTML source, it isn’t needed otherwise.
You’ll have to modify the code further down if you are using enclosing break-tags, like
<li>
. The same principle applies: delete the newline that is adding an unwanted space in your rendered HTML.
Or simply upgrade to TXP 4.0.5 which doesn’t have those newlines there.
Last edited by ruud (2007-07-20 15:39:21)
Offline
#459 2007-07-31 19:13:37
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
A smallish bug report for this plugin:
Clicking the HTML or Preview tabs while editing, then clicking back to the Text tab, will cause the chosen categories to loose their selected state (even on a previously-saved article). If you don’t notice this and subsequently save that article, its categorization will be lost.
Offline
#460 2007-08-01 16:27:54
- mattgilbert
- Member
- Registered: 2006-03-23
- Posts: 70
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hey,
I’m having trouble with rss_unlimited_categories_article_list, as it seems some others are, too. I can’t get it to display anything. I tried:
<txp:rss_unlimited_categories_article_list category="Video" />
<txp:rss_unlimited_categories_article_list category="14" />
“14” is the id number for the Video category. I wasn’t sure from the online documentation which to do. Neither of these tags output anything. I’ve run the MySQL statements, and I can see that they have made the right changes in the database. rss_unlimited_categories_list works fine, with the correct article counts. I tried uninstalling and reinstalling the plugin, no help. I’m using Textpattern 4.0.5.
Any clues?
Offline
#461 2007-08-09 10:29:19
- Ramen Angel
- New Member
- Registered: 2007-07-11
- Posts: 8
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I have a suggestion for the problem reported by Logoleptic (categories vanish after preview). Comment out the existing function rss_admin_catlist_save and paste in this replacement:
function rss_admin_catlist_save($event, $step) {
if (!gps('save') && !gps('publish')) return;
$ID = rss_getID();
if (ps('ID') && ps('Cats')) {
safe_delete("textpattern_category","article_id='$ID'");
$incats = ps('Cats');
if (!empty($incats)) {
foreach($incats as $val ){
safe_insert("textpattern_category",
"category_id = '$val',
article_id='$ID'"
);
}
}
}
}
The original function has two ‘if’ statements: one checks for an active ID, then deletes from the database the existing categories for that article; the other checks for the multi-select category list, then adds the selected categories to the database. The idea is to clear out the existing categories to avoid an error from trying to add duplicate entries.
The problem is that after you’ve clicked Preview or HTML, then clicked on Text, there may be an active ID, but there will not be a category list. The first condition is met, so the existing categories are deleted, but the second condition fails, so no new categories are saved. This is what Logoleptic saw.
My version of the function combines the two conditions so they must both be met; no deletion unless there will be addition. I’ve also added a test at the top to check for a save or the publishing of a new article, as I don’t think there are other times this function should be called.
Note that if you switch to Preview or HTML, any unsaved changes to the category list will be lost. That’s a related but different problem.
Offline
#462 2007-08-11 11:31:39
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hello all,
I am trying to accomplish something with categories, so I was hoping for input if I could somehow do it with this plugin (I need multiple categories per article):
I have a bunch of articles that all belong to several categories. They have a “Year” category and a “Place” category. So, 2001, 2002, 2003 etc. are subcategories of Year, and London, Paris, Madrid are subcategories of Place. I would like to list articles like this:
2001
- Foo
- Bar
2002
- Some
- Other
- Articles
2003
- Brand
- New
- Articles
And then the same, on another page, for Place So, I would like to get a category heading, and then all articles in that category, and I need it to be dynamic (that is, when I add 2004 and some articles in it, for them to appear too).
Is is possible to do with rss_unlimited_categories
?
Offline
#463 2007-08-14 11:23:37
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 562
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I am working on a redesign for an existing site that makes use of rss_unlimited_categories. I have a local testing server on my laptop and need to import all the rss_unlimited_categories from the existing site into the one located there.
Not being very fluent with SQL and PHPMyAdmin, I’m struggling to accomplish this. Any help would be much appreciated.
Thanks.
Offline
#464 2007-08-17 10:33:36
- swati.miniyar
- Member
- Registered: 2007-08-06
- Posts: 39
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
hello all,
i am having a problem in rss_unlimited_categories_list..
i am using it to dispaly the categoies with their no of article count..
if i am having categories like..a,b,c,d ..
after using this plugin i am getting result —-a(3),b(4),c(5),d(6)
where the no. in bracket is its article count..
but the article count is not correct…
category a is having 4 article..When i click on a(3)..its showing 4 article correctly
means..its showing correct listing..
for some categories its showing count correctly but not for all…
how to display correct article count of category?
my code is—
<txp:rss_unlimited_categories_list section=”*” time=“all” listwraptag=“div” linktosection=“archive” showcount=“1” break=”“ wraptag=”“ />
i want to show categories of all sections..
Last edited by swati.miniyar (2007-08-17 10:37:49)
Offline
#465 2007-08-18 15:47:53
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
Hello all,
Recently got into working with Textpattern and, like many of you, I’ve been a happy camper.
I’ve been giving a ride to rss_unlimited_categories this week on a test website and all goes well on the admin side (can select multiple categories and save them with an article) and I get my selected categories listed in my article using the <txp:rss_uc_filedunder /> tag. All that is nice and neat.
The problem comes when I click on one of those categories in the article on the user side. The url is nicely done (http://exemple.blog.com/section/design) but Textpattern doesn’t seem to be able to fetch up the articles that are in the selected category (design). If I do add the catagory in the old category fields, the article will come up properly…
I do not intend nor want to use the old category fields but I do not understand where to logic fails… since it’s a test website, I’ve deleted all my categories and article and retested with the same result. I did read that a new table is created in order to store the multiple categories, but like I mentioned before, I just deleted my test articles and redid my categories just to be sure… I understand I need to use the new helper tags to get the listing from the new tables (which I did use with the expected result) but I cannot figure out how is Textpattern looking up in that new table when its trying to bring article from the X category.
I use Textpattern 4.0.5 with the built-in Permanent link mode set to /section/title.
I’m fairly new to the Textpattern structure so any basic advice and/or overlooked logical thinking is welcome.
Last edited by Antoine Lafontaine (2007-08-19 02:59:38)
Offline
#466 2007-08-18 16:52:22
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
are you using <txp:rss_uc_article_list> instead of the standard article tags?
Offline
#467 2007-08-19 02:57:56
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
I’m using <txp:rss_uc_filedunder /> to list the categories associated with the article displayed… I have a feeling I’m overlooking something, but I’m sure I’m not using the built-in tags provided by Textpattern.
I do not know well of the internals of Textpattern itself, but it feels like it’s Textpattern’s rewritting rules that does not connect with rss_unlimited_categories plugin. Maybe I’ll reapeat myself, but here I go:
I can assign multiple categories to my articles in the admin; for example: ‘blog, design, HTML’. The properties are properly saved with the article (checked by reloading it in the writing panel).
In my article listing page, I use the <txp:rss_uc_filedunder /> tag to display all the categories assigned to each article. This works like a charm; Articles with 3+ categories are all well displayed. Those categories are clickable(links), that is how I want them to be. So when a user clicks on one of the listed category in an article, he gets all the article of the current section with the selected category (HTML for example). The links generated by the <txp:rss_uc_filedunder /> tag are in this format: www.website.com/section/category.
All seems perfect, but I do not get any articles displayed when I click, even though there should be at least one since the category was selected from an existing article with that category assigned to it. So that is why I suppect there is something going on with Textpattern’s rewritting rules concerning categories (it probably doesn’t look up in the new tables I supposed). So before I go and try to search through the plugin and Textpattern’s way to handle categories passed thru a URL, I would like to have some feedback from people using the plugin and if this is something the’ve already tackkled or if I’m missing a point.
Maybe someone with a better knowledge and longer experience could give me some hints about where I should be looking…
Thank you for your help.
Last edited by Antoine Lafontaine (2007-08-19 03:00:27)
Offline
#468 2007-08-19 03:30:35
Re: [plugin] [ORPHAN] rss_unlimited_categories - Unltd. Article Categories
hmm my post got misplaced somehow but in short:
you’re supposed to use <txp:rss_uc_article_list> (to replace <txp:article /> for your article list display) in order to recognize the new categories (since its all in a new db table).
to quote the documentation in the plugin:
rss_unlimited_categories_article_list or rss_uc_article_list
Lists articles by category. This is a replacement for the standard Textpattern article list tags that uses the unlimited category tables instead of the standard Textpattern category 1 and 2 fields.
basically if you’re still not sure,
your article list will look something like this (feel free to add your own necessary attributes):
<txp:if_article_list>
<txp:rss_uc_article_list />
</txp:if_article_list>
<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>
Last edited by iblastoff (2007-08-19 03:45:47)
Offline