SimplePortal

Development => Feature Requests => Topic started by: Unruler on October 29, 2012, 12:49:48 PM

Title: Same shoutbox in different blocks
Post by: Unruler on October 29, 2012, 12:49:48 PM
It would be nice to remove restriction that prohibits having the same shoutbox in different blocks.

Because if I want the same shoutbox be displayed in side panel on portal and in top panel on forum I can't do that.
Title: Re: Same shoutbox in different blocks
Post by: TinMan on October 29, 2012, 01:42:10 PM
What you could do to show the same shoutbox on a side panel and top panel is use Blocks in Blocks (http://simpleportal.net/index.php?topic=5332.0).  While using the shoutbox block that you have on the side panel for your portal, create a new php block and use this code:
Code: [Select]
$block = current(getBlockInfo(false, 49, false, false));  // Load block info
$block['style'] = sportal_parse_style('explode', $block['style'], true);  //Parse block style parameters.
template_block($block); // Output the block.
Change 49 to the number of your side panel shoutbox block (to get the block id, you can click edit on your side panel shoutbox block and should see something like "block_id=10" in the link).

Then in Display Options, Show Block On, select Forum.  Then in Style Options check No Title and No Body.  Then create the block and place it in the top panel and it should only show on the forums.
Title: Re: Same shoutbox in different blocks
Post by: Unruler on October 29, 2012, 02:09:50 PM
Thanks for reply. Good to know there is a workaround with it.

However it's a feature request to be a default functionality of Portal. Because what's the point in that restriction? And there are sill unlimited amount of shoutboxes that could be used, but what's the point in them? Who will possibly use more then one (assuming they're unconnected)?
Title: Re: Same shoutbox in different blocks
Post by: phantomm on October 29, 2012, 04:12:53 PM
You can have different shoutbox for moderators, admins or regular users.
You can have different shoutbox for specific boards... there's a lot of possibilities :)
Title: Re: Same shoutbox in different blocks
Post by: FrizzleFried on October 29, 2012, 06:16:27 PM
I have a general shoutbox and an arcade shoutbox...

...and I use the blocks in blocks idea to do exactly what you want to do...
Title: Re: Same shoutbox in different blocks
Post by: Unruler on October 29, 2012, 07:19:50 PM
You can have different shoutbox for moderators, admins or regular users.
You can have different shoutbox for specific boards... there's a lot of possibilities :)

Well, that's cool, a little bit superfluous imo, but I'm not saying to take it out or anything, that's nice functionality to have. I played with it a little bit myself  >:-D

I have a general shoutbox and an arcade shoutbox...

...and I use the blocks in blocks idea to do exactly what you want to do...

Blocks in blocks are fine but wouldn't it be better to be able to do that w/o it?
Title: Re: Same shoutbox in different blocks
Post by: jack_40k on January 17, 2013, 11:45:49 PM
Hey guys,

I want to have the shoutbox on header block in my forum AND on a separate page that I link to. This is simple enough to do using blocks in blocks - BUT I want different parameters for the same shoutbox.

For example, I want the shoutbox in the header of my forum to be a certain size - and I want the shoutbox on the other page to be another size (larger).

Is there any way to achieve this?

Thanks.

Jack.
Title: Re: Same shoutbox in different blocks
Post by: Ares on April 04, 2013, 10:16:38 PM
Change the 2 to you shoutbox id and place this code in multi php blocks
Code: [Select]
$params['shoutbox'] = 2; // Your shoutbox ID
sp_shoutbox($params, 0);
yw
SimplePortal 2.3.8 © 2008-2024, SimplePortal