SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: Afro on December 15, 2015, 06:59:20 AM

Title: Block immediately after board
Post by: Afro on December 15, 2015, 06:59:20 AM
Is it possible to add a custom html block immediately after the board.. I mean before Info Center.
Thanks.
Title: Re: Block immediately after board
Post by: ♦ Ninja ZX-10RR ♦ on December 15, 2015, 07:57:28 AM
Afro,

Unless I am seriously mistaken (if so, I'm human!) it is currently not possible with SimplePortal, you will have to hard code it into the template. May I ask what do you want to achieve so that I can have a better idea?

Regards
Title: Re: Block immediately after board
Post by: andy on December 15, 2015, 08:55:19 AM
What you could try is an SMF Ad modification. One of them might insert a block between boards - check out the SMF Mods.
Maybe only html or BBcode
Title: Re: Block immediately after board
Post by: Afro on December 15, 2015, 09:42:44 AM
Afro,

Unless I am seriously mistaken (if so, I'm human!) it is currently not possible with SimplePortal, you will have to hard code it into the template. May I ask what do you want to achieve so that I can have a better idea?

Regards

I intend to put a html block there, just above the info center. I will attempt what andy suggested.
Title: Re: Block immediately after board
Post by: Afro on December 15, 2015, 01:53:37 PM
The idea from Andy worked.
Title: Re: Block immediately after board
Post by: ♦ Ninja ZX-10RR ♦ on December 15, 2015, 03:14:24 PM
I'll go ahead and mark the topic as solved then :)
Feel free to do it on your own by pressing the relative button next time! ;)

Regards
Title: Re: Block immediately after board
Post by: Burke Knight on December 16, 2015, 06:16:41 AM
In reflection, this would be a nice suggestion for a future update.

To add another section, maybe call it Middle Blocks, and have it be between boards and info center.

Maybe move this thread into the suggestion board?
Title: Re: Block immediately after board
Post by: andy on December 16, 2015, 07:44:46 AM
Its not a portal related block position but would be a nice feature. Really someone should write it up as a mod over on SMF.

Title: Re: Block immediately after board
Post by: ♦ Ninja ZX-10RR ♦ on December 16, 2015, 07:58:05 AM
In reflection, this would be a nice suggestion for a future update.

To add another section, maybe call it Middle Blocks, and have it be between boards and info center.

Maybe move this thread into the suggestion board?
Will throw it into the tracker.

EDIT: done, http://simpleportal.net/index.php?issue=475.0

(unrelated, don't want to pm you for this, lol) @andy, I have updated your bug report and marked it as confirmed because well, it is confirmed.
Title: Re: Block immediately after board
Post by: ♦ Ninja ZX-10RR ♦ on January 12, 2016, 12:53:52 PM
As a sidenote I am deeply looking into this, I achieved it but in a very hack-ish way, need to figure out if there is an easier and cleaner way.
Title: Re: Block immediately after board
Post by: ♦ Ninja ZX-10RR ♦ on January 15, 2016, 08:20:02 PM
It took me 4 days, but I actually figured this out. You will need to create a non-active block and call it like this (replace "15" with your block ID):
Code: [Select]
$block = current(getBlockInfo(false, 15, false, false));
$block['style'] = sportal_parse_style('explode', $block['style'], true);
template_block($block);
template_info_center();
As you can see, just before the info_center template call, you will find it in BoardIndex.template.php. Remember, the block must be DISABLED, you can place it anywhere in your block list, all its other parameters will work correctly.
If you want the block to show in other places as well, create a clone of said block and show it up where you want it, except for board index (you can use custom display actions, "-forum" would be the negator you should be using).

Regards
SimplePortal 2.3.8 © 2008-2024, SimplePortal