Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#145 2006-02-14 16:32:28

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
GitHub Twitter

Re: [Archived] stw_category_tree

> tinyfly wrote:

> Pat64, Sandor Weisz (aka Santheo) is the author of this plugin.

This plugin only shows categories not articles so there is no way to show future articles. Try textpatterns built in article tag or article_custom tag with the time attribute.

Ooops sorry.

I have any problems with my <code><txp:artcile time=“future” /></code> artcles, only with the count in stw_category_tree : it counts all articles past and fututre.

Last edited by Pat64 (2006-02-14 18:03:44)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#146 2006-02-14 21:10:50

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: [Archived] stw_category_tree

I have been using the following to generate a category list.

<code><txp:cbs_category_list break=“li” wraptag=“ul” class=“counts” showcount=“true” /></code>

I decided to limit the list to down to 15 or so parent categories and switched the code.

<code><txp:stw_category_tree count=“true” maxlevel=“1” cssid=“counts” /></code>

I managed to get the functionality by hacking the plugin code to get cssid to output a class rather than an id.

<code>if ($out) return tag(“\n” . $out,‘ul’,($css_id ? ‘ class=”’.$css_id.’”’ : “”)).”\n”;</code>

Merely a suggestion, but it might it worth adding a cssclass or similar functionality to the next version.

Offline

#147 2006-03-23 21:30:42

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

tinyfly wrote:

2.)I would like to be able to have the count show the number of the content in the category and all sub-categories. (for link categories in this instance)

santheo, I wonder if you got a chance to work on this request from ages ago. I often wish I had this functionality.

Example: I have a link category “Court Cases” that has 0 links. But in that I have a sub-category of “Al Odah v United States” which has 2 links and another sub-category “Jose Padilla” that has 27 links. So when I am listing just the top level categories it shows, “Court Cases (0)” where I would like it to show, “Court Cases (29)”.

Offline

#148 2006-03-23 22:12:26

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

Hello, again. Sorry for the extended absence.

The plug-in has been updated to version 0.7. The details:

  • The plug-in now supports clean URLs. I’ve supplanted some of my URL-generating code with calls to base TXP functions, including the one to create the category link. This means if you have clean URLs turned on, your category links will now appear clean. (Note that in TXP, if you require a category link to specify both a category and a section, the link will always be messy—i.e. in the format /path/to/site/SECTION/?c=CATEGORY.)
  • Because of this change, I needed to slightly alter how the section property works. Now, when you don’t define the section property, category links are created without a specified section. (Before, it assumed all links should stay within the current section.) To use the current section, whatever it is, set section to ”*”.
  • Per tinyfly’s suggestion, I’ve added support for the label and labeltag properties.
  • This is tested in TXP v. 4.0.3.

Thanks to tinyfly for holding down the fort in the meanwhile. You’re tech support in this forum has been helpful and is much appreciated.

Of course, if anyone has any questions or concerns about this version, please post a comment below. I’ll be responding to other specific requests and questions in other comments.

Last edited by santheo (2006-03-23 22:19:11)

Offline

#149 2006-03-23 22:29:33

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

santheo wrote:

Thanks to tinyfly for holding down the fort in the meanwhile.

Well I figured that I used this plugin so much that I should try and help others if they need it.

I just tried using section=”*” and it output the * in the link. Example output: http://www.domain.com/*/?c=categoryname

Offline

#150 2006-03-23 22:32:21

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

And now to address all the requests and feedback I’ve missed.

grad wrote:
I try to get a list of categories only for articles published in current section.

Since categories and sections are independent of each other, I assume you mean “only show categories that contain articles that exist in the current section.” Is this right? I’ll add it to the list of feature requests and see if I can get to it for the next version.

Anton wrote:
Is there any way I could make this plugin show the current category when viewing an individual article? In this case I guess the current category is not the value of the ?c= parameter but the value in the database entry for the selected article.

Interesting. I’ll add it to the feature request list.

erutan wrote:
I’d like to show one of the top level categories and it’s children while in a section (the best I can do is having the plugin generate the children and manually add in the parent).

I’m afraid I don’t understand this request, erutan. Could you link to your set-up and describe what you’d like the tag to output?

fpradignac wrote:
I’ve hacked your code to output a &amp ; instead of your & in your stw_cat_link function :

This shouldn’t be necessary with the changes to stw_cat_link. Could you test it out and let me know?

nighthawk wrote:
The problem I have with your plugin is that it outputs the internal category names (no whitespaces, etc. – e.g. “go-here-now”), but not the names intended for visitors (e.g. “go here now”). Can you help?

I’m afraid I can’t duplicate this. Are you using the latest version (0.6.1 at the time of your post). In any caes, try using 0.7 and let me know if this still happens.

Pat64 wrote:
I have any problems with my <txp:artcile time=“future” /> artcles, only with the count in stw_category_tree : it counts all articles past and fututre.

I never tested for this, but it wasn’t my intent to show all articles, future and current and past. I’ll put this at the top of the feature request list for the next version.

tinyfly wrote:
I would like to be able to have the count show the number of the content in the category and all sub-categories. (for link categories in this instance)

This sounds difficult to me, but it’s possible I’m overstating it. I’ll look into it for the next version.

Thanks to everyone for all your continued use and support. I’m glad to hear you’re getting value out of this plug-in. Please feel free to ping me or the thread with any more questions or requests.

Offline

#151 2006-03-23 22:55:28

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

I just tried using section=”*” and it output the * in the link. Example output: http://www.domain.com/*/?c=categoryname

Stupid glitch on my part. Should be fixed. Everyone who’s downloaded the plugin since I first posted it, a few hours ago, will want to download it again.

Offline

#152 2006-03-24 17:05:16

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

It looks like it is outputing category names again instead of titles.

Offline

#153 2006-03-24 17:07:14

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

Weird. That must have been broken in the last version as well, since I didn’t change any aspect of that functionality. I’ll look into it.

Offline

#154 2006-03-26 15:10:36

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

Version 0.7.1 has been posted. The category title bug is fixed. It’s now outputting titles again instead of names.

Offline

#155 2006-04-04 21:04:15

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: [Archived] stw_category_tree

Santheo, it would be great if you could include support for the wraptag and break attributes. So by default it would be an unordered list but this could be over-ridden by the aforementioned attributes.

Offline

#156 2006-04-04 21:06:32

santheo
Archived Plugin Author
From: Chicago
Registered: 2004-05-27
Posts: 62
Website

Re: [Archived] stw_category_tree

Fair enough. I’ll see if I can add this to the next update.

Offline

Board footer

Powered by FluxBB