Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#76 2005-10-03 08:57:08
- davidm
- Member

- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] jcb_columnize_body
Oops, sorry jimb for the mistake :-)
I kinda lost track there…
Yeah well, this plugin is not trivial and seems to be a real mathematical challenge… Anyone else has input about the use of the plugin ? We could try document whatever issues appear in different context…
.: Retired :.
Offline
Re: [archived] jcb_columnize_body
Look for version .5 in a couple days. It will incorporate the tweaks that have worked for folks in this thread, as well as some other improvements. If there are any issues that haven’t been mentioned in this thread, now is the time so I can try to squash as much squirreliness as possible.
And thanks to everyone for posting back with input, it’s really hard to develop something like this when you don’t have time to test it in every possible scenario.
jimb
Last edited by jimb (2005-10-03 14:54:32)
Offline
#78 2005-10-03 15:22:41
- davidm
- Member

- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] jcb_columnize_body
I’ll be looking close for .5 – testing and reporting on how it works…
Thanks again for this very powerful plugin !
.: Retired :.
Offline
Re: [archived] jcb_columnize_body
So I’ve rewritten the entire plugin from scratch, and it’s almost done. It now splits the content up into nodes, and then looks at their average length and uses that to divide the content into columns. In-line tags (such as links) are now ignored when determining length. So far this seems to give more reliable results than the previous method.
0.5 is able to split based on tags or strings, similar to 0.4. I am also planning on implementing a ‘smart’ mode that will look for any block level element (p, ul, h) and split accordingly. It will also make sure that headings don’t end up at the very bottom of a column, etc. Smart mode is quirky right now and will probably wait until .6.
Here is the cool part: I stumbled upon an idea today that I think will massively improve the quality of columnizing for most uses. I’ve made a little test-suite of text that I run through the plugin for development of the plugin, and I have noticed that there is a (slightly fluid) consistant ratio of characters to lines in my columns. My plan is to clean up the test suite, and post it online for others to use. They will be able to use this test to tune the plug-in to the CSS they are using. The test will result in a number (mine’s been 31 so far) that can be passed in as an argument to allow for some much more intellegent column tuning.
Also: anyone that’s been having a difficult time getting this thing to work with their content, feel free to post/send me an example of what’s you’re passing to it. This would also help build the test suite.
Anyway, .5 is basically done, I just need to update to TXP 4.0 locally and make sure everything is working as it’s supposed to be.
Last edited by jimb (2005-10-04 06:12:08)
Offline
Re: [archived] jcb_columnize_body
Presenting 0.5. Download
Changes:
Rewrite of almost all functionality. A few features have gone away but will be back if anyone misses them. I have updated the help accordingly. The big change is that the mode of columnizing is set by attribute mode, and can be equal to ‘tag’, ‘string’, or (soon) ‘smart’ or ‘words’.
In any mode, the attribute arg is used to pass needed info. So in ‘tag’ mode, arg should be set to the tags you want it to be aware of. You can pass multiple tags by separating them with a vertical pipe. In ‘string’ mode, arg should be set to the string to use as a break point.
Most everything else is the same, minsplit is gone for right now but will be back.
Also, please note when in ‘tag’ mode, the plugin will only columnize tags that you tell it about, so if you set *arg*=“p|dl|h3” and there are other tags in your content (say ul or h5 for example), they will be stripped out in the process of columnizing. Just an FYI. This issue will be solved by smart mode.
And as for the JavaScript version I promised a while back (like 6 months now), it will be coming eventually but I can’t say when. I’m pretty sure that I’ll be using TXP for a client site in the next few months, and my plan is to get it ready for that but I’ll have to see about time.
Kind of neat: there is now a debug mode built into the plugin. Turning this on will show how the plugin is turning the content into nodes, s well as column lengths in characters. To see this change this line:
define(‘JCBDBG’, false);
to:
define(‘JCBDBG’, true);
Anyhow, please beat this thing up and let me know what you think.
Last edited by jimb (2005-10-06 21:24:33)
Offline
#81 2005-10-09 20:37:30
- davidm
- Member

- From: Paris, France
- Registered: 2004-04-27
- Posts: 719
Re: [archived] jcb_columnize_body
Thx jimb, I’ve downloaded 0.5 and will test it on a testsite I run…
I’ll report here for bugs or any feedback I get :-)
.: Retired :.
Offline
Re: [archived] jcb_columnize_body
any update on the progress and examples of this plugin? The plugins site is only updated to 0.3 I should add, going to give this a go when Smart Mode/Words is implemented since modifying 400 articles would be quite a long process.
Last edited by sekhu (2005-12-28 13:00:46)
Offline
#83 2006-02-07 09:02:47
- Champak
- Member
- Registered: 2006-01-31
- Posts: 56
Re: [archived] jcb_columnize_body
Is it possible to have the row lines inserted as well?
Offline
#84 2006-02-24 01:31:27
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: [archived] jcb_columnize_body
If I have an image that spans two columns, how can I make jcb_columnize to wrap the text around the image and not flow it over the image.
I tried adding {clear:both} to the columnized1 and 2 styles which didn’t work. I tried img{clear:both} too.
This could make really cool magazine type layouts. Any suggestions?
Offline
#85 2006-03-01 16:25:58
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: [archived] jcb_columnize_body
An idea: a tag that will break the columns to split long texts into chunks such as:
aaaa | bbbb
aaaa | bbbb
aaaa | bbbb
__________
cccc | dddd
cccc | dddd
cccc | dddd
__________
eeee | ffff
eeee | ffff
eeee | ffff
???
Offline
#86 2006-10-25 03:21:00
- argentorange
- Member
- Registered: 2006-10-09
- Posts: 12
Re: [archived] jcb_columnize_body
Hi, I’m currently using jcb_columnize v.4 on my website: www.marqueemultimedia.com
It’s the coolest plugin ever. However the page doesn’t validate because the div class ‘columnized2’ is placed before a </p>. Is there a way to make it not do this?
Appreciate your help!
Offline
Re: [archived] jcb_columnize_body
Wow, I, uh, sort of got sidetracked learning Ruby and Python at my job and I haven’t finished the updates to the plugin I promised so long ago.
argentorange, I went to your site and couldn’t find the code you’re talking about- but I’d be happy to tweak the code if you need it to do something slightly different.
If there’s still interest in this plugin I’ll try to take a look at finishing it- I’m still really busy but I can probably find some time for it soon.
Offline
Re: [archived] jcb_columnize_body
I adore this plugin (running version 0.5). Thank you Jim.
*edit: 5 —> 0.5
Last edited by alicson (2007-12-12 16:16:07)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: [archived] jcb_columnize_body
Jim are you still around. I am just thinking about some cases where I could use your plug-in but I would feel much safer if the author is still hanging around :)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: [archived] jcb_columnize_body
Holy cow, thanks for posting to this thread, merz1. How did this gem slip through my fingers? I was looking for a plugin that did something similar to this last month; it was a 3-col layout actually, but I think it’s fairly easy to adapt from this plugin with a bit of maths.
Can’t believe I never spotted this, thanks again! I’m going to put on my hacking trousers…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline