@@ -19,6 +19,6 @@ |
||
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | |
21 | 21 | return $config = array( |
22 | - 'highlight' => 'php', // Source code highlight: '' - disable; 'php' - php highlight; |
|
22 | + 'highlight' => 'php', // Source code highlight: '' - disable; 'php' - php highlight; |
|
23 | 23 | ); |
24 | 24 |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $text = trim($text); |
54 | 54 | $addedtag_open = 0; |
55 | 55 | if (!strpos($text, '<?php') && (substr($text, 0, 5) !== '<?php')) { |
56 | - $text = '<?php ' . $text; |
|
56 | + $text = '<?php '.$text; |
|
57 | 57 | $addedtag_open = 1; |
58 | 58 | } |
59 | 59 | $addedtag_close = 0; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $length_text = $pos_close ? $pos_close - $length_open : 0; |
89 | 89 | $str_internal = $length_text ? substr($buffer, $length_open, $length_text) : substr($buffer, $length_open); |
90 | 90 | |
91 | - $buffer = $str_open . $str_internal . $str_close; |
|
91 | + $buffer = $str_open.$str_internal.$str_close; |
|
92 | 92 | |
93 | 93 | return $buffer; |
94 | 94 | } |
@@ -30,16 +30,16 @@ |
||
30 | 30 | */ |
31 | 31 | public function encode($textarea_id) |
32 | 32 | { |
33 | - $config = parent::loadConfig(__DIR__); |
|
33 | + $config = parent::loadConfig(__DIR__); |
|
34 | 34 | if ($config['enable_wmp_entry'] === false) { |
35 | 35 | return array(); |
36 | 36 | } |
37 | 37 | |
38 | 38 | $code = "<button type='button' class='btn btn-default btn-sm' onclick='xoopsCodeWmp(\"{$textarea_id}\",\"" |
39 | - . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\"" |
|
40 | - . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" |
|
39 | + . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES)."\",\"" |
|
40 | + . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES)."\",\"" |
|
41 | 41 | . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) |
42 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALTWMP |
|
42 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALTWMP |
|
43 | 43 | . "'><span class='fa fa-fw fa-windows' aria-hidden='true'></span></button>"; |
44 | 44 | |
45 | 45 | //$code = "<img src='{$this->image_path}/wmp.gif' alt='" . _XOOPS_FORM_ALTWMP . "' title='" . _XOOPS_FORM_ALTWMP . "' '" . "' onclick='xoopsCodeWmp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; |
@@ -20,5 +20,5 @@ |
||
20 | 20 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
21 | 21 | |
22 | 22 | return $config = array( |
23 | - 'enable_wmp_entry' => true, // false to disable entry button in editor, existing content will still play |
|
23 | + 'enable_wmp_entry' => true, // false to disable entry button in editor, existing content will still play |
|
24 | 24 | ); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | 'mp3' => 0, |
28 | 28 | 'wmp' => 0, |
29 | 29 | // If other module is used, please modify the following detection and 'link' in /wiki/config.php |
30 | - 'wiki' => is_dir(XOOPS_ROOT_PATH . '/modules/mediawiki/'), |
|
30 | + 'wiki' => is_dir(XOOPS_ROOT_PATH.'/modules/mediawiki/'), |
|
31 | 31 | 'mms' => 0, |
32 | 32 | 'rtsp' => 0, |
33 | 33 | 'soundcloud' => 0, //new in XOOPS 2.5.7 |
@@ -19,5 +19,5 @@ |
||
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | |
21 | 21 | return $config = array( |
22 | - 'enable_mms_entry' => true, // false to disable entry button in editor, existing content will still play |
|
22 | + 'enable_mms_entry' => true, // false to disable entry button in editor, existing content will still play |
|
23 | 23 | ); |
@@ -31,15 +31,15 @@ |
||
31 | 31 | */ |
32 | 32 | public function encode($textarea_id) |
33 | 33 | { |
34 | - $config = parent::loadConfig(__DIR__); |
|
34 | + $config = parent::loadConfig(__DIR__); |
|
35 | 35 | if ($config['enable_mms_entry'] === false) { |
36 | 36 | return array(); |
37 | 37 | } |
38 | 38 | $code = "<button type='button' class='btn btn-default btn-sm' onclick='xoopsCodeMms(\"{$textarea_id}\",\"" |
39 | - . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\"" |
|
40 | - . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" |
|
39 | + . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES)."\",\"" |
|
40 | + . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES)."\",\"" |
|
41 | 41 | . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) |
42 | - . "\");' onmouseover='style.cursor=\"hand\"' title='" . _XOOPS_FORM_ALTMMS |
|
42 | + . "\");' onmouseover='style.cursor=\"hand\"' title='"._XOOPS_FORM_ALTMMS |
|
43 | 43 | . "'><span class='fa fa-fw fa-server' aria-hidden='true'></span></button>"; |
44 | 44 | |
45 | 45 | //$code = "<img src='{$this->image_path}/mmssrc.gif' alt='" . _XOOPS_FORM_ALTMMS . "' title='" . _XOOPS_FORM_ALTMMS . "' '". "' onclick='xoopsCodeMms(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | global $xoopsConfig; |
21 | -include_once $GLOBALS['xoops']->path('language/' . $xoopsConfig['language'] . '/misc.php'); |
|
21 | +include_once $GLOBALS['xoops']->path('language/'.$xoopsConfig['language'].'/misc.php'); |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Class MytsImage |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | $ts->replacements[] = '<a href="\\3" rel="external">\\3</a>'; |
50 | 50 | $ts->replacements[] = '<a href="\\1" rel="external">\\1</a>'; |
51 | 51 | |
52 | - $ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\\4" rel="external" title="\\5">\\5</a>'; |
|
53 | - $ts->replacements[] = '<a href="' . XOOPS_URL . '/image.php?id=\\2" rel="external" title="\\3">\\3</a>'; |
|
52 | + $ts->replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\4" rel="external" title="\\5">\\5</a>'; |
|
53 | + $ts->replacements[] = '<a href="'.XOOPS_URL.'/image.php?id=\\2" rel="external" title="\\3">\\3</a>'; |
|
54 | 54 | } else { |
55 | 55 | if (!empty($config['resize']) && empty($config['clickable']) && !empty($config['max_width']) && !empty($GLOBALS['xoTheme'])) { |
56 | 56 | if (!$jsLoaded) { |
@@ -58,28 +58,28 @@ discard block |
||
58 | 58 | $GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array( |
59 | 59 | 'type' => 'text/javascript')); |
60 | 60 | } |
61 | - $ts->replacements[] = "<img src='\\5' class='\\2' alt='" . _MSC_RESIZED_IMAGE . "' border='0' onload=\"JavaScript:if(this.width>\\4)this.width=\\4\" />"; |
|
62 | - $ts->replacements[] = "<img src='\\3' class='\\2' alt='" . _MSC_RESIZED_IMAGE . "' border='0'" . ($config['resize'] ? "onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/>'; |
|
63 | - $ts->replacements[] = "<img src='\\3' alt='" . _MSC_RESIZED_IMAGE . "' border='0' onload=\"if(this.width>\\2)this.width=\\2\" /><br>"; |
|
64 | - $ts->replacements[] = "<img src='\\1' alt='" . _MSC_RESIZED_IMAGE . "' border='0'" . ($config['resize'] ? " onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/>'; |
|
61 | + $ts->replacements[] = "<img src='\\5' class='\\2' alt='"._MSC_RESIZED_IMAGE."' border='0' onload=\"JavaScript:if(this.width>\\4)this.width=\\4\" />"; |
|
62 | + $ts->replacements[] = "<img src='\\3' class='\\2' alt='"._MSC_RESIZED_IMAGE."' border='0'".($config['resize'] ? "onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/>'; |
|
63 | + $ts->replacements[] = "<img src='\\3' alt='"._MSC_RESIZED_IMAGE."' border='0' onload=\"if(this.width>\\2)this.width=\\2\" /><br>"; |
|
64 | + $ts->replacements[] = "<img src='\\1' alt='"._MSC_RESIZED_IMAGE."' border='0'".($config['resize'] ? " onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/>'; |
|
65 | 65 | } elseif (!empty($config['clickable']) && !empty($config['max_width']) && !empty($GLOBALS['xoTheme'])) { |
66 | 66 | if (!$jsLoaded) { |
67 | 67 | $jsLoaded = true; |
68 | 68 | $GLOBALS['xoTheme']->addScript('/class/textsanitizer/image/image.js', array( |
69 | 69 | 'type' => 'text/javascript')); |
70 | 70 | } |
71 | - $ts->replacements[] = "<a href='javascript:loadImage(\"\\5\");'><img src='\\5' class='\\2' alt='" . _MSC_CLICK_TO_OPEN_IMAGE . "' border='0' onload=\"if(this.width>\\4)this.width=\\4\" /></a>"; |
|
72 | - $ts->replacements[] = "<a href='javascript:loadImage(\"\\3\");'><img src='\\3' class='\\2' alt='" . _MSC_CLICK_TO_OPEN_IMAGE . "' border='0' " . ($config['resize'] ? "onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/></a>'; |
|
73 | - $ts->replacements[] = "<a href='javascript:loadImage(\"\\3\");'><img src='\\3' alt='" . _MSC_CLICK_TO_OPEN_IMAGE . "' border='0' onload=\"if(this.width>\\2)this.width=\\2\" /></a><br>"; |
|
74 | - $ts->replacements[] = "<a href='javascript:loadImage(\"\\1\");'><img src='\\1' alt='" . _MSC_CLICK_TO_OPEN_IMAGE . "' border='0' title='" . _MSC_CLICK_TO_OPEN_IMAGE . "'" . ($config['resize'] ? " onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/></a>'; |
|
71 | + $ts->replacements[] = "<a href='javascript:loadImage(\"\\5\");'><img src='\\5' class='\\2' alt='"._MSC_CLICK_TO_OPEN_IMAGE."' border='0' onload=\"if(this.width>\\4)this.width=\\4\" /></a>"; |
|
72 | + $ts->replacements[] = "<a href='javascript:loadImage(\"\\3\");'><img src='\\3' class='\\2' alt='"._MSC_CLICK_TO_OPEN_IMAGE."' border='0' ".($config['resize'] ? "onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/></a>'; |
|
73 | + $ts->replacements[] = "<a href='javascript:loadImage(\"\\3\");'><img src='\\3' alt='"._MSC_CLICK_TO_OPEN_IMAGE."' border='0' onload=\"if(this.width>\\2)this.width=\\2\" /></a><br>"; |
|
74 | + $ts->replacements[] = "<a href='javascript:loadImage(\"\\1\");'><img src='\\1' alt='"._MSC_CLICK_TO_OPEN_IMAGE."' border='0' title='"._MSC_CLICK_TO_OPEN_IMAGE."'".($config['resize'] ? " onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/></a>'; |
|
75 | 75 | } else { |
76 | - $ts->replacements[] = "<img src='\\5' class='\\2' border='0' alt='" . _MSC_ORIGINAL_IMAGE . "' onload=\"JavaScript:if(this.width>\\4) this.width=\\4\" />"; |
|
77 | - $ts->replacements[] = "<img src='\\3' class='\\2' border='0' alt='" . _MSC_ORIGINAL_IMAGE . "' " . ($config['resize'] ? "onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/>'; |
|
78 | - $ts->replacements[] = "<img src='\\3' border='0' alt='" . _MSC_ORIGINAL_IMAGE . "' onload=\"JavaScript:if(this.width>\\2) this.width=\\2\" />"; |
|
79 | - $ts->replacements[] = "<img src='\\1' border='0' alt='" . _MSC_ORIGINAL_IMAGE . "' " . ($config['resize'] ? " onload=\"javascript:resizeImage(this, " . $config['max_width'] . ")\"" : '') . '/>'; |
|
76 | + $ts->replacements[] = "<img src='\\5' class='\\2' border='0' alt='"._MSC_ORIGINAL_IMAGE."' onload=\"JavaScript:if(this.width>\\4) this.width=\\4\" />"; |
|
77 | + $ts->replacements[] = "<img src='\\3' class='\\2' border='0' alt='"._MSC_ORIGINAL_IMAGE."' ".($config['resize'] ? "onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/>'; |
|
78 | + $ts->replacements[] = "<img src='\\3' border='0' alt='"._MSC_ORIGINAL_IMAGE."' onload=\"JavaScript:if(this.width>\\2) this.width=\\2\" />"; |
|
79 | + $ts->replacements[] = "<img src='\\1' border='0' alt='"._MSC_ORIGINAL_IMAGE."' ".($config['resize'] ? " onload=\"javascript:resizeImage(this, ".$config['max_width'].")\"" : '').'/>'; |
|
80 | 80 | } |
81 | - $ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\\4" class="\\2" title="\\5" />'; |
|
82 | - $ts->replacements[] = '<img src="' . XOOPS_URL . '/image.php?id=\\2" title="\\3" />'; |
|
81 | + $ts->replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\4" class="\\2" title="\\5" />'; |
|
82 | + $ts->replacements[] = '<img src="'.XOOPS_URL.'/image.php?id=\\2" title="\\3" />'; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | return true; |
@@ -19,5 +19,5 @@ |
||
19 | 19 | defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
20 | 20 | |
21 | 21 | return $config = array( |
22 | - 'enable_rtsp_entry' => true, // false to disable entry button in editor, existing content will still play |
|
22 | + 'enable_rtsp_entry' => true, // false to disable entry button in editor, existing content will still play |
|
23 | 23 | ); |