Textpattern Forum

You are not logged in. Register | Login | Help

#61 2005-05-18 15:34:15

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

Re: [Archived] stw_category_tree

Martagnan wrote:
Currently when I select the “Air Filters” parent category I get a whole list of ALL articles in ALL it’s child categories. I would only like to see an article list once I have selected a child category, then I would see articles belonging only to that child.

Yeah, that’s beyond the abilities of the stw_category_tree plug-in. You’re going to need a plug-in that handles article output. I use chh_article_custom, though I don’t know if it supports what you want to do.

Etz Haim wrote:
The only thing I wish it had is the ability to display section and category titles instead of their names. Can you do it please?

I’m not sure what you mean by category titles. Which column in the DB table are you referring to? (I’m only on release g1.19, so if this is more recent improvement to the system, please let me know.)

Offline

#62 2005-05-18 15:42:38

Etz Haim
Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [Archived] stw_category_tree

Yes, this is a new TXP feature. The database has been expanded so that every category and section, apart from its name, has also a user-friendly “title”. Currently, the TXP core cannot make use of these extra fields, but the upm_section_title, upm_category_title and my own etz_crumbs plugin can take advantage of them.

This is very useful for internationalization, especially in languages that use their own alphabet (non-ASCII). See a demonstration of etz_crumbs, where in the breadcrumbs menu the category and section names are translated to Greek, thus avoiding the use of Greek characters in the URLs.

Last edited by Etz Haim (2006-11-16 17:52:52)

Offline

#63 2005-05-18 15:53:20

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

Re: [Archived] stw_category_tree

Gotcha. I’ll look into it.

Offline

#64 2005-05-24 20:51:51

bauhouse
Plugin Author
From: Abbotsford, BC Canada
Registered: 2004-06-29
Posts: 68
Website

Re: [Archived] stw_category_tree

> kemie wrote:

> A little bump to ask if it is possible to get this working with clean urls, so my outputted list will point to /section/category instead of section/?c=category

Try editing the plugin by replacing the function stw_cat_link with this:

<code>
function stw_cat_link ($cat,$sec) { global $pfr,$url_mode; $path = $pfr.”?”;

if (!empty($sec) && $sec != ‘default’) $path = ($url_mode==1) ? $pfr.$sec.”/” : $path.“s=”.$sec.”&amp;”; return tag($cat,‘a’,’ href=”’.$path.urlencode($cat).’”’);
}
</code>

I’m not sure if this is the right way to go about it, but it appears to be working for me.

Offline

#65 2005-05-25 21:03:33

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

Re: [Archived] stw_category_tree

Any news on using category titles instead of names

Offline

#66 2005-05-25 21:11:18

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

Re: [Archived] stw_category_tree

I have txp installed in a subdirectory called main

so its:
http://cepa/main/

When I use section=“links” on your plugin clicking a category link should take me to:
http://cepa/main/links/?c=whatever-category

Instead it takes me to:
http://cepa/links/?c=whatever-category notice the missing /main/

Any ideas on how to fix this?

Update: If I add section=“main/links” it works but main isn’t a section it is the install path of txp so it should be unnecesary.

Last edited by tinyfly (2005-05-25 21:26:41)

Offline

#67 2005-05-26 01:26:09

Etz Haim
Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [Archived] stw_category_tree

> tinyfly wrote:

> Any news on using category titles instead of names

There you go: admin >> plugins >> stw_category_tree >> edit

and replace:

<pre>return tag($cat,’a’,’ href=

Last edited by Etz Haim (2005-05-26 01:27:18)

Offline

#68 2005-05-26 01:29:40

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [Archived] stw_category_tree

Thanks Etz! That was driving me nuts (and preventing an upgrade from rev326 for a site).

Offline

#69 2005-05-26 02:08:09

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

Re: [Archived] stw_category_tree

Thanks Etz, does this also work for link categories?

I guess I should try it huh?

Offline

#70 2005-05-26 02:25:11

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [Archived] stw_category_tree

You can actually use rss_superarchive very nicely for palin ol’ cat links with section pruning . Look at this thread

Last edited by soulship (2005-06-29 19:12:36)

Offline

Board footer

Powered by FluxBB