PDA

View Full Version : Simple green theme - Long block above content.



Peter Jonsson
December 17, 2012, 04:17 PM
How can i add that to my current theme ?

It would be nice if all templates had that blockplace

Viktor
December 18, 2012, 04:51 AM
Hello Peter,

If you want to create new position for blocks you should do some changes in files and in database.

at first go to ftp:>>libs>>system.lib.php and find /* blocks sides */ array and add new item 'long_block' => $GLOBALS['lang']['long_block'],
Then go to ftp:>>templates>>your_template>>tpl>>content.tpl or header.html where do you want to see new block and add code:



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


Then go to phpMyAdmin and find table with name 'blocks' then find field 'Side' you should edit it and add new item:
'left','right','top','bottom','middle','middle_lef t','middle_right','long_block'

for this field already exist some items you should add new and save it.

Then go to Admin panel >> Languages click add new phrase and add new key 'long_block' and any value for it.
That's all. Go to Admin panel>>Blocks create new block and you will see new position :)

Peter Jonsson
December 18, 2012, 05:43 AM
Sweet, thanks gonna add it later

Viktor
December 18, 2012, 05:45 AM
Let me know about results. if it will be wrong we will check it together.