Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2004-06-17 18:00:29

Damelon
Member
From: Lyon, France
Registered: 2004-05-11
Posts: 47
Website

Re: [Archived] stw_category_tree

> santheo wrote:
> An issue many want to see resolved. I know of no way to do this other than the hack you’ve discovered. I may attempt to write a plug-in that solves this issue, though I don’t know how easy or feasible that’ll be. I’ll let you know what kind of progress I have.

It’s all good. You still automated one particularly irritating aspect of this, which was the necessity to hardcode the links. I wish I had the knowledge to do this stuff. I guess the one other question I have now is : is it possible to change the connecter in multi-word categories links from ‘+’ to ‘-’ ?

Ah, and I did find one other issue. Part of the reason I was hardcoding my category urls was also to deal with funky characters in the links. Here’s an example of this still biting me :

My category name : R

Last edited by Damelon (2004-06-18 04:56:27)

Offline

#17 2004-06-19 02:53:51

Benoit
Member
From: Montreal, QC
Registered: 2004-05-23
Posts: 26
Website

Re: [Archived] stw_category_tree

Damelon, I’ll try and dig in the code this weekend. Back when I was on MT, I had ended up fixing the problem in there by creating a substitution table in the appropriate module as MT simply skipped any accented character. MT ended up integrating my fix in a subsequent release.

It’s simply a matter of finding out WHERE the conversion gets done and provide the substitution. After that, it could be done for just about any language using accented characters.

Last edited by Benoit (2004-06-19 02:54:35)

Offline

#18 2004-06-20 21:16:02

mrpunkin
Member
Registered: 2004-06-13
Posts: 10
Website

Re: [Archived] stw_category_tree

Is there any chance we can get section support for us with messy urls? When you use section=“something” it automatically assumes blog.blog.com/section/?c=category. I would like to be able to have it do blog.blog.com/?s=section&c=category.

BTW, if you do create a messy url way, make sure the & after the section is actually & so it validates.

Last edited by mrpunkin (2004-06-20 21:54:39)


Bryan
.:Mrpunkin.coM:.

Offline

#19 2004-06-23 03:53:20

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

Re: [Archived] stw_category_tree

> I guess the one other question I have now is : is it possible to change the
> connecter in multi-word categories links from ‘+’ to ‘-’ ?

I could do this in the links I’m creating, but this would break the system, since TXP is expecting the connectors to be ‘+‘s not ‘-‘s. Why the desire to switch?

> I guess I think in the perfect world, accented characters in the url would work, but
> it’s not the perfect world. I think the display name should be : R

Offline

#20 2004-06-23 04:16:40

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

Re: [Archived] stw_category_tree

mrpunkin wrote:
> Is there any chance we can get section support for us with messy urls? When you
> use section=“something” it automatically assumes blog.blog.com/section/? > c=category. I would like to be able to have it do blog.blog.com/? > s=section&c=category.

This is implemented. Download from the link above for version 0.3, which now supports both clean and messy URLs. I tested it out, but in case I missed something, please post any quirks you see.

Offline

#21 2004-06-25 00:05:33

mrpunkin
Member
Registered: 2004-06-13
Posts: 10
Website

Re: [Archived] stw_category_tree

Thanks much Santheo, works great!


Bryan
.:Mrpunkin.coM:.

Offline

#22 2004-07-06 13:52:08

Benoit
Member
From: Montreal, QC
Registered: 2004-05-23
Posts: 26
Website

Re: [Archived] stw_category_tree

Santheo, do you think there is a way for the user to add an ID to the UL tags?

Edited – Duh, never mind. Reading the instructions helps.

Last edited by Benoit (2004-07-06 14:34:13)

Offline

#23 2004-07-06 21:22:09

Rufnex
Archived Plugin Author
From: Germany, Munich (Bavaria)
Registered: 2004-06-23
Posts: 51

Re: [Archived] stw_category_tree

santheo .. great plug-in! i tried v0.3 but i can’t display the urls in /clean/ mode .. there always displayed ?messy … any ideas what went wrong?

Offline

#24 2004-07-06 21:39:32

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

Re: [Archived] stw_category_tree

Rufnex-

Can you point me to an example?

Offline

#25 2004-07-06 21:41:50

Rufnex
Archived Plugin Author
From: Germany, Munich (Bavaria)
Registered: 2004-06-23
Posts: 51

Re: [Archived] stw_category_tree

santheo .. i will set up one .. for test i use a local server .. call you back here ;o)

Offline

#26 2004-07-15 02:43:45

elemental
New Member
From: Santa Cruz, CA
Registered: 2004-07-15
Posts: 2
Website

Re: [Archived] stw_category_tree

First off, I’d really like to say thanks Santheo for creating this plug-in. Like a lot of others, I assume, I am currently using textpattern to set up a small web site as opposed to a blog. I have found this plug-in extremely helpful.

What I’d like to know is if there is a way to control which categories get output based upon the section you are in? Specifically, I have categories that I would like to show up in one section, but not in another…

One idea I had to accomplish this was to create a parent category that corresponded to each section, however, I couldn’t figure out a way to prevent the title of the parent category from displaying (as it is redundant with the section name)…

Any help would be appreciated!

Also, regarding the output of your plugin…

The nested unordered list for subcategories needs to be enclosed in a parent li tag in order for the html to validate in xhtml 1.0 strict. I was able to make the changes to the plugin to accomplish this, though I admit it is not very elegant. Let me know if you’d like me to send this to you.

Cheers!

Offline

#27 2004-07-17 12:59:54

And
Member
From: London, UK
Registered: 2004-02-24
Posts: 10
Website

Re: [Archived] stw_category_tree

Great plugin Santheo, I think it’s just what I’ve been looking for to help me sort out my categories.

The only problem is that I can’t get it to assign ID or Class attributes to the lists. I’m using the tag like this while I’m still testing:

<code>
<txp:stw_category_tree prune=true css_id=“catlist” />
</code>

But it doesn’t assign the ID to the UL tag.
Am I doing something wrong?

Offline

#28 2004-07-20 17:43:15

elemental
New Member
From: Santa Cruz, CA
Registered: 2004-07-15
Posts: 2
Website

Re: [Archived] stw_category_tree

And,

I’ve been having the same problem with that as well and haven’t found a direct solution. To me it seems like a bug in the plugin. If you enclose the ul tag in a parent div, you can use inheritance in css to accommodate most of the styling if that is what you need the the id/class for.

Hope that helps…

Offline

#29 2004-07-21 08:58:03

And
Member
From: London, UK
Registered: 2004-02-24
Posts: 10
Website

Re: [Archived] stw_category_tree

Thenks elemental, I did find a way around it (sort of) by entering the required ID’s directly into the script:

<code> $css_id = (empty($cssid)) ? “catlist” : $cssid; $css_on_class = (empty($onclass)) ? “subcat” : $onclass; $minlevel = (empty($minlevel)) ? 1 : $minlevel; $maxlevel = (empty($maxlevel)) ? -1 : $maxlevel; $section = (empty($section)) ? “” : $section; $start = (empty($start)) ? “root” : $start; $prune = (empty($prune)) ? false : $prune;
</code>

If that makes sense. :)

Last edited by And (2004-07-21 08:58:23)

Offline

#30 2004-07-24 00:08:41

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

Re: [Archived] stw_category_tree

> The only problem is that I can’t get it to assign ID
> or Class attributes to the lists.

This was indeed a bug in the code. Rather, in the documentation. Instead of calling the attribute <code>css_id</code>, remove the underscore, thus making the example you cite above read as such:

<code><txp:stw_category_tree prune=true cssid=“catlist” /></code>

I’ve uploaded a proper version, and will update the original post so the documentation reads right. (Note that the css_on_class property also was misnamed.) Sorry ‘bout that.

Offline

Board footer

Powered by FluxBB