Опубликовано: 18 января 201114 г Приветствую!Не работают bb-коды (url,img,email и подобные). Не кликаются то есть. Думаю, и так известно о этой проблеме уже достаточно.Перезаливал /forum/jscripts/ips_text_editor_lite.js - не помогло. Перезаливал папку javascript - не помогло.Не работают ни в каком из стилей. Ни в русской ни в английской версии.Ссылка на форум: http://ofmanager.eu/forum Забыл добавить: они никогда не работали, как сделали форум. Ошибка: ipb_global_lang is not definedfunction ins(name){my_show_div(my_getbyid('qr_open'));if(document.REPLIER.Post){var input=document.REPLIER.Post;input.value=input.value+"[b]"+name+"[/b]"+", ";input.focus();}}</script> <script type="text/javascript" style="display:none">var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}this.text_obj.onfocus=ips_editor_events.prototype.editor_window_onfocus;this.text_obj.onblur=ips_editor_events.prototype.editor_window_onblur;if(this.editor_document.addEventListener){this.editor_document.addEventListener('keypress',ips_editor_events.prototype.editor_document_onkeypress,false);}};this.editor_check_focus=function(){if(!this.text_obj.has_focus){if(this.is_opera){this.text_obj.focus();}try{this.text_obj.focus();}catch(err){return false;}}return true;};this.init_editor_button=function(obj){obj.cmd=obj.id.replace(new RegExp('^'+this.editor_id+'_cmd_(.+?)$'),'$1');obj.editor_id=this.editor_id;this.buttons[obj.cmd]=obj;obj.state=false;obj.mode='normal';obj.real_type='button';obj.onclick=ips_editor_events.prototype.button_onmouse_event;obj.onmousedown=ips_editor_events.prototype.button_onmouse_event;obj.onmouseover=ips_editor_events.prototype.button_onmouse_event;obj.onmouseout=ips_editor_events.prototype.button_onmouse_event;};this.set_button_context=function(obj,state,type){if(typeof type=='undefined'){type='button';}switch(obj.state){case true:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,'button','selected');break;}case 'mouseover':case 'mousedown':case 'mouseup':{this.editor_set_ctl_style(obj,type,'down');break;}}break;}default:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,type,'normal');break;}case 'mousedown':{this.editor_set_ctl_style(obj,type,'down');break;}case 'mouseover':case 'mouseup':{this.editor_set_ctl_style(obj,type,'hover');break;}}break;}}};this.editor_set_ctl_style=function(obj,type,mode){if(obj.mode!=mode){var extra='';if(type=='menu'){extra='-menu';}else if(type=='menubutton'){extra='-menubutton';}extra+=obj.colorname?'-color':'';extra+=obj.emo_id?'-emo':'';obj.mode=mode;try{switch(mode){case "normal":{obj.className='rte-normal'+extra;}break;case "hover":{obj.className='rte-hover'+extra;}break;case "selected":case "down":{obj.className='rte-selected'+extra;}break;}}catch(e){}}};this.format_text=function(e,command,arg){e=ipsclass.cancel_bubble(e,true);if(command.match( /resize_/)){this.resize_editorbox(command.replace( /.+?resize_(up|down)/,"$1"));}if(command.match( /emoticon/)){this.show_all_emoticons();}this.editor_check_focus();if(this[command]){var return_val=this[command](e);}else{try{var return_val=this.apply_formatting(command,false,(typeof arg=='undefined'?true:arg));}catch(e){var return_val=false;}}this.editor_check_focus();return return_val;};this.createlink=function(){var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}var _text=this.get_selection();_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);};this.insertimage=function(){var _text=this.get_selection();var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}this.wrap_tags('img',false,_url);};this.ipb_quote=function(){var _text=this.get_selection();this.wrap_tags('quote',false,_text);};this.ipb_code=function(){var _text=this.get_selection();this.wrap_tags('code',false,_text);};this.apply_formatting=function(cmd,dialog,argument){switch(cmd){case 'bold':case 'italic':case 'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}case 'justifyleft':case 'justifycenter':case 'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}case 'indent':{this.wrap_tags(cmd,false);return;}case 'createlink':{var sel=this.get_selection();if(sel){this.wrap_tags('url',argument);}else{this.wrap_tags('url',argument,argument);}return;}case 'fontname':{this.wrap_tags('font',argument);return;}case 'fontsize':{this.wrap_tags('size',argument);return;}case 'forecolor':{this.wrap_tags('color',argument);return;}case 'backcolor':{this.wrap_tags('background',argument);return;}case 'insertimage':{this.wrap_tags('img',false,argument);return;}case 'strikethrough':{this.wrap_tags('strike',false);return;}case 'superscript':{this.wrap_tags('sup',false);return;}case 'subscript':{this.wrap_tags('sub',false);return;}case 'removeformat':return;}};this.wrap_tags=function(tag_name,has_option,selected_text){var tag_close=tag_name;if(typeof selected_text=='undefined'){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);}if(has_option===true){var option=prompt(ips_language_array['js_rte_optionals']?ips_language_array['js_rte_optionals']:"Enter the optional arguments for this tag",'');if(option){var opentag=this.open_brace+tag_name+'="'+option+'"'+this.close_brace;}else{return false;}}else if(has_option!==false){var opentag=this.open_brace+tag_name+'="'+has_option+'"'+this.close_brace;}else{var opentag=this.open_brace+tag_name+this.close_brace;}var closetag=this.open_brace+'/'+tag_close+this.close_brace;var text=opentag+selected_text+closetag;this.insert_text(text);return false;};this.wrap_tags_lite=function(start_text,close_text){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);this.insert_text(start_text+selected_text+close_text);return false;};this.editor_get_contents=function(){return this.editor_document.value;};this.get_selection=function(){if(typeof(this.editor_document.selectionStart)!='undefined'){return this.editor_document.value.substr(this.editor_document.selectionStart,this.editor_document.selectionEnd-this.editor_document.selectionStart);}else if((document.selection&&document.selection.createRange)||this._ie_cache){return this._ie_cache?this._ie_cache.text:document.selection.createRange().text;}else if(window.getSelection){return window.getSelection()+'';}else{return false;}};this.insert_text=function(text){if(this.editor_check_focus()==false){return false;}if(typeof(this.editor_document.selectionStart)!='undefined'){var open=this.editor_document.selectionStart+0;var st=this.editor_document.scrollTop;this.editor_document.value=this.editor_document.value.substr(0,this.editor_document.selectionStart)+text+this.editor_document.value.substr(this.editor_document.selectionEnd);if(!text.match(new RegExp("\\" + this.open_brace + "(\\S+?)" + "\\" + this.close_brace + "\\" + this.open_brace + "/(\\S+?)" + "\\" + this.close_brace ) ) ) Изменено 18 января 201114 г пользователем JAKOV
Опубликовано: 18 января 201114 г Там же написаноipb_global_lang не определенаПроверьте языковые файлы в cache/lang_cache/ru
Опубликовано: 20 января 201114 г Автор Там же написаноipb_global_lang не определенаПроверьте языковые файлы в cache/lang_cache/ruЧто именно проверять? На месте. Обновлял дважды их. Не помогло.
Опубликовано: 21 января 201114 г Перезалейте из дистрибутива указанный файл. Возможно, там что-то побилось или не хватает чего-то.Или дождитесь ответа программистов, которые еще помнят 2.x
Опубликовано: 21 января 201114 г Там с правами/доступом не все в порядке, при запросе файла отдает код 403. Поставьте права на чтение.
Опубликовано: 22 января 201114 г Автор Там с правами/доступом не все в порядке, при запросе файла отдает код 403. Поставьте права на чтение.Всей папке? cache/lang_cache/ru ?
Опубликовано: 23 января 201114 г Без разницы, главное чтобы lang_javascript.js (кстати, из обеих лэнг папок) был доступен для чтения.
Опубликовано: 24 января 201114 г Автор Без разницы, главное чтобы lang_javascript.js (кстати, из обеих лэнг папок) был доступен для чтения.Папка 755, а файлы все 644, так что тут не в чтении дело, может там надо на запись или исполнение поставить?
Опубликовано: 24 января 201114 г Папка 755, а файлы все 644, так что тут не в чтении дело, может там надо на запись или исполнение поставить?Хз что там надо ставить, но js должен быть доступен из адресной строки, чтобы браузер мог его прочитать. Сейчас при его запросе выводится сообщение - доступ запрещен.
Опубликовано: 25 января 201114 г скорее всего поставить доступ на исполнение. А вообще все эти настройки зависит от настроек Apache
Опубликовано: 26 января 201114 г Автор Они не зависят от апаче, а зависят от прав доступа, я поставил сейчас на весь путь до файла и сам файл права доступа 777, это значит полный доступ, и он всё равно недоступен этот файл. Так что тут в другом дело.
Опубликовано: 27 января 201114 г Они не зависят от апаче, а зависят от прав доступа Права доступа зависит от Apache. Как он работает и от какого владельца. я поставил сейчас на весь путь до файла и сам файл права доступа 777, это значит полный доступ, и он всё равно недоступен этот файл. Так что тут в другом дело.Файл есть? Права на папку где он лежит, достаточные, что бы иметь к нему доступ? Файл не битый?
Опубликовано: 31 января 201114 г Автор Файл есть? Права на папку где он лежит, достаточные, что бы иметь к нему доступ? Файл не битый?фаил есть и права также выставлены. Изменено 15 февраля 201114 г пользователем Fisana Нижний пост с 'ап' удалила.
Опубликовано: 15 февраля 201114 г А чего вы апаете-то? Пока по этой ссылке: http://ofmanager.eu/forum/cache/lang_cache/ru/lang_javascript.js - не появится файл, а не ошибка 403 - ничего и не заработает. Это не баг движка и не ошибка в коде - это вопрос администрирования сервера. Смотрите логи, смотрите права, читайте документацию к движку и настраивайте все. В доке, кстати, явно указано, что на всю директорию cache со всем содержимым нужны права 777. Кстати, если вам это поможет - все файлы в папке cache, включая и этот, создаются движком в процессе работы. Возможно, у вас некорректно сконфигурирован пользователь, от которого работает PHP, и, как следствие, apache не имеет доступа к файлам. Плюс проверьте инструкции .htaccess - может быть кто-то шибко умный прописал запрет на этот каталог. Разбирайтесь с проблемой, а не апайте топик. Никто из здесь присутствующих, кроме вас, ваш сервер не настраивал и полной картины не имеет :)
Опубликовано: 5 марта 201114 г Благодарю! Сделали!Как именно сделали? У меня аналогичная проблема. Несколько дней назад в окне сообщения перестали работать кнопки "Вставить гиперссылку", "Вставить изображение", "Вставить адрес электронной почты". Могли бы вы написать пошаговую инструкцию?
Приветствую!
Не работают bb-коды (url,img,email и подобные). Не кликаются то есть. Думаю, и так известно о этой проблеме уже достаточно.
Перезаливал /forum/jscripts/ips_text_editor_lite.js - не помогло. Перезаливал папку javascript - не помогло.
Не работают ни в каком из стилей. Ни в русской ни в английской версии.
Ссылка на форум: http://ofmanager.eu/forum
Забыл добавить: они никогда не работали, как сделали форум.
Ошибка: ipb_global_lang is not defined
function ins(name){my_show_div(my_getbyid('qr_open'));if(document.REPLIER.Post){var input=document.REPLIER.Post;input.value=input.value+"[b]"+name+"[/b]"+", ";input.focus();}}</script> <script type="text/javascript" style="display:none">var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}this.text_obj.onfocus=ips_editor_events.prototype.editor_window_onfocus;this.text_obj.onblur=ips_editor_events.prototype.editor_window_onblur;if(this.editor_document.addEventListener){this.editor_document.addEventListener('keypress',ips_editor_events.prototype.editor_document_onkeypress,false);}};this.editor_check_focus=function(){if(!this.text_obj.has_focus){if(this.is_opera){this.text_obj.focus();}try{this.text_obj.focus();}catch(err){return false;}}return true;};this.init_editor_button=function(obj){obj.cmd=obj.id.replace(new RegExp('^'+this.editor_id+'_cmd_(.+?)$'),'$1');obj.editor_id=this.editor_id;this.buttons[obj.cmd]=obj;obj.state=false;obj.mode='normal';obj.real_type='button';obj.onclick=ips_editor_events.prototype.button_onmouse_event;obj.onmousedown=ips_editor_events.prototype.button_onmouse_event;obj.onmouseover=ips_editor_events.prototype.button_onmouse_event;obj.onmouseout=ips_editor_events.prototype.button_onmouse_event;};this.set_button_context=function(obj,state,type){if(typeof type=='undefined'){type='button';}switch(obj.state){case true:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,'button','selected');break;}case 'mouseover':case 'mousedown':case 'mouseup':{this.editor_set_ctl_style(obj,type,'down');break;}}break;}default:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,type,'normal');break;}case 'mousedown':{this.editor_set_ctl_style(obj,type,'down');break;}case 'mouseover':case 'mouseup':{this.editor_set_ctl_style(obj,type,'hover');break;}}break;}}};this.editor_set_ctl_style=function(obj,type,mode){if(obj.mode!=mode){var extra='';if(type=='menu'){extra='-menu';}else if(type=='menubutton'){extra='-menubutton';}extra+=obj.colorname?'-color':'';extra+=obj.emo_id?'-emo':'';obj.mode=mode;try{switch(mode){case "normal":{obj.className='rte-normal'+extra;}break;case "hover":{obj.className='rte-hover'+extra;}break;case "selected":case "down":{obj.className='rte-selected'+extra;}break;}}catch(e){}}};this.format_text=function(e,command,arg){e=ipsclass.cancel_bubble(e,true);if(command.match( /resize_/)){this.resize_editorbox(command.replace( /.+?resize_(up|down)/,"$1"));}if(command.match( /emoticon/)){this.show_all_emoticons();}this.editor_check_focus();if(this[command]){var return_val=this[command](e);}else{try{var return_val=this.apply_formatting(command,false,(typeof arg=='undefined'?true:arg));}catch(e){var return_val=false;}}this.editor_check_focus();return return_val;};this.createlink=function(){var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}var _text=this.get_selection();_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);};this.insertimage=function(){var _text=this.get_selection();var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}this.wrap_tags('img',false,_url);};this.ipb_quote=function(){var _text=this.get_selection();this.wrap_tags('quote',false,_text);};this.ipb_code=function(){var _text=this.get_selection();this.wrap_tags('code',false,_text);};this.apply_formatting=function(cmd,dialog,argument){switch(cmd){case 'bold':case 'italic':case 'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}case 'justifyleft':case 'justifycenter':case 'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}case 'indent':{this.wrap_tags(cmd,false);return;}case 'createlink':{var sel=this.get_selection();if(sel){this.wrap_tags('url',argument);}else{this.wrap_tags('url',argument,argument);}return;}case 'fontname':{this.wrap_tags('font',argument);return;}case 'fontsize':{this.wrap_tags('size',argument);return;}case 'forecolor':{this.wrap_tags('color',argument);return;}case 'backcolor':{this.wrap_tags('background',argument);return;}case 'insertimage':{this.wrap_tags('img',false,argument);return;}case 'strikethrough':{this.wrap_tags('strike',false);return;}case 'superscript':{this.wrap_tags('sup',false);return;}case 'subscript':{this.wrap_tags('sub',false);return;}case 'removeformat':return;}};this.wrap_tags=function(tag_name,has_option,selected_text){var tag_close=tag_name;if(typeof selected_text=='undefined'){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);}if(has_option===true){var option=prompt(ips_language_array['js_rte_optionals']?ips_language_array['js_rte_optionals']:"Enter the optional arguments for this tag",'');if(option){var opentag=this.open_brace+tag_name+'="'+option+'"'+this.close_brace;}else{return false;}}else if(has_option!==false){var opentag=this.open_brace+tag_name+'="'+has_option+'"'+this.close_brace;}else{var opentag=this.open_brace+tag_name+this.close_brace;}var closetag=this.open_brace+'/'+tag_close+this.close_brace;var text=opentag+selected_text+closetag;this.insert_text(text);return false;};this.wrap_tags_lite=function(start_text,close_text){selected_text=this.get_selection();selected_text=(selected_text===false)?'':new String(selected_text);this.insert_text(start_text+selected_text+close_text);return false;};this.editor_get_contents=function(){return this.editor_document.value;};this.get_selection=function(){if(typeof(this.editor_document.selectionStart)!='undefined'){return this.editor_document.value.substr(this.editor_document.selectionStart,this.editor_document.selectionEnd-this.editor_document.selectionStart);}else if((document.selection&&document.selection.createRange)||this._ie_cache){return this._ie_cache?this._ie_cache.text:document.selection.createRange().text;}else if(window.getSelection){return window.getSelection()+'';}else{return false;}};this.insert_text=function(text){if(this.editor_check_focus()==false){return false;}if(typeof(this.editor_document.selectionStart)!='undefined'){var open=this.editor_document.selectionStart+0;var st=this.editor_document.scrollTop;this.editor_document.value=this.editor_document.value.substr(0,this.editor_document.selectionStart)+text+this.editor_document.value.substr(this.editor_document.selectionEnd);if(!text.match(new RegExp("\\" + this.open_brace + "(\\S+?)" + "\\" + this.close_brace + "\\" + this.open_brace + "/(\\S+?)" + "\\" + this.close_brace ) ) )Изменено пользователем JAKOV