Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#13 2005-05-13 08:30:55

jimb
Archived Plugin Author
From: Chicago, IL, USA
Registered: 2004-07-22
Posts: 27
Website

Re: [archived] jcb_columnize_body

Here’s version 0.2.

The plugin is no longer a replacement for txp:body. It now functions as was suggested, and will try to columnize anything it is passed. Right now it is only looking at paragraph tags however.

By default the plugin now creates divs with a common class, “columnized”. If you wish to have them have unique classes use classes=“unique” as attributes.

There is also experimental support for multiple columns. To use these set the attribute “columns” equal to the number of columns that you desire. This works best with large amounts of text, and smaller numbers of columns. With smaller amounts og text (less than 2 for each column), visually uneven divs frequently occur. The plugin defaults to 2 columns, as this is the number that works the best right now. 3 isn’t too bad either.

I am working on making the plugin smarter as far as text-dividing goes. I have some experimental code running that is doing a survey or the entire article, counting the paragraphs and then also their lengths. I’m working on some formulas that will then interpret these stats into information that can be useful for distributing the text more evenly.

Last edited by jimb (2005-05-13 08:33:35)

Offline

#14 2005-05-13 14:08:35

Matt
Member
Registered: 2004-02-28
Posts: 92
Website

Re: [archived] jcb_columnize_body

Jim – this is a great contribution. Thanks for your work. If I get the opportunity to test it further, I’ll do so.

Offline

#15 2005-05-13 14:14:02

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

Re: [archived] jcb_columnize_body

Just a tip for those using version 0.2: You can columnize a section of a single article, just like this:

<txp:jcb_columnize>

Paragraph 1 (columnized).

Paragraph 2 (columnized).

Paragraph 3 (columnized).

</txp:jcb_columnize>

Paragraph 4 (not columnized).

Just make sure you put a whitespace before the opening and the closing tag, otherwise Textile will wrap them inside a paragraph, invalidating the XHTML.

Last edited by Etz Haim (2005-10-09 20:38:08)

Offline

#16 2005-05-14 02:37:38

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [archived] jcb_columnize_body

This looks pretty cool.

Just a note, when you output the plugin code, you might want to think of removing the <?php ?> part of the .txt file, since RC3 doesn’t use that anymore.


bludrop studios .::. Creative Expression

Offline

#17 2005-05-14 06:52:59

jimb
Archived Plugin Author
From: Chicago, IL, USA
Registered: 2004-07-22
Posts: 27
Website

Re: [archived] jcb_columnize_body

blumie607-

Thanks for the heads up on the plugin format. I just updated the download text file.

Offline

#18 2005-05-14 08:03:34

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [archived] jcb_columnize_body

I love this jimb ! What a great idea that will give us a lot of flexibility, I had noticed this in CSS3 but we still have to wait, javascript not being the best choice to implement this kind of stuff (what if it’s not on… it won’t degrade gracefully). So the whole txp server-side thing is really a stroke of genius !

THX !


.: Retired :.

Offline

#19 2005-05-16 07:40:26

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

Re: [archived] jcb_columnize_body

I’m discovering lots of new uses for this plugin. Right now, I’m using a version with some modifications, which enables it to split other things than just paragraphs (including DIVs, ULs) and has a slightly different bahavior. Take a look here, here, here and here for a few examples.

jimb, are you interested in incorporating these modifications into your plugin?

Last edited by Etz Haim (2005-05-16 09:30:41)

Offline

#20 2005-05-16 08:43:48

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [archived] jcb_columnize_body

That’s really clever and would be very nice to have this !

Cool :-))


.: Retired :.

Offline

#21 2005-05-17 03:21:12

jimb
Archived Plugin Author
From: Chicago, IL, USA
Registered: 2004-07-22
Posts: 27
Website

Re: [archived] jcb_columnize_body

Etz-

Of course. If you want to email me your mods I can add them to the next version, or just make yours the ‘official’ one for the time being until I do more work myself. Or if you have another idea I’d be happy to hear it.

Offline

#22 2005-05-17 03:32:31

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

Re: [archived] jcb_columnize_body

I’ve sent you the full plugin code. What I’ve added so far

  • The splitontag attribute that defaults to “p”; can be set to “ul”, “div” or any other matched tag.
  • The minsplit attribute that defaults to columns + 1. This means, for example, that it won’t split anything into 2 columns unless there are three elements to split minimum. It won’t wrap the result in a <div class="column1">...</div> either.

Please test it a little before you release it.

Last edited by Etz Haim (2005-10-09 20:36:25)

Offline

#23 2005-05-17 10:54:49

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

Re: [archived] jcb_columnize_body

Etz,

Those additions are looking really nice!

Offline

#24 2005-05-27 07:18:54

davidm
Member
From: Paris, France
Registered: 2004-04-27
Posts: 719

Re: [archived] jcb_columnize_body

Whaow this plugin will really be great if we can split div’s, ul’s… :-))

When will this be avalaible ???


.: Retired :.

Offline

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

Board footer

Powered by FluxBB