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

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 11 ноя 2012, 17:34
Prowhman
Я в процессе обучения) Ну, пока это сильно не парит, если только какие нибудь ещё глюки не вылезут.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 11 ноя 2012, 17:44
jasiuk
ничего не вышло. отдохну, а потом буду опять разбираться.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 11 ноя 2012, 18:01
DeaDRoMeO
jasiuk,проверяйте тогда правку php кода, в шаблонах все верно прописано
Prowhman, дело ваше)

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 24 ноя 2012, 02:09
jasiuk
А кто нибудь после установки мода пробовал в админке создать новый форум?
У меня выдаёт из-за этого мода ошибку:
SQL ERROR [ mysqli ]
Field 'forum_last_poster_avatar' doesn't have a default value [1364]

SQL

INSERT INTO phpbb_zooforums (parent_id, forum_type, forum_status, forum_parents, forum_name, forum_link, forum_desc, forum_desc_uid, forum_desc_options, forum_desc_bitfield, forum_seo_key, forum_seo_desc, forum_seo_bottom, forum_rules, forum_rules_uid, forum_rules_options, forum_rules_bitfield, forum_rules_link, forum_image, forum_logo, forum_style, display_subforum_list, display_on_index, forum_topics_per_page, forum_recent_topics, enable_indexing, enable_icons, enable_events, enable_prune, prune_days, prune_viewed, prune_freq, forum_bg, forum_options, forum_evaluation, forum_flags, left_id, right_id) VALUES (0, 0, 0, '', 'test', '', '', '', 7, '', '', '', '', '', '', 7, '', '', '', '', 0, 1, 0, 0, 0, 1, 0, 0, 0, 7, 7, 1, '', 0, 6, 48, 77, 78)

BACKTRACE
Когда его деинсталлирую ошибка пропадает.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 24 ноя 2012, 09:10
maco8024
Здравствйте, после установки данного мода аватарки (которые слева т.е. автора темы) отображаются другого админа (кэш, темы, стиль, наборы изо. чистил) ,если нажать на "вопросик" в сообщении "информация" и сменить тему автора - получается наоборот , не подскажите в чем проблема ?
Стиль prosilver форум 3.0.11.

Еще не нашел кода в styles/prosilver/template/forumlist_body.html

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

<dd class="lastpost">
и в styles/prosilver/template/viewforum_body.html

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

dd class="lastpost">
и поэтому ни чего не делал в них.

Но аватарки отображались, только слева.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 24 ноя 2012, 11:27
DeaDRoMeO
jasiuk, слишком часто у народа такая ошибка вылетает, пишет что таблица не имеет значения по умолчанию, странное дело
maco8024 писал(а):не подскажите в чем проблема ?
В том, что надо внимательно проверить все правки мода, и

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

<dd class="lastpost">
это есть в коде вашего шаблона, просто невнимательно смотрели либо у вас стоит мод Благодарности за сообщение

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 24 ноя 2012, 12:55
maco8024
maco8024 писал(а):стоит мод Благодарности за сообщение
Все проверил - все правильно , вышеуказанный мод стоит.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 24 ноя 2012, 19:22
DeaDRoMeO
Ну так нашли строки искомые ?

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 25 ноя 2012, 03:53
maco8024
Там есть такие строки в - styles/prosilver/template/forumlist_body.html

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

<dd class="lastpostthanks"><span>{L_LAST_POST}</span></dd>
и

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

<dd class="lastpost<!-- IF forumrow.S_THANKS_FORUM_REPUT_VIEW_COLUMN and not S_IS_BOT --> lastpostthanks<!-- ENDIF -->"><span>
и в styles/prosilver/template/viewforum_body.html есть такие строки :

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

<dd class="lastpostthanks"><span>{L_LAST_POST}</span></dd>
и такой

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

 <dd class="lastpost<!-- BEGIN reput --><!-- IF topicrow.reput.S_THANKS_TOPIC_REPUT_VIEW_COLUMN and not S_IS_BOT --> lastpostthanks<!-- ENDIF --><!-- END reput -->"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
куда лучше вставить МОДовский код ,что бы отображались аватарки "последних сообщений " справа ?.

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 25 ноя 2012, 10:40
DeaDRoMeO
Вставлять код в первом файле надо строго после

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

<dd class="lastpost<!-- IF forumrow.S_THANKS_FORUM_REPUT_VIEW_COLUMN and not S_IS_BOT --> lastpostthanks<!-- ENDIF -->"><span>
А во втором файле после

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

 <dd class="lastpost<!-- BEGIN reput --><!-- IF topicrow.reput.S_THANKS_TOPIC_REPUT_VIEW_COLUMN and not S_IS_BOT --> lastpostthanks<!-- ENDIF --><!-- END reput -->"><span>

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 25 ноя 2012, 11:13
maco8024
Спасибо , все получилось. :-00):

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 25 ноя 2012, 12:35
DeaDRoMeO
Поздравляю))

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 25 ноя 2012, 15:31
Prowhman
А можно ли так сделать, чтобы на страинице портала в блоке "новости" тоже отображалось?

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 26 ноя 2012, 06:57
DeaDRoMeO
Prowhman, скриншот можно ?

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 26 ноя 2012, 13:48
Prowhman

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 26 ноя 2012, 14:49
DeaDRoMeO
Хороший вопрос однако, попробую предложить вариант, если сработает, то потом наверное в отдельный анонс выпишу. Вообщем открыть файл /portal/modules/portal_news.php и найти

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

public $language = 'portal_news_module';
Вставить перед найденным

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

$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 = 50;
      
         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'] ;
         }
         
      }
Найти

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

'TOPIC_ICON_IMG_HEIGHT'	=> (!empty($icons[$fetch_news[$i]['icon_id']])) ? $icons[$fetch_news[$i]['icon_id']]['height'] : '',
Вставить после найденного

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

'TOPIC_AUTHOR_AVATAR'      => ($config['enable_avatar_index']) ? get_user_avatar($row['topic_first_poster_avatar'], $row['topic_first_poster_avatar_type'], $topic_first_poster_avatar_width, $topic_first_poster_avatar_height) : false,
         'TOPIC_AUTHOR_AVATAR_MARGIN'   => ( $topic_first_poster_avatar_width == '' ) ? '' : (( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_first_poster_avatar_width + 5 )),
         'AVATAR_WIDTH'         => $avatar_max_dimensions,
         'LAST_POST_AUTHOR_AVATAR'   => ($config['enable_avatar_index']) ? get_user_avatar($row['topic_last_poster_avatar'], $row['topic_last_poster_avatar_type'], $topic_last_poster_avatar_width, $topic_last_poster_avatar_height) : false,
         'LAST_POST_AUTHOR_AVATAR_MARGIN'=> ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_last_poster_avatar_width + 5 ),
Потом открыть шаблон в папке стиля /portal/news_compact_center.html и найти

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

<span><dfn>{L_LAST_POST}</dfn>{L_POST_BY_AUTHOR} {news_row.USERNAME_FULL_LAST}
Вставить перед найденным

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

<!-- IF news_row.LAST_POST_AUTHOR_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {news_row.LAST_POST_AUTHOR_AVATAR_MARGIN}px;">{news_row.LAST_POST_AUTHOR_AVATAR}</div><!-- ENDIF -->
Потом найти

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

; background-repeat: no-repeat;<!-- ENDIF -->" title="{news_row.TOPIC_FOLDER_IMG_ALT}">
Вставить после найденного

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

<!-- IF news_row.TOPIC_AUTHOR_AVATAR --><span style="float: left; padding-top: 3px; margin-right: {news_row.TOPIC_AUTHOR_AVATAR_MARGIN}px;">{news_row.TOPIC_AUTHOR_AVATAR}</span><!-- ENDIF -->
Очистить кеш

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 27 ноя 2012, 09:57
Prowhman
DeaDRoMeO писал(а):открыть файл /portal/modules/portal_news.php
Ммм... папка modules у меня отсутствует

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 27 ноя 2012, 13:20
DeaDRoMeO
Портал то какой версии ?? И сам портал как называется ?? Смотреть /portal/modules/portal_news.php надо относительно корня форума, а не папки стиля

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 27 ноя 2012, 14:43
Prowhman
Board3 Portal 1.0.6
Смотрел относительно корня форума, разумеется

Avatar of poster on Index and Viewforum phpbb3

Добавлено: 27 ноя 2012, 19:48
DeaDRoMeO
Обновляйтесь либо дайте ссыль откуда можно скачать данный портал, очень старая версия у вас, не факт что сработает