Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] dak_categories

#1 2004-08-10 07:03:07

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

[archived] dak_categories

Notice: This thread is archived, there are native txp tags for the same purpose now.

**********************************************************

Not sure if this has been done before, or if there is a better way.

Formats and returns Categories depending on number of categories and user input.

So for example:

One category might look like this.
[Category1]

Two categories might look like this.
[Category1 | Category2]

Pretty simple, just wanted to make a plugin and didn’t have any other ideas.

Plugin zip can be found here.

Feedback is more then welcome.

Offline

#2 2004-08-10 09:12:52

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: [archived] dak_categories

The plugin is very useful, thx for that!
But it would be more useful with the option for an automatic link to the category-archive like in the original category-tags with link=1 (as described here)

Last edited by mapu (2004-08-10 09:15:16)

Offline

#3 2004-08-10 10:19:00

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

You’re Welcome. I’m glad you find it useful.

I didn’t even know that existed! Yup, I will add it ASAP.

Offline

#4 2004-08-10 10:41:29

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

Added the link=1 functionality.

Before I release it though, would it be helpful if it was wrapped in a div tag?

Thinking it might be nice for CSS purposes.

Offline

#5 2004-08-10 11:07:01

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: [archived] dak_categories

Cool!

Maybe a class wouldn’t be too bad, but I think that most times the categories are named within an entry they are named together with time and comment invitation wrapped altogether in a div-tag (like class=“posted”).

But it’s surely not too much ;-)

Offline

#6 2004-08-10 11:10:12

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

This is true.

I will add it and if people use it, well, more power to them!

Offline

#7 2004-08-10 11:54:10

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

Alright. v0.4

Let me know how it works out.

Turns out I didn’t really expect to add this much functionality to it. Basically just started out as a really simple plugin, so my code is a little too lenghty. Probably will be making it a little more concise and easier to upgrade.

For now, download here.

Offline

#8 2004-08-10 12:11:55

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: [archived] dak_categories

Ok, it’s almost working properly. But the div-tag should only appear if there is a class assigned. Otherwise it breaks up the layout because of empty and unassigned div-tags.

Offline

#9 2004-08-10 19:42:02

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

Fair enough v0.4.1.

If you don’t specify a class, then no div tags will be created.

Here you go. Download

Offline

#10 2004-08-10 20:12:54

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: [archived] dak_categories

Hi Kaiser,

just for reference: I wrote a plugin that also does this:
http://forum.textpattern.com/viewtopic.php?id=2395

Things to look out for when coding were: encoding the categories, and making it work for clean and messy urls.

Although I must admit, I don’t have the class-option. ;)

Choice is good. Looking forward to more plugins from you. :)

Offline

#11 2004-08-10 20:20:12

Kaiser
Archived Plugin Author
From: Denver, CO
Registered: 2004-07-04
Posts: 27
Website

Re: [archived] dak_categories

Hey Sencer,

I guess I should have actually searched. Would have saved me a lot of time!

Thanks for the heads up, and I will make sure to code for those as I mess with things.

I hope to write more, just need ideas. Seems like most of the plugins I think to write are already used up.

Last edited by Kaiser (2004-08-10 20:27:31)

Offline

#12 2004-08-10 20:41:13

mapu
Member
From: Munich, Germany
Registered: 2004-03-16
Posts: 141

Re: [archived] dak_categories

> Kaiser wrote:

> Fair enough v0.4.1.

Already in use :-)

Offline

  1. Index
  2. » Archives
  3. » [archived] dak_categories

Board footer

Powered by FluxBB