Страница 2 из 5

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 02 дек 2012, 17:10
DeaDRoMeO
А вы первое сообщение этой темы внимательно читали ??? Там же есть фикс этой проблемы

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 02 дек 2012, 17:40
maco8024
Я же написал ,что там указаны файлы для правки с версии 1.2.1 , у меня стоит версия 1.3.0.(в этой версии в файле viewforum.php и файле includes/functions_display.php) с первого сообщения нет таких кодов.

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 02 дек 2012, 20:21
DeaDRoMeO
Ды епрст, там всего лишь заменить один блок на другой, как вы думаете как же у меня все это работает ?? Код должен быть на местах, в любом случае

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 02:41
maco8024
Нужно открыть viewforum.php и найти

Код: Выделить всё

$avatar_img = $avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = '';
      
      if ( !empty($row['topic_first_poster_avatar']) || !empty($row['topic_last_poster_avatar']))
      {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
      
         if ( $row['topic_first_poster_avatar_width'] >= $row['topic_first_poster_avatar_height'] )
         {
            $topic_first_poster_avatar_width = ( $row['topic_first_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_width'] ;
            $topic_first_poster_avatar_height = ( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_width'] * $row['topic_first_poster_avatar_height']) : $row['topic_first_poster_avatar_height'] ;
         }
         else 
         {
            $topic_first_poster_avatar_height = ( $row['topic_first_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_height'] ;
            $topic_first_poster_avatar_width = ( $topic_first_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_height'] * $row['topic_first_poster_avatar_width']) : $row['topic_first_poster_avatar_width'] ;
         }

         if ( $row['topic_last_poster_avatar_width'] >= $row['topic_last_poster_avatar_height'] )
         {
            $topic_last_poster_avatar_width = ( $row['topic_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_width'] ;
            $topic_last_poster_avatar_height = ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_width'] * $row['topic_last_poster_avatar_height']) : $row['topic_last_poster_avatar_height'] ;
         }
         else 
         {
            $topic_last_poster_avatar_height = ( $row['topic_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_height'] ;
            $topic_last_poster_avatar_width = ( $topic_last_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_height'] * $row['topic_last_poster_avatar_width']) : $row['topic_last_poster_avatar_width'] ;
         }
         
      }
у меня нет такого кода в этом файле
Открыть includes/functions_display.php и найти

Код: Выделить всё

$avatar_max_dimensions = $avatar_width = $avatar_height = '';
и такого кода - нет.
Вот эти два файла :
http://depositfiles.com/files/n2x0mz37j
http://depositfiles.com/files/u3ocu0h8m

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 07:01
DeaDRoMeO
Извиняюсь, ошибся, мод имеет настройки в админке, ковырять их пробовали ??

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 11:30
maco8024
Ну если вы имеете ввиду вот это , то у меня вот так :



Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 11:46
DeaDRoMeO
Вот же блин, по идее тогда фиксов нет для этого дела, единственным выходом может быть лишь установка старой версии мода либо задать в шаблоне жесткий размер аватары, допустим по моду аватар первая правка шаблона styles/prosilver/template/forumlist_body.html, нужно вставить

Код: Выделить всё

<!-- IF forumrow.FORUM_LAST_POSTER_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {forumrow.FORUM_LAST_POSTER_AVATAR_MARGIN}px;">{forumrow.FORUM_LAST_POSTER_AVATAR}</div><!-- ENDIF -->
Внутрь дива прописать размеры, получится к примеру так

Код: Выделить всё

<!-- IF forumrow.FORUM_LAST_POSTER_AVATAR --><div width="30px" height="30px"  style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {forumrow.FORUM_LAST_POSTER_AVATAR_MARGIN}px;">{forumrow.FORUM_LAST_POSTER_AVATAR}</div><!-- ENDIF -->

и так сделать со всеми правками в шаблонах, которые выводят аватары

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 12:55
maco8024
Все понятно, спасибо.

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 13:15
DeaDRoMeO
Успехов)))

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 15:46
maco8024
Установил старую версию, все работает нормально, только в дебаггере повыскакивали 2 ошибки и они все время повторяются (ниже скрин), можно их исправить ?

Все правки вроде верны, применял фиксы с первого сообщения этой темы.

Ошибки в строке №№478,479

http://depositfiles.com/files/u657nmjoa

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 03 дек 2012, 18:19
DeaDRoMeO
Фиксы в полной мере применены ? Видимо часть кода не вставлена полностью, у меня таких ошибок нет

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 04 дек 2012, 03:04
maco8024
Да спасибо ,все нашел ,исправил. :-00):

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 04 дек 2012, 07:10
DeaDRoMeO
Вот и добренько :co_ol:

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 05 дек 2012, 09:30
maco8024
Приветствую, Сергей вылезла такая ошибка , подскажи где копать ?, появляется при удалении сообщения с форума высвечивается вот так :

,

в дебаггере поевляется вот это :




Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 05 дек 2012, 09:43
DeaDRoMeO
Похоже на то, что не все правки сделаны верно либо SQL запрос не полностью прошел в БД при установке мода аватар последнего сообщения и автора темы

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 05 дек 2012, 09:52
maco8024
Да еще, сообщение удаляется ,но аватар автора (удаленного) остается , SQL запрос - было написано - УСПЕШНО.

Ошибка похожая на вот эту ,сообщение №18 Avatar Index Viewforum

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 05 дек 2012, 10:51
maco8024
Вопрос - решен , решение.

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 05 дек 2012, 11:33
DeaDRoMeO
СПасибо, пригодится)

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 08 дек 2012, 19:17
Lorem Ipsum
DeaDRoMeO писал(а):Фиксы для устранения совместимости с другими модификациями
DeaDRoMeO писал(а):Открыть includes/functions_display.php и найти
Код: Выделить все
$avatar_max_dimensions = $avatar_width = $avatar_height = '';
нет у меня такого.

Random No Avatar phpbb3 (случайная аватара по умолчанию)

Добавлено: 09 дек 2012, 00:50
Lorem Ipsum
DeaDRoMeO, помоги с правкой N1. Аватарки выводятся в реальном размере, не ресайзятся.
DeaDRoMeO писал(а):1. Если у вас установлен мод Avatar of Poster on Index.
Нужно открыть viewforum.php и найти
Этого кода у меня и в помине нет, хотя мод вывода аватарок последних ответивших установлен, как можешь сам видеть.

Код: Выделить всё

$avatar_img = $avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = '';
     
      if ( !empty($row['topic_first_poster_avatar']) || !empty($row['topic_last_poster_avatar']))
      {
      $avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
     
         if ( $row['topic_first_poster_avatar_width'] >= $row['topic_first_poster_avatar_height'] )
         {
            $topic_first_poster_avatar_width = ( $row['topic_first_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_width'] ;
            $topic_first_poster_avatar_height = ( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_width'] * $row['topic_first_poster_avatar_height']) : $row['topic_first_poster_avatar_height'] ;
         }
         else
         {
            $topic_first_poster_avatar_height = ( $row['topic_first_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_height'] ;
            $topic_first_poster_avatar_width = ( $topic_first_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_height'] * $row['topic_first_poster_avatar_width']) : $row['topic_first_poster_avatar_width'] ;
         }

         if ( $row['topic_last_poster_avatar_width'] >= $row['topic_last_poster_avatar_height'] )
         {
            $topic_last_poster_avatar_width = ( $row['topic_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_width'] ;
            $topic_last_poster_avatar_height = ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_width'] * $row['topic_last_poster_avatar_height']) : $row['topic_last_poster_avatar_height'] ;
         }
         else
         {
            $topic_last_poster_avatar_height = ( $row['topic_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_height'] ;
            $topic_last_poster_avatar_width = ( $topic_last_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_height'] * $row['topic_last_poster_avatar_width']) : $row['topic_last_poster_avatar_width'] ;
         }
         
      }
Единственное, что у меня стоит:

Код: Выделить всё

//-- mod : apiv ----------------------------------------------------------------
//-- add
if ( $config['avatar_topics_first_poster_show'] || $config['avatar_topics_last_poster_show'] )
{
	$template->assign_var('AVATAR_MAX_DIMENSIONS', $config['avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = 40;']);
}
//-- fin mod : apiv ------------------------------------------------------------