EllisLab text mark
Advanced Search
     
Extension to Add Textile to Default Text Format Dropdown When Creating New Fields
Posted: 02 May 2008 05:42 PM   [ Ignore ]
Avatar
Joined: 2006-01-18
230 posts

As per this post, I want to build an extension that adds Textile as one of the Default Format options when creating new custom fields. Derek said publish_admin_edit_field_format would be the hook to use, but the thing is, I’m a PHP idiot and I need someone to give me a bit more direction. In other words, how would I use publish_admin_edit_field_format to somehow add Textile as one of the drop down options? I’d appreciate any help on this. Speak slowly. wink

 Signature 

Eric Barstad
Shadow Box Creative Media Ltd.

EE Pro Network

 
Posted: 18 June 2008 09:02 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2008-04-29
344 posts

Greetings!

I would recommend starting out with the Developer Docs for Extension Development.

This will give you a solid foundation of what goes into an extension. Once you have a good understanding of what an extension is all about, check out the publish_admin_edit_field_format hook notes.

You could then reference other extensions on how to interface with the passed values from the hook, and get a better understanding of what to do with them.

If you have any questions, feel free to ask!

 
Posted: 19 June 2008 03:32 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2008-04-12
241 posts

Hi

You’d probably have to preg_replace the formatting options part with your code and add the Textile option there, something like this is what comes to my mind when thinking of this.

Unfortunately preg_replacing, damn I hate that smile

 Signature 

gridonic | Twitter


URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension
DC Template Manager

 
Posted: 25 June 2008 09:09 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2006-01-24
1210 posts

Try looking at another extension that does similar things. LG TinyMCE would be nearly identical to what you need as it converts text boxes to a different custom field type.

http://leevigraham.com/cms-customisation/expressionengine/lg-tinymce/

 Signature 

EE-Garage.com - All my ExpressionEngine 2 Addons!


EE2 - NSM Better Meta - SEO Meta & XML Sitemap Generator
EE2 - NSM Live Look - Real entry previews


Newism - Newcastle - ExpressionEngine Experts

 
Posted: 04 July 2008 09:36 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2006-01-18
230 posts

Thanks for all the tips! I’ve been out of the country, but I’ll check them out once the jet lag passes.

 Signature 

Eric Barstad
Shadow Box Creative Media Ltd.

EE Pro Network

 
Posted: 25 July 2008 01:44 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2006-01-18
230 posts

Well, I’m sticking to HTML/CSS—PHP is no friend of mine. It would also be great if the developer docs had examples for the benefit of noobs like me. [edit: I mean examples for the hooks.]

Anyone else care to take this on? Surely other people get tired of the create field → save field → edit field → edit list → add textile → update field workflow? I don’t expect anything for free—time is money (which is why I want the extension). PM me or reply here if interested.

 Signature 

Eric Barstad
Shadow Box Creative Media Ltd.

EE Pro Network