Browse files

! Porting spacing fixes to SMF 1.1 versions.

  • Loading branch information...
1 parent 56c8ee7 commit 5f9b9fc16c62201c5b8bb1f8b0d3507757a30084 @silentguardian silentguardian committed Mar 17, 2012
View
3 smf1/Sources/PortalBlocks.php
@@ -1502,8 +1502,7 @@ function sp_boardNews($parameters, $id, $return_parameters = false)
</td>
</tr>
</table>
- </div>
- <br />';
+ </div>';
}
if (!empty($per_page))
View
2 smf1/Sources/Subs-Portal.php
@@ -120,7 +120,7 @@ function sportal_init($standalone = false)
$context['can_remove_article'] = allowedTo(array('sp_admin', 'sp_manage_articles', 'sp_remove_article'));
}
- $context['SPortal']['is_portal'] = getShowInfo(0, 'portal', '');
+ $context['SPortal']['on_portal'] = getShowInfo(0, 'portal', '');
}
if (WIRELESS || ($standalone && (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))) || !empty($settings['disable_sp']) || empty($modSettings['sp_portal_mode']) || ((!empty($modSettings['sp_maintenance']) || !empty($maintenance)) && !allowedTo('admin_forum')) || isset($_GET['debug']) || (empty($modSettings['allow_guestAccess']) && $context['user']['is_guest']) || (isset($_REQUEST['action']) && $_REQUEST['action'] == 'dlattach'))
View
20 smf1/Themes/default/Portal.template.php
@@ -58,7 +58,8 @@ function template_portal_above()
foreach ($context['SPortal']['blocks'][2] as $block)
template_block($block);
- echo '
+ if (empty($context['SPortal']['on_portal']))
+ echo '
<br class="sp_side_clear" />';
}
}
@@ -68,8 +69,14 @@ function template_portal_below()
global $context, $modSettings;
if (!empty($context['SPortal']['blocks'][3]))
+ {
+ if (empty($context['SPortal']['on_portal']) || !empty($context['SPortal']['blocks'][2]) || !empty($modSettings['articleactive']))
+ echo '
+ <br class="sp_side_clear" />';
+
foreach ($context['SPortal']['blocks'][3] as $block)
template_block($block);
+ }
echo '
</td>';
@@ -105,24 +112,29 @@ function template_portal_below()
function template_block($block)
{
- global $context, $settings, $txt;
+ global $context, $modSettings, $settings, $txt;
- // Make sure that we have some valid block data.
if (empty($block) || empty($block['type']))
return;
if ($block['type'] == 'sp_boardNews')
{
+ echo '
+ <div class="sp_block_section', isset($context['SPortal']['sides'][$block['column']]['last']) && $context['SPortal']['sides'][$block['column']]['last'] == $block['id'] && ($block['column'] != 2 || empty($modSettings['articleactive'])) ? '_last' : '', '">';
+
$block['type']($block['parameters'], $block['id']);
+ echo '
+ </div>';
+
return;
}
if (isset($txt['sp_custom_block_title_' . $block['id']]))
$block['label'] = $txt['sp_custom_block_title_' . $block['id']];
echo '
- <div class="sp_block_section', isset($context['SPortal']['sides'][$block['column']]['last']) && $context['SPortal']['sides'][$block['column']]['last'] == $block['id'] ? '_last' : '', '">
+ <div class="sp_block_section', isset($context['SPortal']['sides'][$block['column']]['last']) && $context['SPortal']['sides'][$block['column']]['last'] == $block['id'] && ($block['column'] != 2 || empty($modSettings['articleactive'])) ? '_last' : '', '">
<div class="sp_block_container', !empty($block['style']['no_body']) ? '' : ' tborder', '">
<table class="sp_block">';
View
9 smf1/Themes/default/PortalArticles.template.php
@@ -8,9 +8,6 @@ function template_articles()
if (empty($modSettings['articleactive']))
return;
- echo '
- <div class="sp_regular_padding;">';
-
while ($article = $context['get_articles']())
{
echo '
@@ -42,16 +39,12 @@ function template_articles()
</td>
</tr>
</table>
- </div>
- <br />';
+ </div>';
}
if (!empty($modSettings['articleperpage']) && !empty($context['page_index']))
echo '
<div class="sp_page_index">', $txt['sp-articlesPages'], ': ', $context['page_index'], '</div>';
-
- echo '
- </div>';
}
function template_add_article()

0 comments on commit 5f9b9fc

Please sign in to comment.