Would be awesome if this could be ported to D7!

Comments

codi’s picture

StatusFileSize
new10.92 KB

First crack at a D7 release of columns_filter. I don't know about the wysiwyg plugin as I use ckeditor which I'll have some integration for in a bit.

I also removed the theme functions for now, but if you just need div separators as is then this will work for you.

Same filter order applies. Keep it just under the 'Limit allowed HTML tags' and you're good.

joachim’s picture

Status: Active » Needs review

Thanks for working on this!

Changing status so I remember to look at this when I have time.

Anonymous’s picture

I've tried your version of the D7 port, and it works fine. I juste made a small change because I found it odd behaviour to add the column number in the class attribute, and instead added the number of total columns.

But it doesn't work with any wysiwyg editor. I tried CKEditor, tinyMCE, markitup and nicEdit. On all of them the paragraph break get ignored and the wysiwyg button (plugin) gets ignored too.

codi’s picture

Same issue for me. I'll take a look, but i'm not terribly familiar with wysiwyg editors.

joachim’s picture

Status: Needs review » Needs work

I've taken a look at the zipfile.

The code needs a bit more work:

- we've lost a few function docblocks
- Implementation of hook_filter <-- it's not, it's now a callback
- callbacks like _columns_filter_filter can lose the initial _

Also, this should be run through coder module.

I've started a 7.x-1.x branch. Can you post your version as a patch on that please?

dboulet’s picture

Might try porting this tomorrow...

EDIT: Lack of time, will have to wait until next week.

dboulet’s picture

Status: Needs work » Needs review
StatusFileSize
new14.79 KB

Ok, had a little bit of trouble creating this patch, still getting used to git : ).

Please test, code works well for me.

RandalK’s picture

Status: Needs review » Needs work

Applying this patch gives a few whitespace errors:

git apply columns_filter_d7-1111390-7.patch

columns_filter_d7-1111390-7.patch:220: trailing whitespace.

columns_filter_d7-1111390-7.patch:227: trailing whitespace.

columns_filter_d7-1111390-7.patch:242: trailing whitespace.

columns_filter_d7-1111390-7.patch:250: trailing whitespace.

columns_filter_d7-1111390-7.patch:265: trailing whitespace.

warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

And this IMHO should be moved into columns_filter.info
(see http://drupal.org/node/171205#stylesheets and system_add_module_assets)

function columns_filter_init() {
  drupal_add_css(drupal_get_path('module', 'columns_filter') . '/columns_filter.css');
}

Other then that I see no problems.

dboulet’s picture

Status: Needs work » Needs review
StatusFileSize
new17.62 KB

Thanks for the review RandalK! Here's a new patch.

joachim’s picture

Status: Needs review » Fixed

Committed this to the 7 branch and made a dev release which should show up in a while.

I noticed one problem but I've filed it as a new bug rather than held this up as it's minor: #1192148: filter UI description no longer matches core style.

Thanks everyone :)

joachim’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.