Merge pull request #130 from marc1706/fixup/theme
[fixup/theme] Fix theme paths and topic icons
This commit is contained in:
@@ -51,6 +51,12 @@ class phpbb_ext_board3_portal_controller_main
|
||||
*/
|
||||
private $root_path;
|
||||
|
||||
/**
|
||||
* Portal includes path
|
||||
* @var string
|
||||
*/
|
||||
private $includes_path;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* NOTE: The parameters of this method must match in order and type with
|
||||
@@ -72,14 +78,15 @@ class phpbb_ext_board3_portal_controller_main
|
||||
$this->user = $user;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->root_path = $phpbb_root_path . 'ext/board3/portal/portal/';
|
||||
$portal_root_path = $phpbb_root_path . 'ext/board3/portal/';
|
||||
$this->includes_path = $phpbb_root_path . 'ext/board3/portal/portal/';
|
||||
$this->root_path = $phpbb_root_path . 'ext/board3/portal/';
|
||||
$portal_root_path = $this->root_path;
|
||||
|
||||
if (!function_exists('obtain_portal_config'))
|
||||
{
|
||||
include($this->root_path . 'includes/constants' . $this->php_ext);
|
||||
include($this->root_path . 'includes/functions_modules' . $this->php_ext);
|
||||
include($this->root_path . 'includes/functions' . $this->php_ext);
|
||||
include($this->includes_path . 'includes/constants' . $this->php_ext);
|
||||
include($this->includes_path . 'includes/functions_modules' . $this->php_ext);
|
||||
include($this->includes_path . 'includes/functions' . $this->php_ext);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +138,7 @@ class phpbb_ext_board3_portal_controller_main
|
||||
$class_name = 'portal_' . $row['module_classname'] . '_module';
|
||||
if (!class_exists($class_name))
|
||||
{
|
||||
include("{$this->root_path}modules/portal_{$row['module_classname']}{$this->php_ext}");
|
||||
include("{$this->includes_path}modules/portal_{$row['module_classname']}{$this->php_ext}");
|
||||
}
|
||||
if (!class_exists($class_name))
|
||||
{
|
||||
@@ -192,7 +199,7 @@ class phpbb_ext_board3_portal_controller_main
|
||||
{
|
||||
$this->template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
||||
'TEMPLATE_FILE' => 'portal/modules/' . $template_module['template'],
|
||||
'IMAGE_SRC' => $this->root_path . '../styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $template_module['image_src'],
|
||||
'IMAGE_SRC' => $this->root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $template_module['image_src'],
|
||||
'TITLE' => $template_module['title'],
|
||||
'CODE' => $template_module['code'],
|
||||
'MODULE_ID' => $row['module_id'],
|
||||
@@ -204,7 +211,7 @@ class phpbb_ext_board3_portal_controller_main
|
||||
{
|
||||
$this->template->assign_block_vars('modules_' . column_num_string($row['module_column']), array(
|
||||
'TEMPLATE_FILE' => 'portal/modules/' . $template_module,
|
||||
'IMAGE_SRC' => $this->root_path . '../styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $row['module_image_src'],
|
||||
'IMAGE_SRC' => $this->root_path . 'styles/' . $this->user->style['style_path'] . '/theme/images/portal/' . $row['module_image_src'],
|
||||
'IMAGE_WIDTH' => $row['module_image_width'],
|
||||
'IMAGE_HEIGHT' => $row['module_image_height'],
|
||||
'MODULE_ID' => $row['module_id'],
|
||||
|
||||
@@ -224,6 +224,7 @@ class portal_news_module
|
||||
'TOPIC_VIEWS' => $fetch_news[$i]['topic_views'],
|
||||
'N_ID' => $i,
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'TOPIC_IMG_STYLE' => $folder_img,
|
||||
'TOPIC_FOLDER_IMG_SRC' => $user->img($folder_img, $folder_alt, false, '', 'src'),
|
||||
'TOPIC_FOLDER_IMG_ALT' => $user->lang[$folder_alt],
|
||||
'TOPIC_ICON_IMG' => (!empty($icons[$fetch_news[$i]['icon_id']])) ? $icons[$fetch_news[$i]['icon_id']]['img'] : '',
|
||||
|
||||
@@ -20,9 +20,21 @@
|
||||
<ul class="topiclist topics">
|
||||
<!-- ENDIF -->
|
||||
<li class="row<!-- IF news_row.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
|
||||
<dl class="icon" style="background-image: url({news_row.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
|
||||
<dl class="icon {news_row.TOPIC_IMG_STYLE}">
|
||||
<dt style="<!-- IF S_DISPLAY_NEWS_RVS -->width: 44%;<!-- ELSE -->width: 60%;<!-- ENDIF --> <!-- IF news_row.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{news_row.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{news_row.TOPIC_FOLDER_IMG_ALT}"><!-- IF news_row.S_UNREAD_TOPIC --><a href="{news_row.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><!-- IF news_row.ATTACH_ICON_IMG -->{news_row.ATTACH_ICON_IMG} <!-- ENDIF --><!-- IF news_row.S_POLL --><strong>{L_VIEW_TOPIC_POLL}</strong><!-- ENDIF --><a href="{news_row.U_VIEW_COMMENTS}" title="{news_row.TITLE}" class="topictitle">{news_row.TITLE}</a><!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --> • <a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> • <!-- ENDIF -->
|
||||
<!-- IF news_row.PAGINATION --><strong class="pagination"><span>{news_row.PAGINATION}</span></strong><!-- ENDIF -->
|
||||
<!-- IF news_row.PAGINATION -->
|
||||
<div class="pagination">
|
||||
<ul><!-- BEGIN pagination -->
|
||||
<!-- IF news_row.pagination.S_IS_PREV -->
|
||||
<!-- ELSEIF news_row.pagination.S_IS_CURRENT --><li class="active"><span>{news_row.pagination.PAGE_NUMBER}</span></li>
|
||||
<!-- ELSEIF news_row.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
|
||||
<!-- ELSEIF news_row.pagination.S_IS_NEXT -->
|
||||
<!-- ELSE --><li><a href="{news_row.pagination.PAGE_URL}">{news_row.pagination.PAGE_NUMBER}</a></li>
|
||||
<!-- ENDIF -->
|
||||
<!-- END pagination --->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<br />{L_POSTED} {L_POST_BY_AUTHOR} {news_row.POSTER_FULL} » {news_row.TIME}
|
||||
<!-- IF news_row.FORUM_NAME -->
|
||||
<br />{L_FORUM}: <a href="{news_row.U_VIEWFORUM}" style="font-weight: bold;">{news_row.FORUM_NAME}</a>
|
||||
|
||||
@@ -81,6 +81,10 @@ span.portal-corners-top-inner, span.portal-corners-bottom-inner{
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#portal-body .row .pagination {
|
||||
padding: 1px 0 1px 12px;
|
||||
}
|
||||
|
||||
/**
|
||||
* margin spacing as in default prosilver for the forumlist
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user