1
ibleedv20
Editor in blocks
  • 2009/7/27 2:42

  • ibleedv20

  • Friend of XOOPS

  • Posts: 32

  • Since: 2009/1/9 1


Is it possible to get a choice of editors in the blocks section.Hyperlinks are so bland without color.Would this be a hack or is there a way to get a WYSIWYG in there.

2
mariane
Re: Editor in blocks
  • 2009/7/27 12:19

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


hello, yes you can make any editor the default one, for example if you want to make tinyeditor the default XOOPS editor (for blocks and everything) do the following:
- edit the file formdhtmltextarea.php , you can find it in this path: /class/xoopsform/
look for this code (i think it's on line 74):
var $htmlEditor = array();

and replace it by the following:
var $htmlEditor = array('XoopsFormTinyeditorTextArea''/class/xoopseditor/tinyeditor/formtinyeditortextarea.php');

save the file and replace it by the existing one in your website.
- edit this file: blockform.php, you can find it on this path:
module/system/admin/blocksadmin/
look for the folowing code in it:
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], 1570);

and replace it by this one:
if ( is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php")) { 
    include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php"); 
    
$textarea = new XoopsFormTinyeditorTextArea(array('caption'=>_AM_CONTENT'name'=>'bcontent''value'=>$block['content'], 'width'=>'100%''height'=>'400px',  'xEditor'=>'1')); 
    }else{ 
    
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], 1570); 
    }

save the file and replace it by the existing one in your website and update the system module.


now if you need to make this editor also the default editor of all modules installed in your website , do the following:

- go to xoops_version.php and look for this code:
array(_MI_NEWS_FORM_DHTML => 'dhtml',  
_MI_NEWS_FORM_COMPACT => 'textarea',  
_MI_NEWS_FORM_SPAW => 'spaw',  
_MI_NEWS_FORM_HTMLAREA => 'htmlarea',  
_MI_NEWS_FORM_KOIVI => 'koivi',  
_MI_NEWS_FORM_FCK => 'fck';

and replace it by the following:

array(_MI_NEWS_FORM_DHTML => 'dhtml',  
_MI_NEWS_FORM_COMPACT => 'textarea',  
_MI_NEWS_FORM_SPAW => 'spaw',  
_MI_NEWS_FORM_HTMLAREA => 'htmlarea',  
_MI_NEWS_FORM_KOIVI => 'koivi',  
_MI_NEWS_FORM_FCK => 'fck',  
'tinyeditor' => 'tinyeditor');


finally, edit include/functions.php
and look for:
case "koivi":  
if(!
$x22) {  
if ( 
is_readable(XOOPS_ROOT_PATH "/class/wysiwyg/formwysiwygtextarea.php")) {  
include_once(
XOOPS_ROOT_PATH "/class/wysiwyg/formwysiwygtextarea.php");  
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''400px''');  
}  
} else {  
$editor = new XoopsFormEditor($caption"koivi"$editor_configs);  
}  
break;

and replace it by the following
case "tinyeditor":  
if ( 
is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/ formtinyeditortextarea.php")) {  
include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php");  
$editor = new XoopsFormTinyeditorTextArea(array 'caption'=>$caption'name'=>$name'value'=>$value'width'=>'100%''height'=>'400px''xEditor'=>'1'));  
}  
break;


Please try this methode on your local host first or backup the files that you will change in your website.
the road of success is always under construction

3
ibleedv20
Re: Editor in blocks
  • 2009/7/27 17:22

  • ibleedv20

  • Friend of XOOPS

  • Posts: 32

  • Since: 2009/1/9 1


I will be trying it on my test site today.Once again it is a pleasure to be using XOOPS and to receive such great support.I am learning so much from using this CMS.I support this site and all associated with it.Thnx again.

4
jimbofoxman
Re: Editor in blocks

Ok, I did the first two steps and now Tiny Editor shows up. BUT..........I have only one line of text visible making it hard to see what the content is. All the menus and stuff are there.........just only space enough for one line of content to work on.

Anyone know how to make the area taller?

5
jimbofoxman
Re: Editor in blocks

Well I give up..........I figured out how to drag the edit area larger..........but it has the stupid background in there. So I tried some CSS thing, but screwed up the blockadmin screen. So I restored the files and re-edited the first two files and it's still the same old no frills editor. I quit!

Login

Who's Online

183 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits