We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Extension to Add Textile to Default Text Format Dropdown When Creating New Fields

Development and Programming

Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

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. 😉

       
Justin Hurlburt's avatar
Justin Hurlburt
344 posts
17 years ago
Justin Hurlburt's avatar Justin Hurlburt

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!

       
gridonic's avatar
gridonic
231 posts
17 years ago
gridonic's avatar gridonic

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 😊

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

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/

       
Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

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

       
Eric Barstad's avatar
Eric Barstad
198 posts
17 years ago
Eric Barstad's avatar Eric Barstad

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.