PDA

View Full Version : Remove WYSIWYG Editor


Abronsyth
10-10-2014, 11:13 AM
I'm hoping this is pretty simple.

I'd like to remove the "What you see is what you get" editor from the shoutbox and private messages.

I just don't want users to use obnoxious fonts sizes and colors/etc, so I'd prefer it to be simplified, like the pet bio/etc :)

Thanks,
Abron

Hall of Famer
10-13-2014, 08:53 AM
You just have to replace the HTML form that contains WYGIWYS editor to a standard HTML textarea. It should be doable.

Abronsyth
10-24-2014, 09:48 AM
Having trouble figuring out which files to look at. I've checked the base files, lang, and view for both messages and shoutbox, but couldn't find anything related.

What files should I be looking in..?

Abronsyth
12-29-2014, 01:59 PM
Still haven't figured out where to change this, if anyone possibly knows.

IntoRain
12-29-2014, 03:51 PM
In shoutboxview.php:

public function index(){
$mysidia = Registry::get("mysidia");
$document = $this->document;
$document->setTitle($this->lang->title);
$document->addLangvar($this->lang->default);

$shoutbox = $this->getField("shoutbox");
$this->display($shoutbox);
//$ckEditor = $shoutbox->editor;//comment or delete this
if($mysidia->input->post("comment")){
$document->addLangvar($this->lang->complete);
$this->refresh(5);
return;
}

$shoutboxForm = new Form("shoutbox", "shoutbox", "post");
$shoutboxForm->add(new Comment($mysidia->lang->notice, TRUE));//change this to TRUE to make a linebreak
//comment or delete this:
//$shoutboxForm->add(new Comment($ckEditor->editor("comment", "CKEditor for Mys v1.3.4")));

$shoutTextArea = new TextArea("comment", "", 4, 45);//add this line
$shoutboxForm->add($shoutTextArea);//add this line
$shoutboxForm->add(new Button("Shout It!", "submit", "submit"));
$document->add($shoutboxForm);
}


I commented the changes, so it should be easy to find them ^^

Abronsyth
12-29-2014, 06:11 PM
Ah, thank you very much! And the comments should help me fix up the other areas, as well!

Thank you <3

Edit: Yes! Managed to get messages fixed up, as well! Commented code is amazing, haha, thank you again!