I've put together another module for myself the handles the [caption align="right" ...] syntax properly. I'm considering contributing the code, but I think it might be better to just merge it with this module. This module would then parse either syntax.
My module is produces pure html/css. There is no jquery connected.
What do you think?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 934844 WordPress [caption] syntax, comment #4.patch | 3.34 KB | Bevan |
| #4 | shortcodes.inc_.txt | 6.13 KB | Bevan |
| #2 | 934844_wp_caption.patch | 9.91 KB | aron novak |
Comments
Comment #1
freelockHi,
How about posting a patch here? In the midst of a wp-> drupal migration right now, would be great if you have this already done...
Comment #2
aron novakFor everyone, who wants to use it for wp->drupal migration, here is a patch.
It uses WP's own shortcode processing file (with some cleanup, i removed non-needed functions from the file).
The help text inside the module is not updated, but i tested at wp-migrated nodes and seems to work well.
I only set this to "Needs work", as the help text is not true anymore, also including a file from WP is not so nice, not sure if it can be committed like this to the repository.
Comment #3
Bevan commentedtnichols; Where is your code available?
Aron Novak; Thanks for this! It's just what I need.
Comment #4
Bevan commentedThis version of the patch makes the CSS-width of
div.caption-innerwork. Without the patch, the width property's value is missing "px", and therefore has no effect. I.e. The rendered markup is now;instead of
The patch does not include
shortcodes.inc, which I have also attached.Comment #5
Bevan commentedAron; I believe the license of the original file
shortcodes.incis GPL 2, correct? If so then I do not believe it is a problem to include it in the repository.Though the problem really is whether the maintainer of this module (if he/she is still active) wants to change the module this radically.
Comment #6
aron novakFrom http://drupal.org/node/103704
"DO NOT include code from a non-Drupal project in the repository."
So i think it's still a bit problematic to do copy-paste from another project, regardless of its license.
Comment #7
quicksketchRather than implement the entire WordPress quicktag.inc file, I think a rational first step would be just to fix the "bug" instead of working on this possibly over-reaching feature request. I've made a new issue for just the bug at #1282088: WordPress-style [align="right"] quote syntax not handled correctly.
Comment #8
quicksketchFor now I'd like to table this feature. I've imitated portions of the WordPress code in the solution at #1282088: WordPress-style [align="right"] quote syntax not handled correctly. It's not lifting the entire quicktags.inc file though, which I think is a bit aggressive for this module try to shoehorn into Drupal. Instead I've only used a small segment of the code which is useful for pulling out attributes no matter what format or order they are in (e.g. attributes with or without quotes -- single or double).