TSP Posted September 25, 2011 Share Posted September 25, 2011 Hi, I'm making a hook and I see no way to add a new input box inside the fieldset for the fast reply controls. Could this be done? Or is there another way to achieve adding an input box there with a hook? Want to keep template edits to a minimum and the hook also require some setting checking to check if it can be displayed. edit: and I want a hook point in front of the reply button on the full reply page. (postFormTemplate) Link to comment Share on other sites More sharing options...
Martin A. Posted September 26, 2011 Share Posted September 26, 2011 Javascript:$( 'fast_reply_controls' ) .insert( {top: new Element( 'input', { type: 'text', name: 'name', id: 'id' } ).defaultize( 'default text' ) } ); Hook with replaceOutput public function replaceOutput( $output, $key ) { $tag = "<fieldset class='right' id='fast_reply_controls'>"; $pos = strpos( $output, $tag ); $string = $this->registry->getClass('output')->getTemplate('topic')->templateToInsert(); if( $pos ) { $output = substr_replace( $output, $string, $pos, 0 ); } return $output } This act as a template hook, and can be loaded with any of the available template hooks in the template. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.