SimplePortal

Customization => Custom Coding => Topic started by: grafitus on August 12, 2010, 10:06:45 AM

Title: Full Top and/or Bottom Blocks
Post by: grafitus on August 12, 2010, 10:06:45 AM
Then we'll do oparation, portal layout will be such as belowing:
Only TopOnly BottomBoth
(http://img405.imageshack.us/img405/10/topcw.png)(http://img842.imageshack.us/img842/5465/bottoma.png)(http://img42.imageshack.us/img42/1715/bothj.png)

Only Top
Open ./Themes/default/Portal.template.php file.
Code: (Find and delete) [Select]
if (!empty($context['SPortal']['blocks'][2]))
foreach ($context['SPortal']['blocks'][2] as $block)
template_block($block);

Code: (Find) [Select]
if (!empty($modSettings['showleft']) && !empty($context['SPortal']['blocks'][1]))
Code: (Replace) [Select]
if (!empty($context['SPortal']['blocks'][2]))
{
echo '
<td id="sp_center" colspan="', !empty($modSettings['showleft']) && !empty($modSettings['showright']) ?

3 : (!empty($modSettings['showleft']) && !empty($modSettings['showright']) ? 2 : '') , '">';

foreach ($context['SPortal']['blocks'][2] as $block)
template_block($block);

echo '
</td>
</tr>
<tr>';
}

if (!empty($modSettings['showleft']) && !empty($context['SPortal']['blocks'][1]))


Only Bottom
Open ./Themes/default/Portal.template.php file.
Code: (Find and Delete) [Select]
echo '
<br />';

if (!empty($context['SPortal']['blocks'][3]))
foreach ($context['SPortal']['blocks'][3] as $block)
template_block($block);

Code: (Find) [Select]
echo '
</tr>
</table>';
Code: (Replace) [Select]
if (!empty($context['SPortal']['blocks'][3]))
{
echo '
</tr>
<tr>
<td id="sp_center" colspan="', !empty($modSettings['showleft']) && !empty($modSettings['showright']) ?

3 : (!empty($modSettings['showleft']) && !empty($modSettings['showright']) ? 2 : '') , '">';

foreach ($context['SPortal']['blocks'][3] as $block)
template_block($block);

echo '
</td>';
}

echo '
</tr>
</table>';


Both
I don't explain it again, do I? :nervous-happy: You do both the above. You'll what you needed... :angel:
Title: Re: Full Top and/or Bottom Blocks
Post by: MaXi on November 15, 2010, 12:05:51 PM
This is nice!

But I would like...

Top Panel
(http://www2.gamegarden.cz/Themes/default/images/tinyportal/TPpanel_top.gif)

 and

Bottom Panel
(http://www2.gamegarden.cz/Themes/default/images/tinyportal/TPpanel_bottom.gif)

like TinyPortal.

Can you help please?
Title: Re: Full Top and/or Bottom Blocks
Post by: grafitus on November 16, 2010, 12:42:51 AM
With this oparation, we are not adding new side. We are just change places.

BTW, your request will be in SimplePortal 2.4.
http://simpleportal.net/index.php?issue=338.0
Title: Re: Full Top and/or Bottom Blocks
Post by: MaXi on November 16, 2010, 10:49:08 AM
I know, I know...
... I need this function very soon.
And nobody can tell me when will the SP 2.4  be published :)
How can I create the Top Panel above?
grafitus thank you for your answer.
SimplePortal 2.3.8 © 2008-2024, SimplePortal