// // ------------------------------------------------------------------------ // // This program is free software; you can redistribute it and/or modify // // it under the terms of the GNU General Public License as published by // // the Free Software Foundation; either version 2 of the License, or // // (at your option) any later version. // // // // You may not change or alter any portion of this comment or credits // // of supporting developers from this source code or any supporting // // source code which is considered copyrighted (c) material of the // // original comment or credit authors. // // // // This program is distributed in the hope that it will be useful, // // but WITHOUT ANY WARRANTY; without even the implied warranty of // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // // Author: Kazumi Ono (AKA onokazu) // // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // // Project: The XOOPS Project (http://www.xoops.org/) // // ------------------------------------------------------------------------- // /* * displayes xoopsCode buttons and target textarea to which xoopscodes are inserted * $textarea_id is a unique id of the target textarea */ function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null) { $hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText'; //Hack for url, email ...., the anchor is for having a link on [_More...] echo "url email imgsrc image code quote
\n"; $sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"); echo "\n"; $fontarray = array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana"); echo "\n"; $colorarray = array("00", "33", "66", "99", "CC", "FF"); echo ""._EXAMPLE."\n"; echo "
\n"; //Hack smilies move for bold, italic ... $areacontent = isset( $GLOBALS[$textarea_id] ) ? $GLOBALS[$textarea_id] : ''; echo "bold italic underline linethrough  


\n"; //Fin du hack } /* * Displays smilie image buttons used to insert smilie codes to a target textarea in a form * $textarea_id is a unique of the target textarea */ function xoopsSmilies($textarea_id) { $myts =& MyTextSanitizer::getInstance(); $smiles = $myts->getSmileys(); if (empty($smileys)) { $db =& Database::getInstance(); if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) { while ($smiles = $db->fetchArray($result)) { //hack smilies move for the smilies !! echo ""; //fin du hack } } } else { $count = count($smiles); for ($i = 0; $i < $count; $i++) { if ($smiles[$i]['display'] == 1) { //hack bis echo ""; //fin du hack } } } //hack for more echo " ["._MORE."]"; } //fin du hack ?>