mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
more convrol over bbarea, some code need more attention/rewrite
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/bbcode_shortcodes.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/bbcode_shortcodes.php,v $
|
||||||
| $Revision: 1.12 $
|
| $Revision: 1.13 $
|
||||||
| $Date: 2009-07-21 06:31:23 $
|
| $Date: 2009-09-19 15:21:50 $
|
||||||
| $Author: e107coders $
|
| $Author: secretr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -133,12 +133,14 @@ class bbcode_shortcodes
|
|||||||
function sc_bb_help($parm)
|
function sc_bb_help($parm)
|
||||||
{
|
{
|
||||||
if(defsettrue('e_WYSIWYG')) { return; }
|
if(defsettrue('e_WYSIWYG')) { return; }
|
||||||
global $bbcode_helpactive,$bbcode_helptag;
|
global $bbcode_helpactive,$bbcode_helptag, $bbcode_helpsize;
|
||||||
if($parm) $bbcode_helptag = $parm;
|
if($parm) $bbcode_helptag = $parm;
|
||||||
elseif(!varset($bbcode_helptag)) $bbcode_helptag = 'helpb';
|
elseif(!varset($bbcode_helptag)) $bbcode_helptag = 'helpb';
|
||||||
|
if($bbcode_helpsize) $bbcode_helpsize = ' '.$bbcode_helpsize;
|
||||||
$bbcode_helpactive = TRUE;
|
$bbcode_helpactive = TRUE;
|
||||||
|
|
||||||
//FIXME - better bb help
|
//FIXME - better bb help
|
||||||
return "<input id='{$bbcode_helptag}' class='tbox large helpbox' type='text' name='{$bbcode_helptag}' size='90' readonly='readonly' />";
|
return "<input id='{$bbcode_helptag}' class='tbox helpbox{$bbcode_helpsize}' type='text' name='{$bbcode_helptag}' size='90' readonly='readonly' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_bb_preimagedir($parm)
|
function sc_bb_preimagedir($parm)
|
||||||
|
@@ -9,8 +9,8 @@
|
|||||||
* Form Handler
|
* Form Handler
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
||||||
* $Revision: 1.42 $
|
* $Revision: 1.43 $
|
||||||
* $Date: 2009-09-14 21:54:16 $
|
* $Date: 2009-09-19 15:21:51 $
|
||||||
* $Author: secretr $
|
* $Author: secretr $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -159,21 +159,39 @@ class e_form
|
|||||||
return "<textarea name='{$name}' rows='{$rows}' cols='{$cols}'".$this->get_attributes($options, $name).">{$value}</textarea>";
|
return "<textarea name='{$name}' rows='{$rows}' cols='{$cols}'".$this->get_attributes($options, $name).">{$value}</textarea>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function bbarea($name, $value, $help_mod = '', $help_tagid='')
|
function bbarea($name, $value, $help_mod = '', $help_tagid='', $size = 'large')
|
||||||
{
|
{
|
||||||
$options = array('class' => 'tbox large e-wysiwyg');
|
//size - large|medium|small
|
||||||
|
//width should be explicit set by current admin theme
|
||||||
|
switch($size)
|
||||||
|
{
|
||||||
|
case 'medium':
|
||||||
|
$rows = '10';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'small':
|
||||||
|
$rows = '7';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'large':
|
||||||
|
default:
|
||||||
|
$rows = '15';
|
||||||
|
$size = 'large';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$options = array('class' => 'tbox'.($size ? ' '.$size : '').' e-wysiwyg');
|
||||||
|
$bbbar = '';
|
||||||
if(!deftrue('e_WYSIWYG'))
|
if(!deftrue('e_WYSIWYG'))
|
||||||
{
|
{
|
||||||
require_once(e_HANDLER."ren_help.php");
|
require_once(e_HANDLER."ren_help.php");
|
||||||
$options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'";
|
$options['other'] = "onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'";
|
||||||
$bbbar = display_help($help_tagid, $help_mod);
|
$bbbar = display_help($help_tagid, $help_mod, 'addtext', 'help', $size);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = "
|
$ret = "
|
||||||
<div class='bbarea'>
|
<div class='bbarea {$size}'>
|
||||||
<div class='field-spacer'>
|
".$this->textarea($name, $value, $rows, 50, $options)."
|
||||||
".$this->textarea($name, $value, 15, 50, $options)."
|
<div class='field-spacer'><!-- --></div>
|
||||||
</div>
|
|
||||||
{$bbbar}
|
{$bbbar}
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/ren_help.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/ren_help.php,v $
|
||||||
| $Revision: 1.9 $
|
| $Revision: 1.10 $
|
||||||
| $Date: 2009-01-15 15:42:24 $
|
| $Date: 2009-09-19 15:21:50 $
|
||||||
| $Author: secretr $
|
| $Author: secretr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -31,10 +31,11 @@ function ren_help($mode = 1, $addtextfunc = "addtext", $helpfunc = "help")
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function display_help($tagid="helpb", $mode = 1, $addtextfunc = "addtext", $helpfunc = "help")
|
function display_help($tagid="helpb", $mode = 1, $addtextfunc = "addtext", $helpfunc = "help", $helpsize = '')
|
||||||
{
|
{
|
||||||
if(defsettrue('e_WYSIWYG')) { return; }
|
if(defsettrue('e_WYSIWYG')) { return; }
|
||||||
global $tp, $pref, $eplug_bb, $bbcode_func, $register_bb, $bbcode_help, $bbcode_helpactive, $bbcode_helptag;
|
global $tp, $pref, $eplug_bb, $bbcode_func, $register_bb, $bbcode_help, $bbcode_helpactive, $bbcode_helptag, $bbcode_helpsize;
|
||||||
|
$bbcode_helpsize = $helpsize;
|
||||||
|
|
||||||
$bbcode_func = $addtextfunc;
|
$bbcode_func = $addtextfunc;
|
||||||
$bbcode_help = $helpfunc;
|
$bbcode_help = $helpfunc;
|
||||||
@@ -67,6 +68,7 @@ function display_help($tagid="helpb", $mode = 1, $addtextfunc = "addtext", $help
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$temp = array();
|
||||||
$temp['news'] = $BBCODE_TEMPLATE_NEWSPOST;
|
$temp['news'] = $BBCODE_TEMPLATE_NEWSPOST;
|
||||||
$temp['submitnews'] = $BBCODE_TEMPLATE_SUBMITNEWS;
|
$temp['submitnews'] = $BBCODE_TEMPLATE_SUBMITNEWS;
|
||||||
$temp['extended'] = $BBCODE_TEMPLATE_NEWSPOST;
|
$temp['extended'] = $BBCODE_TEMPLATE_NEWSPOST;
|
||||||
@@ -76,7 +78,7 @@ function display_help($tagid="helpb", $mode = 1, $addtextfunc = "addtext", $help
|
|||||||
$temp['maintenance']= $BBCODE_TEMPLATE_ADMIN;
|
$temp['maintenance']= $BBCODE_TEMPLATE_ADMIN;
|
||||||
$temp['comment'] = "{BB_HELP}<br />".$BBCODE_TEMPLATE;
|
$temp['comment'] = "{BB_HELP}<br />".$BBCODE_TEMPLATE;
|
||||||
|
|
||||||
if($temp[$mode])
|
if(isset($temp[$mode]))
|
||||||
{
|
{
|
||||||
$BBCODE_TEMPLATE = $temp[$mode];
|
$BBCODE_TEMPLATE = $temp[$mode];
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/bbcode_template.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/bbcode_template.php,v $
|
||||||
| $Revision: 1.6 $
|
| $Revision: 1.7 $
|
||||||
| $Date: 2009-07-07 07:25:27 $
|
| $Date: 2009-09-19 15:21:50 $
|
||||||
| $Author: e107coders $
|
| $Author: secretr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
// How to register your own BBcode button.
|
// How to register your own BBcode button.
|
||||||
@@ -22,10 +22,9 @@
|
|||||||
// $register_bb['blank'] = array("", "[blank][/blank]","Blank example helper text",e_IMAGE."bbcode/template.png");
|
// $register_bb['blank'] = array("", "[blank][/blank]","Blank example helper text",e_IMAGE."bbcode/template.png");
|
||||||
|
|
||||||
$BBCODE_TEMPLATE = "
|
$BBCODE_TEMPLATE = "
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||||
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
";
|
";
|
||||||
|
|
||||||
// $BBCODE_TEMPLATE .= "{BB=blank}";
|
// $BBCODE_TEMPLATE .= "{BB=blank}";
|
||||||
@@ -35,54 +34,47 @@ $BBCODE_TEMPLATE = "
|
|||||||
// $sc_style['BB_HELP']['post'] = "</div>";
|
// $sc_style['BB_HELP']['post'] = "</div>";
|
||||||
|
|
||||||
$BBCODE_TEMPLATE_SUBMITNEWS = "
|
$BBCODE_TEMPLATE_SUBMITNEWS = "
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB_HELP}
|
{BB_HELP}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||||
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=flash}
|
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=flash}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
// -------- Admin Templates ----------------------
|
// -------- Admin Templates ----------------------
|
||||||
|
|
||||||
$BBCODE_TEMPLATE_ADMIN = "
|
$BBCODE_TEMPLATE_ADMIN = "
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB_HELP=admin}
|
{BB_HELP=admin}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}
|
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}
|
||||||
{BB=right}{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
{BB=right}{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||||
{BB_PREIMAGEDIR=".e_IMAGE."}
|
{BB_PREIMAGEDIR=".e_IMAGE."}
|
||||||
{BB=preimage}{BB=prefile}{BB=flash}
|
{BB=preimage}{BB=prefile}{BB=flash}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
";
|
";
|
||||||
|
|
||||||
// $BBCODE_TEMPLATE_ADMIN .= "{BB=blank}";
|
// $BBCODE_TEMPLATE_ADMIN .= "{BB=blank}";
|
||||||
|
|
||||||
$BBCODE_TEMPLATE_NEWSPOST = "
|
$BBCODE_TEMPLATE_NEWSPOST = "
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB_HELP=$mode}
|
{BB_HELP=$mode}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}
|
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}
|
||||||
{BB=right}{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
{BB=right}{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||||
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
|
{BB_PREIMAGEDIR=".e_IMAGE."newspost_images/}
|
||||||
{BB=preimage}{BB=prefile}{BB=flash}
|
{BB=preimage}{BB=prefile}{BB=flash}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
";
|
";
|
||||||
|
|
||||||
$BBCODE_TEMPLATE_CPAGE = "
|
$BBCODE_TEMPLATE_CPAGE = "
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB_HELP}
|
{BB_HELP}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
<div class='field-spacer'>
|
|
||||||
{BB=newpage}
|
{BB=newpage}
|
||||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=center}{BB=left}{BB=right}
|
||||||
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
{BB=bq}{BB=code}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}
|
||||||
{BB_PREIMAGEDIR=".e_IMAGE."custom/}
|
{BB_PREIMAGEDIR=".e_IMAGE."custom/}
|
||||||
{BB=preimage}{BB=prefile}{BB=flash}
|
{BB=preimage}{BB=prefile}{BB=flash}
|
||||||
</div>
|
<div class='field-spacer'><!-- --></div>
|
||||||
";
|
";
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user