Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2005-10-12 20:34:30

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: [plugin] [ORPHAN] cbs_category_list

Nardo,

  1. I use a standard TXP function to generate the URL. This function is supposed to create clean URL’s. Actually in the current TXP version, if your URL contains a category, this only works with the default section, so all other sections have messy URL’s but it’s not my plugin’s fault. I hope it will be fixed soon. The plugin code will remain the same. I don’t want to hard-code a function that is already present in Textpattern just because it is buggy. But even if I hard-code a clean URL it won’t work without hacking Textpattern’s code (try to type the URL yourself in your browser bar and see the result).
  1. The active class feature was already requested by jstubbs. Just look at that post just above. I’ll add it in a few hours.

And finally, I started writing this plugin because I tried rss_suparchive_bycat and didn’t like it at all. It made my website twice slower and the code was huge.

Last edited by cbeyls (2005-10-12 21:03:20)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#26 2005-10-12 23:20:13

Infi
Member
Registered: 2005-05-28
Posts: 75

Re: [plugin] [ORPHAN] cbs_category_list

Thanks for the tip on #1. (I knew it was something simple. :rolleyes: ) I’ll continue on with cbs; it’s the best I’ve seen for the task so far. Thanks so much for sharing!

Offline

#27 2005-10-12 23:50:05

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] cbs_category_list

thanks cbeyls – good points all – and yep this a very mean and clean little plugin

re: working section/category URLs – I found it as easy as installing zem_rewrite (thanks btw to Andreas for the tip) – and will run with it on a static site using categories as subsections

so I guess my question is: how do you hack your plugin to remove those “/?c=” three little characters? : ) if I understand you, it means copying a txp function into the plugin first, then modifying that… ? would certainly throw some ca$h at you if you’d consider doing a parallel version of your plugin…

=======

feature request #311231:

a version which outputs a drop-down menu — like zem-popup-cat, which would satisfy my needs except it outputs the category name not category title

Last edited by nardo (2005-10-13 02:08:58)

Offline

#28 2005-10-13 13:03:25

mearso
Member
From: Wales
Registered: 2004-03-25
Posts: 18
Website

Re: [plugin] [ORPHAN] cbs_category_list

Cheers for this plug-in. I’m just waiting for the clean URLs on categories to work.

Hope it comes soon!

Offline

#29 2005-10-14 00:07:21

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: [plugin] [ORPHAN] cbs_category_list

Nardo,

Which URL form are you expecting actually? You mean a special URL form made possible by using another plugin which is zem_rewrite ? This means the plugin would require another one to work ?

As for the cash, thank you but I have little spare time and I want to preserve it by doing things I like to do ;) For example, my new website is barely opened and I still have tons of things to add to it. Furthermore, a TXP plugin is simple and not worth paying for it I think.

So, now I’m gonna add this “active category class” feature. For the clean URL’s thing, I repeat that it is Textpattern that generates the URL’s and is able to recognize them afterwards, so if you can find a clean URL syntax for categories and sections that is natively recognized by Textpattern, I’ll add it. If you need another plugin, I’ll not add it. Last possibility: hacking Textpattern code and keeping the plugin code unchanged while waiting for this feature to be implemented in the new versions of Textpattern.

Finaly, for the drop-down, why don’t you ask to zem the author of zem_popup_cat ? ;)

Last edited by cbeyls (2005-10-14 00:28:56)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#30 2005-10-14 01:57:57

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] cbs_category_list

which url form?
“/section/category” as opposed to “/section/?c=category”

thank you for your consideration, it was a request – and you’ve answered it

re: drop-down – I suggest it because I think it would add to the usefulness, completeness and versaility of your plugin! at the moment people are using two or three different category plugins which each lack a little something

Last edited by nardo (2008-02-04 03:52:05)

Offline

#31 2005-10-14 01:57:59

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: [plugin] [ORPHAN] cbs_category_list

Okay, the new version is available. It just adds the active category styling.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#32 2005-10-14 08:42:27

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: [plugin] [ORPHAN] cbs_category_list

Thank you cbeyls! Works beautifully as expected. Only a small problem, which is not related to the plugin but rather the links…

I have a test site nearly ready here: http://www.solborg.fhs.no/txp/linjer You can see the sub-categories on the left. The section is called “linjer” and the plugin is called like so: <code><txp:cbs_category_list wraptag=“ul” break=“li” parent=“linjer” activeclass=“active” /></code>

Only issue is this – if I click on the subcategories produced by cbs_category_list the active state (of a white link) works, but if I click on one of the articles in “linjer” it does not. Basically, each page is static and there is only one article per subcategory.

cbeyls mentioned earlier that it is not possible to style with a:active on a multiple page.

Back to my example, if one were to click on “Modulfag” in the article list, one would get this as a link: http://www.solborg.fhs.no/txp/linjer/modulfag

Clicking on the subcategory list produced by cbs_category_list gives: http://www.solborg.fhs.no/txp/linjer/?c=Modulfag

Anyone know of a way around this? Scratching my head. My styles:

<code>.cbs_category_list {
margin: 0;
margin-bottom: 10px;
padding: 0;
list-style: none;
}

#left li {
margin: 0;
padding: 0;
text-align: right;
list-style-type: none;
display: block;
}

#left a:link {
color: #2F3863;
text-decoration: none;
}

#left a:hover, #left a:active, #left .active {
color: #fff;
text-decoration: none;
}</code>

Note: .active is the activeclass.

Offline

#33 2005-10-14 09:33:36

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] cbs_category_list

jstubbs – I may be wrong… but as this plugin is faithful to the textpattern url schema, it would require the “?c=” in the URL to know that it is currently in a category list

so perhaps the options are either to live with the messy clean category URL (“?c=”) throughout your site or hand-code your category lists (so you can give each li an id and dynamically insert a body class based on category or section)

Offline

#34 2005-10-18 14:47:11

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: [plugin] [ORPHAN] cbs_category_list

jstubbs

This is not a bug at all. If the URL does not provide any category information, my plugin cannot retrieve it from the context. This is only the case for article lists, not individual articles. But when you display an individual article, you have access to category1 and category2 so you can put them in evidence in some other way.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#35 2006-01-09 12:47:34

Thirteen
Member
Registered: 2006-01-09
Posts: 40

Re: [plugin] [ORPHAN] cbs_category_list

EDIT: I’ve got it to work- After some more fiddling, I realized I had to use the if_category to make it show…

I’m very new to textpattern and am still slowly familiarizing myself with how categories/subcategories work; please forgive me if I’m asking something very dumb.

I’ve installed this plugin and all seems to be working well where it’ll list my categories out. However, once I go to click on any category link, it doesn’t take me to the page that should display the articles. Rather, it just displays the category listing page all over again. I’m thinking that I must be doing something wrong, but I’m not sure where.

Basically, the way I have the site set up is in main sections like about, tutorials, downloads, etc etc. So when you click on, say, downloads- I have it so that it’ll display a list of categories like wallpapers, skins, icons, etc. Up till here, everything works fine. However, when I click on any of those categories…it doesn’t go to said category.

Any help anyone is willing to give me would be so greatly appreciated. Thank you and once again, I’m sorry if the mistake I’m making is something entirely stupid!

Last edited by Thirteen (2006-01-10 12:52:28)

Offline

#36 2006-01-25 18:10:06

martinship
New Member
From: Santa Fe, NM
Registered: 2006-01-22
Posts: 6

Re: [plugin] [ORPHAN] cbs_category_list

When I try to install this plugin, it crashes Apache’s PHP5 parser for Win32. Was it designed for php4? Has it been tested on any wamp setups? I’ve installed pleanty of other plugins successfully on this setup, but this one just won’t go.

If there’s a chance rebuilding it from the source would work, I could give that a try too.

Offline

Board footer

Powered by FluxBB