Intrerio
+35
Репутация
8
Рейтинг
а неделька прошла месяц назад)))
Начал процесс дружбы этого мессенджера с 1.10.3. Все супер кроме отправки сообщений с мессенджера. Помогите разобраться с кодировкой
Чтоб подружить агент и систему установил на поддомене версию 1.9 и просто вручную заменил настройки к БД. Это так инфо для размышления. Я просто перепробовал уже все что можно но так и не могу додуматься в чем проблема.
Здраствуйте. Словом решил переделать агент для инстанта который разрабатывался для 1.9 версии. Все супер, подружил его с 1.10.3. Проблема в отправке и приеме сообщений. При отправке с мессенджера в базу записываются пустые сообщения. При отправке с сайта мессенджер выдает пустую строку (но с указанием отправителя). Пользователей показует в нормальном режиме. Я понимаю что проблема в кодировке но не могу понять где именно. Вот два файла которые используються самим мессенджером. Думаю копать надо в них
<? /******************************************************************************/ // ICM v 2.0 for InstantCMS 1.7 // // 2011 FREEWARE // // gener@i.ua // // // // // /******************************************************************************/ //header('Content-Type: text/html;charset=windows-1251'); include('core/cms.php'); include('components/users/includes/usercore.php'); $inCore = cmsCore::getInstance(); $inCore->loadClass('user'); $inDB= cmsDatabase::getInstance(); $inUser= cmsUser::getInstance(); $inUser->update(); $inCore->onlineStats(); $user_id=$inUser->id; $inCore->loadModel('users'); $dom=new DOMDocument('1.0', 'UTF-8'); function idtonick($uid){ $inDB= cmsDatabase::getInstance(); $sq="SELECT nickname FROM cms_users WHERE id=$uid LIMIT 1"; $result=$inDB->query($sq); if ($inDB->num_rows($result)){ $nick = $inDB->fetch_assoc($result); return $nick['nickname']; } else return ""; } if ($user_id){ if ($inCore->inRequest('cmd')){ $cmd = $inCore->request('cmd', 'str'); if ($cmd=='enter'){ $sq="DELETE FROM cms_imchat_online WHERE user=$user_id"; $inDB->query($sq); $sq="INSERT INTO cms_imchat_online (user) VALUES ($user_id)"; $inDB->query($sq); } if ($cmd=="exit"){ $sq="DELETE FROM cms_imchat_online WHERE user=$user_id"; $inDB->query($sq); } if ($cmd=="refresh"){ if($inCore->inRequest('lmes')){$lastmsg=$inCore->request('lmes','int');} $sq="SELECT * FROM cms_imchat where id>$lastmsg ORDER BY id"; $result=$inDB->query($sq); $root=$dom->createElement('response'); if ($inDB->num_rows($result)){ while($nmes = $inDB->fetch_assoc($result)){ if($nmes['to']<>$user_id && $nmes['privat']==1&& $nmes['from']<>$user_id){} else{ $name=$dom->createElement('name'); $root->appendChild($name); $nsender=idtonick($nmes['from']); $nto=idtonick($nmes['to']); $name->appendChild($dom->createElement('time',$nmes['time'])); $name->appendChild($dom->createElement('privat',$nmes['privat'])); $name->appendChild($dom->createElement('lastmsg',$nmes['id'])); } } } $dom->appendChild($root); echo $dom->saveXML(); } if ($cmd=='say'){ $to=$inCore->request('to','int'); $msg=$inCore->request('msg','str'); $prv=$inCore->request('prv','int'); if($to>=0){ $sq="INSERT INTO cms_imchat (`from`,`to`,`time`,msg,privat) VALUES ($user_id,$to,'{$time}','{$msg}',$prv)"; $inDB->query($sq); $lastid=$inDB->get_last_id('cms_imchat'); $sq="DELETE FROM cms_imchat WHERE id <$lastid-20"; $inDB->query($sq); } } if ($cmd=='online'){ $sq="SELECT user from cms_imchat_online"; $result=$inDB->query($sq); $root=$dom->createElement('response'); if ($inDB->num_rows($result)){ while($rec = $inDB->fetch_assoc($result)){ $name=$dom->createElement('name'); $root->appendChild($name); $nick=idtonick($rec['user']); $name->appendChild($dom->createElement('id',$rec['user'])); } } $dom->appendChild($root); echo $dom->saveXML(); } } } ?>
<? /******************************************************************************/ // ICM v 2.0 for InstantCMS 1.7 // // 2011 FREEWARE // // gener@i.ua // // // // // /******************************************************************************/ //header('Content-Type: text/html;charset=windows-1251');
Не поленился и поставил на поддомен версию 1.10.1. Теперь процесс зависает на авторизации. Словом вбиваешь логин и пароль нажимаешь вход и все ждем… час ждем… два ждем… Я уже проверил нетфреймворк так у меня версия 3.4 версию 2.0 ставить не дает
Ребята, не могу понять в чем проблема. Установил все как "книга пишет". настроил. Авторизация проходит а вот дальше ошибка — "Произошла ошибка, при извлечении класса сообщений!". Версия 1.10.3
На сколько я знаю то такого еще в полной сборке нет, но версия 1.10.3 уже подразумевает мультиязычность интерфейса, а некоторые платные плагины позволяют переводить статьи, блоги и т.д.
Нашол ошибку с отступом.
Этот скрипт для того чтоб менялся фон, так вот его надо вставить в другое место.
<img src="" alt="background" id="bg" style="display:none" />
<script type="text/javascript" class="noprint">
var aImages = new Array();
var aURL = new Array();
var aArtists = new Array();
var iPrev = -1;
var iRnd = -1;
aImages[0] = "templates/_default_/images/bg/bg.jpg";
aImages[1] = "templates/_default_/images/bg/bg1.jpg";
aImages[2] = "templates/_default_/images/bg/bg2.jpg";
aImages[3] = "templates/_default_/images/bg/bg3.jpg";
$(document).ready(function() {
$("img#bg").load(function()
{
$("img#bg").fadeTo(2000,1);
setTimeout(function()
{
$("#image_description").animate({right: '-=150'}, 1000);
$("img#bg").fadeOut(2000);
setTimeout(LoadImages,2500);
}
,30000);
}
)
setTimeout(LoadImages,1000);
});
function LoadImage(iNr)
{
$("img#bg").attr("src", aImages[iNr]);
};
function LoadImages()
{
/* Select a random image number and make sure this is not equal to the previous image */
while(iPrev == iRnd)
{
iRnd = Math.floor(Math.random()*aImages.length);
}
/* Show the selected image */
LoadImage(iRnd);
iPrev = iRnd;
};
</script>
<script type="text/javascript" class="noprint">
var aImages = new Array();
var aURL = new Array();
var aArtists = new Array();
var iPrev = -1;
var iRnd = -1;
aImages[0] = "templates/_default_/images/bg/bg.jpg";
aImages[1] = "templates/_default_/images/bg/bg1.jpg";
aImages[2] = "templates/_default_/images/bg/bg2.jpg";
aImages[3] = "templates/_default_/images/bg/bg3.jpg";
$(document).ready(function() {
$("img#bg").load(function()
{
$("img#bg").fadeTo(2000,1);
setTimeout(function()
{
$("#image_description").animate({right: '-=150'}, 1000);
$("img#bg").fadeOut(2000);
setTimeout(LoadImages,2500);
}
,30000);
}
)
setTimeout(LoadImages,1000);
});
function LoadImage(iNr)
{
$("img#bg").attr("src", aImages[iNr]);
};
function LoadImages()
{
/* Select a random image number and make sure this is not equal to the previous image */
while(iPrev == iRnd)
{
iRnd = Math.floor(Math.random()*aImages.length);
}
/* Show the selected image */
LoadImage(iRnd);
iPrev = iRnd;
};
</script>
Словом перепробовал все что только можно, вручную поменял все до исходного вида но ошибка не пропала. Наиболее простой вариант для меня оказался просто заменить стандартным темплейтом. Какие идеи по поводу ошибок с пхп?
Дорогие друзья, ошибка отступа действительно в файле template.php. Сейчас буду копать но если кто знает где именно может быть то жду комментариев. Кстати по поводу ошибок php то буду рад услышать варианты исправления
Не смог найти такой строчки. Но вот думаю что проблема в другом. Нужен совет. Словом в какой то момент установок плагинов и дополнений у меня именно в этом пробеле начала отображаться вот такая ошибка:
Strict Standards: Declaration of p_copy_link::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_copy_link/plugin.php on line 79
В профиле пользователей вот это:
Strict Standards: Declaration of p_profile_bar::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_profile_bar/plugin.php on line 74
Strict Standards: Declaration of p_udacha::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_udacha/plugin.php on line 161
Strict Standards: Declaration of p_podmig::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_podmig/plugin.php on line 108
Strict Standards: Declaration of p_link2video::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_link2video/plugin.php on line 47
Strict Standards: Declaration of p_hidelinks::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_hidelinks/plugin.php on line 60
Strict Standards: Declaration of p_user_comments::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_user_comments/plugin.php on line 78
Strict Standards: Declaration of p_guests::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_guests/plugin.php on line 115
Strict Standards: Declaration of p_maps_obj::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_obj/plugin.php on line 110
Strict Standards: Declaration of p_maps_places::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_places/plugin.php on line 111
Strict Standards: Declaration of p_maps_news::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_news/plugin.php on line 97
Strict Standards: Declaration of p_uc::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_uc/plugin.php on line 125
Увидел проблему только когда включил отображение ошибок в пхп. Может я ошибаюсь и эти ошибки вообще не имеют отношения друг к другу и скорее всего что не имеют потому что только что посмотрел с ошибкой и верхний отступ еще увеличился. Сейчас буду копать в самом файле шаблона, а еще лутше просто заменю его на стандартный и отпишусь что к чему
Strict Standards: Declaration of p_copy_link::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_copy_link/plugin.php on line 79
В профиле пользователей вот это:
Strict Standards: Declaration of p_profile_bar::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_profile_bar/plugin.php on line 74
Strict Standards: Declaration of p_udacha::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_udacha/plugin.php on line 161
Strict Standards: Declaration of p_podmig::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_podmig/plugin.php on line 108
Strict Standards: Declaration of p_link2video::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_link2video/plugin.php on line 47
Strict Standards: Declaration of p_hidelinks::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_hidelinks/plugin.php on line 60
Strict Standards: Declaration of p_user_comments::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_user_comments/plugin.php on line 78
Strict Standards: Declaration of p_guests::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_guests/plugin.php on line 115
Strict Standards: Declaration of p_maps_obj::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_obj/plugin.php on line 110
Strict Standards: Declaration of p_maps_places::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_places/plugin.php on line 111
Strict Standards: Declaration of p_maps_news::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_maps_news/plugin.php on line 97
Strict Standards: Declaration of p_uc::execute() should be compatible with cmsPlugin::execute($event = '', $item = Array) in /var/www/cityua/data/www/open-lviv.com/plugins/p_uc/plugin.php on line 125
Увидел проблему только когда включил отображение ошибок в пхп. Может я ошибаюсь и эти ошибки вообще не имеют отношения друг к другу и скорее всего что не имеют потому что только что посмотрел с ошибкой и верхний отступ еще увеличился. Сейчас буду копать в самом файле шаблона, а еще лутше просто заменю его на стандартный и отпишусь что к чему
Еще маленькая правка для стилей фотоальбомов:
А ранее было так:
И вот ранее было неправильное отображение альбомов
.photo_album_tumb{
height:auto !important;
float:left;
position:relative;
width:200px;
margin-right:15px;
margin-bottom:15px;
border:solid 1px #C3D6DF;
padding:15px;
border-radius:8px;
-moz-border-radius:8px;
}
height:auto !important;
float:left;
position:relative;
width:200px;
margin-right:15px;
margin-bottom:15px;
border:solid 1px #C3D6DF;
padding:15px;
border-radius:8px;
-moz-border-radius:8px;
}
.photo_album_tumb{
height:100%;
float:left;
position:relative;
width:200px;
margin-right:15px;
margin-bottom:15px;
border:solid 1px #C3D6DF;
padding:15px;
border-radius:8px;
-moz-border-radius:8px;
}
height:100%;
float:left;
position:relative;
width:200px;
margin-right:15px;
margin-bottom:15px;
border:solid 1px #C3D6DF;
padding:15px;
border-radius:8px;
-moz-border-radius:8px;
}
Нет я о другом разрыве.Ничего не понимаю. Просмотрел через мозилу и все нормально отображается, а вот когда смотрю через хром то вот в чем проблема

Одну проблему с альбомами исправил. Поменял в стилях .photo_album_tumb{
height:100% на 170рх
но почему так случилось всеровно не пойму. Так же остаеться второй вопрос в силе
height:100% на 170рх
но почему так случилось всеровно не пойму. Так же остаеться второй вопрос в силе
Здраствуйте. Не могу понять почему ни с того ни с сего начали вот так отображаться альбомы ссылка.Ребята помогите. Думаю что это из-за какого то обновления. И еще одно. Когда будете на сайте гляньте на пустое место в самом верху странички выше меню пользователя. Не могу никак убрать зазор. Тоже буду рад помоще