Hi,
Great module! This is really useful. I would like to suggest you to use this module for you next version: http://drupal.org/project/simplehtmldom
It's php library that will allow you to avoid the regex in your filter and select the images jquery style. Here are some examples: http://drupalcode.org/project/simplehtmldom.git/blob/27104c9:/simplehtml...

It would be a huge step in the maintainability of the module.

Comments

lolandese’s picture

Status: Active » Postponed

Thanks. That's looks like a solid suggestion.

I have considered using a parser before and had a look at the QueryPath module. That resulted to be a bit too complicated for me.

The simplehtmldom API module you suggest looks easier to use, at least looking at the provided example. I honestly think you might be right and this could be the way to go.

"Unfortunately" my time is taken at the moment by some client's projects, but once in more calm waters I will look into this.

Meanwhile patches are welcomed with open arms and I will review them instantly. Co-maintaining is more than welcome. :)

Thanks again.

lolandese’s picture

Issue summary: View changes
Status: Postponed » Needs review
StatusFileSize
new5.59 KB

Using XPath there is no need to add a dependency on other modules or a library.

Another issue that we just solved, #2136923: More than two selector/rejector classes, is more complicated for XPath, so that part had to be reverted. That seems to be only a minor issue though.

lolandese’s picture

Version: 7.x-1.0 » 7.x-2.x-dev
Status: Needs review » Fixed

Opened a 2.x branch for the XPath method. Committed. See http://drupalcode.org/project/autofloat.git/commitdiff/e27cf16.

Feel free to use this branch. Feedback appreciated.

Some minor differences:

  • Instead of wrapping elements in a span to target them with CSS, a class is added directly to the element itself to float.
  • Rejector and selector classes to target are limited to two, instead of the unlimited classes that can be used with the 'regular expression' version.

Thanks.

lolandese’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Status: Fixed » Patch (to be ported)
lolandese’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new7.24 KB

Patch ported to D8.

lolandese’s picture

Status: Needs review » Patch (to be ported)
lolandese’s picture

Version: 8.x-1.x-dev » 6.x-1.x-dev
lolandese’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new7.95 KB

How convenient to borrow code from the D7 API for functions that don't exist for D6:

Patch ported to D6.

lolandese’s picture

Status: Needs review » Fixed

Committed and released a new 6.x-2.x branch. See http://drupalcode.org/project/autofloat.git/commitdiff/31bd39f.

After D7 and D8 this was the last one, thus 'fixed'.

Thanks.

Status: Fixed » Closed (fixed)

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