Опубликовано: 1 марта 201312 г Собственно поставил отображение аватаров пользователей в чате IP.Shoutbox 1.1.3 Всё бы хорошо, но есть одно НО. Если удалить пользователя, и его сообщения находятся в чате, то при обновление чата, он выпадает в ошибку базы данных. Вот код мода: <php>$this->DB->build( array( 'select' => 'avatar_location, avatar_type, pp_thumb_width, pp_thumb_height, pp_thumb_photo', 'from' => 'profile_portal', 'where' => 'pp_member_id='.$d[member_id].'' ) );$this->DB->execute();$memberthing = $this->DB->fetch();</php><if test="$memberthing['pp_thumb_avatar'] == '' && $memberthing['avatar_location'] != '' "><if test="$memberthing['avatar_type'] != 'url'"><img src='<if test="$memberthing['avatar_type'] == 'upload'">/uploads/imperiall/<else />/public/style_avatars/</if>{$memberthing['avatar_location']}' style='max-width:auto;max-height:20px' class='photo'/><else /><img src='{$memberthing['avatar_location']}' style='max-width:auto;max-height:20px' class='photo'/></if><else /><if test="$memberthing['pp_thumb_photo'] == ''"><img src='{$this->settings['img_url']}/profile/default_thumb.png' style='max-width:20px;max-height:20px' class='photo'/><else /><img src='/uploads/imperiall/{$memberthing['pp_thumb_photo']}' style='max-width:auto;max-height:20px' class='photo'/></if></if> А вот проблемный участок: <php>$this->DB->build( array( 'select' => 'avatar_location, avatar_type, pp_thumb_width, pp_thumb_height, pp_thumb_photo', 'from' => 'profile_portal', 'where' => 'pp_member_id='.$d[member_id].'' ) );$this->DB->execute();$memberthing = $this->DB->fetch();</php> Изменено 1 марта 201312 г пользователем Haktar
Опубликовано: 1 марта 201312 г Обратите внимание По указанному вами в профиле "Board url" находится не IP.Board, либо модифицированный пиратский скрипт с удаленными копирайтами. Если вы указали неверный URL, пожауйста, поправьте его, потому что он скорее всего потребуется при диагностике вашей проблемы. Нелицензионные скрипты не приветствуются, т.к. зачастую именно некорректное "нуление" и является причиной проблем в них.
Собственно поставил отображение аватаров пользователей в чате IP.Shoutbox 1.1.3
Всё бы хорошо, но есть одно НО. Если удалить пользователя, и его сообщения находятся в чате, то при обновление чата, он выпадает в ошибку базы данных.
Вот код мода:
<php>$this->DB->build( array( 'select' => 'avatar_location, avatar_type, pp_thumb_width, pp_thumb_height, pp_thumb_photo', 'from' => 'profile_portal', 'where' => 'pp_member_id='.$d[member_id].'' ) );$this->DB->execute();$memberthing = $this->DB->fetch();</php><if test="$memberthing['pp_thumb_avatar'] == '' && $memberthing['avatar_location'] != '' "><if test="$memberthing['avatar_type'] != 'url'"><img src='<if test="$memberthing['avatar_type'] == 'upload'">/uploads/imperiall/<else />/public/style_avatars/</if>{$memberthing['avatar_location']}' style='max-width:auto;max-height:20px' class='photo'/><else /><img src='{$memberthing['avatar_location']}' style='max-width:auto;max-height:20px' class='photo'/></if><else /><if test="$memberthing['pp_thumb_photo'] == ''"><img src='{$this->settings['img_url']}/profile/default_thumb.png' style='max-width:20px;max-height:20px' class='photo'/><else /><img src='/uploads/imperiall/{$memberthing['pp_thumb_photo']}' style='max-width:auto;max-height:20px' class='photo'/></if></if>
А вот проблемный участок:
<php>$this->DB->build( array( 'select' => 'avatar_location, avatar_type, pp_thumb_width, pp_thumb_height, pp_thumb_photo', 'from' => 'profile_portal', 'where' => 'pp_member_id='.$d[member_id].'' ) );$this->DB->execute();$memberthing = $this->DB->fetch();</php>
Изменено пользователем Haktar