1
zeroram
Xoops Editor Width Problem
  • 2006/4/20 21:43

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


Well i usually know this, but i havent found yet how to resize the XOOPS Editor box.

since am using a fixed width for content 495px when i use the ditor to post news or reply on forums the editor( i belive) brake the whole design..

any ideas how i can fix this??

see example here


Resized Image

2
aph3x
Re: Xoops Editor Width Problem
  • 2006/4/20 22:16

  • aph3x

  • Theme Designer

  • Posts: 834

  • Since: 2004/12/26


I'm not sure if this will be any help... but found THIS on hervet's site
Everything I'm not made me everything I am
The Themes

3
zeroram
Re: Xoops Editor Width Problem
  • 2006/4/20 22:38

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


Thanks DefianceB0y but that hack seem only to work for resizing in real time the page, but not to keep it with a fixed width

anyone have an idea how to really fix this??

4
zeroram
Re: Xoops Editor Width Problem
  • 2006/4/22 7:56

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


no one?

5
hervet
Re: Xoops Editor Width Problem
  • 2006/4/22 9:53

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hello,

For the simple textareas, open the file called /xoops/class/xoopsform/formtextarea.php.

Find this lines :
Quote:

$this->_rows = intval($rows);
$this->_cols = intval($cols);

and replace =intval(...) with the specific size you want to give it.


For the dhtml textareas, opne the file calld /xoops/class/xoopsform/formdhtmltextarea.php.
Find this (very long) line :
Quote:

$ret .= "<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeBold(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/bold.gif' alt='bold' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeItalic(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/italic.gif' alt='italic' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeUnderline(\"".$this->_hiddenText."\");' onmouseover='style.cursor=\"hand\"' src='".XOOPS_URL."/images/underline.gif' alt='underline' />&nbsp;<img onclick='javascript:setVisible(\"".$this->_hiddenText."\");makeLineThrough(\"".$this->_hiddenText."\");' src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor=\"hand\"' />&nbsp;&nbsp;<input type='text' id='".$this->getName()."Addtext' size='20' />&nbsp;<input type='button' onclick='xoopsCodeText(\"".$this->getName()."\", \"".$this->_hiddenText."\", \"".htmlspecialchars(_ENTERTEXTBOX, ENT_QUOTES)."\")' class='formButton' value='"._ADD."' /><br /><br /><textarea id='".$this->getName()."' name='".$this->getName()."' onselect=\"xoopsSavePosition('".$this->getName()."');\" onclick=\"xoopsSavePosition('".$this->getName()."');\" onkeyup=\"xoopsSavePosition('".$this->getName()."');\" cols='".$this->getCols()."' rows='".$this->getRows()."'".$this->getExtra().">".$this->getValue()."</textarea><br />\n";



inside this line, find this :
Quote:

cols='".$this->getCols()."' rows='".$this->getRows()


replace $this->getCols() with your specific size and replace $this->getRows() with your specific size too.

Take care, next time you will upgrade your XOOPS version, you will lost this (in fact you will have to reapply it).

BUT the best idea is to modify your theme to solve this "problem".

bye,
Hervé

6
zeroram
Re: Xoops Editor Width Problem
  • 2006/4/22 22:02

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


i edited this formdhtmltextarea.php

and works great on submiting news, but when i went to reply on forum it keep braking the theme...

do you know where i can found this for the forum?

7
zeroram
Re: Xoops Editor Width Problem
  • 2006/4/22 22:44

  • zeroram

  • Friend of XOOPS

  • Posts: 326

  • Since: 2004/6/30


never mind.. found it

if anyone need this in the future.. you need to do the same procedure before stated by hervet but also do it on

include/xoopscodes.php

8
hervet
Re: Xoops Editor Width Problem
  • 2006/4/23 8:27

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Please, don't forget the "thank you".

9
eZer001
Re: Xoops Editor Width Problem
  • 2006/8/6 20:45

  • eZer001

  • Just popping in

  • Posts: 23

  • Since: 2006/4/11


Quote:

hervet wrote:
Please, don't forget the "thank you".


Thank you

Login

Who's Online

161 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 161


more...

Donat-O-Meter

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

Latest GitHub Commits