/** * @todo ai caramba, tinymce * @param string * @param bool * @param string * @param string * @global array * @global array * @return string **/ function editorTools($content = '', $advanced = false, $additional = '', $process = '') { global $go, $default; $OBJ =& get_instance(); if ($OBJ->access->prefs['writing'] !== 1) { $s = "<div class='col' style='margin-top:18px;'>\n"; $s .= href("<img src='asset/img/bold.gif' alt'[]' id='ed_bold' />", '#', "title='" . $OBJ->lang->word('bold') . "' class='btn btn-off' onmouseover=\"this.className='btn btn-over'\" onmouseout=\"this.className='btn btn-off'\" onClick=\"edInsertTag(edCanvas, 0);return false;\" width='20'"); $s .= href("<img src='asset/img/italic.gif' alt'[]' id='ed_italic' />", '#', "title='" . $OBJ->lang->word('italic') . "' class='btn btn-off' onmouseover=\"this.className='btn btn-over'\" onmouseout=\"this.className='btn btn-off'\" onClick=\"edInsertTag(edCanvas, 1);return false;\""); $s .= href("<img src='asset/img/under.gif' alt'[]' id='ed_under' />", '#', "title='" . $OBJ->lang->word('underline') . "' class='btn btn-off' onmouseover=\"this.className='btn btn-over'\" onmouseout=\"this.className='btn btn-off'\" onClick=\"edInsertTag(edCanvas, 3);return false;\""); $s .= "<img src=\"asset/img/line_spcr.gif\" border=\"0\">\n"; $s .= href("<img src='asset/img/link.gif' alt'[]' />", '#', "title='" . $OBJ->lang->word('links manager') . "' class='btn btn-off' onmouseover=\"this.className='btn btn-over'\" onmouseout=\"this.className='btn btn-off'\" onClick=\"OpenWindow('?a=system&q=links','popup','325','350','yes');return false;\""); if ($advanced == 1) { $s .= href("<img src='asset/img/files.gif' alt'[]' />", '#', "title='" . $OBJ->lang->word('files manager') . "' class='btn btn-off' onmouseover=\"this.className='btn btn-over'\" onmouseout=\"this.className='btn btn-off'\" onClick=\"OpenWindow('?a=system&q=files','popup','700','465','yes');return false;\""); } $s .= "</div>\n"; $s .= "<div class='col txt-right' style='margin-top:18px;'>\n"; $s .= " {$additional}"; $s .= "</div>\n"; $s .= "<div class='cl'><!-- --></div>\n"; $OBJ->template->add_js('alexking.quicktags.js'); $s .= "<textarea name='content' class='content' id='jxcontent' style='width:625px;'>" . stripForForm($content, $process) . "</textarea>\n"; $s .= "<script type='text/javascript'>var edCanvas = document.getElementById('jxcontent');</script>\n"; } else { $OBJ->template->add_extended_js('extend/tiny_mce/tiny_mce.js'); $OBJ->template->add_script = "<script language='javascript' type='text/javascript'>\n <!--\n var action = '{$go['a']}';\n var ide = '{$go['id']}';\n var tinymce = true;\n tinyMCE.init({\n mode : 'textareas',\n theme : 'advanced',\n theme_advanced_toolbar_location : 'top',\n theme_advanced_layout_manager: 'SimpleLayout',\n theme_advanced_toolbar_align : 'left',\n theme_advanced_buttons1 : 'bold, italic, underline, separator, forecolorpicker, backcolorpicker, separator, justifyleft, justifycenter, justifyright, separator, link, unlink, separator, cleanup',\n theme_advanced_buttons2 : '',\n theme_advanced_buttons3 : '',\n force_br_newlines : true,\n convert_fonts_to_spans : true\n });\n //-->\n </script>"; $s = "<div class='col' style='margin-top:18px;'>\n"; $s .= "<div class='some1'><div class='top1'></div></div>\n"; //$s .= " "; $s .= "</div>\n"; $s .= "<div class='col txt-right' style='margin-top:18px;'>\n"; $s .= " {$additional}"; $s .= "</div>\n"; $s .= "<div class='cl'><!-- --></div>\n"; $s .= "<textarea name='content' class='content' style='width:625px;' id='jxcontent'>" . stripForForm($content, $process) . "</textarea>"; } return $s; }
function page_settings() { global $go, $default; $this->template->location = $this->lang->word('settings'); // sub-locations $this->template->sub_location[] = array($this->lang->word('main'), "?a={$go['a']}"); // the record $rs = $this->db->fetchRecord("SELECT *\n FROM " . PX . "objects_prefs\n WHERE obj_ref_type = '" . OBJECT . "'"); $body = $this->error === true ? div($this->error_msg, "id='show-error'") . br() : ''; load_module_helper('files', $go['a']); load_helpers(array('editortools', 'output')); // ++++++++++++++++++++++++++++++++++++++++++++++++++++ $body .= "<div class='bg-grey'>\n"; $body .= "<div class='c3'>\n"; // First column $body .= "<div class='col'>\n"; $body .= ips($this->lang->word('exhibition name'), 'input', 'obj_name', $rs['obj_name'], "maxlength='50'", 'text', $this->lang->word('required'), 'req'); $body .= ips($this->lang->word('advanced mode'), 'getGeneric', 'obj_mode', $rs['obj_mode']); if ($rs['obj_mode'] == 1) { $body .= "<label>" . $this->lang->word('theme') . "</label>\n"; $body .= getThemes(DIRNAME . BASENAME . '/site/', $rs['obj_theme']); $body .= ips($this->lang->word('organize'), 'getOrganize', 'obj_org', $rs['obj_org']); } //$body .= ips($this->lang->word('use editor'), 'getGeneric', 'writing', $rs['writing']); $body .= "</div>\n"; // second column $body .= "<div class='col'>\n"; if ($rs['obj_mode'] == 1) { $body .= label($this->lang->word('pre nav text') . ' ' . span($this->lang->word('html allowed'))); $body .= textarea(stripForForm($rs['obj_itop'], 1), "style='height:99px;'", 'obj_itop'); } $body .= label($this->lang->word('post nav text') . ' ' . span($this->lang->word('html allowed'))); $body .= textarea(stripForForm($rs['obj_ibot'], 1), "style='height:99px;'", 'obj_ibot'); $body .= div(input('upd_settings', 'submit', null, $this->lang->word('update')), "style='text-align: right;'"); $body .= "</div>\n"; if ($rs['obj_mode'] == 1) { // third column $body .= "<div class='col'>\n"; $body .= label($this->lang->word('sections')) . br(); $body .= getSections(); $body .= "</div>\n"; } $body .= "<div class='cl'><!-- --></div>\n"; $body .= "</div>"; $this->template->body = $body; return; }