PDA

View Full Version : Add more "Box places" - Top left, right, bottom left, right



Peter Jonsson
February 5, 2013, 12:43 PM
Working on a small project on my site and im wondering how i can add more box places.

I want to add 4 more box places. Just like Middle left and Middle right but Top left, Top right and Bottom left and Bottom right.

And also while im adding more box places add one that goes above main content that are right under the menu.
Just like Simple theme have (http://general.demoflynax.com/?template=general_simple_green)

Viktor
February 5, 2013, 02:39 PM
Hello Peter,

I show you how to add 1 new block position for example header :)

go to your database>>blocks click Structure find field 'Side' we should add new item for that ,'header' for example save and close.

then go to ftp://libs>>system.lib.php
find array:



/* blocks sides */
$l_block_sides = array(


in end of this array add new item:


'header' => $GLOBALS['lang']['header']

save and close.
Then go to ftp://templates>>your_template>>tpl>> if you want to add it in header open header tpl, if you want add it in footer open footer.tpl

and add code where you want see this block



{if $blocks.header}
<div class="header_block">
{foreach from=$blocks item='block'}
{if $block.Side == 'header'}
{include file='blocks'|cat:$smarty.const.RL_DS|cat:'blocks_ manager.tpl' block=$block}
{/if}
{/foreach}
</div>
{/if}


then go to Admin Panel >> Languages click add new phrase and write in key 'header' in value any value. Save and check.

Peter Jonsson
February 5, 2013, 03:40 PM
Ok, so i have added everything in your example and where i want the header box to appear.

I go to my content box and choose "header" then i save it.
I go to the page to look and there is nothing.

I go back and see that it says "Null" under Side

Viktor
February 6, 2013, 03:20 AM
Hello Peter,

Did you added in database>>blocks in field 'Side' new item with key 'header'?

Peter Jonsson
February 6, 2013, 06:08 AM
Ye, sorry forgot to say that i fixed it. The problem was i named it 'heade'. Forgot the r

Thanks for the help =)

Austin Ellis
July 14, 2014, 03:57 AM
im trying to figure this out.... is this just in the admin section? cuz im trying to add my facebook content box into my footer..

I go to database, then I just see sql box, then code in there.... can you please explain in a little further detail where do I go?

Majed Alhamwi
December 30, 2014, 11:07 PM
im trying to figure this out.... is this just in the admin section? cuz im trying to add my facebook content box into my footer..

I go to database, then I just see sql box, then code in there.... can you please explain in a little further detail where do I go?


I guess they meant SQL Database through PhpMyAdmin in your website Cpanel. try to have a look

Pawel Steinborn
January 10, 2015, 01:02 PM
Great tutorial!
Thanks Viktor for this important clues

Wei Hong
June 22, 2015, 11:04 PM
Does this work with the boat flatty? 'cause I cant find the Side block in phpadmin

Viktor
June 23, 2015, 04:02 AM
Hello Wei Hong,

Side block position it means left in database :)

Wei Hong
June 23, 2015, 05:49 AM
Hello Wei Hong,

Side block position it means left in database :)

HI Viktor,
I'm trying to apply your tutorial to add the header position in boat flatty. As I explained in another thread. Does your header tutorial work for boat flatty?

Viktor
June 23, 2015, 08:28 AM
Hello Wei Hong,

Yes it should work but needs more css styles for different resolutions of devices.

Wei Hong
June 23, 2015, 08:53 AM
Hello Wei Hong,

Yes it should work but needs more css styles for different resolutions of devices.

I see
Can I copy the css from general flatty? The long top something like that?

Viktor
June 23, 2015, 09:32 AM
Hello Wei Hong,

You should not copy you should know css and create new styles for the box. Of course you can take from general but I cannot promise you, will it work or not.