Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
My first extension (Quicktag formatting bar)
This discussion has been closed.
Comments
You'll have to use both of them for editing discussions and comments. They can point to the same render function though The extension looks nice!
I think I need to get permission from Alex though because I've modified his javascript.
<?php /* Extension Name: Quicktags Extension Url: http://lussumo.com/addons/ Description: Inserts a javascript formatting bar to the post area, using Alex King's Quicktags) Version: 0.1 Author: James Greig Author Url: http://www.3stripe.net */ $Configuration["QUICKTAGS_PATH"] = 'extensions/Quicktags/'; if (in_array($Context->SelfUrl, array("post.php", "comments.php"))) { class QuicktagsBar { function QuicktagsBar_Create() { echo ' <div id="quicktags"> <script type="text/javascript">edToolbar();</script> </div><br /> '; } function QuicktagsBarApres_Create() { echo ' <script type="text/javascript">var edCanvas = document.getElementById(\'CommentBox\');</script> <script src="/extensions/Quicktags/quicktags.js" type="text/javascript"></script> '; } } } function AddQuicktagstoCommentForm(&$DiscussionForm) { $QuicktagsBar = new QuicktagsBar($DiscussionForm->Context); $QuicktagsBar-> QuicktagsBar_Create(); } function AddQuicktagsJavascriptafterCommentForm(&$DiscussionForm) { $QuicktagsBar = new QuicktagsBar($DiscussionForm->Context); $QuicktagsBar-> QuicktagsBarApres_Create(); } if( $Context->Session->UserID > 0) { $Head->AddScript($Context->Configuration["BASE_URL"].$Context->Configuration["QUICKTAGS_PATH"].'quicktags.js'); $Context->AddToDelegate("DiscussionForm", "CommentForm_PreCommentsInputRender", 'AddQuicktagstoCommentForm'); $Context->AddToDelegate("DiscussionForm", "DiscussionForm_PreCommentRender",'AddQuicktagstoCommentForm'); $Context->AddToDelegate("DiscussionForm", "CommentForm_PreButtonsRender", 'AddQuicktagsJavascriptafterCommentForm'); $Context->AddToDelegate("DiscussionForm", "DiscussionForm_PreButtonsRender",'AddQuicktagsJavascriptafterCommentForm'); } ?>
var frm = document.getElementById('frmPostComment'); if (frm) { // Do stuff in here, like... setCheckedValue(frm.FormatType, 'Html'); }
I've updated the zip file on the Addons page... we're at v0.3 now... wahooo.... video quicktags coming soon