Simple Portal

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
(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fimg405.imageshack.us%2Fimg405%2F10%2Ftopcw.png&hash=fc1998cf0de268cd083f2be860e08ea1e820cfe0)(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fimg842.imageshack.us%2Fimg842%2F5465%2Fbottoma.png&hash=cb5842574a96baad506ae59cc71da5bc1e9bd1ed)(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fimg42.imageshack.us%2Fimg42%2F1715%2Fbothj.png&hash=8dbc38dc1f35ec21b4e561ddecf41fbc156272b0)

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
(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fwww2.gamegarden.cz%2FThemes%2Fdefault%2Fimages%2Ftinyportal%2FTPpanel_top.gif&hash=9e4d8e0059fb0e25157bb000774771eeeb5d6869)

and

Bottom Panel
(https://simpleportal.net/proxy.php?request=http%3A%2F%2Fwww2.gamegarden.cz%2FThemes%2Fdefault%2Fimages%2Ftinyportal%2FTPpanel_bottom.gif&hash=62d19170d53795e2a34883b5ce6652444018682c)

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.
EhPortal 1.39.8 © 2024, WebDev