@@ -42,113 +42,113 @@ |
||
| 42 | 42 | |
| 43 | 43 | $shortcodes->addShortcode( |
| 44 | 44 | 'siteurl', |
| 45 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 45 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 46 | 46 | $url = ltrim($attributes[0], '='); |
| 47 | 47 | $url = \Xoops::getInstance()->url($url); |
| 48 | - $newcontent = '<a href="' .$url. '">' . $shortcodes->process($content) . '</a>'; |
|
| 48 | + $newcontent = '<a href="'.$url.'">'.$shortcodes->process($content).'</a>'; |
|
| 49 | 49 | return $newcontent; |
| 50 | 50 | } |
| 51 | 51 | ); |
| 52 | 52 | |
| 53 | 53 | $shortcodes->addShortcode( |
| 54 | 54 | 'url', |
| 55 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 55 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 56 | 56 | $url = ltrim($attributes[0], '='); |
| 57 | 57 | $url = \Xoops::getInstance()->url($url); |
| 58 | - $newcontent = '<a href="' .$url. '">' . $shortcodes->process($content) . '</a>'; |
|
| 58 | + $newcontent = '<a href="'.$url.'">'.$shortcodes->process($content).'</a>'; |
|
| 59 | 59 | return $newcontent; |
| 60 | 60 | } |
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | 63 | $shortcodes->addShortcode( |
| 64 | 64 | 'color', |
| 65 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 65 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 66 | 66 | $color = ltrim($attributes[0], '='); |
| 67 | - $color = preg_match('/^[a-f0-9]{3}$|^[a-f0-9]{6}$/i', $color) ? '#' . $color : $color; |
|
| 68 | - $newcontent = '<span style="color: ' .$color. '">' . $shortcodes->process($content) . '</span>'; |
|
| 67 | + $color = preg_match('/^[a-f0-9]{3}$|^[a-f0-9]{6}$/i', $color) ? '#'.$color : $color; |
|
| 68 | + $newcontent = '<span style="color: '.$color.'">'.$shortcodes->process($content).'</span>'; |
|
| 69 | 69 | return $newcontent; |
| 70 | 70 | } |
| 71 | 71 | ); |
| 72 | 72 | |
| 73 | 73 | $shortcodes->addShortcode( |
| 74 | 74 | 'size', |
| 75 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 75 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 76 | 76 | $size = ltrim($attributes[0], '='); |
| 77 | - $newcontent = '<span style="font-size: ' .$size. '">' . $shortcodes->process($content) . '</span>'; |
|
| 77 | + $newcontent = '<span style="font-size: '.$size.'">'.$shortcodes->process($content).'</span>'; |
|
| 78 | 78 | return $newcontent; |
| 79 | 79 | } |
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | $shortcodes->addShortcode( |
| 83 | 83 | 'font', |
| 84 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 84 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 85 | 85 | $font = ltrim($attributes[0], '='); |
| 86 | - $newcontent = '<span style="font-family: ' .$font. '">' . $shortcodes->process($content) . '</span>'; |
|
| 86 | + $newcontent = '<span style="font-family: '.$font.'">'.$shortcodes->process($content).'</span>'; |
|
| 87 | 87 | return $newcontent; |
| 88 | 88 | } |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | 91 | $shortcodes->addShortcode( |
| 92 | 92 | 'email', |
| 93 | - function ($attributes, $content, $tagName) { |
|
| 93 | + function($attributes, $content, $tagName) { |
|
| 94 | 94 | $content = trim($content); |
| 95 | - $newcontent = '<a href="mailto:' . $content . '">' . $content . '</a>'; |
|
| 95 | + $newcontent = '<a href="mailto:'.$content.'">'.$content.'</a>'; |
|
| 96 | 96 | return $newcontent; |
| 97 | 97 | } |
| 98 | 98 | ); |
| 99 | 99 | |
| 100 | 100 | $shortcodes->addShortcode( |
| 101 | 101 | 'b', |
| 102 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 103 | - $newcontent = '<strong>' . $shortcodes->process($content) . '</strong>'; |
|
| 102 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 103 | + $newcontent = '<strong>'.$shortcodes->process($content).'</strong>'; |
|
| 104 | 104 | return $newcontent; |
| 105 | 105 | } |
| 106 | 106 | ); |
| 107 | 107 | |
| 108 | 108 | $shortcodes->addShortcode( |
| 109 | 109 | 'i', |
| 110 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 111 | - $newcontent = '<em>' . $shortcodes->process($content) . '</em>'; |
|
| 110 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 111 | + $newcontent = '<em>'.$shortcodes->process($content).'</em>'; |
|
| 112 | 112 | return $newcontent; |
| 113 | 113 | } |
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | 116 | $shortcodes->addShortcode( |
| 117 | 117 | 'u', |
| 118 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 119 | - $newcontent = '<u>' . $shortcodes->process($content) . '</u>'; |
|
| 118 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 119 | + $newcontent = '<u>'.$shortcodes->process($content).'</u>'; |
|
| 120 | 120 | return $newcontent; |
| 121 | 121 | } |
| 122 | 122 | ); |
| 123 | 123 | |
| 124 | 124 | $shortcodes->addShortcode( |
| 125 | 125 | 'd', |
| 126 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 127 | - $newcontent = '<del>' . $shortcodes->process($content) . '</del>'; |
|
| 126 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 127 | + $newcontent = '<del>'.$shortcodes->process($content).'</del>'; |
|
| 128 | 128 | return $newcontent; |
| 129 | 129 | } |
| 130 | 130 | ); |
| 131 | 131 | |
| 132 | 132 | $shortcodes->addShortcode( |
| 133 | 133 | 'center', |
| 134 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 135 | - $newcontent = '<div style="text-align: center;">' . $shortcodes->process($content) . '</div>'; |
|
| 134 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 135 | + $newcontent = '<div style="text-align: center;">'.$shortcodes->process($content).'</div>'; |
|
| 136 | 136 | return $newcontent; |
| 137 | 137 | } |
| 138 | 138 | ); |
| 139 | 139 | |
| 140 | 140 | $shortcodes->addShortcode( |
| 141 | 141 | 'left', |
| 142 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 143 | - $newcontent = '<div style="text-align: left;">' . $shortcodes->process($content) . '</div>'; |
|
| 142 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 143 | + $newcontent = '<div style="text-align: left;">'.$shortcodes->process($content).'</div>'; |
|
| 144 | 144 | return $newcontent; |
| 145 | 145 | } |
| 146 | 146 | ); |
| 147 | 147 | |
| 148 | 148 | $shortcodes->addShortcode( |
| 149 | 149 | 'right', |
| 150 | - function ($attributes, $content, $tagName) use ($shortcodes) { |
|
| 151 | - $newcontent = '<div style="text-align: right;">' . $shortcodes->process($content) . '</div>'; |
|
| 150 | + function($attributes, $content, $tagName) use ($shortcodes) { |
|
| 151 | + $newcontent = '<div style="text-align: right;">'.$shortcodes->process($content).'</div>'; |
|
| 152 | 152 | return $newcontent; |
| 153 | 153 | } |
| 154 | 154 | ); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | } else { |
| 145 | 145 | list ($class, $path) = $this->htmlEditor; |
| 146 | - include_once \XoopsBaseConfig::get('root-path') . $path; |
|
| 146 | + include_once \XoopsBaseConfig::get('root-path').$path; |
|
| 147 | 147 | if (class_exists($class)) { |
| 148 | 148 | $this->htmlEditor = new $class($options); |
| 149 | 149 | } |
@@ -172,10 +172,10 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | $xoops = \Xoops::getInstance(); |
| 174 | 174 | |
| 175 | - $extra = ($this->getExtra() != '' ? " " . $this->getExtra() : ''); |
|
| 175 | + $extra = ($this->getExtra() != '' ? " ".$this->getExtra() : ''); |
|
| 176 | 176 | $ret = ""; |
| 177 | 177 | // actions |
| 178 | - $ret .= $this->xoopsCodeControls() . "<br />\n"; |
|
| 178 | + $ret .= $this->xoopsCodeControls()."<br />\n"; |
|
| 179 | 179 | // fonts |
| 180 | 180 | $ret .= $this->typographyControls(); |
| 181 | 181 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $this->suppressRender(['value']); |
| 185 | 185 | $attributes = $this->renderAttributeString(); |
| 186 | 186 | |
| 187 | - $ret .= '<textarea ' . $attributes . $extra . '>' . $this->getValue() . "</textarea>\n"; |
|
| 187 | + $ret .= '<textarea '.$attributes.$extra.'>'.$this->getValue()."</textarea>\n"; |
|
| 188 | 188 | |
| 189 | 189 | if (empty($this->skipPreview)) { |
| 190 | 190 | if (!$xoops->theme()) { |
@@ -192,15 +192,15 @@ discard block |
||
| 192 | 192 | } else { |
| 193 | 193 | $xoops->theme()->addScript('media/xoops/image.js', array('type' => 'text/javascript')); |
| 194 | 194 | } |
| 195 | - $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . "class='btn btn-sm btn-default' value='" . \XoopsLocale::A_PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . (int)($this->doHtml) . ", '" . $xoops->security()->createToken() . "')\"" . " />"; |
|
| 196 | - $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $this->getName() . "_hidden_data'>" . \XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT . "</div>" . "</fieldset>" . "</div>"; |
|
| 195 | + $button = "<input id='".$this->getName()."_preview_button' "."type='button' "."class='btn btn-sm btn-default' value='".\XoopsLocale::A_PREVIEW."' "."onclick=\"form_instantPreview('".XOOPS_URL."', '".$this->getName()."','".XOOPS_URL."/images', ".(int)($this->doHtml).", '".$xoops->security()->createToken()."')\""." />"; |
|
| 196 | + $ret .= "<br />"."<div id='".$this->getName()."_hidden' style='display: block;'> "."<fieldset>"."<legend>".$button."</legend>"."<div id='".$this->getName()."_hidden_data'>".\XoopsLocale::CLICK_PREVIEW_TO_SEE_CONTENT."</div>"."</fieldset>"."</div>"; |
|
| 197 | 197 | } |
| 198 | 198 | // Load javascript |
| 199 | 199 | if (empty($js_loaded)) { |
| 200 | 200 | $javascript = (($this->js) |
| 201 | - ? '<script type="text/javascript">' . $this->js . '</script>' |
|
| 202 | - : '') . '<script type="text/javascript" src="' . \XoopsBaseConfig::get('url') . '/include/formdhtmltextarea.js"></script>'; |
|
| 203 | - $ret = $javascript . $ret; |
|
| 201 | + ? '<script type="text/javascript">'.$this->js.'</script>' |
|
| 202 | + : '').'<script type="text/javascript" src="'.\XoopsBaseConfig::get('url').'/include/formdhtmltextarea.js"></script>'; |
|
| 203 | + $ret = $javascript.$ret; |
|
| 204 | 204 | $js_loaded = true; |
| 205 | 205 | } |
| 206 | 206 | return $ret; |
@@ -332,63 +332,63 @@ discard block |
||
| 332 | 332 | |
| 333 | 333 | $fontStr = '<div class="row"><div class="col-md-12"><div class="btn-group" role="toolbar">'; |
| 334 | 334 | $fontStr .= '<div class="btn-group">' |
| 335 | - . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::SIZE .'"' |
|
| 335 | + . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::SIZE.'"' |
|
| 336 | 336 | . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">' |
| 337 | 337 | . '<span class = "glyphicon glyphicon-text-height"></span><span class="caret"></span></button>' |
| 338 | 338 | . '<ul class="dropdown-menu">'; |
| 339 | 339 | $localeFontSizes = \XoopsLocale::getFontSizes(); |
| 340 | 340 | foreach ($localeFontSizes as $value => $name) { |
| 341 | - $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'size\', \'' . $value . '\', \'' |
|
| 342 | - . $textarea_id . '\', \'' . $hiddentext . '\');">' . $name . '</a></li>'; |
|
| 341 | + $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'size\', \''.$value.'\', \'' |
|
| 342 | + . $textarea_id.'\', \''.$hiddentext.'\');">'.$name.'</a></li>'; |
|
| 343 | 343 | } |
| 344 | 344 | $fontStr .= '</ul></div>'; |
| 345 | 345 | |
| 346 | 346 | $fontStr .= '<div class="btn-group">' |
| 347 | - . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::FONT .'"' |
|
| 347 | + . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::FONT.'"' |
|
| 348 | 348 | . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">' |
| 349 | 349 | . '<span class = "glyphicon glyphicon-font"></span><span class="caret"></span></button>' |
| 350 | 350 | . '<ul class="dropdown-menu">'; |
| 351 | 351 | //. _FONT . ' <span class="caret"></span></button><ul class="dropdown-menu">'; |
| 352 | 352 | foreach ($fontarray as $font) { |
| 353 | - $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'font\', \'' . $font . '\', \'' |
|
| 354 | - . $textarea_id . '\', \'' . $hiddentext . '\');">' . $font . '</a></li>'; |
|
| 353 | + $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'font\', \''.$font.'\', \'' |
|
| 354 | + . $textarea_id.'\', \''.$hiddentext.'\');">'.$font.'</a></li>'; |
|
| 355 | 355 | } |
| 356 | 356 | $fontStr .= '</ul></div>'; |
| 357 | 357 | |
| 358 | 358 | $fontStr .= '<div class="btn-group">' |
| 359 | - . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'. \XoopsLocale::COLOR .'"' |
|
| 359 | + . '<button type="button" class="btn btn-default btn-sm dropdown-toggle" title="'.\XoopsLocale::COLOR.'"' |
|
| 360 | 360 | . ' data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">' |
| 361 | 361 | . '<span class = "glyphicon glyphicon-text-color"></span><span class="caret"></span></button>' |
| 362 | 362 | . '<ul class="dropdown-menu">'; |
| 363 | 363 | //. _COLOR . ' <span class="caret"></span></button><ul class="dropdown-menu">'; |
| 364 | 364 | foreach ($colorArray as $color => $hex) { |
| 365 | - $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'color\', \'' . $hex . '\', \'' |
|
| 366 | - . $textarea_id . '\', \'' . $hiddentext . '\');">' |
|
| 367 | - . '<span style="color:#' . $hex . ';">' . $color .'</span></a></li>'; |
|
| 365 | + $fontStr .= '<li><a href="javascript:xoopsSetElementAttribute(\'color\', \''.$hex.'\', \'' |
|
| 366 | + . $textarea_id.'\', \''.$hiddentext.'\');">' |
|
| 367 | + . '<span style="color:#'.$hex.';">'.$color.'</span></a></li>'; |
|
| 368 | 368 | } |
| 369 | 369 | $fontStr .= '</ul></div>'; |
| 370 | 370 | $fontStr .= '</div>'; |
| 371 | 371 | |
| 372 | 372 | //$styleStr = "<div class='row'><div class='col-md-12'>"; |
| 373 | 373 | $styleStr = "<div class='btn-group' role='group'>"; |
| 374 | - $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::BOLD . "' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>"; |
|
| 375 | - $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::ITALIC . "' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>"; |
|
| 376 | - $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::UNDERLINE . "' aria-label='Left Align'>" . '<span class="fa fa-underline"></span></button>'; |
|
| 377 | - $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::LINE_THROUGH . "' aria-label='Left Align'>" . '<span class="fa fa-strikethrough"></span></button>'; |
|
| 374 | + $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::BOLD."' aria-label='Left Align'><span class='fa fa-bold' aria-hidden='true'></span></button>"; |
|
| 375 | + $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::ITALIC."' aria-label='Left Align'><span class='fa fa-italic' aria-hidden='true'></span></button>"; |
|
| 376 | + $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::UNDERLINE."' aria-label='Left Align'>".'<span class="fa fa-underline"></span></button>'; |
|
| 377 | + $styleStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::LINE_THROUGH."' aria-label='Left Align'>".'<span class="fa fa-strikethrough"></span></button>'; |
|
| 378 | 378 | $styleStr .= "</div>"; |
| 379 | 379 | |
| 380 | 380 | $alignStr = "<div class='btn-group' role='group'>"; |
| 381 | - $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::LEFT . "' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>"; |
|
| 382 | - $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::CENTER . "' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>"; |
|
| 383 | - $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='" . \XoopsLocale::RIGHT . "' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>"; |
|
| 381 | + $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::LEFT."' aria-label='Left Align'><span class='fa fa-align-left' aria-hidden='true'></span></button>"; |
|
| 382 | + $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::CENTER."' aria-label='Left Align'><span class='fa fa-align-center' aria-hidden='true'></span></button>"; |
|
| 383 | + $alignStr .= "<button type='button' class='btn btn-default btn-sm' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' title='".\XoopsLocale::RIGHT."' aria-label='Left Align'><span class='fa fa-align-right' aria-hidden='true'></span></button>"; |
|
| 384 | 384 | $alignStr .= "</div>"; |
| 385 | 385 | |
| 386 | 386 | $fontStr .= " {$styleStr} {$alignStr} \n"; |
| 387 | 387 | |
| 388 | 388 | $fontStr .= "<button type='button' class='btn btn-default btn-sm' onclick=\"XoopsCheckLength('" |
| 389 | - . $this->getName() . "', '" . @$this->configs['maxlength'] . "', '" |
|
| 390 | - . \XoopsLocale::F_CURRENT_TEXT_LENGTH . "', '" . \XoopsLocale::MAXIMUM_LENGTH . "');\" title='" |
|
| 391 | - . \XoopsLocale::CHECK_TEXT_LENGTH . "'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>"; |
|
| 389 | + . $this->getName()."', '".@$this->configs['maxlength']."', '" |
|
| 390 | + . \XoopsLocale::F_CURRENT_TEXT_LENGTH."', '".\XoopsLocale::MAXIMUM_LENGTH."');\" title='" |
|
| 391 | + . \XoopsLocale::CHECK_TEXT_LENGTH."'><span class='fa fa-check-square-o' aria-hidden='true'></span></button>"; |
|
| 392 | 392 | $fontStr .= "</div></div>"; |
| 393 | 393 | |
| 394 | 394 | return $fontStr; |
@@ -405,24 +405,23 @@ discard block |
||
| 405 | 405 | $hiddentext = $this->hiddenText; |
| 406 | 406 | |
| 407 | 407 | $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">"; |
| 408 | - $fontStr .= "var _editor_dialog = ''" . "+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
|
| 409 | - $fontStr .= "+ '<option value=\'SIZE\'>" . \XoopsLocale::SIZE . "</option>'"; |
|
| 408 | + $fontStr .= "var _editor_dialog = ''"."+ '<select class=\"span2\" id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
|
| 409 | + $fontStr .= "+ '<option value=\'SIZE\'>".\XoopsLocale::SIZE."</option>'"; |
|
| 410 | 410 | $localeFontSizes = \XoopsLocale::getFontSizes(); |
| 411 | 411 | foreach ($localeFontSizes as $_val => $_name) { |
| 412 | 412 | $fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'"; |
| 413 | 413 | } |
| 414 | 414 | $fontStr .= " + '</select> '"; |
| 415 | 415 | $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Font\' onchange=\'xoopsSetElementAttribute(\"font\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
| 416 | - $fontStr .= "+ '<option value=\'FONT\'>" . \XoopsLocale::FONT . "</option>'"; |
|
| 416 | + $fontStr .= "+ '<option value=\'FONT\'>".\XoopsLocale::FONT."</option>'"; |
|
| 417 | 417 | $localeFonts = \XoopsLocale::getFonts(); |
| 418 | - $fontarray = !empty($localeFonts) ? $localeFonts : |
|
| 419 | - array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler"); |
|
| 418 | + $fontarray = !empty($localeFonts) ? $localeFonts : array("Arial", "Courier", "Georgia", "Helvetica", "Impact", "Verdana", "Haettenschweiler"); |
|
| 420 | 419 | foreach ($fontarray as $font) { |
| 421 | 420 | $fontStr .= " + '<option value=\'{$font}\'>{$font}</option>'"; |
| 422 | 421 | } |
| 423 | 422 | $fontStr .= " + '</select> '"; |
| 424 | 423 | $fontStr .= "+ '<select class=\"span2\" id=\'{$textarea_id}Color\' onchange=\'xoopsSetElementAttribute(\"color\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'"; |
| 425 | - $fontStr .= "+ '<option value=\'COLOR\'>" . \XoopsLocale::COLOR . "</option>';"; |
|
| 424 | + $fontStr .= "+ '<option value=\'COLOR\'>".\XoopsLocale::COLOR."</option>';"; |
|
| 426 | 425 | $fontStr .= "var _color_array = new Array('00', '33', '66', '99', 'CC', 'FF'); |
| 427 | 426 | for(var i = 0; i < _color_array.length; i ++) { |
| 428 | 427 | for(var j = 0; j < _color_array.length; j ++) { |
@@ -436,15 +435,15 @@ discard block |
||
| 436 | 435 | |
| 437 | 436 | $fontStr .= "document.write(_editor_dialog); </script>"; |
| 438 | 437 | |
| 439 | - $styleStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/bold.gif' alt='" . \XoopsLocale::BOLD . "' title='" . \XoopsLocale::BOLD . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 440 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/italic.gif' alt='" . \XoopsLocale::ITALIC . "' title='" . \XoopsLocale::ITALIC . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 441 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/underline.gif' alt='" . \XoopsLocale::UNDERLINE . "' title='" . \XoopsLocale::UNDERLINE . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/> "; |
|
| 442 | - $styleStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/linethrough.gif' alt='" . \XoopsLocale::LINE_THROUGH . "' title='" . \XoopsLocale::LINE_THROUGH . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 438 | + $styleStr = "<img src='".\XoopsBaseConfig::get('url')."/images/bold.gif' alt='".\XoopsLocale::BOLD."' title='".\XoopsLocale::BOLD."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeBold(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 439 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/italic.gif' alt='".\XoopsLocale::ITALIC."' title='".\XoopsLocale::ITALIC."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeItalic(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 440 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/underline.gif' alt='".\XoopsLocale::UNDERLINE."' title='".\XoopsLocale::UNDERLINE."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeUnderline(\"{$hiddentext}\", \"{$textarea_id}\");'/> "; |
|
| 441 | + $styleStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/linethrough.gif' alt='".\XoopsLocale::LINE_THROUGH."' title='".\XoopsLocale::LINE_THROUGH."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLineThrough(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 443 | 442 | |
| 444 | - $alignStr = "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignleft.gif' alt='" . \XoopsLocale::LEFT . "' title='" . \XoopsLocale::LEFT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 445 | - $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/aligncenter.gif' alt='" . \XoopsLocale::CENTER . "' title='" . \XoopsLocale::CENTER . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 446 | - $alignStr .= "<img src='" . \XoopsBaseConfig::get('url') . "/images/alignright.gif' alt='" . \XoopsLocale::RIGHT . "' title='" . \XoopsLocale::RIGHT . "' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 447 | - $fontStr = $fontStr . "<br />\n{$styleStr} {$alignStr} \n"; |
|
| 443 | + $alignStr = "<img src='".\XoopsBaseConfig::get('url')."/images/alignleft.gif' alt='".\XoopsLocale::LEFT."' title='".\XoopsLocale::LEFT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeLeft(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 444 | + $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/aligncenter.gif' alt='".\XoopsLocale::CENTER."' title='".\XoopsLocale::CENTER."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeCenter(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 445 | + $alignStr .= "<img src='".\XoopsBaseConfig::get('url')."/images/alignright.gif' alt='".\XoopsLocale::RIGHT."' title='".\XoopsLocale::RIGHT."' onmouseover='style.cursor=\"hand\"' onclick='xoopsMakeRight(\"{$hiddentext}\", \"{$textarea_id}\");' /> "; |
|
| 446 | + $fontStr = $fontStr."<br />\n{$styleStr} {$alignStr} \n"; |
|
| 448 | 447 | return $fontStr; |
| 449 | 448 | } |
| 450 | 449 | |