1
irmtfan
any editor can show smilies at the bottom of page needed
  • 2007/1/15 4:36

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


is this can be done by tinyeditor or any other like dhtml?

2
fragttdg
Re: any editor can show smilies at the bottom of page needed
  • 2007/1/16 4:30

  • fragttdg

  • Just popping in

  • Posts: 34

  • Since: 2004/6/13


I wrote a simple textarea under class/xoopsform/ and have been using it throughout my site. FYI

if (!defined('XOOPS_ROOT_PATH')) {
    die(
"XOOPS root path not defined");
}
include_once(
XOOPS_ROOT_PATH.'/include/xoopscodes.php');

class 
XoopsFormSimpleTextArea extends XoopsFormElement {
    
/**
     * number of columns
     * @var    int 
     * @access  private
     */
    
var $_cols;

    
/**
     * number of rows
     * @var    int 
     * @access  private
     */
    
var $_rows;

    
/**
     * initial content
     * @var    string  
     * @access  private
     */
    
var $_value;

    
/**
     * Constuctor
     * 
     * @param    string  $caption    caption
     * @param    string  $name       name
     * @param    string  $value      initial content
     * @param    int     $rows       number of rows
     * @param    int     $cols       number of columns   
     */
    
function XoopsFormSimpleTextArea($caption$name$value=""$rows=5$cols=50$id ""){
        
$this->setCaption($caption);
        
$this->setName($name);
        
$this->_rows intval($rows);
        
$this->_cols intval($cols);
        
$this->setValue($value);
        
$this->setId($id);
    }

    
/**
     * get number of rows
     * 
     * @return    int
     */
    
function getRows(){
        return 
$this->_rows;
    }

    
/**
     * Get number of columns
     * 
     * @return    int
     */
    
function getCols(){
        return 
$this->_cols;
    }

    
/**
     * Get initial content
     * 
     * @return    string
     */
    
function getValue(){
        return 
$this->_value;
    }

    
/**
     * Set initial content
     * 
     * @param    $value    string
     */
    
function setValue($value){
        
$this->_value $value;
    }

    
/**
     * prepare HTML for output
     * 
     * @return    sting HTML
     */
    
function render(){
        return 
".$this->getName()."' id='".$this->getId()."' rows='".$this->getRows()."' cols='".$this->getCols()."'".$this->getExtra().">".$this->getValue()."".get_xoopsSmilies($this->getId());
    }
}
?>
Xoops Based site - http://www.xiubei.com

3
irmtfan
Re: any editor can show smilies at the bottom of page needed
  • 2007/1/23 7:43

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i cant find get_xoopsSmilies function anywhere.
where is that?
i just find xoopsSmilies and use it like this:
xoopsSmilies($this->getName())

but it always shows at the top of topic perfix and not bottom of editor.

i put it where ever in the dhtmlext editor render function but still it persist to be on top:
function render()
    {
          
$ret '$this->_url '/xoops.js">';
        
$ret .= $this->_codeIcon()."n";
        
$ret .= $this->_fontArray();
        
$ret .= "XoopsCheckLength('".$this->getName()."''".$this->_maxlength."''"._ALTLENGTH."''"._ALTLENGTH_MAX."');" value=' ? ' />";
        
$ret .= "nn".xoopsSmilies($this->getName());
        
        
$ret .= ".$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()."n";
        
$ret .= xoopsSmilies($this->getName());
        return 
$ret;
    }

4
McDonald
Re: any editor can show smilies at the bottom of page needed
  • 2007/1/23 9:13

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Smilies are automatically added under the editor field in tinyeditor as long as you select the Emotions plugin from the toolbars setup. See page 10 of the tinyeditor manual.

5
irmtfan
Re: any editor can show smilies at the bottom of page needed
  • 2007/1/23 9:30

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


thank you for your reply McDonald
in tinyeditor i cant see "emotions" in the bottom of editing page.
it just shows an icon in the editor toolbar to select smilies.
could you show me a live demo?
also i want to add it in dhtmlext.

6
McDonald
Re: any editor can show smilies at the bottom of page needed
  • 2007/1/23 11:15

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Hello irmtfan,

Sorry, I was wrong about the smilies in tinyeditor.
My excuses for the confusion.
Maybe frankblack has a solution for this.
You can add your wish to the feature list of tinyeditor so the developpers can implement it in a later version.

Login

Who's Online

390 user(s) are online (235 user(s) are browsing Support Forums)


Members: 1


Guests: 389


DediRock,

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