How can I put the shout out box in a html table

I have created a page and would like to add the shout out box in a html table any ideas on how i can do this

Quote · 13 Mar 2011

I saw that Huston already done it, ask him!

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 13 Mar 2011

 

I have created a page and would like to add the shout out box in a html table any ideas on how i can do this

you can add the shoutbox to other pages, but you will have to use a php block the code that generate the shout box is "    BxDolService::call('shoutbox', 'get_shoutbox'); ",

just copy and paste the code obove into a php block and thats it. you can use deano tool to create the php block

Quote · 13 Mar 2011

I have deano tool and it works great but it only allows you to add the shout out bx to a page what i want to do id to add the shout box inside a html table for better structure

Quote · 13 Mar 2011

 

I have deano tool and it works great but it only allows you to add the shout out bx to a page what i want to do id to add the shout box inside a html table for better structure

Not entirely accurate.

I am guessing your table is in a HTML block.

HTML blocks do not support PHP. And the shoutbox can only be called with PHP.

But a PHP block can do both PHP and HTML. So your table can be put in a PHP block instead of a HTML block.

Example of a 3 column 2 row table with the shoutbox in the bottom right cell of the table done using a php block.

$sCode = '
<table border="1" width="100%">
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 4</td>
<td>Cell 5</td>
<td>' . BxDolService::call('shoutbox', 'get_shoutbox') . '</td>
</tr>
</table>
';
echo $sCode;

https://www.deanbassett.com
Quote · 13 Mar 2011

Hey Thanks you deano92964

Quote · 13 Mar 2011

 

I saw that Huston already done it, ask him!

What I did, was create a clone of the shoutbox to use on my GameZone pages, so that those pages would have a separate shoutbox system.  This is what it looks like: http://houstonlively.com/gamezone.php?page=home    (Click on the 'Buzz' tab)

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 13 Mar 2011

I have been trying to figure this out but to no avail i have this code which is supposed to place the shout box inside a html table cell but for some reason it will not work they shout out box will appear on top of the table and not in side the cell .. I added a screen shot to illustrate what im trying to do also here is the code im using any help will be greatly appreciated

 

$sCode = '
<table border="1">
<tr>
<td colspan="3">My life aint easy </td>
</tr>
<tr>
<td>Cell 4</td>
<td width="650">Cell 5</td>
<td width="10">'. BxDolService::call('shoutbox', 'get_shoutbox') . '</td>
</tr>
</table>
';
echo $sCode;

html_php table.jpg · 435.1K · 346 views
Quote · 14 Mar 2011

Ok.

That code is fine.

I found the reason why. The shoutbox is not designed to be returned that way, so i am working on a mod for the shoutbox that should correct that.

I will post it in a few minutes.

https://www.deanbassett.com
Quote · 14 Mar 2011

Coool great thanks really i really need this

 

Quote · 14 Mar 2011

Ok. Change your php block code.

Use this.

$sCode = '
<table border="1">
<tr>
<td colspan="3">My life aint easy </td>
</tr>
<tr>
<td>Cell 4</td>
<td width="650">Cell 5</td>
<td width="10">'. BxDolService::call('shoutbox', 'get_shoutbox',false) . '</td>
</tr>
</table>
';
echo $sCode;

I marked in RED what i changed from the code you posted above.

Now we need to modify the shoutbox code.


This is for dolphin 7.0.5.

Open modules\boonex\shoutbox\classes\BxShoutBoxModule.php

Look for this function

function serviceGetShoutBox()
{
$echo $this -> _oTemplate -> getShoutboxWindow($this -> sPathToModule
, $this -> _oDb -> getLastMessageId(), $this -> _getLastMessages());
}


Replace it with this.

function serviceGetShoutBox($bEcho = true)
{
$sCode = $this -> _oTemplate -> getShoutboxWindow($this -> sPathToModule
, $this -> _oDb -> getLastMessageId(), $this -> _getLastMessages());
if($bEcho) {
echo $sCode;
} else {
return $sCode;
}
}

Note: If you do not have dolphin 7.0.5, do not make the change. Let me know what version you have, and i will provide custom code for it.


What is does is allow an extra parameter to be passed to the service call which determines if the code is echoed or returned. By default the shoutbox is echoed out, but cannot be embedded in a table that way, the code has to be returned instead.


Also, you cannot have more than one shoutbox on a page. The two will interfear with each other.

https://www.deanbassett.com
Quote · 14 Mar 2011

If you don't mind modifying the database, you can add an injection key, so that you can call the shoutbox in a regular HTML block.  This db query will add the key:

INSERT INTO `sys_injections` (`id`, `name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
('', 'Shout_Box', 0, 'Shout_Box', 'php', 'return BxDolService::call(''shoutbox'', ''get_shoutbox'');', 0, 1);

 

You can then call the shoutbox in an html block with this:  <bx_injection:Shout_Box />

 

 

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 14 Mar 2011

 

If you don't mind modifying the database, you can add an injection key, so that you can call the shoutbox in a regular HTML block.  This db query will add the key:

INSERT INTO `sys_injections` (`id`, `name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
('', 'Shout_Box', 0, 'Shout_Box', 'php', 'return BxDolService::call(''shoutbox'', ''get_shoutbox'');', 0, 1);

 

You can then call the shoutbox in an html block with this:  <bx_injection:Shout_Box />

 

 


Ah yes. That might be a viable alternative as well.


https://www.deanbassett.com
Quote · 14 Mar 2011

 

RE: Also, you cannot have more than one shoutbox on a page. The two will interfear with each other.

 

shoutbox.mp4 · 801.6K · 198 downloads
My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 14 Mar 2011

 

 

RE: Also, you cannot have more than one shoutbox on a page. The two will interfear with each other.

 

Set the first cell to a smaller width than last one.

You should see that having 2 of them of different widths will not work. The second one will assume the width of the first one rendered affecting the text areas of the shoutbox.


Perhaps i should have said, you can, but not recommended.


https://www.deanbassett.com
Quote · 14 Mar 2011

deano92964 thank you again I don't currently have 7.0.5 but i will be upgrading to it later today I really appreciate this and i will drop something in you bucket thank you

Quote · 14 Mar 2011

Hi, and thanks for this info. I was asking something of the same in an earilier post. http://www.boonex.com/unity/forums/#topic/Can-this-be-done-with-inactive-blocks.htm

Was just wondering since the shout box is a realy good feature and just about a necesity for sites that the option to have it on almost any page with inactive blocks should be there. That way no matter where the person is on the site they can take part in the shoutbox. I am not a programer so don't know why this option isn't there or what problems that would cause.

Quote · 14 Mar 2011

hey Houston I dont no why you might need to shout boxes on one page but it does look cool real cool

Quote · 14 Mar 2011

 

hey Houston I dont no why you might need to shout boxes on one page but it does look cool real cool

You wouldn't...  I was just harassing deano

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 14 Mar 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.