При просмотре мобильной версии сайта, после обновления списка сообщений, модуль iChat неверно определяет текущую папку шаблона.
Версия скрипта 10 (возможно и более ранние версии)
Версия модуля: ... v 7.0
Открыть файл:
/engine/modules/iChat/ajax/refresh.php
найти:
if( $config["lang_" . $config['skin']] ) {
добавить выше :
// определение мобильного шаблона
$smartphone_detected = false;
if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobiledisable" ) $_SESSION['mobile_disable'] = 1;
if( isset( $_REQUEST['action'] ) and $_REQUEST['action'] == "mobile" ) { $_SESSION['mobile_enable'] = 1; $_SESSION['mobile_disable'] = 0;}
if( !isset( $_SESSION['mobile_disable'] ) ) $_SESSION['mobile_disable'] = 0;
if( !isset( $_SESSION['mobile_enable'] ) ) $_SESSION['mobile_enable'] = 0;
if ( $config['allow_smartphone'] AND !$_SESSION['mobile_disable']) {
if ( check_smartphone() ) {
if ( @is_dir ( ROOT_DIR . '/templates/smartphone' ) ) {
$config['skin'] = "smartphone";
$smartphone_detected = true;
$config['allow_comments_wysiwyg'] = 0;
}
}
}
//
*код выдран из init.php DLE