Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#229 2007-09-17 16:54:48

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: [Archived] stw_category_tree

As a longtime fan of this plugin, I’m really looking forward to checking this out.

Offline

#230 2007-09-17 22:09:49

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [Archived] stw_category_tree

Hi Paul, this looks fab, but like kemie the up/down arrows are missing for me and clicking on them does nothing. Txp4.05.

Offline

#231 2007-09-18 12:56:00

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

Re: [Archived] stw_category_tree

alexwest wrote:
Just been updating a website where I am using this plugin and I am finding that it would be great to add a ‘sort’ attribute to the display of categories. Basically, the plugin is sorting by name and I would like to have the possibility to sort by title also. Sure it takes just a few lines of code somewhere.

I think it would be more than a few lines. I don’t do any sorting right now; I use the sorting that’s built into TXP, which is alpha by name. However, looking down this thread a couple posts, it looks like Paul_U’s combined wow_menu with stw_category_tree, in order to support category re-ordering. You might want to check that out.

applied_robert wrote:
Is there any way to flag the current subcategory as “active”, if the user navigates to them? And how to do it?

Yes. Set the property onclass to “active” (or whatever you want it to be).

Paul_U wrote:
I’ve sort of combined this plugin with the wow_menu plugin, since I also needed the ability to order the categories for a site, and wow_menu lacked some of the nice features of this one (plus this plugin is easier to edit). I’m a bit unsure how to go about this sort of thing around here (do I have to ask the authors if I can use the code when doing stuff like this?), but anyway, I hope this is okay :). I bumped the version number to (hopefully) avoid version-confusion.

Wow, thanks Paul. Haven’t gotten a chance to take a look yet, but it sounds very useful. Thanks for doing this.

My concern is regarding the version numbering. I don’t think it’s such a good idea to name this plug-in according to my versioning scheme, since the new code was written by a third party, and isn’t officialy part of the plug-in yet. If you’d like to use stw_category_tree as the name, I suggest you number it as an offshooting branch, like version 1a, and then advance the numbering from there (1a.1, 1a.2, etc). That way there’s less confusion about ownership. How’s that sound?

-S

Offline

#232 2007-09-18 15:51:12

Paul_U
Member
From: Enschede, NL
Registered: 2007-09-12
Posts: 14
Website

Re: [Archived] stw_category_tree

santheo: Sounds like a good idea to me, I’ll do that after (hopefully) fixing some bugs tonight.

lee: What browser are you using? It won’t work in IE6, since I haven’t touched wow_menu’s javascript, but I only now tested in IE7 and that’s also bugging for me. I’ll look into it asap.

kemie: I’ll try to look into it tonight. Not sure what’s causing it, any chance you could capture the entire SQL query for me? It does say “Field status: Menu item order ID field found.” at the top of the page?

The arrows are actually html entities, not images, but I might just change them to plain text if it isn’t working for you guys. Just noticed they’re not working in IE either for me, although they’re fine in Firefox.

Offline

#233 2007-09-18 16:35:46

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [Archived] stw_category_tree

Hi Paul, I was using Safari 302 on a Mac. Changing to IE on a pc makes the up/down arrows work, that is categories move up and down the tree. But one of the nested categories (there are only 2) I have isn’t showing graphically as nested.

Offline

#234 2007-09-18 17:01:30

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [Archived] stw_category_tree

Also the section attribute doesn’t seem to work.

instead of path/to/site/SECTION/?c=category I’m getting path/to/site/category/category

where the first category is simply the word category

My tag: <txp:stw_category_tree start=“Essential-Features” section=”*” />

Offline

#235 2007-09-18 19:15:31

applied_robert
New Member
Registered: 2007-09-17
Posts: 4

Re: [Archived] stw_category_tree

santheo wrote:

Yes. Set the property onclass to “active” (or whatever you want it to be).

Hi,

thanks for your reply.
I have set the onclass property to “active” – and it (partially) works, I get the class=“active” in HTML output.
But not on the current category itself – only on its ancestors.
E.g., if the current category is “subcategory11”, only its parent “category1” is flagged as active…?

Offline

#236 2007-09-18 20:31:58

Paul_U
Member
From: Enschede, NL
Registered: 2007-09-12
Posts: 14
Website

Re: [Archived] stw_category_tree

lee wrote:

Also the section attribute doesn’t seem to work.
instead of path/to/site/SECTION/?c=category I’m getting path/to/site/category/category
where the first category is simply the word category
My tag: <txp:stw_category_tree start=“Essential-Features” section=”*” />

Hi lee,

You’re right, I messed up on using the section attribute, hadn’t noticed that yet, thanks. I’ve fixed that, and have also rewritten the javascript from wow_menu’s original. Along with some extra php checks that should also fix the SQL errors, since it was passing in undefined id’s at times. It should also work fine in IE6/7 now, but I haven’t tested Safari yet.

I’ve also changed the arrows to another character, does this one show for you?

New version can be found at http://www.smartposition.nl/downloads/txp/ .

santheo: I’ve changed the version number to 1a.1 now.

Offline

#237 2007-09-18 20:36:19

Paul_U
Member
From: Enschede, NL
Registered: 2007-09-12
Posts: 14
Website

Re: [Archived] stw_category_tree

lee wrote:

But one of the nested categories (there are only 2) I have isn’t showing graphically as nested.

If that problem persists, is there any way you could send me the contents of your txp_category database table? That might help diagnose the problem

Offline

#238 2007-09-18 20:58:01

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [Archived] stw_category_tree

In IE6 Win: SAVE CHANGES doesn’t work, the browser reports a problem id is null or not a object, Line 160

In FF Win: Everything working OK

In Safari Mac: SAVE CHANGES gives up Only 0 out of 1 rows could be updated. Please check if the order was saved correctly!

The nesting problem I reported seem to have gone.

Great work.

Last edited by lee (2007-09-18 20:58:14)

Offline

#239 2007-09-18 21:28:23

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [Archived] stw_category_tree

Any chance the onclass could have an option to be applied to the li or a tag and not just the li tag?

Offline

#240 2007-09-18 21:44:04

Paul_U
Member
From: Enschede, NL
Registered: 2007-09-12
Posts: 14
Website

Re: [Archived] stw_category_tree

lee wrote:

In IE6 Win: SAVE CHANGES doesn’t work, the browser reports a problem id is null or not a object, Line 160

Dang, I just checked if row ordering worked in IE, forgot to check the actual saving. I updated 1a.1 with the fix, so please reinstall that one. Didn’t want to bump the version again ;).

And what would be the advantage of also applying the onclass to the a tag over selecting like li.onclass a?

Offline

Board footer

Powered by FluxBB