We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

No Html button in 'textarea' event add/edit | Forum

matt
matt Dec 31 '12
Hiya,

We dont seem to have a html code insert button in the Event add/edit description box? Anyone know how to call that into the box?

Thanks

Matt
Purusothaman Ramanujam
Edit the below file:
ow_plugins\event\controllers\base.php

Add the highlighted text below in the code chunk. Chose what you want in this.

        $buttons = array(
            BOL_TextFormatService::WS_BTN_BOLD,
            BOL_TextFormatService::WS_BTN_ITALIC,
            BOL_TextFormatService::WS_BTN_UNDERLINE,
            BOL_TextFormatService::WS_BTN_IMAGE,
            BOL_TextFormatService::WS_BTN_LINK,
            BOL_TextFormatService::WS_BTN_ORDERED_LIST,
            BOL_TextFormatService::WS_BTN_UNORDERED_LIST,
            BOL_TextFormatService::WS_BTN_MORE,
            BOL_TextFormatService::WS_BTN_SWITCH_HTML,
            BOL_TextFormatService::WS_BTN_HTML,
            BOL_TextFormatService::WS_BTN_VIDEO
        );

        $desc = new WysiwygTextarea('desc',$buttons);
        $desc->setLabel($language->text('event', 'add_form_desc_label'));
        $desc->setRequired();
        $this->addElement($desc);
matt
matt Jan 2 '13
Worked like a charm! Thanks for your expertise and time Bro :)

Awesome.

Matt
Purusothaman Ramanujam
Welcome :) Happy to help :)
Vladimir Bach
Vladimir Bach Feb 3 '14
Any idea how some one might do the same thing for the catalog plugin? I tried looking for the same string of info, but it's not the same. 


Jordi
Jordi Mar 20 '15
How to do this in 1.7.2??


thanks

Purusothaman Ramanujam
I guess it should work the same way, if the core editor has not changed.
Jordi
Jordi Mar 23 '15
i think it is because i cant find that code 



Thanks

Purusothaman Ramanujam
Are you checking in events plugin code?
Jordi
Jordi Mar 25 '15
yes
Purusothaman Ramanujam
Please PM me with details of the files so that I can help
Gary
Gary Jul 17 '15
I've just tried this code change on a fresh install - V1.7.5 (build 9600)


When applied only three new buttons appear More, Photo, Video - what I'm really after is the Switch to HTML one.




Any ideas why this one (and others) are missing?


thanks


Purusothaman Ramanujam
Clear cache and try if you made any changes.
Gary
Gary Jul 21 '15
@Purusothaman Ramanujam  - I've tried clearing the borwser cache and even a different browser, but I'm only seeing the three extra buttons, but not the HTML one.
Purusothaman Ramanujam
Not sure unless I see what is done.
Gary
Gary Jul 23 '15
This is what I have now:



$buttons = array(           
BOL_TextFormatService::WS_BTN_BOLD,           
BOL_TextFormatService::WS_BTN_ITALIC,           
BOL_TextFormatService::WS_BTN_UNDERLINE,           
BOL_TextFormatService::WS_BTN_IMAGE,           
BOL_TextFormatService::WS_BTN_LINK,           
BOL_TextFormatService::WS_BTN_ORDERED_LIST,            BOL_TextFormatService::WS_BTN_UNORDERED_LIST,           
BOL_TextFormatService::WS_BTN_MORE,           
BOL_TextFormatService::WS_BTN_SWITCH_HTML,           
BOL_TextFormatService::WS_BTN_HTML,           
BOL_TextFormatService::WS_BTN_VIDEO        );
        $desc = new WysiwygTextarea('desc',$buttons);
        $desc->setLabel($language->text('event', 'add_form_desc_label'));
        $desc->setRequired();

$event = new OW_Event(self::EVENT_NAME, array( 'name' => 'desc' ), $desc);        OW::getEventManager()->trigger($event);       
$desc = $event->getData();

$this->addElement($desc);



The Forum post is edited by Gary Jul 23 '15