Silverstripe : tinymce improvements for image handling

The image button on the tinymce instance of silverstripe html text fields is really nice and well layed out : it gives editors one of the best text / image integration, with a minimum user actions that’s both powerful, intuitive, and reactive thanks to AJAX calls to the folder structure.

One small drawback is that it comes with one small feature that can be annoying at times, especially when you’re looking for inserting images without resampling them, especially for transparent images or tight image integration / quality that Silverstripe resampling functions (PHP based) cannot match (check out the original image hack).

Image size limit feature

In silverstripe, when you select a big image, width and height are automatically resized to a maximum of 600 pixels. Quick hackers might want to deactivate this feature by commenting the resize algorithm in cms/code/ThumbnailStripField.php (lines 73/80 of 2.3 rc2).

But for those who want the best of both worlds (enjoy limitation AND allow original size), here is a hack that will allow editors to choose between the limited image size (max 600, very useful for huge uploads straight from high definition camera) and the original size (very useful for reasonable image size, like example here of 800). Next trick would be to allow editor to type in width and height with automatic calculation of the image proportion. We’re getting closer to photoshop indeed.

Read the rest of this entry »

Silverstripe howto : import group users

Developping new functions in Silverstripe CMS is not easy task  : documentation of the framework is good enough for most web site development tasks but when it comes to specific functions, we know the potentiality is there but lack specific API documentation. It took me a few hours and a lot of brain energy to find out how to … duplicate the newsletter recipient import function to have it work for users and groups. Objective was to let my own customer import hundreds of his own customers. Done, tested to a certain extent, click here for more on Silverstripe’s dedicated thread.

Files :

Screenshot

Insite image gallery editing

silverstripe is getting serious there : experienced website developers will be delighted to try out a new version of the famous Gallery extension that implements in site image editing for text captions, reordering and item deletion. Novice users will not get lost as this extension builds on what’s popular, with Facebook-style interface for adding captions after insite image upload. the result is wonderful as it implements one of the best modal galleries out ther, based on (commercial) Shadowbox jquery gallery plugin. Another guy is working on a Nyromodal implementation (because it’s GPL) and no doubt next time I need the stuff I’ll work on porting the front end to my own choice of jquery modal gallery plugin.

Silverstripe form validation translation

Silverstripe’s nice form builder, in its current version, has one big drawback : it doesnot handle translations very well. Coming from a discussion on Silverstripe’s forums, I have decided to manage my own translation solution for UserDefinedForms.

Read the rest of this entry »