SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started 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.
-
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
-
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
-
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.
-
The idea from Andy worked.
-
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
-
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?
-
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.
-
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.
-
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.
-
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):
$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