editor related patches

Discussion corner for Developers of Serendipity.
Post Reply
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

editor related patches

Post 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
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: editor related patches

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
assent
Regular
Posts: 9
Joined: Thu Oct 18, 2007 12:20 pm

Re: editor related patches

Post 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
----------------------------------------------------
Assen Tchorbadjiev
Aplus.Net Internet Services
assent [at] aplus.net
2C35 8891 6DCB 2D4C BAA0 13E9 35F9 7F6A 41E0 8A1E <pgp.mit.edu>
Post Reply