new blocks on chat page

how to change the chat page to add new blocks?

Quote · 27 Oct 2009

depends entirely on what you shall have there, you can add code to templates/tmpl_uni/page_57.html if only html

or you can use templates/tmpl_uni/page_57.html and chat.php files like below in my example:

modified file - templates/tmpl_uni/page_57.html: (added code is green)

__include _header.html__

<div class="disignBoxFirst">
<div class="boxFirstHeader">Members</div>
<div class="boxContent">
<div class="clear_both"></div>
__memusers__
<div class="clear_both"></div>
</div>
</div>
<div class="clear_both"></div>

__page_main_code__
__include _footer.html__

modified file chat.php: (added code is green)


<?

/***************************************************************************
*                            Dolphin Smart Community Builder
*                              -----------------
*     begin                : Mon Mar 23 2006
*     copyright            : (C) 2006 BoonEx Group
*     website              : http://www.boonex.com/
* This file is part of Dolphin - Smart Community Builder
*
* Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
* http://creativecommons.org/licenses/by/3.0/
*
* Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Creative Commons Attribution 3.0 License for more details.
* You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
* see license.txt file; if not, write to marketing@boonex.com
***************************************************************************/

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );

// --------------- page variables and login

$_page['name_index']    = 57;
$_page['css_name']        = 'ray_chat.css';

$_page['header'] = _t( "_RAY_CHAT" );
$_page['header_text'] = _t( "_RAY_CHAT", $site['title'] );

$logged['member'] = member_auth( 0, false );

// --------------- page components

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode();
$_page_cont[$_ni]['memusers'] = getMemUsers();

// --------------- [END] page components

PageCode();

/**
* Members on chat page
*/
function getMemUsers() {
global $site;
global $aPreValues;
global $getBlockCode_Mem_db_num;
global $max_thumb_width;
global $max_thumb_height;
global $oTemplConfig;

$mem_num = '7';

if ( $mem_num )
{
$mem_res = db_res( "SELECT `ID`, `NickName`, `DateOfBirth`, `Country`
FROM `Profiles`
WHERE `Couple` = '0' AND `Picture` = '1' AND `Status` = 'Active'
ORDER BY RAND()
LIMIT $mem_num" );
$ret .= '<div class="clear_both"></div>';

if( mysql_num_rows( $mem_res ) > 0 )
{
$j=1;
while( $mem_arr = mysql_fetch_assoc( $mem_res ) )
{

$mem_country = _t($aPreValues['Country'][$mem_arr['Country']]['LKey']);                              
$mem_flag = '&nbsp;<img src="'. ($site['flags'].strtolower($mem_arr['Country'])) .'.gif" alt="flag" />';

$ret .= '<div class="featured_block_1">';
$ret .= get_member_thumbnail( $mem_arr['ID'], 'none' );
$ret .= '<center>';
$ret .= '<a href="' . getProfileLink( $mem_arr['ID'] ) . '">';
$ret .= process_line_output( $mem_arr['NickName'] );
$ret .= '</a>';
$ret .= ", ";
$ret .= age( $mem_arr['DateOfBirth'] );
$ret .= '<br />';
$ret .= $mem_country;
$ret .= $mem_flag;
$ret .= '</center>';
$ret .= '<br />';
$ret .= '</div>';

$j++;
}
}
else
{
$ret .= '<div class="no_result">';
$ret .= '<div>';
$ret .= _t("_No results found");
$ret .= '</div>';
$ret .= '</div>';
}
$ret .= '<div class="clear_both"></div>';
}

return $ret;
}


// --------------- page components functions

/**
* page code function
*/
function PageCompMainCode() {
global $oTemplConfig;
global $logged;

$iId = (int)$_COOKIE['memberID'];
$ret = MsgBox($check_res[CHECK_ACTION_MESSAGE]);
if (getParam( 'enable_ray' ) == 'on') {
$sPassword = $iId > 0 ? getPassword($iId) : "";
$check_res = checkAction( $iId, ACTION_ID_USE_RAY_CHAT );
if($check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED)
$ret = getApplicationContent('chat', 'user', array('id' => $iId, 'password' => $sPassword), true);
}
return DesignBoxContent( _t("_RAY_CHAT"), $ret, $oTemplConfig -> PageCompThird_db_num );
}
?>

Quote · 27 Oct 2009
 
 
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.