| 3 | | global $blogURL, $pluginURL; |
| 4 | | $script[] = '<script type="text/javascript">var blogURL_USC="'.$blogURL.'";</script>'; |
| 5 | | $script[] = '<script type="text/javascript" src="'.$pluginURL.'/lib/spellcheck.js"></script>'; |
| 6 | | $script[] = '<script language="javascript" type="text/javascript">'; |
| 7 | | $script[] = '//<![CDATA['; |
| 8 | | $script[] = 'String.prototype.trim = function () {return this.replace(/\s\s+/, " ").replace("\'", "").replace(/^\s*/g, "").replace(/\s*$/g, "");}'; |
| 9 | | $script[] = 'function spellcheck_owner(caller) {'; |
| 10 | | $script[] = ' if(editor.editMode == "WYSIWYG") {'; |
| 11 | | $script[] = ' var contentDoc = editor.contentDocument.body;'; |
| 12 | | $script[] = ' var text = (document.all) ? contentDoc.innerText : contentDoc.textContent;'; |
| 13 | | $script[] = ' } else {'; |
| 14 | | $script[] = ' var text = document.getElementById("editWindow").value;'; |
| 15 | | $script[] = ' }'; |
| 16 | | $script[] = ' var content = text.trim();'; |
| 17 | | $script[] = ' getSpellcheck("", "", content, 0);'; |
| 18 | | $script[] = '}//]]></script>'; |
| 19 | | $script[] = '<div id="SpellView" style="position:absolute;display:none;z-index:200;width:600px;height:400px;overflow-y:scroll;"></div>'; |
| 20 | | $script[] = '<img src="'.$pluginURL.'/lib/spellcheck_icon.gif" width="74" height="20" border="0" onclick="spellcheck_owner(this);return false;" style="cursor:pointer;">'; |
| 21 | | |
| 22 | | return implode("\r\n", $script).$target; |
| | 3 | global $blogURL, $pluginURL, $configVal; |
| | 4 | requireComponent('Textcube.Function.misc'); |
| | 5 | $data = misc::fetchConfigVal($configVal); |
| | 6 | $data['editor'] = isset($data['editor']) ? $data['editor'] : 1; |
| | 7 | if ($data['editor'] > 0) { |
| | 8 | $script[] = '<script type="text/javascript">var blogURL_USC="'.$blogURL.'";</script>'; |
| | 9 | $script[] = '<script type="text/javascript" src="'.$pluginURL.'/lib/spellcheck.js"></script>'; |
| | 10 | $script[] = '<script language="javascript" type="text/javascript">'; |
| | 11 | $script[] = '//<![CDATA['; |
| | 12 | $script[] = 'String.prototype.trim = function () {return this.replace(/\s\s+/, " ").replace("\'", "").replace(/^\s*/g, "").replace(/\s*$/g, "");}'; |
| | 13 | $script[] = 'function spellcheck_owner(caller) {'; |
| | 14 | $script[] = ' if(editor.editMode == "WYSIWYG") {'; |
| | 15 | $script[] = ' var contentDoc = editor.contentDocument.body;'; |
| | 16 | $script[] = ' var text = (document.all) ? contentDoc.innerText : contentDoc.textContent;'; |
| | 17 | $script[] = ' } else {'; |
| | 18 | $script[] = ' var text = document.getElementById("editWindow").value;'; |
| | 19 | $script[] = ' }'; |
| | 20 | $script[] = ' var content = text.trim();'; |
| | 21 | $script[] = ' getSpellcheck("", "", content, 0);'; |
| | 22 | $script[] = '}//]]></script>'; |
| | 23 | $script[] = '<div id="SpellView" style="position:absolute;display:none;z-index:200;width:600px;height:400px;overflow-y:scroll;"></div>'; |
| | 24 | $script[] = '<img src="'.$pluginURL.'/lib/spellcheck_icon.gif" width="74" height="20" border="0" onclick="spellcheck_owner(this);return false;" style="cursor:pointer;">'; |
| | 25 | $target = implode("\r\n", $script).$target; |
| | 26 | } |
| | 27 | return $target; |
| 26 | | global $pluginURL; |
| 27 | | $target .= '<img src="'.$pluginURL.'/lib/spellcheck_icon.gif" width="74" height="20" border="0" align="absbottom" onclick="getSpellcheck(this, \'[##_article_rep_id_##]\', \'\', 1);return false;" style="cursor:pointer;"> (<a href="http://urimal.cs.pusan.ac.kr/urimal_new" onclick="window.open(this.href); return false;">우리말 배움터</a>)'; |
| | 31 | global $pluginURL, $configVal; |
| | 32 | $data = misc::fetchConfigVal($configVal); |
| | 33 | $data['comment'] = isset($data['comment']) ? $data['comment'] : 1; |
| | 34 | if ($data['comment'] > 0) { |
| | 35 | $target .= '<img src="'.$pluginURL.'/lib/spellcheck_icon.gif" width="74" height="20" border="0" align="absbottom" onclick="getSpellcheck(this, \'[##_article_rep_id_##]\', \'\', 1);return false;" style="cursor:pointer;"> (<a href="http://urimal.cs.pusan.ac.kr/urimal_new" onclick="window.open(this.href); return false;">우리말 배움터</a>)'; |
| | 36 | } |
| 32 | | global $blogURL, $pluginURL; |
| 33 | | ob_start(); |
| 34 | | ?> |
| 35 | | <script type="text/javascript">var blogURL_USC="<?php echo $blogURL;?>";</script> |
| 36 | | <script type="text/javascript" src="<?php echo $pluginURL;?>/lib/spellcheck.js"></script> |
| 37 | | <?php |
| 38 | | $target .= ob_get_contents(); |
| 39 | | ob_end_clean(); |
| | 41 | global $blogURL, $pluginURL, $entries, $suri, $configVal; |
| | 42 | $data = misc::fetchConfigVal($configVal); |
| | 43 | $data['comment'] = isset($data['comment']) ? $data['comment'] : 1; |
| | 44 | if ($data['comment'] > 0) { |
| | 45 | $script = ''; |
| | 46 | if (count($entries) > 0 || $suri['directive']=="/guestbook") { |
| | 47 | $script .= '<script type="text/javascript">var blogURL_USC="' . $blogURL . '";</script>'.CRLF; |
| | 48 | $script .= '<script type="text/javascript" src="' . $pluginURL . '/lib/spellcheck.js"></script>'.CRLF; |
| | 49 | } |
| | 50 | $target .= $script; |
| | 51 | } |