Page 1 of 1

editor related patches

Posted: Thu Nov 01, 2007 6:23 pm
by assent
Hi,

I'm attaching two patches related to the "Link Image" (Gallery) and "Link Entry" feature when adding/editing entries.
The first feature is available with the "coppermine selector plugin" and the second one comes with the "event_wikilinks".

Both patches are against the current s9y stable version.

serendipity_event_wikilinks.php.diff
Uses the shared insert function instead of the wikilinks provided function, since the former inserts the entry link on both WYSIWYG and source mode

serendipity_editor.js.diff
It does several things:
a) guess the editor based on the 3x supported options: FCK, tinyMCE and Xinha
b) get the correct instance based on a)
c) based on whether the editor is running in WYSIWYG mode, or source mode - either inserts HTML content via the editor functions, or add the content via the source mode functions

Both were tested on several browsers - IE6,7, Firefox 2+ (Linux & NT) and work fine.

EDIT: adding patch file URLs below

http://assent.cpteam-unix.com/s9y/seren ... or.js.diff

http://assent.cpteam-unix.com/s9y/seren ... s_php.diff

Re: editor related patches

Posted: Fri Nov 02, 2007 12:26 pm
by garvinhicking
Hi!

Thanks a lot, I've committed your changes! I needed to change the code style a bit (spaces instead of tabs, added optional brackets, removed function argument spacing).

Best regards,
Garvin

Re: editor related patches

Posted: Fri Nov 02, 2007 12:30 pm
by assent
garvinhicking wrote:Hi!
[..]I needed to change the code style a bit (spaces instead of tabs, added optional brackets, removed function argument spacing).
[..]
Thanks,

next time we'll try to keep the current style.

Assen