Chat in Homepage

How do I...

Put the chat into the homepage ?

thank

Quote · 9 Mar 2010

Go to your admin screen, builders, pages block, select homepage and drag the block up to where you want it displayed

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 9 Mar 2010

Go to your admin screen, builders, pages block, select homepage and drag the block up to where you want it displayed

Issue is... it's not possible in a default installation.

I recall one of the BoonEx crew members posting something related to this.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 9 Mar 2010

Not a post from a BoonExer, but it's still what you need: http://www.boonex.com/unity/forums/?action=goto&topic_id=other-blocks-on-homepage

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 9 Mar 2010

Ok, maybe I misuderstood. Is he talking about the shoutbox? Or the big chatroom. The shoutbox is already there....

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 10 Mar 2010

Ok, maybe I misuderstood. Is he talking about the shoutbox? Or the big chatroom. The shoutbox is already there....

I believe he is talking about the full-blown chat, as the shoutbox is on the home page by default.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 10 Mar 2010

Ok, maybe I misuderstood. Is he talking about the shoutbox? Or the big chatroom. The shoutbox is already there....

I believe he is talking about the full-blown chat, as the shoutbox is on the home page by default.

I followed the link you gave me.. there are NO info in there about my question

Quote · 10 Mar 2010

Ok, maybe I misuderstood. Is he talking about the shoutbox? Or the big chatroom. The shoutbox is already there....

I believe he is talking about the full-blown chat, as the shoutbox is on the home page by default.

I followed the link you gave me.. there are NO info in there about my question

If you want to add the chat to the homepage, you must create a PHP Block and then add the necessary database information.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 10 Mar 2010

arent there any documentation ?

Quote · 10 Mar 2010

Ok, maybe I misuderstood. Is he talking about the shoutbox? Or the big chatroom. The shoutbox is already there....

I believe he is talking about the full-blown chat, as the shoutbox is on the home page by default.

I followed the link you gave me.. there are NO info in there about my question

If you want to add the chat to the homepage, you must create a PHP Block and then add the necessary database information.

Hi, i have a PHP Block, but really i don't know what DB information i need for have the Chat (not shoutbox) on the homepage... can you help me?

Thank you..

...
Quote · 10 Mar 2010

dolphin is nice..

and i am quote shocked for the lack of documentation..

Quote · 11 Mar 2010

Still would like to do this....

Anyone with suggestions on how to put the actual "live chat page" (m/chat/home/) on the homepage?

I used Deanos tools to create a new php block, copied the php info to it. Takes the entire site out... move the block to "Inactive" section and the site works again..

EDIT:

I try to insert this in the php block

require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php');

global $_page;
global $_page_cont;

$iId = ( isset($_COOKIE['memberID']) && ($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) ) ? (int) $_COOKIE['memberID'] : 0;
$iIndex = 57;

$_page['name_index']    = $iIndex;
$_page['css_name']        = '';

$_page['header'] = _t('_chat_page_caption');
$_page['header_text'] = _t('_chat_box_caption', $site['title']);

$oChat = new BxChatModule($aModule);
$_page_cont[$iIndex]['page_main_code'] = $oChat->getContent($iId);

PageCode($oChat->_oTemplate);

and get this error..

Warning: require_once(/home/public_html/mysite.com/modules//classes/Module.php) [function.require-once]: failed to open stream: No such file or directory in /home/public_html/mysite.com/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '/home/public_html/mysite.com/modules//classes/Module.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/mysite.com/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 11 Feb 2011

and get this error..

Warning: require_once(/home/public_html/mysite.com/modules//classes/Module.php) [function.require-once]: failed to open stream: No such file or directory in /home/public_html/mysite.com/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '/home/public_html/mysite.com/modules//classes/Module.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/public_html/mysite.com/inc/classes/BxDolPageView.php(597) : eval()'d code on line 1

 

I marked in red where you have double //

 

require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php');

Remove the proceeding slash in red

Quote · 11 Feb 2011

I to would be interested in learning how to move chat to home page.

You possess an intuitive intelligence so powerful it can help you heal, and relieve stress.
Quote · 11 Feb 2011

Come on , I thought you would have figured this out by now... lol

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 14 Feb 2011

ok - I dont know if an answer was posted somewhere else, but here is the workaround that I am using which allows me to place the chat on any page using a php block.

First, you need to create the php block on the page that you want the chat to appear on;

Second - I use the following code - replace the items in red with your corresponding information

<?php
$date_chat = time();
$memberpword = $_COOKIE['memberPassword'];
$memberID = $_COOKIE['memberID'];

?>

    <script type="text/javascript" language="javascript">
    <!--
        function reload()
        {
location.href='/modules/index.php?r=chat/home/&module=chat&app=user';        }
    -->
    </script>
<div id="chat_user" style="margin:10px;"><object data="http://your.domain.name.here/flash/modules/global/app/holder_as3.swf" style="display:block;" name="ray_flash_chat_user_embed" id="ray_flash_chat_user_object" type="application/x-shockwave-flash" height="600" width="100%"><param value="always" name="allowScriptAccess"><param value="true" name="allowFullScreen"><param value="http://your.domain.name.here/flash/modules/chat/" name="base"><param value="#FFFFFF" name="bgcolor"><param value="opaque" name="wmode"><param value="url=http://your.domain.name.here/flash/XML.php&amp;module=chat&amp;app=user&amp;id=<?php echo $memberID?>&amp;password=<?php echo $memberpword?>" name="flashvars"></object></div>
<script type="text/javascript" language="javascript">
var flashvars={url:"http://your.domain.name.here/flash/XML.php",module:"chat",app:"user",id:"<?php echo $memberID?>",password:"<?php $memberpword?>"};var params={allowScriptAccess:"always",allowFullScreen:"true",base:"http://your.domain.name.here/flash/modules/chat/",bgcolor:"#FFFFFF",wmode:"opaque"};
var attributes = {
    id: "ray_flash_chat_user_object",
    name: "ray_flash_chat_user_embed",
    style: "display:block;"
};
swfobject.embedSWF("http://your.domain.name.here/flash/modules/global/app/holder_as3.swf", "chat_user_<?php echo $date_chat?>", "100%", "600", "9.0.0", "http://your.domain.name.here/flash/modules/global/app/expressInstall.swf", flashvars, params, attributes);
</script>
<?php { }

caredesign.net
Quote · 1 Feb 2012

This does not work for me..

get this error in the php block

Parse error: syntax error, unexpected '<' in/home/michaela/public_html/mysite.com/inc/classes/BxDolPageView.php(607) : eval()'d code on line 1

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 1 Feb 2012

bump

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 2 Feb 2012

That code does not work in a PHP block because it is not designed to work in a php block.

It contains code that relies on it's presence in the modules folder hence the variables $aModule['path'] ect which contain nothing if not executed in the modules folder. The code is also designed to be rendered in a page, not a block hence the variables that start with $_page

Here is a rewritten version designed to be run in a page block.

$aModule['path'] = 'boonex/chat/';
$aModule['class_prefix'] = 'BxChat';
require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php');
$iId = ( isset($_COOKIE['memberID']) && ($GLOBALS['logged']['member'] || $GLOBALS['logged']['admin']) ) ? (int) $_COOKIE['memberID'] : 0;
$oChat = new BxChatModule($aModule);
echo $oChat->getContent($iId);


Now this will create a block inside the PHP block you place the code in. Not something i can change as that is generated by the getContent function in the chat module itself which changing will also affect the normal chat page.

A block inside a block is not the affect you want so you will need to change the designbox type of the php block you place the code in from 1 to 0. To do that find the php block in the database in the table sys_page_compose and change the designbox from 1 to 0 and then clear the dolphin cache.

And this is a hack. Took me over a hour to figure this out and is most likley not the proper way to do it. But you cannot just drop code written to be displayed on a module generated page into a block without a lot of changes.

https://www.deanbassett.com
Quote · 2 Feb 2012

Deano - (and I say this in all awe of you and your abilities) - I am actually using it in a code block now on an alliance site - it works perfectly - if you would like, send me a message and I can show you.

 

Newton - in my code, I included the open php tag (<?php) - that must be removed from the beginning of the code when using in a php block. Keep the open php tag at the end, though.

 

caredesign.net
Quote · 7 Feb 2012

 Thanks!

Newton - in my code, I included the open php tag (<?php) - that must be removed from the beginning of the code when using in a php block. Keep the open php tag at the end, though.
ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 8 Feb 2012
 
 
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.