There was this from 2016, which went unanswered in the forums (no one could figure it out I think?), which try as I might, I couldn't manipulate into anything useful whatsoever. Blank white page standalone, and does nothing when put into my index.php, doesn't throw up any errors that I can tell
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$html='<html><head><link href="'.$phpbb_root_path.'ext/dmzx/mchat/styles/prosilver/theme/mchat.css" rel="stylesheet" /></head><body>';
$html.='<script type="text/javascript" src="'.$phpbb_root_path.'assets/javascript/editor.js"></script>';
$html.='<script type="text/javascript" src="'.$phpbb_root_path.'assets/javascript/jquery.min.js"></script>';
$html.='<script type="text/javascript" src="'.$phpbb_root_path.'styles/prosilver/template/ajax.js"></script>';
$html.='<script type="text/javascript">
// <![CDATA[
var root_path = "'.$phpbb_root_path.'";
// ]]>
</script>';
echo $html;
$mchat_installed = (!empty($config['mchat_version']) && !empty($config['mchat_enable'])) ? true : false;
if ($mchat_installed && $auth->acl_get('u_mchat_view'))
{
if(!defined('MCHAT_INCLUDE') && $config['mchat_on_index'] && !empty($user->data['user_mchat_index']))
{
define('MCHAT_INCLUDE', true);
$mchat_include_index = true;
include($phpbb_root_path . 'ext/dmzx/mchat/controller/mchat.' . $phpEx);
}
//$user->add_lang('mods/mchat_lang');
$template->assign_vars(array(
'ROOT_PATH' => $phpbb_root_path,
));
$template->set_filenames(array('body' => 'ext/dmzx/mchat/styles/prosilver/template/mchat_body.html'));
$template->display('body');
}
echo '</body></html>';
?>
And there was this lovely bit of code from the fellas over on phpmodders, and I had what I THOUGHT was a little more success, but either way my end result has been "nadda". I at least think I understand the issue in this code a little better?
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path.'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// Start session management.
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// BEGIN mChat Mod
$mchat_installed = (!empty($config['mchat_version']) && !empty($config['mchat_enable'])) ? true : false;
if ($mchat_installed && $auth->acl_get('u_mchat_view'))
{
if(!defined('MCHAT_INCLUDE') && $config['mchat_on_index'] && !empty($user->data['user_mchat_index']))
{
define('MCHAT_INCLUDE', true);
$mchat_include_index = true;
include($phpbb_root_path . 'ext/dmzx/mchat/core/mchat.' . $phpEx);
}
if (!empty($config['mchat_stats_index']) && !empty($user->data['user_mchat_stats_index']))
{
if (!function_exists('mchat_users'))
{
include($phpbb_root_path . 'ext/dmzx/mchat/core/functions.' . $phpEx);
}
// Add lang file
$user->add_lang('ext/dmzx/mchat/language/en/mchat' . $phpEx);
// stats display
$mchat_session_time = !empty($config_mchat['timeout']) ? $config_mchat['timeout'] : 3600;// you can change this number to a greater number for longer chat sessions
$mchat_stats = mchat_users($mchat_session_time);
$template->assign_vars(array(
'MCHAT_INDEX_STATS' => true,
'MCHAT_INDEX_USERS_COUNT' => $mchat_stats['mchat_users_count'],
'MCHAT_INDEX_USERS_LIST' => $mchat_stats['online_userlist'],
'L_MCHAT_ONLINE_EXPLAIN' => $mchat_stats['refresh_message'],
));
}
}
// END mChat Mod
// Output page
page_header($user->lang['MCHAT_TITLE']);
$template->set_filenames(array(
'body' => 'mchat_body2.html')
);
page_footer();
?>
I think the issue with this code is I don't know how to either declare, or override WHERE it looks for
Code: Select all
$template->set_filenames(array(
'body' => 'mchat_body2.html')
);
I really don't know. I'mma keep tacking away at this, see if I can get ANY response whatsoever. I feel like maybe if I can figure this craziness out, I'll be one step closer to either integrating comments into my webpage PROPERlY, or at least, understanding why I can't seem to figure out PROPER integration? Anyone got any ideas to point me in the right direction(s) here?
Thanks so much in advance for everyone's time