Attached patch adds color picker integration to codefilter module:
I just wish the highlighting was a bit more fine grained.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | codefilter_colorpicker2.patch | 4.72 KB | psynaptic |
| codefilter_colorpicker.patch | 4.6 KB | psynaptic |
Attached patch adds color picker integration to codefilter module:
I just wish the highlighting was a bit more fine grained.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | codefilter_colorpicker2.patch | 4.72 KB | psynaptic |
| codefilter_colorpicker.patch | 4.6 KB | psynaptic |
Comments
Comment #1
psynaptic commentedWrong status.
Comment #2
psynaptic commentedMissing hook_perm!
Comment #3
thedavidmeister commentedWouldn't it be better to use ini_get() for the default colours and ini_set() to enforce the new colours, rather than writing a new function to search and replace over an already-parsed string?
Also, this patch essentially introduces a new dependency on the colour module if you want to edit the colours of your syntax highlighting through codefilter. I think if you want this functionality it would be better to start with a variable_set() and variable_get() style wrapper around the php ini_set() and ini_get() and *then* layer the colour picker on top of that.
Hope you don't mind that I've bumped this up a major version.
Comment #4
cameron tod commentedFeel like making a patch? ;)
Comment #5
thedavidmeister commentedI just ended up sticking my ini_set() calls straight in settings.php.
Just providing a review for the existing patch, not rewriting it at this point. It does need work though as it's currently re-implementing functionality that php implements natively in a way that is harder to maintain and slower performance.
Comment #6
cameron tod commentedIf I was going to implement this, I would create a submodule called something like "codefilter_color". The submodule would implement a color picker admin interface, which would then set the colors for each value (below) using ini_set() at runtime.
Postponing until the bug queue is a bit more under control, and we have some more tests written.
Comment #7
thedavidmeister commenteddoes it need to be a whole submodule?
seems like an .inc file that's only loaded when a supported colorpicker module is enabled would be more than enough.
Comment #8
pbonnefoi commentedcam8001,
I have created a submodule for this called codefilter_color with an admin interface not using ini_set but str_replace for each changed color.
I've sent you a message about this.