--- /dev/null
+<?php
+/*
+ * NP_MitasNom ver 0.5.9.2
+ * Written by Katsumi
+ * This library is GPL
+ */
+class NP_MitasNom extends NucleusPlugin {
+ var $actionplugin=false;
+ var $bconvertbreaks;
+ function getName() {
+ $this->_checkVersion();
+ return 'NP_MitasNom';
+ }
+ function getMinNucleusVersion() { return 220; }
+ function getAuthor() { return 'Katsumi'; }
+ function getVersion() { return '0.5.9.2'; }
+ function getURL() {return 'http://japan.nucleuscms.org/wiki/plugins:mitasnom';}
+ function getDescription() { return $this->translated('WYSIWYG HTML editor plagin using FCKeditor'); }
+ function supportsFeature($what) { return (int)($what=='SqlTablePrefix'); }
+ function install() {
+ // Install, upgrade options, and Refresh member options.
+ // Note: createOption() is overrided (see below).
+ $this->createOption('version','version','text',$this->getVersion(),'access=hidden');
+ $this->createOption('width',$this->translated('Width'),'text','100%');
+ $this->createOption('height',$this->translated('Height'),'text','400');
+ $this->createOption('toolbar',$this->translated('Toolbar'),'select','Default','Default|Default|Full|Full|Basic|Basic|Custom|Custom');
+ $this->createOption('toolbar_custom',$this->translated('Custom Toolbar'), 'textarea',
+ "['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],\n".
+ "['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],\n".
+ "['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],\n".
+ "['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],\n".
+ "['OrderedList','UnorderedList','-','Outdent','Indent'],\n".
+ "['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],\n".
+ "['Link','Unlink','Anchor'],\n".
+ "['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak','UniversalKey'],\n".
+ "['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',\n".
+ "['Style','FontFormat','FontName','FontSize'],\n".
+ "['TextColor','BGColor'],\n".
+ "['About']");
+ $this->createOption('addremovetoolbar',$this->translated('Add new toolbar to the menu / Delete toolbar from the menu'),'text','');
+ $this->createOption('returnafterbr',$this->translated('"<br />" => "<br />\n" conversion?'),'yesno','yes');
+ $this->createOption('returnafterbrbr',$this->translated('"<br /><br />" => "<br />\n<br />\n" conversion?'),'yesno','no');
+ $this->createOption('dialogwidth',$this->translated('Width of Popup dialog'),'text','500');
+ $this->createOption('dialogheight',$this->translated('Height of Popup dialog'),'text','450');
+ $this->createOption('protectedsource',$this->translated('Protected Sources'), 'textarea',
+ '/<script[\s\S]*?\/script>/gi'."\n".
+ '/<%[\s\S]*?%>/g');
+ //$this->createOption('additionalpsource',$this->translated('Additional Protected Sources'), 'textarea','');
+ $this->createOption('usemembersettings',$this->translated('Use member-specific settings?'),'yesno','no');
+ $this->createOption('useimagemanager',$this->translated('Use Image-Manager plugin instead of media.php?'),'yesno','no');
+ $this->createOption('usehttps',$this->translated('Use secure server (https) for edititing item?'),'yesno','no');
+ $this->createOption('usep',$this->translated('Use P tag instead of BR for enter key (IE only)?'),'yesno','no');
+ }
+ function getEventList() { return array('EditItemFormExtras','AddItemFormExtras','PrepareItemForEdit',
+ 'PreAddItem','PreUpdateItem',
+ 'PreItem','PostPluginOptionsUpdate','PrePluginOptionsEdit'); }
+
+ // SkinVar is currently used for showing link to create item
+ function doSkinVar($skinType,$type,$text='') {
+ global $blogid,$CONF,$member;
+ switch (strtolower($type)) {
+ case 'newitem':
+ default:
+ if (!$member->isLoggedIn()) return;
+ if (!$text) $text=$this->translated('New Item with WYSIWYG');
+ $url=$CONF['ActionURL'].'?action=plugin&name=MitasNom&type=createitem&blogid='.$blogid;
+ $url=htmlspecialchars($url);
+ if ($this->getOption('usehttps')=='yes') $url=preg_replace('/^http:/','https:',$url);
+ echo "<a href=\"$url\">$text</a>\n";
+ break;
+ }
+ }
+
+ // TemplateVar is currently used for showing link to edit item
+ function doTemplateVar(&$item,$type,$text='') {
+ global $CONF,$member;
+ switch (strtolower($type)) {
+ case 'edititem':
+ default:
+ if (!$text) $text=$text=$this->translated('Edit Item with WYSIWYG');
+ $itemid=$item->itemid;
+ $url=htmlspecialchars($url);
+ if ($this->getOption('usehttps')=='yes') $url=preg_replace('/^http:/','https:',$url);
+ $url=$CONF['ActionURL'].'?action=plugin&name=MitasNom&type=itemedit&itemid='.$itemid;
+ echo "<a href=\"$url\">$text</a>\n";
+ break;
+ }
+ }
+
+ // Action is used to show item-editing/newitem-creating window.
+ function doAction($type){
+ global $DIR_LIBS,$member,$manager,$CONF,$blogid,$itemid;
+ if (!$member->isLoggedIn()) return _NOTLOGGEDIN;
+ if (!strstr('createitem itemedit',$type)) return _BADACTION;
+
+ // Resolve itemid and blogid
+ if (!$blogid && $itemid) $blogid=getBlogIDFromItemID($itemid);
+ if (!$blogid) return _BADACTION;
+ if (!$member->teamRights($blogid)) return _ERROR_DISALLOWED;
+ $blog=&$manager->getBlog($blogid);
+ $convBreaks=false;
+ if ($blog) if ($blog->convertBreaks()) $convBreaks=true;
+
+ // Get editing HTML
+ $this->actionplugin=true;
+ include($DIR_LIBS . 'ADMIN.php');
+ $a=new ADMIN();
+ switch ($type) {
+ case 'createitem':
+ ob_start();
+ $a->action_createitem();
+ $buff=ob_get_contents();
+ ob_end_clean();
+ break;
+ case 'itemedit':
+ ob_start();
+ $a->action_itemedit();
+ $buff=ob_get_contents();
+ ob_end_clean();
+ break;
+ default:
+ return _BADACTION;
+ }
+
+ // Return if not valid editing HTML
+ // These codes must be changed when non-compatible Nucleus version comes out.
+ if (!preg_match('/<head>/',$buff)) return _ERRORMSG;
+ if (!preg_match('/<div class="jsbuttonbar">/',$buff)) return _ERRORMSG;
+ if (!preg_match('/<textarea([^>]*)inputbody([^>]*)>([^>]*)<\/textarea>/',$buff)) return _ERRORMSG;
+ if (!preg_match('/<textarea([^>]*)inputmore([^>]*)>([^>]*)<\/textarea>/',$buff)) return _ERRORMSG;
+
+ // Create NucleusFCKeditor instances
+ if (!class_exists('NucleusFCKeditor')) include ($this->getDirectory().'fckclass.php');
+ $body='';
+ $more='';
+ if ($type=='itemedit') {
+ if (preg_match ('/<textarea([^>]*)inputbody([^>]*)>([^>]*)<\/textarea>/',$buff,$matches))
+ $body=$matches[3];
+ $body=$this->unhtmlentities($body);
+ if (preg_match ('/<textarea([^>]*)inputmore([^>]*)>([^>]*)<\/textarea>/',$buff,$matches))
+ $more=$matches[3];
+ $more=$this->unhtmlentities($more);
+ }
+ if ($convBreaks) {
+ $body=addBreaks($body);
+ $more=addBreaks($more);
+ }
+ $FCKedit1=new NucleusFCKEditor('body',$this,$body);
+ $FCKedit2=new NucleusFCKEditor('more',$this,$more);
+ $buff1=$FCKedit1->CreateHtml();
+ $buff2=$FCKedit2->CreateHtml();
+
+ // Replace texts of editing page
+ // These codes must be changed when non-compatible Nucleus version comes out.
+ $buff=preg_replace ('/<head>/','<head><base href="'.$CONF['AdminURL'].'">', $buff,1);
+ $buff=preg_replace ('/<div class="jsbuttonbar">/','<div class="jsbuttonbar" style="DISPLAY: none;">', $buff,2);
+ $buff=preg_replace ('/<textarea([^>]*)inputbody([^>]*)>([^>]*)<\/textarea>/',$buff1, $buff,1);
+ $buff=preg_replace ('/<textarea([^>]*)inputmore([^>]*)>([^>]*)<\/textarea>/',$buff2, $buff,1);
+ echo $buff;
+ }
+
+ // Solve <%image%> tag for showing items
+ function event_PreItem(&$data) {
+ $item=&$data['item'];
+ $pattern=$this->_patternBeforeEdit();
+ $replace=$this->_replaceBeforeEdit($item->authorid);
+ for ($i=0;$i<1;$i++){
+ $item->body=preg_replace($pattern[$i],$replace[$i],$item->body);
+ $item->more=preg_replace($pattern[$i],$replace[$i],$item->more);
+ }
+ }
+
+ // NP_MitasNom option in editing dialog.
+ // This is more compatible to newer Nucleus version,
+ // unless 'id="inputbody"' and 'id="inputmore"' changed.
+ function event_AddItemFormExtras(&$data) { return $this->event_EditItemFormExtras($data); }
+ function event_EditItemFormExtras(&$data) {
+ global $DIR_LIBS,$member,$manager,$CONF,$blogid,$itemid;
+ // Resolve itemid and blogid
+ if (!$blogid && $itemid) $blogid=getBlogIDFromItemID($itemid);
+ if (!$blogid) return _BADACTION;
+ if (!$member->teamRights($blogid)) return _ERROR_DISALLOWED;
+ $blog=&$manager->getBlog($blogid);
+ $convBreaks=false;
+ if ($blog) if ($blog->convertBreaks()) $convBreaks=true;
+ $authorid=$member->getID();
+ if ($itemid) {
+ $item=&$manager->getItem($itemid,1,1);
+ $authorid=$item['authorid'];
+ }
+
+ if ($this->actionplugin) {
+ echo '<input type="hidden" name="mitasnom_wysiwyged" id="mitasnom_wysiwyged" value="full"/>';
+ return;
+ } else echo '<input type="hidden" name="mitasnom_wysiwyged" id="mitasnom_wysiwyged" value=""/>';
+ $dwidth=$this->this_getOption('dialogwidth');
+ $dheight=$this->this_getOption('dialogheight');
+ $mURL=$CONF['MediaURL'].$member->getID().'/';
+?>
+<h3>NP_MitasNom</h3>
+<script type="text/javascript">
+//<![CDATA[
+function WYSIWYGpopup(textId){
+ window.open('plugins/mitasnom/popup.php?blogid=<?php echo (int)$blogid; ?>&id='+textId,'name',
+<?php echo "'status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=$dwidth,height=$dheight,top=0,left=0');\n"; ?>
+}
+function convBreaks(T) {
+ T=T+'';
+ T=T.replace(/\x0D\x0A/g,"\x0A");
+ T=T.replace(/\x0D/g,"\x0A");
+ T=T.replace(/\x0A/g,"<br />\x0A");
+ return T;
+}
+function rmvBreaks(T) {
+ T=T+'';
+ T=T.replace(/\x0A/g,'');
+ T=T.replace(/\x0D/g,'');
+ T=T.replace(/<br \/>/g,'\n');
+ <?php
+ if ($this->this_getOption('returnafterbrbr')!='yes')
+ echo 'while (T.match(/\n\n/g)) T=T.replace(/\n\n/g,"\n<br />");'."\n";
+ echo 'while (T.match(/<br \/>\n/g)) T=T.replace(/<br \/>\n/g,"<br /><br />");'."\n";
+ ?>
+ T=T.replace(/\n<br \/>/g,'<br />\n');
+ return T;
+}
+function WYSIWYGgettext(id){
+ var T=document.getElementById(id).value+'';
+<?php
+ if ($convBreaks) echo "\tT=convBreaks(T);\n";
+ $replacearray=$this->_replaceBeforeEdit($authorid);
+ foreach($this->_patternBeforeEdit() as $key => $pattern) {
+ $replace=$replacearray[$key];
+ echo "\tT=T.replace($pattern"."g,'$replace');\n";
+ }
+?>
+ return T;
+}
+function WYSIWYGsettext(id,T){
+<?php
+ if ($convBreaks) echo "\tT=rmvBreaks(T);\n";
+ $replacearray=$this->_replaceAfterEdit();
+ foreach($this->_patternAfterEdit() as $key => $pattern) {
+ $replace=$replacearray[$key];
+ echo "\tT=T.replace($pattern"."g,'$replace');\n";
+ }
+?>
+ document.getElementById(id).value=T;
+ document.getElementById('mitasnom_wysiwyged').value='image';
+}
+//]]>
+</script>
+<p>
+<a href="javascript:WYSIWYGpopup('inputbody');" title="Edit by HTML editor"><?php echo $this->translated('WYSIWYG:body'); ?></a>
+<a href="javascript:WYSIWYGpopup('inputmore');" title="Edit by HTML editor"><?php echo $this->translated('WYSIWYG:more'); ?></a>
+</p>
+<?php
+ }
+
+ //<%image%>, <%popup%> conversion
+ function event_PrepareItemForEdit(&$data) {
+ global $CONF,$member;
+ if (!$this->actionplugin) return;
+ $item=&$data['item'];
+ $pattern=$this->_patternBeforeEdit();
+ $replace=$this->_replaceBeforeEdit($item['authorid']);
+ $item['body']=preg_replace($pattern,$replace,$item['body']);
+ $item['more']=preg_replace($pattern,$replace,$item['more']);
+ }
+
+ // Creates Nucleus-specific tags (<%image%> <%popup%>) from general HTML tags.
+ function event_PreAddItem(&$item) { return $this->event_PreUpdateItem($item); }
+ function event_PreUpdateItem(&$item) {
+ if (!requestVar('mitasnom_wysiwyged')) return;
+ $body=&$item['body'];
+ $more=&$item['more'];
+ $blog=&$item['blog'];
+ $body=$this->_restoreImgPopup($body);
+ $more=$this->_restoreImgPopup($more);
+ if (requestVar('mitasnom_wysiwyged')!='full') return;
+ if ($blog->convertBreaks()) {
+ $body=removeBreaks($body);
+ $more=removeBreaks($more);
+ }
+ if ($this->this_getOption('returnafterbr')=='yes') {
+ $body=$this->_addEnterAfterBr($body);
+ $more=$this->_addEnterAfterBr($more);
+ }
+ $pattern=$this->_patternAfterEdit();
+ $replace=$this->_replaceAfterEdit();
+ $body=preg_replace($pattern,$replace,$body);
+ $more=preg_replace($pattern,$replace,$more);
+ }
+ function _addEnterAfterBr(&$data){
+ // <br/> => <br/>\n conversion
+ $ret='';
+ $data=str_replace(array("\r","\n"),'',$data);
+ while ($data) {
+ if (($i=strpos($data,'<br />'))===false) break;
+ $ret.=substr($data,0,$i+6);
+ $data=substr($data,$i+6);
+ if (substr($data,0,1)=="\x0D" || substr($data,0,1)=="\x0A") continue;
+ if (substr($data,0,6)!='<br />' || $this->this_getOption('returnafterbrbr')=='yes') $ret.="\n";
+ }
+ return $ret.$data;
+ }
+ function _restoreImgPopup(&$data){
+ global $CONF,$member,$DIR_MEDIA;
+ //$mURL=$CONF['MediaURL'].$member->getID().'/';
+ $mURL=$CONF['MediaURL'];
+ $pattern='/<img [^>]*?src="'.str_replace('/','\/',$mURL).'[^"]*?"[^>]*? \/>/';
+ if (preg_match_all ( $pattern, $data, $matches,PREG_SET_ORDER)) {
+ foreach($matches as $match){
+ $subject=$match[0];
+ $src=$width=$height=$alt='';
+ $prop=array();
+ foreach(explode('" ',substr($subject,5)) as $value) {
+ $i=strpos($value,'=');
+ $j=strpos($value,'"');
+ if ($i===false || $j===false) continue;
+ $key=substr($value,0,$i);
+ $value=substr($value,$j+1);
+ switch ($key) {
+ case 'src':
+ if (preg_match('/src="'.str_replace('/','\/',$mURL).'([^"]*?)"/',$subject,$match)) $src=$match[1];
+ break;
+ case 'width':
+ $width=$value;
+ break;
+ case 'height':
+ $height=$value;
+ break;
+ default:
+ $prop[$key]=$value;
+ break;
+ }
+ }
+ if (!$prop['title']) $prop['title']=$prop['alt'];
+ if (!$prop['alt']) $prop['alt']=$prop['title'];
+ foreach ($prop as $key => $value) {
+ if (!$alt) $alt.=' ';
+ $alt.=$key.'="'.$value.'"';
+ }
+ $data=str_replace($subject,"<%image($src|$width|$height|$alt)%>",$data);
+ }
+ }
+ $pattern='/<a [\s\S]*?href="'.str_replace('/','\/',$mURL).'[^"]*?"[\s\S]*?<\/a>/';
+ if (preg_match_all ( $pattern, $data, $matches,PREG_SET_ORDER)) {
+ $i=0;
+ foreach($matches as $match){
+ $subject=$match[0];
+ if (preg_match('/href="'.str_replace('/','\/',$mURL).'([^"]*?)"/',$subject,$match)) $href=$match[1];
+ else $href='';
+ if (preg_match('/title="width=([^\|]*?)\|height=([^"]*?)"/',$subject,$match)) {
+ $width=$match[1];
+ $height=$match[2];
+ } else {
+ $old_level = error_reporting(0);
+ $size = @GetImageSize($DIR_MEDIA.$href);
+ error_reporting($old_level);
+ $width = ($height = 0);
+ if ($size) {
+ $width = $size[0];
+ $height = $size[1];
+ }
+ }
+ if (preg_match('/>([^<]*?)<\/a>/',$subject,$match)) $alt=$match[1];
+ else $alt='';
+ if (!$width) $width=100;
+ if (!$height) $height=100;
+ if ($alt) $data=str_replace($subject,"<%popup($href|$width|$height|$alt)%>",$data);
+ }
+ }
+ return $data;
+ }
+
+ //Replacement for <%image%>, <%popup%>
+ function _patternBeforeEdit(){
+ return array( '/<%image\(([0-9]*?)\/([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)alt="([^"]*?)"([^\)]*?)\)%>/',
+ '/<%image\(([^\|\/]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)alt="([^"]*?)"([^\)]*?)\)%>/',
+ '/<%image\(([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)alt="([^"]*?)"([^\)]*?)\)%>/',
+ '/<%image\(([0-9]*?)\/([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%image\(([^\|\/]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%image\(([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%popup\(([0-9]*?)\/([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%popup\(([^\|\/]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%popup\(([^\|]*?)\|([0-9]*?)\|([0-9]*?)\|([^\)]*?)\)%>/',
+ '/<%([^%]*?)%>/');
+ }
+ function _replaceBeforeEdit($authorid) {
+ global $CONF;
+ $mURL=$CONF['MediaURL'].$authorid.'/';
+ return array( '<img src="'.$CONF['MediaURL'].'$1/$2" width="$3" height="$4" $5 alt="$6"$7 />',
+ '<img src="'.$mURL.'$1" width="$2" height="$3" $4 alt="$5"$6 />',
+ '<img src="'.$CONF['MediaURL'].'$1" width="$2" height="$3" $4 alt="$5"$6 />',
+ '<img src="'.$CONF['MediaURL'].'$1/$2" width="$3" height="$4" alt="$5" title="$5" />',
+ '<img src="'.$mURL.'$1" width="$2" height="$3" alt="$4" title="$4" />',
+ '<img src="'.$CONF['MediaURL'].'$1" width="$2" height="$3" alt="$4" title="$4" />',
+ '<a href="'.$CONF['MediaURL'].'$1/$2" title="width=$3|height=$4">$5</a>',
+ '<a href="'.$mURL.'$1" title="width=$2|height=$3">$4</a>',
+ '<a href="'.$CONF['MediaURL'].'$1" title="width=$2|height=$3">$4</a>',
+ '<mitasnom title="nucleustag"></mitasnom><%$1%>');
+ }
+ function _patternAfterEdit(){
+ return array( '/<mitasnom title="nucleustag"><\/mitasnom>/');
+ }
+ function _replaceAfterEdit() {
+ return array( '');
+ }
+
+ // Show information when editing plugin option
+ var $errormessage;
+ function event_PrePluginOptionsEdit($data){
+ if ($this->errormessage) echo "<h4>".$this->errormessage."</h4>";
+ }
+ function returnWithMessage($text) { $this->errormessage=$text;}
+
+ // Customize toolbar menu
+ function event_PostPluginOptionsUpdate($data) {
+ $plugid=$data['plugid'];
+ if ($plugid!=$this->GetID()) return;
+ $this->install();// Refresh member option settings.
+ if (!($name=$this->getOption('addremovetoolbar'))) return;
+ $name=ereg_replace("[^0-9a-zA-Z]","",$name);
+ $this->setOption('addremovetoolbar','');
+ if (!($toolbar=$this->getOption('toolbar_custom')))
+ return $this->returnWithMessage($this->translated('Toolbar definition is empty'));
+ if (strstr(' default full basic custom ',strtolower($name)))
+ return $this->returnWithMessage($this->translated('Default, Full, Basic and Custom toolbars cannot be removed.'));
+ $ret=$this->getOption('toolbar_'.strtolower($name));//$ret=$this->getOption('toolbar_'.$this);
+ if (!($oid=$this->this_getOid('toolbar'))) return;
+ if (!($extra=$this->this_getExtra($oid))) return;
+ if (strstr(strtolower($extra),strtolower($name))) {
+ //delete
+ $extra=eregi_replace("\|$name\|$name","",$extra);
+ sql_query('UPDATE ' . sql_table('plugin_option_desc') .
+ ' SET oextra = "'.addslashes($extra). '" WHERE oid=' . (int)$oid);
+ $this->deleteOption('toolbar_'.strtolower($name));
+ $this->returnWithMessage($name.$this->translated(' toolbar is deleted.'));
+ } else {
+ //add
+ $extra=str_replace("|Custom|Custom","|$name|$name|Custom|Custom",$extra);
+ sql_query('UPDATE ' . sql_table('plugin_option_desc') .
+ ' SET oextra = "'.addslashes($extra). '" WHERE oid=' . (int)$oid);
+ $this->createOption('toolbar_'.strtolower($name), $name.$this->translated(' Toolbar'), 'textarea', $toolbar);
+ $this->returnWithMessage($name.$this->translated(' toolbar is added.'));
+ }
+ }
+
+ // Member specific stuff
+ function this_getOption($name) {
+ global $member;
+ if ($this->getOption('usemembersettings')!='yes') return $this->getOption($name);
+ if (!$this->_useMemberSpecificOption($name)) return $this->getOption($name);
+ return $this->getMemberOption($member->getID(), $name);
+ }
+ function _useMemberSpecificOption($name) {
+ foreach ($this->_allMemberSpecificOptions() as $value) if ($name==$value) return true;
+ return false;
+ }
+ function _allMemberSpecificOptions() {
+ return array('width','height','toolbar','returnafterbr','returnafterbrbr',
+ 'dialogwidth','dialogheight','additionalpsource');
+ }
+
+ // SQL stuff
+ function this_getOid($name,$context='global'){
+ $query = 'SELECT oid, oname FROM ' . sql_table('plugin_option_desc') .
+ ' WHERE opid=' . intval($this->plugid).
+ ' and ocontext="'.addslashes($context).'"';
+ $res = sql_query($query);
+ while ($o = mysql_fetch_object($res)) if ($o->oname==$name) return $o->oid;
+ return null;
+ }
+ function this_getExtra($oid){
+ $query = 'SELECT oextra FROM ' . sql_table('plugin_option_desc') . ' WHERE oid=' . intval($oid);
+ $res = sql_query($query);
+ if ($o = mysql_fetch_object($res)) return $o->oextra;
+ return null;
+ }
+
+ // Uppgrading stuff
+ function _checkVersion(){
+ if (!$this->this_getOid('version')) $this->install();
+ else if ($this->getVersion()!=$this->getOption('version')) $this->install();
+ $this->setOption('version',$this->getVersion());
+ }
+
+ // Overrided function
+ function createOption($name, $desc, $type, $defValue = '', $typeExtras = '') {
+ if (!$this->this_getOid($name)) parent::createOption($name, $desc, $type, $defValue, $typeExtras);
+ if ($this->_useMemberSpecificOption($name)) {
+ if ($this->getOption('usemembersettings')=='yes') {
+ if (!$this->this_getOid($name,'member')) {
+ if ($name=='toolbar') {
+ $typeExtras=quickQuery(
+ 'SELECT oextra as result FROM '.sql_table('plugin_option_desc').
+ ' WHERE opid='.(int)$this->getID().' AND oname="toolbar"');
+ }
+ if (($Extras=$typeExtras)=='access=hidden') $Extras='';
+ $Extras=str_replace('|Custom|Custom','',$Extras);
+ $Extras=str_replace('|Full|Full','',$Extras);
+ $this->createMemberOption($name, $desc, $type,$this->getOption($name), $Extras);
+ }
+ } else {
+ if ($this->this_getOid($name,'member'))
+ $this->deleteMemberOption($name);
+ }
+ }
+ return 1;
+ }
+
+ // Language stuff
+ var $langArray;
+ function translated($english){
+ if (!is_array($this->langArray)) {
+ $this->langArray=array();
+ $language=$this->getDirectory().'language/'.ereg_replace( '[\\|/]', '', getLanguageName()).'.php';
+ if (file_exists($language)) include($language);
+ }
+ if (!($ret=$this->langArray[$english])) $ret=$english;
+ return $ret;
+ }
+
+ // General function (found on PHP help page) follows
+ function unhtmlentities($string) {
+ $trans_tbl = get_html_translation_table (HTML_ENTITIES);
+ $trans_tbl = array_flip ($trans_tbl);
+ return strtr ($string, $trans_tbl);
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+
+ $strRel = '../../../';
+ require($strRel . 'config.php');
+
+ // create the admin area page
+ if (!$member->isLoggedIn()) exit('Not logged in.');
+ include($DIR_LIBS . 'PLUGINADMIN.php');
+ $oPluginAdmin = new PluginAdmin('MitasNom');
+ $p=&$oPluginAdmin->plugin;
+
+ // Setting media dialog stuff
+ $MediaURL=$CONF['MediaURL'];
+ echo "FCKConfig.NucleusMediaDir='$MediaURL';\n";
+ $NucleusMediaWindowWidth=trim($p->this_getOption('dialogwidth'));
+ $NucleusMediaWindowHeight=trim($p->this_getOption('dialogheight'));
+ if ($p->this_getOption('useimagemanager')=='yes') {
+ $NucleusMediaWindowURL=$CONF['AdminURL'].'plugins/imagemanager/manager.php';
+ echo "FCKConfig.NucleusUseImageManager=true;\n";
+
+ } else {
+ $NucleusMediaWindowURL=$CONF['AdminURL'].'media.php';
+ echo "FCKConfig.NucleusUseImageManager=false;\n";
+ }
+ if ($p->this_getOption('usep')=='yes') echo "FCKConfig.UseBROnCarriageReturn=false;\n";
+
+ echo "FCKConfig.LinkBrowserWindowWidth='$NucleusMediaWindowWidth';\n";
+ echo "FCKConfig.LinkBrowserWindowHeight='$NucleusMediaWindowHeight';\n";
+ echo "FCKConfig.LinkBrowserURL='$NucleusMediaWindowURL';\n";
+ echo "FCKConfig.ImageBrowserWindowWidth='$NucleusMediaWindowWidth';\n";
+ echo "FCKConfig.ImageBrowserWindowHeight='$NucleusMediaWindowHeight';\n";
+ echo "FCKConfig.ImageBrowserURL='$NucleusMediaWindowURL';\n";
+ echo "FCKConfig.FlashBrowserWindowWidth='$NucleusMediaWindowWidth';\n";
+ echo "FCKConfig.FlashBrowserWindowHeight='$NucleusMediaWindowHeight';\n";
+ echo "FCKConfig.FlashBrowserURL='$NucleusMediaWindowURL';\n";
+
+ // ProtectedSource
+ $ProtectedSources="/\\x0A/g\n";
+ $ProtectedSources.=$p->getOption('protectedsource')."\n";
+ $ProtectedSources.=$p->this_getOption('additionalpsource');
+ $ProtectedSources=str_replace("\n","\x0A",$ProtectedSources);
+ $ProtectedSources=str_replace("\x0D","\x0A",$ProtectedSources);
+ foreach ( explode ("\x0A",$ProtectedSources) as $value)
+ if ($value) echo "FCKConfig.ProtectedSource.Add($value);\n";
+
+ // Custom toolbar
+ $toolbar=$p->this_getOption('toolbar');
+ switch (strtolower($toolbar)) {
+ case 'default':
+ case 'full':
+ case 'basic':
+ break;
+ default:
+ echo 'FCKConfig.ToolbarSets["'.$toolbar.'"] = ['.
+ $p->getOption('toolbar_'.strtolower($toolbar))."];\n";
+ break;
+ }
+
+?>
\ No newline at end of file
--- /dev/null
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * "Support Open Source software. What about a donation today?"
+ *
+ * File Name: fck_dialog_common.js
+ * Useful functions used by almost all dialog window pages.
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+/*
+ * Modified for Nucleus Plugin by Katsumi
+ * The license turned to GPL.
+ */
+
+// Gets a element by its Id. Used for shorter coding.
+function GetE( elementId )
+{
+ return document.getElementById( elementId ) ;
+}
+
+function ShowE( element, isVisible )
+{
+ if ( typeof( element ) == 'string' )
+ element = GetE( element ) ;
+ element.style.display = isVisible ? '' : 'none' ;
+}
+
+function SetAttribute( element, attName, attValue )
+{
+ if ( attValue == null || attValue.length == 0 )
+ element.removeAttribute( attName, 0 ) ; // 0 : Case Insensitive
+ else
+ element.setAttribute( attName, attValue, 0 ) ; // 0 : Case Insensitive
+}
+
+function GetAttribute( element, attName, valueIfNull )
+{
+ var oAtt = element.attributes[attName] ;
+
+ if ( oAtt == null || !oAtt.specified )
+ return valueIfNull ? valueIfNull : '' ;
+
+ var oValue ;
+
+ if ( !( oValue = element.getAttribute( attName, 2 ) ) )
+ oValue = oAtt.nodeValue ;
+
+ return ( oValue == null ? valueIfNull : oValue ) ;
+}
+
+// Functions used by text fiels to accept numbers only.
+function IsDigit( e )
+{
+ e = e || event ;
+ var iCode = ( e.keyCode || e.charCode ) ;
+
+ event.returnValue =
+ (
+ ( iCode >= 48 && iCode <= 57 ) // Numbers
+ || (iCode >= 37 && iCode <= 40) // Arrows
+ || iCode == 8 // Backspace
+ || iCode == 46 // Delete
+ ) ;
+
+ return event.returnValue ;
+}
+
+String.prototype.trim = function()
+{
+ return this.replace( /(^\s*)|(\s*$)/g, '' ) ;
+}
+
+String.prototype.startsWith = function( value )
+{
+ return ( this.substr( 0, value.length ) == value ) ;
+}
+
+String.prototype.remove = function( start, length )
+{
+ var s = '' ;
+
+ if ( start > 0 )
+ s = this.substring( 0, start ) ;
+
+ if ( start + length < this.length )
+ s += this.substring( start + length , this.length ) ;
+
+ return s ;
+}
+
+function OpenFileBrowser( url, width, height )
+{
+ // oEditor must be defined.
+
+ var iLeft = ( oEditor.FCKConfig.ScreenWidth - width ) / 2 ;
+ var iTop = ( oEditor.FCKConfig.ScreenHeight - height ) / 2 ;
+
+ var sOptions = "toolbar=no,status=no,resizable=yes,dependent=yes" ;
+ sOptions += ",width=" + width ;
+ sOptions += ",height=" + height ;
+ sOptions += ",left=" + iLeft ;
+ sOptions += ",top=" + iTop ;
+ sOptions += ",scrollbars=yes";
+ // The "PreserveSessionOnFileBrowser" because the above code could be
+ // blocked by popup blockers.
+ if ( oEditor.FCKConfig.PreserveSessionOnFileBrowser && oEditor.FCKBrowserInfo.IsIE )
+ {
+ // The following change has been made otherwise IE will open the file
+ // browser on a different server session (on some cases):
+ // http://support.microsoft.com/default.aspx?scid=kb;en-us;831678
+ // by Simone Chiaretta.
+ var oWindow = oEditor.window.open( url, 'FCKBrowseWindow', sOptions ) ;
+ if ( oWindow )
+ oWindow.opener = window ;
+ else
+ alert( oEditor.FCKLang.BrowseServerBlocked ) ;
+ }
+ else { var oWindow =window.open( url, 'FCKBrowseWindow', sOptions ) ; }
+ if ( oWindow ) {
+ if (FCKConfig.NucleusUseImageManager) {// Image-Manager plugin
+ SetImageManager_oWindow=oWindow;
+ SetImageManager_timer=setInterval("SetImageManager()",1);// Check the window every 1 mili second.
+ } else {//media.php
+ oWindow.window.opener.includeImage=function(collection,filename,type,width,height)
+ {
+ if (this.GetE('txtUrl')) this.GetE('txtUrl').value=FCKConfig.NucleusMediaDir+collection+'/'+filename;
+ if (this.GetE('txtWidth')) this.GetE('txtWidth').value=width;
+ if (this.GetE('txtHeight')) this.GetE('txtHeight').value=height;
+ //if (this.GetE('txtAttTitle')) this.GetE('txtAttTitle').value=filename;
+ };
+ oWindow.window.opener.includeOtherMedia=function(collection, filename)
+ {
+ if (this.GetE('txtUrl')) this.GetE('txtUrl').value=FCKConfig.NucleusMediaDir+collection+'/'+filename;
+ };
+ }
+ }
+}
+
+var SetImageManager_oWindow;
+var SetImageManager_timer;
+function SetImageManager(){
+ var oWindow=SetImageManager_oWindow;
+ if (!oWindow.window.onOK) return;
+ clearInterval(SetImageManager_timer);
+ oWindow.window.base_url=FCKConfig.NucleusMediaDir;
+ oWindow.window.__dlg_close=function(val)
+ {
+ var sActualBrowser;
+ try {
+ sActualBrowser=oWindow.window.opener.sActualBrowser.toLowerCase();
+ } catch(e) {
+ sActualBrowser='';
+ }
+ if (val) switch (sActualBrowser){
+ case "link":
+ if (oWindow.window.opener.GetE('txtLnkUrl')) oWindow.window.opener.GetE('txtLnkUrl').value=val['f_url'];
+ break;
+ default:
+ if (oWindow.window.opener.GetE('txtUrl')) oWindow.window.opener.GetE('txtUrl').value=val['f_url'];
+ if (oWindow.window.opener.GetE('txtWidth')) oWindow.window.opener.GetE('txtWidth').value=val['f_width'];
+ if (oWindow.window.opener.GetE('txtWidth')) oWindow.window.opener.GetE('txtHeight').value=val['f_height'];
+ //if (oWindow.window.opener.GetE('txtAttTitle')) oWindow.window.opener.GetE('txtAttTitle').value=filename;
+ }
+ oWindow.close();
+ };
+}
\ No newline at end of file
--- /dev/null
+/*
+ * NucleusTag plugin for FCKeditor
+ * The license of this file is GPL.
+ */
+
+// Nucleus Tag
+var FCKNucleusTagProcessor = new Object() ;
+FCKNucleusTagProcessor.ProcessDocument = function( document )
+{
+ var aLinks = document.getElementsByTagName( 'mitasnom' ) ;
+ var oLink ;
+ var i = aLinks.length - 1 ;
+ while ( i >= 0 && ( oLink = aLinks[i--] ) ) {
+ if (oLink.title=='nucleustag') {
+ var oImg = FCKDocumentProcessors_CreateFakeImage( 'FCK__NucleusTag', oLink.cloneNode(true) ) ;
+ oImg.setAttribute( '_fcknucleustag', 'true', 0 ) ;
+ oLink.parentNode.insertBefore( oImg, oLink ) ;
+ oLink.parentNode.removeChild( oLink ) ;
+ }
+ }
+}
+
+FCKDocumentProcessors.addItem( FCKNucleusTagProcessor ) ;
+
+// Refresh the document
+FCK.SetHTML( FCK.GetXHTML( FCKConfig.FormatSource ), true ) ;
--- /dev/null
+<html><body><?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+$strRel = '../../../../';
+include($strRel . 'config.php');
+
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('Not logged in');
+if (!$manager->checkTicket()) exit('Invalid ticket');
+
+error_reporting (E_ERROR | E_WARNING | E_PARSE);
+
+//$files=listup_files('../');
+$files=listup_files('../editor');
+
+if (!($fHandle=fopen('compress.dat','x'))) exit; //Overwrite prohibited.
+$list='';
+$fpoint=0;
+
+foreach ($files as $value) {
+ ob_start();
+ $list.=readfile($value).'|'.$value."\n";// The data at each line is: "filesize|filename"
+ $data=ob_get_contents();
+ ob_end_clean();
+ fwrite($fHandle,$data);
+ echo "$value<br />\n";
+}
+fclose($fHandle);
+
+if (!($fHandle=fopen('compress.lst','x'))) exit; //Overwrite prohibited.
+fwrite($fHandle,$list);
+fclose($fHandle);
+
+function listup_files($dir){
+ $dir=str_replace('\\','/',$dir);// Windows support.
+ $dir=preg_replace('/[\/]$/','',$dir).'/';
+ $files=array();
+ if (!is_dir($dir)) return $files;
+ $d = dir($dir);
+ while (false !== ($entry = $d->read())) {
+ if ($entry=='.'||$entry=='..') continue;// Ignore this and parent directory.
+ if (is_dir($dir.$entry)) {// The case of directory
+ foreach(listup_files($dir.$entry) as $value) $files[]=$value;
+ continue;
+ }
+ $files[]=$dir.$entry;
+ }
+ $d->close();
+ return $files;
+}
+?>All Done!</body></html>
\ No newline at end of file
--- /dev/null
+<html><body><?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+$strRel = '../../../../';
+include($strRel . 'config.php');
+
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('Not logged in');
+if (!$manager->checkTicket()) exit('Invalid ticket');
+
+error_reporting (E_ERROR | E_WARNING | E_PARSE);
+
+if (!file_exists('compress.lst')) exit('compress.lst not found');
+if (!($fHandle=fopen('compress.dat','r'))) exit;
+
+foreach(file('compress.lst') as $value) {
+ list($filesize,$filename)=explode('|',$value);// The data contains "filesize|filename".
+ $filesize=(int)$filesize;
+ $filename=trim($filename);
+ echo "($filesize)$filename<br />\n";
+ $data=fread($fHandle,$filesize);
+ mkdirex(dirname($filename));
+ if (!($fHandle2=fopen($filename,'w'))) continue;// Overwrite allowed.
+ fwrite($fHandle2,$data);
+ fclose($fHandle2);
+}
+
+function mkdirex($dir,$mod='777'){
+ $dir=str_replace('\\','/',$dir);
+ if (substr($dir,0,1)=='/') $temp='/';
+ else $temp='';
+ eval('$i=0'.$mod.';');
+ foreach(explode('/',$dir) as $value) {
+ if (!$value) continue;
+ $temp.=$value.'/';
+ if (!file_exists($temp)) {
+ @mkdir($temp);
+ @chmod($temp,$i);
+ }
+ }
+}
+?>All Done!</body></html>
\ No newline at end of file
--- /dev/null
+<html><body><?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+$strRel = '../../../../';
+include($strRel . 'config.php');
+
+if (!($member->isLoggedIn() && $member->isAdmin())) exit('Not logged in');
+
+echo '<a href="'.$manager->addTicketToUrl('expand.php').'">Expand</a><p/>';
+
+if (!file_exists('compress.lst')) echo '<a href="'.$manager->addTicketToUrl('compress.php').'">Compress</a><p/>';
+
+?></body></html>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+
+if (!class_exists('FCKeditor')) include (dirname(__FILE__).'/fckeditor.php');
+
+class NucleusFCKeditor extends FCKeditor
+{
+ function NucleusFCKeditor($instanceName, &$plugin, $data='')
+ {
+ global $itemid,$blogid,$manager,$DIR_SKINS,$CONF;
+
+ $this->__construct( $instanceName ) ;
+ if ($plugin->getOption('usehttps')=='yes') $this->BasePath=preg_replace('/^http:/','https:',$plugin->getAdminURL());
+ else $this->BasePath=$plugin->getAdminURL();
+ $this->Value=$data;
+ $this->Width=trim($plugin->this_getOption('width'));
+ $this->Height=trim($plugin->this_getOption('height'));
+ $this->ToolbarSet=$plugin->this_getOption('toolbar');
+
+ // XML and CSS stuffs
+ if (!$blogid && $itemid) $blogid=getBlogIDFromItemID($itemid);
+ if (!$blogid) return;
+ if (!($blog=&$manager->getBlog($blogid))) return;
+ $skin=new SKIN($blog->getDefaultSkin());
+ $styledir=$DIR_SKINS.$skin->getIncludePrefix().'mitasnom/';
+ $styleURL=$CONF['SkinsURL'].$skin->getIncludePrefix().'mitasnom/';
+ if (file_exists($styledir)) {
+ if (file_exists($styledir.'fckstyles.xml'))
+ $this->Config['StylesXmlPath']=$styleURL.'fckstyles.xml';
+ if (file_exists($styledir.'fckstyles.css'))
+ $this->Config['EditorAreaCSS']=$styleURL.'fckstyles.css';
+ }
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * "Support Open Source software. What about a donation today?"
+ *
+ * File Name: fckconfig.js
+ * Editor configuration settings.
+ * See the documentation for more info.
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+/*
+ * fckconfig.js for Nucleus plugin.
+ * Modified by Katsumi
+ * The license of this library turned to GPL.
+ */
+
+FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
+
+FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
+
+FCKConfig.BaseHref = '' ;
+
+FCKConfig.FullPage = false ;
+
+FCKConfig.Debug = false ;
+FCKConfig.AllowQueryStringDebug = true ;
+
+FCKConfig.SkinPath = FCKConfig.BasePath + 'skins/default/' ;
+
+FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
+
+// FCKConfig.Plugins.Add( 'placeholder', 'de,en,fr,it,pl' ) ;
+
+//ProtectedSources are added in config.php
+
+//FCKConfig.ProtectedSource.Add( /<script[\s\S]*?\/script>/gi ) ; // <SCRIPT> tags.
+//FCKConfig.ProtectedSource.Add( /<%[\s\S]*?%>/g ) ; // ASP style server side code <%...%>
+//FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code <?...?>
+//FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ; // ASP.Net style tags <asp:control>
+
+FCKConfig.AutoDetectLanguage = true ;
+FCKConfig.DefaultLanguage = 'en' ;
+FCKConfig.ContentLangDirection = 'ltr' ;
+
+FCKConfig.EnableXHTML = true ; // Unsupported: Do not change.
+FCKConfig.EnableSourceXHTML = true ; // Unsupported: Do not change.
+
+FCKConfig.ProcessHTMLEntities = true ;
+FCKConfig.IncludeLatinEntities = true ;
+FCKConfig.IncludeGreekEntities = true ;
+
+FCKConfig.FillEmptyBlocks = true ;
+
+FCKConfig.FormatSource = true ;
+FCKConfig.FormatOutput = true ;
+FCKConfig.FormatIndentator = ' ' ;
+
+FCKConfig.ForceStrongEm = true ;
+FCKConfig.GeckoUseSPAN = true ;
+FCKConfig.StartupFocus = false ;
+FCKConfig.ForcePasteAsPlainText = false ;
+FCKConfig.AutoDetectPasteFromWord = true ; // IE only.
+FCKConfig.ForceSimpleAmpersand = false ;
+FCKConfig.TabSpaces = 0 ;
+FCKConfig.ShowBorders = true ;
+FCKConfig.ToolbarStartExpanded = true ;
+FCKConfig.ToolbarCanCollapse = true ;
+FCKConfig.IEForceVScroll = false ;
+FCKConfig.IgnoreEmptyParagraphValue = true ;
+FCKConfig.PreserveSessionOnFileBrowser = false ;
+FCKConfig.FloatingPanelsZIndex = 10000 ;
+
+FCKConfig.ToolbarSets["Default"] = [
+ ['Source','Save','Preview'],
+ ['Cut','Copy','Paste'],
+ ['Find','Replace','RemoveFormat'],
+ ['Link','Unlink','Anchor'],
+ ['Image','Table','Smiley','SpecialChar'],
+ ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
+ ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
+ ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
+ '/',
+ ['Style','FontFormat'],
+ ['TextColor','FontName','FontSize']
+];
+
+FCKConfig.ToolbarSets["Full"] = [
+ ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
+ ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
+ ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
+ ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
+ ['OrderedList','UnorderedList','-','Outdent','Indent'],
+ ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
+ ['Link','Unlink','Anchor'],
+ ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak','UniversalKey'],
+ ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
+ '/',
+ ['Style','FontFormat','FontName','FontSize'],
+ ['TextColor','BGColor'],
+ ['About']
+] ;
+
+FCKConfig.ToolbarSets["Basic"] = [
+ ['Source','Save','Preview','-','Bold','Italic','RemoveFormat','-','Image','Link','Unlink']
+] ;
+
+FCKConfig.ContextMenu = ['Generic','Link','Anchor','Image','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
+
+FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
+
+FCKConfig.FontNames = 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
+FCKConfig.FontSizes = '1/xx-small;2/x-small;3/small;4/medium;5/large;6/x-large;7/xx-large' ;
+FCKConfig.FontFormats = 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
+
+FCKConfig.StylesXmlPath = FCKConfig.EditorPath + 'fckstyles.xml' ;
+FCKConfig.TemplatesXmlPath = FCKConfig.EditorPath + 'fcktemplates.xml' ;
+
+FCKConfig.SpellChecker = 'ieSpell' ; // 'ieSpell' | 'SpellerPages'
+FCKConfig.IeSpellDownloadUrl = 'http://www.iespell.com/rel/ieSpellSetup211325.exe' ;
+
+FCKConfig.MaxUndoLevels = 15 ;
+
+FCKConfig.DisableImageHandles = false ;
+FCKConfig.DisableTableHandles = false ;
+
+FCKConfig.LinkDlgHideTarget = false ;
+FCKConfig.LinkDlgHideAdvanced = false ;
+
+FCKConfig.ImageDlgHideLink = false ;
+FCKConfig.ImageDlgHideAdvanced = false ;
+
+FCKConfig.FlashDlgHideAdvanced = false ;
+
+FCKConfig.SmileyPath = FCKConfig.BasePath + 'images/smiley/msn/' ;
+FCKConfig.SmileyImages = ['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'] ;
+FCKConfig.SmileyColumns = 8 ;
+FCKConfig.SmileyWindowWidth = 320 ;
+FCKConfig.SmileyWindowHeight = 240 ;
+
+//Following options were Changed for Nucleus.
+
+FCKConfig.Plugins.Add('nucleus');
+
+//var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
+//var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
+// extension to use for the default File Browser (Perl uses "cgi").
+//var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
+
+FCKConfig.UseBROnCarriageReturn = true ; // IE only.
+
+var NucleusMediaWindowWidth=500;
+var NucleusMediaWindowHeight=450;
+var NucleusMediaWindowURL="../../../../media.php";
+var NucleusMediaDir="media/";
+
+FCKConfig.LinkBrowser = true ;
+FCKConfig.LinkBrowserWindowWidth = NucleusMediaWindowWidth ;
+FCKConfig.LinkBrowserWindowHeight = NucleusMediaWindowHeight ;
+FCKConfig.LinkBrowserURL= NucleusMediaWindowURL ;
+
+FCKConfig.ImageBrowser = true ;
+FCKConfig.ImageBrowserWindowWidth = NucleusMediaWindowWidth ;
+FCKConfig.ImageBrowserWindowHeight = NucleusMediaWindowHeight ;
+FCKConfig.ImageBrowserURL= NucleusMediaWindowURL;
+
+FCKConfig.FlashBrowser = true ;
+FCKConfig.FlashBrowserWindowWidth = NucleusMediaWindowWidth ;
+FCKConfig.FlashBrowserWindowHeight = NucleusMediaWindowHeight ;
+FCKConfig.FlashBrowserURL= NucleusMediaWindowURL;
+
+FCKConfig.LinkUpload = false ;
+FCKConfig.ImageUpload = false ;//Changed for Nucleus
+FCKConfig.FlashUpload = false ;//Changed for Nucleus
+
+FCKConfig.NucleusMediaDir=NucleusMediaDir;
+
+FCKConfig.CustomConfigurationsPath = '../config.php' ;
+
+//Above options were Changed for Nucleus.
+
+if( window.console ) window.console.log( 'Config is loaded!' ) ; // @Packager.Compactor.RemoveLine
\ No newline at end of file
--- /dev/null
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * "Support Open Source software. What about a donation today?"
+ *
+ * File Name: fckeditor.js
+ * This is the integration file for JavaScript.
+ *
+ * It defines the FCKeditor class that can be used to create editor
+ * instances in a HTML page in the client side. For server side
+ * operations, use the specific integration system.
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+// FCKeditor Class
+var FCKeditor = function( instanceName, width, height, toolbarSet, value )
+{
+ // Properties
+ this.InstanceName = instanceName ;
+ this.Width = width || '100%' ;
+ this.Height = height || '200' ;
+ this.ToolbarSet = toolbarSet || 'Default' ;
+ this.Value = value || '' ;
+ this.BasePath = '/fckeditor/' ;
+ this.CheckBrowser = true ;
+ this.DisplayErrors = true ;
+ this.EnableSafari = false ; // This is a temporary property, while Safari support is under development.
+ this.EnableOpera = false ; // This is a temporary property, while Opera support is under development.
+
+ this.Config = new Object() ;
+
+ // Events
+ this.OnError = null ; // function( source, errorNumber, errorDescription )
+}
+
+FCKeditor.prototype.Create = function()
+{
+ // Check for errors
+ if ( !this.InstanceName || this.InstanceName.length == 0 )
+ {
+ this._ThrowError( 701, 'You must specify an instance name.' ) ;
+ return ;
+ }
+
+ document.write( '<div>' ) ;
+
+ if ( !this.CheckBrowser || this._IsCompatibleBrowser() )
+ {
+ document.write( '<input type="hidden" id="' + this.InstanceName + '" name="' + this.InstanceName + '" value="' + this._HTMLEncode( this.Value ) + '" style="display:none" />' ) ;
+ document.write( this._GetConfigHtml() ) ;
+ document.write( this._GetIFrameHtml() ) ;
+ }
+ else
+ {
+ var sWidth = this.Width.toString().indexOf('%') > 0 ? this.Width : this.Width + 'px' ;
+ var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ;
+ document.write('<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="WIDTH: ' + sWidth + '; HEIGHT: ' + sHeight + '">' + this._HTMLEncode( this.Value ) + '<\/textarea>') ;
+ }
+
+ document.write( '</div>' ) ;
+}
+
+FCKeditor.prototype.ReplaceTextarea = function()
+{
+ if ( !this.CheckBrowser || this._IsCompatibleBrowser() )
+ {
+ // We must check the elements firstly using the Id and then the name.
+ var oTextarea = document.getElementById( this.InstanceName ) ;
+ var colElementsByName = document.getElementsByName( this.InstanceName ) ;
+ var i = 0;
+ while ( oTextarea || i == 0 )
+ {
+ if ( oTextarea && oTextarea.tagName == 'TEXTAREA' )
+ break ;
+ oTextarea = colElementsByName[i++] ;
+ }
+
+ if ( !oTextarea )
+ {
+ alert( 'Error: The TEXTAREA with id or name set to "' + this.InstanceName + '" was not found' ) ;
+ return ;
+ }
+
+ oTextarea.style.display = 'none' ;
+ this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ;
+ this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ;
+ }
+}
+
+FCKeditor.prototype._InsertHtmlBefore = function( html, element )
+{
+ if ( element.insertAdjacentHTML ) // IE
+ element.insertAdjacentHTML( 'beforeBegin', html ) ;
+ else // Gecko
+ {
+ var oRange = document.createRange() ;
+ oRange.setStartBefore( element ) ;
+ var oFragment = oRange.createContextualFragment( html );
+ element.parentNode.insertBefore( oFragment, element ) ;
+ }
+}
+
+FCKeditor.prototype._GetConfigHtml = function()
+{
+ var sConfig = '' ;
+ for ( var o in this.Config )
+ {
+ if ( sConfig.length > 0 ) sConfig += '&' ;
+ sConfig += escape(o) + '=' + escape( this.Config[o] ) ;
+ }
+
+ return '<input type="hidden" id="' + this.InstanceName + '___Config" value="' + sConfig + '" style="display:none" />' ;
+}
+
+FCKeditor.prototype._GetIFrameHtml = function()
+{
+ var sFile = (/fcksource=true/i).test( window.top.location.search ) ? 'fckeditor.original.html' : 'fckeditor.html' ;
+
+ var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + this.InstanceName ;
+ if (this.ToolbarSet) sLink += '&Toolbar=' + this.ToolbarSet ;
+
+ return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="no" scrolling="no"></iframe>' ;
+}
+
+FCKeditor.prototype._IsCompatibleBrowser = function()
+{
+ var sAgent = navigator.userAgent.toLowerCase() ;
+
+ // Internet Explorer
+ if ( sAgent.indexOf("msie") != -1 && sAgent.indexOf("mac") == -1 && sAgent.indexOf("opera") == -1 )
+ {
+ var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
+ return ( sBrowserVersion >= 5.5 ) ;
+ }
+
+ // Gecko
+ if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 )
+ return true ;
+
+ // Opera
+ if ( this.EnableOpera )
+ {
+ var aMatch = sAgent.match( /^opera\/(\d+\.\d+)/ ) ;
+ if ( aMatch && aMatch[1] >= 9.0 )
+ return true ;
+ }
+
+ // Safari
+ if ( this.EnableSafari && sAgent.indexOf( 'safari' ) != -1 )
+ return ( sAgent.match( /safari\/(\d+)/ )[1] >= 312 ) ; // Build must be at least 312 (1.3)
+
+ return false ;
+}
+
+FCKeditor.prototype._ThrowError = function( errorNumber, errorDescription )
+{
+ this.ErrorNumber = errorNumber ;
+ this.ErrorDescription = errorDescription ;
+
+ if ( this.DisplayErrors )
+ {
+ document.write( '<div style="COLOR: #ff0000">' ) ;
+ document.write( '[ FCKeditor Error ' + this.ErrorNumber + ': ' + this.ErrorDescription + ' ]' ) ;
+ document.write( '</div>' ) ;
+ }
+
+ if ( typeof( this.OnError ) == 'function' )
+ this.OnError( this, errorNumber, errorDescription ) ;
+}
+
+FCKeditor.prototype._HTMLEncode = function( text )
+{
+ if ( typeof( text ) != "string" )
+ text = text.toString() ;
+
+ text = text.replace(/&/g, "&") ;
+ text = text.replace(/"/g, """) ;
+ text = text.replace(/</g, "<") ;
+ text = text.replace(/>/g, ">") ;
+ text = text.replace(/'/g, "'") ;
+
+ return text ;
+}
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * "Support Open Source software. What about a donation today?"
+ *
+ * File Name: fckeditor.php
+ * This is the integration file for PHP.
+ *
+ * It defines the FCKeditor class that can be used to create editor
+ * instances in PHP pages on server side.
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+ */
+
+class FCKeditor
+{
+ var $InstanceName ;
+ var $BasePath ;
+ var $Width ;
+ var $Height ;
+ var $ToolbarSet ;
+ var $Value ;
+ var $Config ;
+
+ // PHP 5 Constructor (by Marcus Bointon <coolbru@users.sourceforge.net>)
+ function __construct( $instanceName )
+ {
+ $this->InstanceName = $instanceName ;
+ $this->BasePath = '/FCKeditor/' ;
+ $this->Width = '100%' ;
+ $this->Height = '200' ;
+ $this->ToolbarSet = 'Default' ;
+ $this->Value = '' ;
+
+ $this->Config = array() ;
+ }
+
+ // PHP 4 Contructor
+ function FCKeditor( $instanceName )
+ {
+ $this->__construct( $instanceName ) ;
+ }
+
+ function Create()
+ {
+ echo $this->CreateHtml() ;
+ }
+
+ function CreateHtml()
+ {
+ $HtmlValue = htmlspecialchars( $this->Value ) ;
+
+ $Html = '<div>' ;
+
+ if ( $this->IsCompatible() )
+ {
+ if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
+ $File = 'fckeditor.original.html' ;
+ else
+ $File = 'fckeditor.html' ;
+
+ $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ;
+
+ if ( $this->ToolbarSet != '' )
+ $Link .= "&Toolbar={$this->ToolbarSet}" ;
+
+ // Render the linked hidden field.
+ $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ;
+
+ // Render the configurations hidden field.
+ $Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ;
+
+ // Render the editor IFRAME.
+ $Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"no\" scrolling=\"no\"></iframe>" ;
+ }
+ else
+ {
+ if ( strpos( $this->Width, '%' ) === false )
+ $WidthCSS = $this->Width . 'px' ;
+ else
+ $WidthCSS = $this->Width ;
+
+ if ( strpos( $this->Height, '%' ) === false )
+ $HeightCSS = $this->Height . 'px' ;
+ else
+ $HeightCSS = $this->Height ;
+
+ $Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;
+ }
+
+ $Html .= '</div>' ;
+
+ return $Html ;
+ }
+
+ function IsCompatible()
+ {
+ global $HTTP_USER_AGENT ;
+
+ if ( isset( $HTTP_USER_AGENT ) )
+ $sAgent = $HTTP_USER_AGENT ;
+ else
+ $sAgent = $_SERVER['HTTP_USER_AGENT'] ;
+
+ if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
+ {
+ $iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
+ return ($iVersion >= 5.5) ;
+ }
+ else if ( strpos($sAgent, 'Gecko/') !== false )
+ {
+ $iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+ return ($iVersion >= 20030210) ;
+ }
+ else
+ return false ;
+ }
+
+ function GetConfigFieldString()
+ {
+ $sParams = '' ;
+ $bFirst = true ;
+
+ foreach ( $this->Config as $sKey => $sValue )
+ {
+ if ( $bFirst == false )
+ $sParams .= '&' ;
+ else
+ $bFirst = false ;
+
+ if ( $sValue === true )
+ $sParams .= $this->EncodeConfig( $sKey ) . '=true' ;
+ else if ( $sValue === false )
+ $sParams .= $this->EncodeConfig( $sKey ) . '=false' ;
+ else
+ $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ;
+ }
+
+ return $sParams ;
+ }
+
+ function EncodeConfig( $valueToEncode )
+ {
+ $chars = array(
+ '&' => '%26',
+ '=' => '%3D',
+ '"' => '%22' ) ;
+
+ return strtr( $valueToEncode, $chars ) ;
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ * FCKeditor - The text editor for internet
+ * Copyright (C) 2003-2005 Frederico Caldeira Knabben
+ *
+ * Licensed under the terms of the GNU Lesser General Public License:
+ * http://www.opensource.org/licenses/lgpl-license.php
+ *
+ * For further information visit:
+ * http://www.fckeditor.net/
+ *
+ * "Support Open Source software. What about a donation today?"
+ *
+ * File Name: fckstyles.xml
+ * This is the sample style definitions file. It makes the styles combo
+ * completely customizable.
+ * See FCKConfig.StylesXmlPath in the configuration file.
+ *
+ * File Authors:
+ * Frederico Caldeira Knabben (fredck@fckeditor.net)
+
+ * Modified for Nucleus plugin by Katsumi
+ * The license turned to GPL.
+-->
+<Styles>
+ <Style name="Image on Left" element="img">
+ <Attribute name="class" value="leftbox" />
+ </Style>
+ <Style name="Image on Right" element="img">
+ <Attribute name="class" value="rightbox" />
+ </Style>
+ <Style name="Custom Bold" element="span">
+ <Attribute name="style" value="font-weight: bold;" />
+ </Style>
+ <Style name="Custom Italic" element="em" />
+ <Style name="Title" element="span">
+ <Attribute name="class" value="Title" />
+ </Style>
+ <Style name="Code" element="span">
+ <Attribute name="class" value="Code" />
+ </Style>
+ <Style name="Title H3" element="h3" />
+ <Style name="Custom Ruler" element="hr">
+ <Attribute name="size" value="1" />
+ <Attribute name="color" value="#ff0000" />
+ </Style>
+</Styles>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<Templates imagesBasePath="fck_template/images/">
+ <Template title="Image and Title" image="template1.gif">
+ <Description>One main image with a title and text that surround the image.</Description>
+ <Html>
+ <![CDATA[
+ <img style="MARGIN-RIGHT: 10px" height="100" alt="" width="100" align="left"/>
+ <h3>Type the title here</h3>
+ Type the text here
+ ]]>
+ </Html>
+ </Template>
+ <Template title="Strange Template" image="template2.gif">
+ <Description>A template that defines two colums, each one with a title, and some text.</Description>
+ <Html>
+ <![CDATA[
+ <table cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td width="50%">
+ <h3>Title 1</h3>
+ </td>
+ <td> </td>
+ <td width="50%">
+ <h3>Title 2</h3>
+ </td>
+ </tr>
+ <tr>
+ <td>Text 1</td>
+ <td> </td>
+ <td>Text 2</td>
+ </tr>
+ </tbody>
+ </table>
+ More text goes here.
+ ]]>
+ </Html>
+ </Template>
+ <Template title="Text and Table" image="template3.gif">
+ <Description>A title with some text and a table.</Description>
+ <Html>
+ <![CDATA[
+ <table align="left" width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td>
+ <h3>Title goes here</h3>
+ <p>
+ <table style="FLOAT: right" cellspacing="0" cellpadding="0" width="150" border="1">
+ <tbody>
+ <tr>
+ <td align="center" colspan="3"><strong>Table title</strong></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ </tbody>
+ </table>
+ Type the text here</p>
+ </td></tr></table>
+ ]]>
+ </Html>
+ </Template>
+</Templates>
--- /dev/null
+<html><body>There is nothing to see here.</body></html>
\ No newline at end of file
--- /dev/null
+<?php
+$this->langArray['WYSIWYG HTML editor plagin using FCKeditor']='FCKeditor¤òÍøÍѤ·¤¿¡¢WYSIWYG¥¿¥¤¥×¤ÎHTML¥¨¥Ç¥£¥¿¡¼';
+$this->langArray['Width']='ɽ¼¨¤¹¤ëÉý';
+$this->langArray['Height']='ɽ¼¨¤¹¤ë¹â¤µ';
+$this->langArray['Toolbar']='»ÈÍѤ¹¤ë¥Ä¡¼¥ë¥Ð¡¼';
+$this->langArray['Custom Toolbar']='¥«¥¹¥¿¥à¥Ä¡¼¥ë¥Ð¡¼';
+$this->langArray['Add new toolbar to the menu / Delete toolbar from the menu']='¥Ä¡¼¥ë¥Ð¡¼¤ò¥á¥Ë¥å¡¼¤ËÄɲà / ¤â¤·¤¯¤Ï¡¢¥á¥Ë¥å¡¼¤«¤éºï½ü';
+$this->langArray['"<br />" => "<br />\n" conversion?']='"<br />" ¤ò "<br />\n" ¤ËÊÑ´¹¤·¤Þ¤¹¤«?';
+$this->langArray['"<br /><br />" => "<br />\n<br />\n" conversion?']='"<br /><br />"¤ò "<br />\n<br />\n" ¤ËÊÑ´¹¤·¤Þ¤¹¤«?';
+$this->langArray['Width of Popup dialog']='¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤ÎÉý';
+$this->langArray['Height of Popup dialog']='¥Ý¥Ã¥×¥¢¥Ã¥×¥¦¥£¥ó¥É¥¦¤Î¹â¤µ';
+$this->langArray['Protected Sources']='Êݸ¤ë¥½¡¼¥¹¥³¡¼¥É';
+$this->langArray['Additional Protected Sources']='Êݸ¤ë¥½¡¼¥¹¥³¡¼¥É(ÄɲÃʬ)';
+$this->langArray['Use member-specific settings?']='¥á¥ó¥Ð¡¼¤´¤È¤ÎÀßÄê¤òÍѤ¤¤Þ¤¹¤«?';
+$this->langArray['New Item with WYSIWYG']='WYSIWYG ¤Ç¿·¤·¤¤µ»ö';
+$this->langArray['Edit Item with WYSIWYG']='WYSIWYG ¤ÇÊÔ½¸';
+$this->langArray['WYSIWYG:body']='WYSIWYG:ËÜʸ';
+$this->langArray['WYSIWYG:more']='WYSIWYG:³¤';
+$this->langArray['Toolbar definition is empty']='¥Ä¡¼¥ë¥Ð¡¼ÀßÄ꤬¶õÇò¤Ç¤¹';
+$this->langArray['Default, Full, Basic and Custom toolbars cannot be removed.']='Default, Full, Basic µÚ¤Ó Custom ¥Ä¡¼¥ë¥Ð¡¼¤Ïºï½ü¤Ç¤¤Þ¤»¤ó';
+$this->langArray[' Toolbar']=' ¥Ä¡¼¥ë¥Ð¡¼';
+$this->langArray[' toolbar is added.']=' ¥Ä¡¼¥ë¥Ð¡¼¤òÄɲä·¤Þ¤·¤¿';
+$this->langArray[' toolbar is deleted.']=' ¥Ä¡¼¥ë¥Ð¡¼¤òºï½ü¤·¤Þ¤·¤¿';
+$this->langArray['Use Image-Manager plugin instead of media.php?']='media.php ¤ÎÂå¤ï¤ê¤Ë Image-Manager ¥×¥é¥°¥¤¥ó¤òÍѤ¤¤Þ¤¹¤«¡©';
+$this->langArray['Use secure server (https) for edititing item?']='ÊÔ½¸¤Ë¡¢¥»¥¥å¥¢¥µ¡¼¥Ð(https)¤òÍѤ¤¤Þ¤¹¤«?';
+?>
\ No newline at end of file
--- /dev/null
+<?php
+$this->langArray['WYSIWYG HTML editor plagin using FCKeditor']='FCKeditorを利用した、WYSIWYGタイプのHTMLエディター';
+$this->langArray['Width']='表示する幅';
+$this->langArray['Height']='表示する高さ';
+$this->langArray['Toolbar']='使用するツールバー';
+$this->langArray['Custom Toolbar']='カスタムツールバー';
+$this->langArray['Add new toolbar to the menu / Delete toolbar from the menu']='ツールバーをメニューに追加 / もしくは、メニューから削除';
+$this->langArray['"<br />" => "<br />\n" conversion?']='"<br />" を "<br />\n" に変換しますか?';
+$this->langArray['"<br /><br />" => "<br />\n<br />\n" conversion?']='"<br /><br />"を "<br />\n<br />\n" に変換しますか?';
+$this->langArray['Width of Popup dialog']='ポップアップウィンドウの幅';
+$this->langArray['Height of Popup dialog']='ポップアップウィンドウの高さ';
+$this->langArray['Protected Sources']='保護するソースコード';
+$this->langArray['Additional Protected Sources']='保護するソースコード(追加分)';
+$this->langArray['Use member-specific settings?']='メンバーごとの設定を用いますか?';
+$this->langArray['New Item with WYSIWYG']='WYSIWYG で新しい記事';
+$this->langArray['Edit Item with WYSIWYG']='WYSIWYG で編集';
+$this->langArray['WYSIWYG:body']='WYSIWYG:本文';
+$this->langArray['WYSIWYG:more']='WYSIWYG:続き';
+$this->langArray['Toolbar definition is empty']='ツールバー設定が空白です';
+$this->langArray['Default, Full, Basic and Custom toolbars cannot be removed.']='Default, Full, Basic 及び Custom ツールバーは削除できません';
+$this->langArray[' Toolbar']=' ツールバー';
+$this->langArray[' toolbar is added.']=' ツールバーを追加しました';
+$this->langArray[' toolbar is deleted.']=' ツールバーを削除しました';
+$this->langArray['Use Image-Manager plugin instead of media.php?']='media.php の代わりに Image-Manager プラグインを用いますか?';
+$this->langArray['Use secure server (https) for edititing item?']='編集に、セキュアサーバ(https)を用いますか?';
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+ * NP_MitasNom
+ * Written by Katsumi
+ * This library is GPL
+ */
+ $strRel = '../../../';
+ require($strRel . 'config.php');
+
+ // create the admin area page
+ if (!$member->isLoggedIn()) exit;
+ include($DIR_LIBS . 'PLUGINADMIN.php');
+ $oPluginAdmin = new PluginAdmin('MitasNom');
+ $p=&$oPluginAdmin->plugin;
+
+ if (!class_exists('NucleusFCKeditor')) include (dirname(__FILE__).'/fckclass.php');
+
+ $id=htmlspecialchars(requestVar('id'),ENT_QUOTES);
+ $blogid=(int)requestVar('blogid');
+?><html>
+<head>
+<script type="text/javascript">
+function getId(){
+<?php echo "return '$id';\n"; ?>
+}
+function event_onload(){
+ var id=getId();
+ if (!id) return;
+ document.getElementById('inputbody').value=window.opener.WYSIWYGgettext(id);
+}
+function event_onsubmit(){
+ var id=getId();
+ if (!id) return;
+ window.opener.focus();
+ window.opener.WYSIWYGsettext(id,document.getElementById('inputbody').value);
+ window.close();
+}
+</script>
+<body onload="event_onload();">
+<form method="get" action="javascript:event_onsubmit();">
+<?php
+ $FCKedit=new NucleusFCKEditor('inputbody',$p);
+ $FCKedit->Width='100%';
+ $FCKedit->Height='100%';
+ $FCKedit->Create();
+?>
+</form>
+</body></html>
\ No newline at end of file