Мини-постер в общем списке релизов

 • Просмотры: 657
Se
SelinaAnt
Откуда: Украина
Благодарил (а): 67 раз
Поблагодарили: 67 раз
Сообщения: 359
Зарегистрирован: 25 окт 2011, 01:31
Сообщение

Мини-постер в общем списке релизов

03 мар 2013, 16:45

Уважаемые кодеры, помогите плиз. Нужно следующее: в списке релизов форумного листа чтобы был маленький мини-постер, который будет браться с раздачи. Вот примерно так делала, но кручу уже битый час УРЛ постера, не проявляется хоть тресни.


Может кому еще пригодится, кто знает ? Вставила код:

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

<img src="{topicrow.torrent_poster_fields.POSTER_SRC}" alt="{topicrow.TOPIC_TITLE}" style="width:100px;height:100px;" title="{topicrow.TOPIC_TITLE}"/>
Версия Трекера: 43

Заранее спасибо. :oops:
Аватара пользователя
PPK
Администратор
Благодарил (а): 82 раза
Поблагодарили: 1621 раз
Сообщения: 10284
Зарегистрирован: 21 мар 2009, 17:13
Сообщение

Мини-постер в общем списке релизов

03 мар 2013, 18:36

Se
SelinaAnt
Откуда: Украина
Благодарил (а): 67 раз
Поблагодарили: 67 раз
Сообщения: 359
Зарегистрирован: 25 окт 2011, 01:31
Сообщение

Мини-постер в общем списке релизов

03 мар 2013, 23:31

Все четко получилось! Для тех кто будет мучаться с кодом даю подсказки с форума:
Файл first_x_in_forum_index_config.php, даю как у меня:

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

<?php
/**
*
* @package First Topic [pic] on Forum Index  v.0.0.6
* @version $Id: first_x_in_forum_index_config.php 2356 2356 2010-11-04 12:00:17Z 4seven $
* @copyright (c) 2010 / 4seven
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
   exit;
}
   
// First Topic [pic] on Forum Index  / 4seven / 2010
//----------------SETTINGS - START -------------------
//------------------------------------------------------------
//----------BASIC-SETTINGS----------------

// set function-mode of mod:

$function_mode = 'mix';

// enter as given: img,  attachment or mix (first come - first serve)
// $display_priority = 'img';  // later

//--------------------------------------------------------------

// make your  desired settings here

$width_or_height_img  = 'mix';

// enter as given: width, height or mix 
// explanation of mix: centered cropped  pic with exact squared fit

//--------------------------------------------------------------

// make the setting of max thumb-size in px here 
// counts for width, height or mix

$convert_max_size = 80;

// don't make it to big ;)

//--------------------------------------------------------------

// activate the display of an "no [img] pic" 
// but, before u activate this > make a pic and save it  
// with the size of $convert_max_size and correct fit (given by $width_or_height_img )
// name it no_img.jpg and load it up to images/img_thumbs

$no_pic_img = 'yes';

// enter as given: yes or no

//--------------------------------------------------------------

// placeholder with perfect fit, instead of "no [img] pic"
// if $no_pic_img = 'no' and $no_img_placeholder = 'no'  > the topic title fit is shown in standard phpbb3 mode
// hint: only active if $no_pic_img = 'no'

$no_img_placeholder = 'yes';

// enter as given: yes or no 

//--------------------------------------------------------------

// colour of border around thumb and "no [img] pic"

$border_color = 'transparent';

// enter in HEX eg. '#F6F4D0' (for prosilver) or 'lightgray' or 'transparent'  (no border)

//--------------------------------------------------------------

// activate this mode for showing thumbs in search.php 
// (Search Results,View unanswered posts, View active topics etc.)

$active_4_search = 'yes';

// enter as given: yes or no

//--------------------------------------------------------------

// ----------------[img] SETTINGS--------------------

// ------------[attachment] SETTINGS---------------

// enter here the forum id's that will show thumbing  of [attachment]

$affected_forum_att	= array(17,29,30,32,34,35,36,38,39,40,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,74,75,76,77,79,80,81,82,83,84,86,87,88,89,90,91,92); 

// enter as given: (7,8,9) 

//--------------------------------------------------------------

// enter here the forum id's that will show thumbing  of [img]

$affected_forum_img	= array(17,29,30,32,34,35,36,38,39,40,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,74,75,76,77,79,80,81,82,83,84,86,87,88,89,90,91,92); 

// enter as given: (7,8,9) 

//--------------------------------------------------------------
//----------------SETTINGS - END -------------------
// First Topic [pic] on Forum Index  / 4seven / 2010
?>
Длинный перечень цифр - это номера форумов где вы хотите чтобы бала картинка! Смените на свои.

viewforum_body.html и viewforum_tracker_body.html:
доходите до этого пункта и делаем так:
Найти

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

<!-- IF topicrow.S_UNREAD_TOPIC -->
Добавить перед ним код:

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

<!-- IF topicrow.PRE_IMG or topicrow.PRE_ATTACH -->
			<span style="padding:1px;float:left;width:{topicrow.CONVERT_SIZE}px;text-align:center;<!-- IF (topicrow.PRE_IMG or topicrow.PRE_ATTACH) and BORDER_COLOR --> background-color:{BORDER_COLOR};<!-- ENDIF -->">
			<!-- IF topicrow.PRE_IMG -->
			<a href="{topicrow.ORIG_LINK}"><img style="padding-top:2px;" width="70px" height="100px" src="{topicrow.PRE_IMG}" alt="" /></a>	
			<!-- ELSEIF topicrow.PRE_ATTACH -->
			<a href="{topicrow.ORIG_ATTACH_LINK}"><img style="padding-top:2px;" width="70px" height="100px" src="{topicrow.PRE_ATTACH}" alt="" /></a>
			<!-- ENDIF -->					
			</span>
			<span style="position:absolute; left:{topicrow.CONVERT_DIV_SIZE}px;">
			<!-- ELSEIF EMPTY_IMG -->	
			<span style="padding:1px;float:left;width:{CONVERT_SIZE}px;text-align:center;<!-- IF EMPTY_IMG and BORDER_COLOR --> background-color:{BORDER_COLOR};<!-- ENDIF -->">
			<img style="padding-top:2px;" width="70px" height="100px" src="{EMPTY_IMG}" alt="" />
			</span>
			<span style="position:absolute; left:{CONVERT_DIV_SIZE}px;">
			<!-- ELSEIF (not EMPTY_IMG)  and (PLACEHOLDER) -->
			<span style="padding:1px;float:left;width:{CONVERT_SIZE}px;text-align:center;">
			</span>
			<span style="position:absolute; left:{CONVERT_DIV_SIZE}px;">
			<!-- ENDIF -->
			<!-- IF (topicrow.PRE_IMG or topicrow.PRE_ATTACH) or(EMPTY_IMG)  or ((not EMPTY_IMG)  and (PLACEHOLDER)) -->			
				</span>
			<!-- ENDIF -->
ВСЁ! Больше ничего не нужно делать.
Теперь, чтобы картинка "НЕТ Постера\картинки" у вас не отображалась где есть постер или картинка:
в списке релизов для торрента Постер должен быть нулевым АТАЧЕМ, то-есть загружаться самым первым, иначе будет брать "Но-имадж" или первый попавшийся скриншот!
Удачи. Я себе сделала, запросов мало, а красота появилась на сайте! 8-)

Вернуться в «Вопросы, ответы и примеры решений»