Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#469 2007-08-19 03:57:49

Antoine Lafontaine
New Member
From: Kawasaki, Japan
Registered: 2007-08-18
Posts: 3
Website

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

Thank you for you help. This is what I was missing.

Although it was written in the doc, it was not as obvious as it looks now since I’ve been fiddling around with TxP for about a week. I guess the addition of those four lines of code would help to give an image has to where the old tags should be replaced with the new ones and so on.

Thank you for your help iblastoff and also thx to the author of this helpful plugin. I’ll try to contribute back when time comes.

Offline

#470 2007-08-19 22:16:32

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

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

Ramen Angel wrote:

(see Ramen’s original post here for code & further explanation)

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.

Do you mean that simply using preview is enough to cause the categories to be deleted from the database? I didn’t notice that behavior, but I also didn’t explicitly test for it. I’m not able to confirm this right now, so I’d appreciate it if you could clarify your response a bit. The site that’s using this plugin is very near launch, and if the problem is that serious I’ll definitely want to apply your patch.

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.

Could this (the extra test) also be accomplished by changing the register_callback() functions that start around line 29? I could be misunderstanding how these callbacks work; as far as I can tell there’s no documentation of available events unless you want to pick through the source code for them. (Please correct me if I’m wrong, because I’d love to have access to such a resource.)

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.

That’s actually the only bug I thought I was reporting — the loss of category selections on the client side. If they’re also being deleted from the database, then this isn’t the small bug that I thought it was.

Offline

#471 2007-08-19 23:01:32

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

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

About a year ago, Rafael Nevarez posted a patch to this plugin’s rss_unlimited_categories_list tag. The modified version added an activeclass attribute that allows one to give special styling to the currently-viewed category. I couldn’t get Rafael’s original modification to work with the current version of the plugin, but with a few adjustments it does exactly what it should.

In case others might find it useful, I’ve posted the updated function here for download.

Offline

#472 2007-08-20 12:16:22

Ramen Angel
New Member
Registered: 2007-07-11
Posts: 8

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

Sorry if I was unclear.

1. Categories Deleted. Yes, viewing the Preview or HTML causes the active article’s saved categories to be deleted from the database. I just double-checked with a fresh installation of 4.0.4, and again after upgrading it to 4.0.5, using a copy of plugin version 0.7.4 from Rob Sable’s site.

2. Moving Save Test. As far as I know, saving can only be detected by testing for form variables with gps() or ps(). It doesn’t seem possible to register a callback function to respond to the “save” step. The save test I added isn’t necessary for preventing these inadvertant deletions from the database. I shouldn’t have included it here, as it was only a small (I think) improvement, and not part of the solution I was suggesting for the deletion problem.

3. Original Bug. Yes, I guess I zoomed past your original complaint. Unsaved categories vanish because the plugin’s special multi-select box isn’t part of TXP. Just before viewing Preview or HTML, TXP grabs the values of all the fields and stores them. The values are restored when the page is redrawn after leaving Preview or HTML. Since TXP doesn’t know about the multi-select box, it isn’t stored & restored like the others. The select box is redrawn with saved categories from the database, and all unsaved selections are lost.

I’m pretty sure this can be remedied, but I’m not sure I’m the one to do it.

Last edited by Ramen Angel (2007-08-20 21:45:30)

Offline

#473 2007-08-20 18:39:19

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

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

Thanks for your further work on this, R.A. I’ll be sure to apply your fix.

Ramen Angel said

I’m pretty sure [the lost category selections in the multi-select box] can be remedied, but I’m not sure I’m the one to do it.

I have similar feelings on this. I have some notion of how it might be done, but no time to pursue it. I’m also hesitant to make substantial edits to a plugin that’s being maintained by someone else, since my changes might become incompatible later.

Thanks again for the time you put into helping out with this.

Offline

#474 2007-08-23 19:50:31

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

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

Typo in help file

Insturctions for this plugin have a small typo. rss_uc_filedunder shows the attribute parent with the example category="" instead of parent=""

Also, labeltag="" seems to have a default value of br.

Last edited by mwillse (2007-08-23 20:19:49)

Offline

#475 2007-08-23 19:52:38

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

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

Class on listwraptag

I’d to apply a class to listwrap tag. This would enable me to apply style to my wraptag and both the labels. Currently, I cannot style the container. I would manually wrap rss_uc_fileunder with a div, but not all of my articles include these categories and that would produce extraneous html. Any suggestions?

I also tried to wrap with br but it creates a container tag.

Offline

#476 2007-08-26 10:17:09

rualthan
New Member
From: Bangalore, India
Registered: 2007-08-26
Posts: 5
Website

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

Antoine Lafontaine wrote:

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.

Hi Antoin, I had the same issue with:

  • rss_unlimited_categories_filedunder
  • rss_unlimited_categories_cloud

I use :

  • rss_unlimited_categories_filedunder to display the categories linked my a post at the bottom of posts.
  • rss_unlimited_categories_cloud to display tag cloud on right column

When I click on a category which I am sure has at least an article linked, I get an empty list.

Both the two tags has section, and linktosection variables set to article by default. I do not have article section, I rename it to blog-post.

I changed as

<txp:rss_unlimited_categories_filedunder section=“blog-post” linktosection=“blog-post”/>

and similarly for rss_unlimited_categories_cloud.

Now, when clicking on a category, I get the list of article linked to the category clicked. But this works only for categories linked via Category 1 and Category 2.

I created a test post here

I linked it to three categories

Category 1 – life
Category 2 – image

Third one from the list: video

When I click on video, this post does not come up. It does when I click on life from the tag cloud.

Would appreciate any help

Offline

#477 2007-08-26 10:32:28

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

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

in the documentation:
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.

Offline

#478 2007-08-26 11:06:02

rualthan
New Member
From: Bangalore, India
Registered: 2007-08-26
Posts: 5
Website

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

Hi Eta,

I do not want the usual category listing. I want to display tag cloud. rss_unlimited_categories_article_list is not a substitute for rss_unlimited_categories_cloud and rss_unlimited_categories_filedunder

Offline

#479 2007-08-26 18:44:10

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

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

uhhh i guess i should be more specific? you have to use rss_unlimited_categories_article_list or rss_uc_article_list as a replacement for your regular <txp:article /> tag. otherwise its just going to refer to the built-in txp categories rather than the new unlimited categories which are in its own table.

Last edited by iblastoff (2007-08-26 18:44:55)

Offline

#480 2007-08-26 23:22:42

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

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

I said

…as I can tell there’s no documentation of available events unless you want to pick through the source code for them. (Please correct me if I’m wrong, because I’d love to have access to such a resource.)

Found it.

Offline

Board footer

Powered by FluxBB