hey i am having the same issue i start the install and do the DB stuff and thats fine. but then it gets to the part of me pasting the code. and i paste it in to my template PAGE_CONTAINER
and then test it on the install and it does not show up on my forum.
i have pasted it in a diffrent location. and i get a small text come up saying cant find the hardcode.php file.
but its the same code that the installation made up for me
This is all on Xenforo also.
thanks if you can help or if you can install it for me that would be great
sure here is my code from the PAGE_CONTAINER
<!DOCTYPE html><xen:set var="$isResponsive" value="{xen:if '@enableResponsive AND !{$noResponsive}', 1, 0}" />
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs XenBase {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if @xb_boxed_layout, 'xbBoxedStyle'} {xen:if @xb_widen, 'xbWideStyle'} {xen:if @xb_leftSidebar, 'LeftSidebar', 'RightSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<!--===========================FreiChat=======START=========================-->
<!-- For uninstalling ME , first remove/comment all FreiChat related code i.e below code
Then remove FreiChat tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->
<?php
$ses=null;
if(!function_exists("freichatx_get_hash"
){
function freichatx_get_hash($ses){
if(is_file("/home/u298018824/public_html/freichat/hardcode.php"
){
require "/home/u298018824/public_html/freichat/hardcode.php";
$temp_id = $ses . $uid;
return md5($temp_id);
}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not
found!'
;</script>";
}
return 0;
}
}
?>
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php?id=<?php echo $ses;?>&xhash=<?php echo freichatx_get_hash($ses); ?>"></script>
<link rel="stylesheet" href="http://orclmedia.esy.es/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!--===========================FreiChatX=======END=========================-->
<xen:hook name="page_container_head">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<xen:if is="{$isResponsive}">
<meta name="viewport" content="width=device-width, initial-scale=1" />
</xen:if>
<xen:if is="{$requestPaths.fullBasePath}">
<base href="{$requestPaths.fullBasePath}" />
<script><xen:comment>/ Chrome bug and for Google cache /</xen:comment>
var _b = document.getElementsByTagName('base'
[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}";
if (_b && _b.href != _bH) _b.href = _bH;
</script>
</xen:if>
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
<noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
<link rel="stylesheet" href="css.php?css=xenforo,form,public&style={xen:urlencode $_styleId}&dir={$visitorLanguage.text_direction}&d={$visitorStyle.last_modified_date}" />
<!--XenForo_Require:CSS-->
<xen:require css="xb.css" />
<xen:if is="@xb_web_font">
@xb_web_font_link
</xen:if>
<xen:if is="@xb_fontAwesome">
<link rel="stylesheet" href="{$requestPaths.fullBasePath}@xb_fontAwesomeLink">
</xen:if>
<xen:if is="@xb_fontAwesome_useCDN">
@xb_fontAwesome_CDN
</xen:if>
{xen:helper ignoredCss, {$visitor.ignoredUsers}}
<xen:include template="google_analytics" />
<xen:include template="page_container_js_head" />
<xen:include template="xb_head" />
<link rel="apple-touch-icon" href="{xen:helper fullurl, @ogLogoPath, 1}" />
<link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}" href="{xen:link forums/-/index.rss}" />
<xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
<xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</xen:hook>
</head>
<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
<xen:hook name="body">
<xen:if is="@xb_offcanvas_menu">
<div class="xbOffCanvasContent xbOffCanvasMask"></div>
<xen:include template="xb_offcanvas_menu" />
<div class="xbOffCanvasContainer">
</xen:if>
<xen:if is="@xb_user_bar AND !@xb_user_panel_header">
<xen:if is="{$visitor.user_id}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
<xen:else />
<xen:if is="{$visitor.is_moderator} || {$visitor.is_admin}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
</xen:if>
<xen:if is="@xb_top_bar_enable"><xen:include template="xb_top_bar" /></xen:if>
<xen:if is="@xb_boxed_layout"><div class="xbBoxed"></xen:if>
<div id="headerMover">
<xen:if is="@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
<xen:if is="@xb_body_helper"><div class="xbBodyhelper"></div></xen:if>
<xen:if is="!@xb_remove_headerproxy"><div id="headerProxy"></div></xen:if>
<div id="content" class="{$contentTemplate}">
<div class="<xen:if is="@xb_widen">pageContent<xen:else />pageWidth</xen:if>">
<div class="<xen:if is="@xb_widen">pageWidth<xen:else />pageContent</xen:if>">
<xen:if is="@xb_content_helper"><div class="xbContenthelper"></div></xen:if>
<xen:include template="ad_top_content" />
<!-- main content area -->
<xen:if is="@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
<xen:hook name="page_container_content_top" />
<xen:if is="{$sidebar}">
<xen:if is="@xb_stickySidebar"><div class="xbContentWrapper"></xen:if>
<div class="mainContainer">
<div class="mainContent"></xen:if>
<xen:include template="ad_above_top_breadcrumb" />
<xen:hook name="page_container_breadcrumb_top">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_below_top_breadcrumb" />
<!--[if lt IE 8]>
<p class="importantMessage">{xen:phrase you_are_using_out_of_date_browser_upgrade}</p>
<![endif]-->
<xen:hook name="page_container_notices">
<xen:include template="notices" />
</xen:hook>
<xen:hook name="page_container_content_title_bar">
<xen:if is="@xb_noH1 && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!{$noH1}">
<!-- h1 title, description -->
<div class="titleBar">
{xen:raw $beforeH1}
<h1><xen:if
is="{$h1}">{xen:raw $h1}<xen:elseif
is="{$title}" />{xen:raw $title}<xen:else
/>{$xenOptions.boardTitle}</xen:if>
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
</h1>
<xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
</div>
<xen:else />
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl xbTopCtrl">{xen:raw $topctrl}</div></xen:if>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_above_content" />
<!-- main template -->
{xen:raw $contents}
<xen:include template="ad_below_content" />
<xen:if is="!{$visitor.user_id} && !{$hideLoginBar}">
<!-- login form, to be moved to the upper drop-down -->
<xen:include template="login_bar_form" />
</xen:if>
<xen:if is="@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="{$sidebar}"></div>
</div>
<!-- sidebar -->
<aside>
<div class="sidebar">
<xen:hook name="page_container_sidebar">
<xen:include template="ad_sidebar_top" />
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
{xen:raw $sidebar}
<xen:include template="ad_sidebar_bottom" />
</xen:hook>
</div>
</aside>
<xen:if is="@xb_stickySidebar"></div></xen:if>
</xen:if>
<xen:if is="!@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="@xb_scroll_buttons OR @xb_scroll_down_on">
<xen:include template="xb_scroll_buttons" />
</xen:if>
<xen:include template="ad_below_bottom_breadcrumb" />
</div>
</div>
<xen:if is="@xb_welcome_bar AND !{$visitor.user_id}">
<xen:include template="xb_welcome_bar" />
</xen:if>
</div>
<xen:if is="!@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
</div>
<footer>
<xen:include template="footer" />
</footer>
<xen:if is="@xb_boxed_layout"></div></xen:if>
<xen:if is="@xb_offcanvas_menu">
</div>
</xen:if>
<xen:include template="page_container_js_body" />
<!--XenBase Current Version : @xb_parent_version -->
<!--Style Version : @xb_style_version -->
<xen:if is="{$isIndexPage} AND {$canSearch}">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{xen:jsescape {xen:link canonical:index}}",
"potentialAction": {
"@type": "SearchAction",
"target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
"query-input": "required name=search_keywords"
}
}
</script>
</xen:if>
</xen:hook>
</body>
</html>
Replace that freichat code from that page with:
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php"></script>
<link rel="stylesheet" href="http://orclmedia.esy.es/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
Now, open freichat/hardcode.php
Replace
$use_cookie=false;
with
$use_cookie=true;
okay i have tried it that way and it still does not show up. here is what PAGE_CONTAINER looks like now
<!DOCTYPE html><xen:set var="$isResponsive" value="{xen:if '@enableResponsive AND !{$noResponsive}', 1, 0}" />
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs XenBase {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if @xb_boxed_layout, 'xbBoxedStyle'} {xen:if @xb_widen, 'xbWideStyle'} {xen:if @xb_leftSidebar, 'LeftSidebar', 'RightSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php"></script>
<link rel="stylesheet" href="http://orclmedia.esy.es/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<xen:hook name="page_container_head">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<xen:if is="{$isResponsive}">
<meta name="viewport" content="width=device-width, initial-scale=1" />
</xen:if>
<xen:if is="{$requestPaths.fullBasePath}">
<base href="{$requestPaths.fullBasePath}" />
<script><xen:comment>/ Chrome bug and for Google cache /</xen:comment>
var _b = document.getElementsByTagName('base'
[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}";
if (_b && _b.href != _bH) _b.href = _bH;
</script>
</xen:if>
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
<noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
<link rel="stylesheet" href="css.php?css=xenforo,form,public&style={xen:urlencode $_styleId}&dir={$visitorLanguage.text_direction}&d={$visitorStyle.last_modified_date}" />
<!--XenForo_Require:CSS-->
<xen:require css="xb.css" />
<xen:if is="@xb_web_font">
@xb_web_font_link
</xen:if>
<xen:if is="@xb_fontAwesome">
<link rel="stylesheet" href="{$requestPaths.fullBasePath}@xb_fontAwesomeLink">
</xen:if>
<xen:if is="@xb_fontAwesome_useCDN">
@xb_fontAwesome_CDN
</xen:if>
{xen:helper ignoredCss, {$visitor.ignoredUsers}}
<xen:include template="google_analytics" />
<xen:include template="page_container_js_head" />
<xen:include template="xb_head" />
<link rel="apple-touch-icon" href="{xen:helper fullurl, @ogLogoPath, 1}" />
<link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}" href="{xen:link forums/-/index.rss}" />
<xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
<xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</xen:hook>
</head>
<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
<xen:hook name="body">
<xen:if is="@xb_offcanvas_menu">
<div class="xbOffCanvasContent xbOffCanvasMask"></div>
<xen:include template="xb_offcanvas_menu" />
<div class="xbOffCanvasContainer">
</xen:if>
<xen:if is="@xb_user_bar AND !@xb_user_panel_header">
<xen:if is="{$visitor.user_id}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
<xen:else />
<xen:if is="{$visitor.is_moderator} || {$visitor.is_admin}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
</xen:if>
<xen:if is="@xb_top_bar_enable"><xen:include template="xb_top_bar" /></xen:if>
<xen:if is="@xb_boxed_layout"><div class="xbBoxed"></xen:if>
<div id="headerMover">
<xen:if is="@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
<xen:if is="@xb_body_helper"><div class="xbBodyhelper"></div></xen:if>
<xen:if is="!@xb_remove_headerproxy"><div id="headerProxy"></div></xen:if>
<div id="content" class="{$contentTemplate}">
<div class="<xen:if is="@xb_widen">pageContent<xen:else />pageWidth</xen:if>">
<div class="<xen:if is="@xb_widen">pageWidth<xen:else />pageContent</xen:if>">
<xen:if is="@xb_content_helper"><div class="xbContenthelper"></div></xen:if>
<xen:include template="ad_top_content" />
<!-- main content area -->
<xen:if is="@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
<xen:hook name="page_container_content_top" />
<xen:if is="{$sidebar}">
<xen:if is="@xb_stickySidebar"><div class="xbContentWrapper"></xen:if>
<div class="mainContainer">
<div class="mainContent"></xen:if>
<xen:include template="ad_above_top_breadcrumb" />
<xen:hook name="page_container_breadcrumb_top">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_below_top_breadcrumb" />
<!--[if lt IE 8]>
<p class="importantMessage">{xen:phrase you_are_using_out_of_date_browser_upgrade}</p>
<![endif]-->
<xen:hook name="page_container_notices">
<xen:include template="notices" />
</xen:hook>
<xen:hook name="page_container_content_title_bar">
<xen:if is="@xb_noH1 && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!{$noH1}">
<!-- h1 title, description -->
<div class="titleBar">
{xen:raw $beforeH1}
<h1><xen:if
is="{$h1}">{xen:raw $h1}<xen:elseif
is="{$title}" />{xen:raw $title}<xen:else
/>{$xenOptions.boardTitle}</xen:if>
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
</h1>
<xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
</div>
<xen:else />
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl xbTopCtrl">{xen:raw $topctrl}</div></xen:if>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_above_content" />
<!-- main template -->
{xen:raw $contents}
<xen:include template="ad_below_content" />
<xen:if is="!{$visitor.user_id} && !{$hideLoginBar}">
<!-- login form, to be moved to the upper drop-down -->
<xen:include template="login_bar_form" />
</xen:if>
<xen:if is="@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="{$sidebar}"></div>
</div>
<!-- sidebar -->
<aside>
<div class="sidebar">
<xen:hook name="page_container_sidebar">
<xen:include template="ad_sidebar_top" />
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
{xen:raw $sidebar}
<xen:include template="ad_sidebar_bottom" />
</xen:hook>
</div>
</aside>
<xen:if is="@xb_stickySidebar"></div></xen:if>
</xen:if>
<xen:if is="!@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="@xb_scroll_buttons OR @xb_scroll_down_on">
<xen:include template="xb_scroll_buttons" />
</xen:if>
<xen:include template="ad_below_bottom_breadcrumb" />
</div>
</div>
<xen:if is="@xb_welcome_bar AND !{$visitor.user_id}">
<xen:include template="xb_welcome_bar" />
</xen:if>
</div>
<xen:if is="!@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
</div>
<footer>
<xen:include template="footer" />
</footer>
<xen:if is="@xb_boxed_layout"></div></xen:if>
<xen:if is="@xb_offcanvas_menu">
</div>
</xen:if>
<xen:include template="page_container_js_body" />
<!--XenBase Current Version : @xb_parent_version -->
<!--Style Version : @xb_style_version -->
<xen:if is="{$isIndexPage} AND {$canSearch}">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{xen:jsescape {xen:link canonical:index}}",
"potentialAction": {
"@type": "SearchAction",
"target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
"query-input": "required name=search_keywords"
}
}
</script>
</xen:if>
</xen:hook>
</body>
</html>
But you don't get
alert('module freichatx says: hardcode.php file not found!'smile;"; } return 0; } } ?>
error right ?
Now, for the next step, we have to pass the userid and xhash to freichat
Replace the line in code in PAGE_CONTAINER:
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php"></script>
with
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php?id={$visitor.user_id}"></script>
Then, open freichat/client/main.php
Around line 25, add following line:
$_GET['xhash'] = md5($_GET['id'] . $uid);
If you have followed these steps correctly, you should be able to see freichat now.
okay ive changed that is page_container
now this is what my main.php looks likes
<?php
session_start();
//hi, this is not php , its javascript !
header("content-type:application/x-javascript");
if (!isset($_GET['mobile'])) {
$mobile = 0;
} else {
$mobile = (int) $_GET['mobile'];
}
//we need you db connection & settings
require_once '../arg.php';
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
//error_reporting(-1);
$img_req = '';
//COMM_15_DAY_NOTIFY_1
$zlib = false;
$no_get = !isset($_GET['id']) || !isset($_GET['xhash']);
//header("Content-type: text/javascript");
if ($use_cookie == 'false') {
$use_cookie = false;
} else {
$use_cookie = $use_cookie;
}
if ($use_cookie) {$_GET['xhash'] = md5($_GET['id'] . $uid);
//authentication is done via cookie
//so _GET global wont be set
} else {
//_GET must be set
if ($no_get)
exit;
}
if ($no_get && $use_cookie) {
$_SESSION[$uid . 'xhash'] = $session_id = null;
} else {
$session_id = strip_tags($_GET['id']);
$_SESSION[$uid . 'xhash'] = $_GET['xhash'];
}
if (!isset($_SESSION[$uid . 'xhash']) || ($_SESSION[$uid . 'xhash'] != $_GET['xhash'])) {
$_SESSION[$uid . 'is_cached'] = false;
}
//-----------------------------------------------------------------------------
class FCC extends FreiChat {
public $banned = false;
public $session_id;
public function __construct() {
parent::__construct();
$this->init_vars();
}
public function FCC_init() {
require_once '../server/drivers/' . $this->driver . '.php';
$this->freichat_debug("main.php loaded");
if (!isset($_SESSION[$this->uid . 'rtl'])) {
$_SESSION[$this->uid . 'rtl'] = false;
}
if (!isset($_SESSION[$this->uid . 'freistatus'])) {
$_SESSION[$this->uid . 'freistatus'] = 1;
}
if (!isset($_SESSION[$this->uid . 'custom_mesg'])) {
$_SESSION[$this->uid . 'custom_mesg'] = $this->frei_trans['default_status'];
}
if (!isset($_SESSION[$this->uid . 'in_room'])) {
$_SESSION[$this->uid . 'in_room'] = -1;
}
if (isset($_SESSION[$this->uid . 'ses_id']) == false) {
global $session_id;
$parameters = array(
"id" => $session_id,
"custom_mesg" => false,
"first" => false
);
if (!isset($_SESSION[$this->uid . 'in_room'])) {
$_SESSION[$this->uid . 'in_room'] = -1;
}
$sessions = new $this->driver($this->db);
$sessions->uid = $this->uid;
$sessions->permanent_name = $this->permanent_name;
$sessions->permanent_id = $this->permanent_id;
$sessions->online_time = $this->online_time;
$sessions->online_time2 = $this->online_time2;
$sessions->time_string = $this->time_string;
$sessions->show_name = $this->show_name;
$sessions->usr_list_wanted = false;
$sessions->db_prefix = $this->db_prefix;
$sessions->displayname = $this->displayname;
$sessions->frei_trans = $this->frei_trans;
$sessions->debug = $this->debug;
$sessions->update_usr_info = true;
$sessions->url = $this->url;
$sessions->driver = $this->driver;
$sessions->to_freichat_path = $this->to_freichat_path;
$sessions->options = $parameters;
$sessions->row_username = $this->row_username;
$sessions->row_userid = $this->row_userid;
$sessions->usertable = $this->usertable;
$sessions->ug_ids = $this->ug_ids;
$sessions->use_cookie = $this->use_cookie;
$sessions->pdo_driver = $this->pdo_driver;
$sessions->load_driver();
return $sessions->get_id();
// print_r($_SESSION);
}
}
public function check_user_agent($type = NULL) {
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if ($type == 'bot') {
// matches popular bots
if (preg_match("/googlebot|adsbot|yahooseeker|yahoobot|msnbot|watchmouse|pingdom\.com|feedfetcher-google/", $user_agent)) {
return true;
// watchmouse|pingdom\.com are "uptime services"
}
} else if ($type == 'browser') {
// matches core browser types
if (preg_match("/mozilla\/|opera\//", $user_agent)) {
return true;
}
} else if ($type == 'mobile') {
// matches popular mobile devices that have small screens and/or touch inputs
// mobile devices have regional trends; some of these will have varying popularity in Europe, Asia, and America
// detailed demographics are unknown, and South America, the Pacific Islands, and Africa trends might not be represented, here
if (preg_match("/phone|iphone|itouch|ipod|symbian|android|htc_|htc-|palmos|blackberry|opera mini|iemobile|windows ce|nokia|fennec|hiptop|kindle|mot |mot-|webos\/|samsung|sonyericsson|^sie-|nintendo/", $user_agent)) {
// these are the most common
return true;
} else if (preg_match("/mobile|pda;|avantgo|eudoraweb|minimo|netfront|brew|teleca|lg;|lge |wap;| wap /", $user_agent)) {
// these are less common, and might not be worth checking
return true;
}
}
return false;
}
}
$cvs = new FCC;
$cvs->session_id = $cvs->FCC_init();
$cvs->get_js_config();
$is_mobile = $cvs->check_user_agent('mobile');
//exit(print_r($cvs));
//print_r($_SESSION);
if ($cvs->BOOT == "no") {
//Do not load freichat
exit("freichat is disabled");
}
if ($cvs->exit_for_guests == "yes" && $_SESSION[$uid . 'is_guest'] == 1) {
//dievar_dump($_SESSION);
//Do not load freichat
exit("guests are not allowed");
}
$smileys = str_replace("'", "\'", json_encode($cvs->get_smileys()));
if ($cvs->GZIP_handler == 'ON') {
$zlib = true;
if (!ob_start("ob_gzhandler"))
{
ob_start();
}
}
$_SESSION[$uid . 'is_cached'] = true;
if ($cvs->banned == true)
exit("you are banned");
//var_dump($construct);
if (isset($_SESSION)) {
$username = $_SESSION[$cvs->uid . 'usr_name'];
$id = $_SESSION[$cvs->uid . 'usr_ses_id'];
} else {
$cvs->freichat_debug("Session Not Yet Created in client side");
}
$frei_trans[] = Array();
//require '../client/jquery/freichat_themes/defarg.php';
require '../client/themes/' . $cvs->freichat_theme . '/argument.php';
$frei_trans = $cvs->frei_trans;
$url = str_replace('client/main.php', '', $cvs->url);
if (isset($_SERVER['HTTP_REFERER'])) {
$referer_url = $_SERVER['HTTP_REFERER'];
} else {
$referer_url = $url;
}
if (strpos($referer_url, 'www.') == TRUE) {
$url = str_replace('http://', 'http://www.', $url);
$url = str_replace('https://', 'https://www.', $url);
} else {
$url = str_replace('http://www.', 'http://', $url);
$url = str_replace('https://www.', 'https://', $url);
}
if (strpos($url, 'www.www.') == TRUE) {
$url = str_replace('http://www.www.', 'http://www.', $url);
$url = str_replace('https://www.www.', 'https://www.', $url);
}
$pfromname = str_replace("'", "\'", $_SESSION[$uid . "usr_name"]);
$custom_mesg = "";
if (isset($_SESSION[$uid . "custom_mesg"])) {
if ($_SESSION[$uid . "custom_mesg"] != "" && $_SESSION[$uid . "custom_mesg"] != "i am null" && $_SESSION[$uid . "custom_mesg"] != null) {
$custom_mesg = $_SESSION[$uid . "custom_mesg"];
}
} else {
$custom_mesg = 'I am available';
}
$ACL = $cvs->get_acl();
$show_chatroom_plugin = 'enabled';
if ($cvs->show_chatroom_plugin == 'enabled') {
if (($_SESSION[$uid . 'is_guest'] == 0 && $ACL['CHATROOM']['user'] == 'noallow') || ($_SESSION[$uid . 'is_guest'] == 1 && $ACL['CHATROOM']['guest'] == 'noallow')) { //is a user
$show_chatroom_plugin = 'disabled';
}
} else {
$show_chatroom_plugin = 'disabled';
}
require_once 'jsdef.js';
require_once 'jquery/js/jquery.1.8.3.js';
require_once 'jquery/js/jquery.jscrollpane.min.js';
//for website
if ($is_mobile && $mobile != 1 && $cvs->show_mobilechat_plugin == 'enabled') {
require 'mobile.js'; //can be used for alerts
} else {
/*
* Includes
* Effects : Clip , Explode.
* Widgets : Draggable
*/
require_once 'jquery/js/jquery-ui-frontend.js';
require_once 'jquery/js/combined.min.js'; //include SM 2_.2.97a + slick + dragx
$_SESSION[$cvs->uid . 'FreiChatX_init'] = true;
require_once 'plugins.js';
if ($cvs->show_videochat_plugin == 'enabled') {
//require '../administrator/admin_files/theme_maker/lib/js/md5.js';
require_once 'plugins/videochat/videochat.js';
require_once 'plugins/groupchat/groupchat.js';
require_once 'plugins/groupchat/tag-it.min.js';
require_once 'plugins/groupchat/jquery.tooltipster.min.js';
}
if($cvs->show_chatroom_plugin == 'enabled') {
require '../administrator/admin_files/theme_maker/lib/colorpicker/js/colorpicker.min.js';
}
require_once 'freichat.js';
}
//for mobile page
if ($mobile == 1) {
require_once 'plugins/mobile/chat/mobilechat.js';
}
if ($cvs->GZIP_handler == 'ON') {
if ($zlib == true) {
ob_end_flush();
}
}
$_SESSION[$cvs->uid . 'main_loaded'] = true;
Make sure this step was followed:
Now, open freichat/hardcode.php
Replace
$use_cookie=false;
with
$use_cookie=true;
And send the content of both the files/template that you edited, will have a look at them again to check if everything is right.
okay, thanks. yeah here is the PAGE_CONTAINER
<!DOCTYPE html><xen:set var="$isResponsive" value="{xen:if '@enableResponsive AND !{$noResponsive}', 1, 0}" />
<html id="XenForo" lang="{$visitorLanguage.language_code}" dir="{$visitorLanguage.text_direction}" class="Public NoJs XenBase {xen:if {$visitor.user_id}, 'LoggedIn', 'LoggedOut'} {xen:if {$sidebar}, 'Sidebar', 'NoSidebar'} {xen:if @xb_boxed_layout, 'xbBoxedStyle'} {xen:if @xb_widen, 'xbWideStyle'} {xen:if @xb_leftSidebar, 'LeftSidebar', 'RightSidebar'} {xen:if $hasAutoDeferred, RunDeferred} {xen:if $isResponsive, Responsive, NoResponsive}" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<script type="text/javascript" language="javascipt" src="http://orclmedia.esy.es/freichat/client/main.php?id={$visitor.user_id}"></script>
<link rel="stylesheet" href="http://orclmedia.esy.es/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<xen:hook name="page_container_head">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<xen:if is="{$isResponsive}">
<meta name="viewport" content="width=device-width, initial-scale=1" />
</xen:if>
<xen:if is="{$requestPaths.fullBasePath}">
<base href="{$requestPaths.fullBasePath}" />
<script><xen:comment>/ Chrome bug and for Google cache /</xen:comment>
var _b = document.getElementsByTagName('base'
[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}";
if (_b && _b.href != _bH) _b.href = _bH;
</script>
</xen:if>
<title><xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else />{$xenOptions.boardTitle}</xen:if></title>
<noscript><style>.JsOnly, .jsOnly { display: none !important; }</style></noscript>
<link rel="stylesheet" href="css.php?css=xenforo,form,public&style={xen:urlencode $_styleId}&dir={$visitorLanguage.text_direction}&d={$visitorStyle.last_modified_date}" />
<!--XenForo_Require:CSS-->
<xen:require css="xb.css" />
<xen:if is="@xb_web_font">
@xb_web_font_link
</xen:if>
<xen:if is="@xb_fontAwesome">
<link rel="stylesheet" href="{$requestPaths.fullBasePath}@xb_fontAwesomeLink">
</xen:if>
<xen:if is="@xb_fontAwesome_useCDN">
@xb_fontAwesome_CDN
</xen:if>
{xen:helper ignoredCss, {$visitor.ignoredUsers}}
<xen:include template="google_analytics" />
<xen:include template="page_container_js_head" />
<xen:include template="xb_head" />
<link rel="apple-touch-icon" href="{xen:helper fullurl, @ogLogoPath, 1}" />
<link rel="alternate" type="application/rss+xml" title="{xen:phrase rss_feed_for_x, 'title={$xenOptions.boardTitle}'}" href="{xen:link forums/-/index.rss}" />
<xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 200}" /></xen:if>
<xen:if is="{$head}"><xen:foreach loop="$head" value="$headElement">{xen:raw $headElement}</xen:foreach></xen:if>
</xen:hook>
</head>
<body{xen:if {$bodyClasses}, ' class="{$bodyClasses}"'}>
<xen:hook name="body">
<xen:if is="@xb_offcanvas_menu">
<div class="xbOffCanvasContent xbOffCanvasMask"></div>
<xen:include template="xb_offcanvas_menu" />
<div class="xbOffCanvasContainer">
</xen:if>
<xen:if is="@xb_user_bar AND !@xb_user_panel_header">
<xen:if is="{$visitor.user_id}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
<xen:else />
<xen:if is="{$visitor.is_moderator} || {$visitor.is_admin}">
<xen:include template="moderator_bar" />
<xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
<xen:include template="login_bar" />
</xen:if>
</xen:if>
<xen:if is="@xb_top_bar_enable"><xen:include template="xb_top_bar" /></xen:if>
<xen:if is="@xb_boxed_layout"><div class="xbBoxed"></xen:if>
<div id="headerMover">
<xen:if is="@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
<xen:if is="@xb_body_helper"><div class="xbBodyhelper"></div></xen:if>
<xen:if is="!@xb_remove_headerproxy"><div id="headerProxy"></div></xen:if>
<div id="content" class="{$contentTemplate}">
<div class="<xen:if is="@xb_widen">pageContent<xen:else />pageWidth</xen:if>">
<div class="<xen:if is="@xb_widen">pageWidth<xen:else />pageContent</xen:if>">
<xen:if is="@xb_content_helper"><div class="xbContenthelper"></div></xen:if>
<xen:include template="ad_top_content" />
<!-- main content area -->
<xen:if is="@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
<xen:hook name="page_container_content_top" />
<xen:if is="{$sidebar}">
<xen:if is="@xb_stickySidebar"><div class="xbContentWrapper"></xen:if>
<div class="mainContainer">
<div class="mainContent"></xen:if>
<xen:include template="ad_above_top_breadcrumb" />
<xen:hook name="page_container_breadcrumb_top">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!@xb_bcmoveout">
<div class="breadBoxTop {xen:if $topctrl, withTopCtrl}">
<xen:if is="{$topctrl} AND !@xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
<xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
</div>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_below_top_breadcrumb" />
<!--[if lt IE 8]>
<p class="importantMessage">{xen:phrase you_are_using_out_of_date_browser_upgrade}</p>
<![endif]-->
<xen:hook name="page_container_notices">
<xen:include template="notices" />
</xen:hook>
<xen:hook name="page_container_content_title_bar">
<xen:if is="@xb_noH1 && {$contentTemplate} == 'forum_list'">
<xen:else />
<xen:if is="!{$noH1}">
<!-- h1 title, description -->
<div class="titleBar">
{xen:raw $beforeH1}
<h1><xen:if
is="{$h1}">{xen:raw $h1}<xen:elseif
is="{$title}" />{xen:raw $title}<xen:else
/>{$xenOptions.boardTitle}</xen:if>
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
</h1>
<xen:if is="{$pageDescription.content}"><p id="pageDescription" class="muted {$pageDescription.class}">{xen:raw $pageDescription.content}</p></xen:if>
</div>
<xen:else />
<xen:if is="{$topctrl} AND @xb_calltoaction"><div class="topCtrl xbTopCtrl">{xen:raw $topctrl}</div></xen:if>
</xen:if>
</xen:if>
</xen:hook>
<xen:include template="ad_above_content" />
<!-- main template -->
{xen:raw $contents}
<xen:include template="ad_below_content" />
<xen:if is="!{$visitor.user_id} && !{$hideLoginBar}">
<!-- login form, to be moved to the upper drop-down -->
<xen:include template="login_bar_form" />
</xen:if>
<xen:if is="@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="{$sidebar}"></div>
</div>
<!-- sidebar -->
<aside>
<div class="sidebar">
<xen:hook name="page_container_sidebar">
<xen:include template="ad_sidebar_top" />
<xen:if is="!{$noVisitorPanel}"><xen:include template="sidebar_visitor_panel" /></xen:if>
{xen:raw $sidebar}
<xen:include template="ad_sidebar_bottom" />
</xen:hook>
</div>
</aside>
<xen:if is="@xb_stickySidebar"></div></xen:if>
</xen:if>
<xen:if is="!@xb_bcbottomshift">
<xen:hook name="page_container_breadcrumb_bottom">
<xen:if is="@xb_noBreadcrumb && {$contentTemplate} == 'forum_list'">
<xen:else />
<div class="breadBoxBottom"><xen:include template="breadcrumb" /></div>
</xen:if>
</xen:hook>
</xen:if>
<xen:if is="@xb_scroll_buttons OR @xb_scroll_down_on">
<xen:include template="xb_scroll_buttons" />
</xen:if>
<xen:include template="ad_below_bottom_breadcrumb" />
</div>
</div>
<xen:if is="@xb_welcome_bar AND !{$visitor.user_id}">
<xen:include template="xb_welcome_bar" />
</xen:if>
</div>
<xen:if is="!@xb_remove_headerproxy">
<header>
<xen:include template="header" />
<xen:edithint template="navigation" />
<xen:edithint template="search_bar" />
</header>
</xen:if>
</div>
<footer>
<xen:include template="footer" />
</footer>
<xen:if is="@xb_boxed_layout"></div></xen:if>
<xen:if is="@xb_offcanvas_menu">
</div>
</xen:if>
<xen:include template="page_container_js_body" />
<!--XenBase Current Version : @xb_parent_version -->
<!--Style Version : @xb_style_version -->
<xen:if is="{$isIndexPage} AND {$canSearch}">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{xen:jsescape {xen:link canonical:index}}",
"potentialAction": {
"@type": "SearchAction",
"target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
"query-input": "required name=search_keywords"
}
}
</script>
</xen:if>
</xen:hook>
</body>
</html>
and here is the hardcode.php
<?php
/ Data base details /
$dsn='mysql:host=mysql.hostinger.co.uk;dbname=u298018824fourm'; //DSN
$db_user='u298018824_orclm'; //DB username
$db_pass='chKu7ApOfi'; //DB password
$driver='Xenforo'; //Integration driver
$db_prefix='xf'; //prefix used for tables in database
$uid='5830e4f4235ae'; //Any random unique number
$connected='YES'; //only for custom installation
$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=false; //make it false if you want to reinstall freichat
$admin_pswd='Tess123'; //backend password
$debug = false;
$custom_error_handling='YES'; // used during custom installation
$use_cookie=true;
/ email plugin /
$smtp_username = '';
$smtp_password = '';
$force_load_jquery = 'NO';
/ Custom driver /
$usertable='login'; //specifies the name of the table in which your user information is stored.
$row_username='root'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='loginid'; //specifies the name of the field in which the user's id is stored (usually id or userid)
$avatar_table_name='members'; //specifies the table where avatar information is stored
$avatar_column_name='avatar'; //specifies the column name where the avatar url is stored
$avatar_userid='id'; //specifies the userid to the user to get the user's avatar
$avatar_reference_user='id'; //specifies the reference to the user to get the user's avatar in user table
$avatar_reference_avatar='id'; //specifies the reference to the user to get the user's avatar in avatar
$avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not change
then here is the main.php
<?php
session_start();
//hi, this is not php , its javascript !
header("content-type:application/x-javascript"
;
if (!isset($_GET['mobile'])) {
$mobile = 0;
} else {
$mobile = (int) $_GET['mobile'];
}
//we need you db connection & settings
require_once '../arg.php';
header("Cache-Control: no-cache, must-revalidate"
; // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"
; // Date in the past
//error_reporting(-1);
$img_req = '';
//COMM_15_DAY_NOTIFY_1
$zlib = false;
$no_get = !isset($_GET['id']) || !isset($_GET['xhash']);
//header("Content-type: text/javascript"
;
if ($use_cookie == 'false'
{
$use_cookie = false;
} else {
$use_cookie = $use_cookie;
}
if ($use_cookie) {$_GET['xhash'] = md5($_GET['id'] . $uid);
//authentication is done via cookie
//so _GET global wont be set
} else {
//_GET must be set
if ($no_get)
exit;
}
if ($no_get && $use_cookie) {
$_SESSION[$uid . 'xhash'] = $session_id = null;
} else {
$session_id = strip_tags($_GET['id']);
$_SESSION[$uid . 'xhash'] = $_GET['xhash'];
}
if (!isset($_SESSION[$uid . 'xhash']) || ($_SESSION[$uid . 'xhash'] != $_GET['xhash'])) {
$_SESSION[$uid . 'is_cached'] = false;
}
//-----------------------------------------------------------------------------
class FCC extends FreiChat {
public $banned = false;
public $session_id;
public function __construct() {
parent::__construct();
$this->init_vars();
}
public function FCC_init() {
require_once '../server/drivers/' . $this->driver . '.php';
$this->freichat_debug("main.php loaded");
if (!isset($_SESSION[$this->uid . 'rtl'])) {
$_SESSION[$this->uid . 'rtl'] = false;
}
if (!isset($_SESSION[$this->uid . 'freistatus'])) {
$_SESSION[$this->uid . 'freistatus'] = 1;
}
if (!isset($_SESSION[$this->uid . 'custom_mesg'])) {
$_SESSION[$this->uid . 'custom_mesg'] = $this->frei_trans['default_status'];
}
if (!isset($_SESSION[$this->uid . 'in_room'])) {
$_SESSION[$this->uid . 'in_room'] = -1;
}
if (isset($_SESSION[$this->uid . 'ses_id']) == false) {
global $session_id;
$parameters = array(
"id" => $session_id,
"custom_mesg" => false,
"first" => false
);
if (!isset($_SESSION[$this->uid . 'in_room'])) {
$_SESSION[$this->uid . 'in_room'] = -1;
}
$sessions = new $this->driver($this->db);
$sessions->uid = $this->uid;
$sessions->permanent_name = $this->permanent_name;
$sessions->permanent_id = $this->permanent_id;
$sessions->online_time = $this->online_time;
$sessions->online_time2 = $this->online_time2;
$sessions->time_string = $this->time_string;
$sessions->show_name = $this->show_name;
$sessions->usr_list_wanted = false;
$sessions->db_prefix = $this->db_prefix;
$sessions->displayname = $this->displayname;
$sessions->frei_trans = $this->frei_trans;
$sessions->debug = $this->debug;
$sessions->update_usr_info = true;
$sessions->url = $this->url;
$sessions->driver = $this->driver;
$sessions->to_freichat_path = $this->to_freichat_path;
$sessions->options = $parameters;
$sessions->row_username = $this->row_username;
$sessions->row_userid = $this->row_userid;
$sessions->usertable = $this->usertable;
$sessions->ug_ids = $this->ug_ids;
$sessions->use_cookie = $this->use_cookie;
$sessions->pdo_driver = $this->pdo_driver;
$sessions->load_driver();
return $sessions->get_id();
// print_r($_SESSION);
}
}
public function check_user_agent($type = NULL) {
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if ($type == 'bot') {
// matches popular bots
if (preg_match("/googlebot|adsbot|yahooseeker|yahoobot|msnbot|watchmouse|pingdom\.com|feedfetcher-google/", $user_agent)) {
return true;
// watchmouse|pingdom\.com are "uptime services"
}
} else if ($type == 'browser') {
// matches core browser types
if (preg_match("/mozilla\/|opera\//", $user_agent)) {
return true;
}
} else if ($type == 'mobile') {
// matches popular mobile devices that have small screens and/or touch inputs
// mobile devices have regional trends; some of these will have varying popularity in Europe, Asia, and America
// detailed demographics are unknown, and South America, the Pacific Islands, and Africa trends might not be represented, here
if (preg_match("/phone|iphone|itouch|ipod|symbian|android|htc_|htc-|palmos|blackberry|opera mini|iemobile|windows ce|nokia|fennec|hiptop|kindle|mot |mot-|webos\/|samsung|sonyericsson|^sie-|nintendo/", $user_agent)) {
// these are the most common
return true;
} else if (preg_match("/mobile|pda;|avantgo|eudoraweb|minimo|netfront|brew|teleca|lg;|lge |wap;| wap /", $user_agent)) {
// these are less common, and might not be worth checking
return true;
}
}
return false;
}
}
$cvs = new FCC;
$cvs->session_id = $cvs->FCC_init();
$cvs->get_js_config();
$is_mobile = $cvs->check_user_agent('mobile'
;
//exit(print_r($cvs));
//print_r($_SESSION);
if ($cvs->BOOT == "no"
{
//Do not load freichat
exit("freichat is disabled");
}
if ($cvs->exit_for_guests == "yes" && $_SESSION[$uid . 'is_guest'] == 1) {
//dievar_dump($_SESSION);
//Do not load freichat
exit("guests are not allowed"
;
}
$smileys = str_replace("'", "\'", json_encode($cvs->get_smileys()));
if ($cvs->GZIP_handler == 'ON'
{
$zlib = true;
if (!ob_start("ob_gzhandler"
)
{
ob_start();
}
}
$_SESSION[$uid . 'is_cached'] = true;
if ($cvs->banned == true)
exit("you are banned"
;
//var_dump($construct);
if (isset($_SESSION)) {
$username = $_SESSION[$cvs->uid . 'usr_name'];
$id = $_SESSION[$cvs->uid . 'usr_ses_id'];
} else {
$cvs->freichat_debug("Session Not Yet Created in client side"
;
}
$frei_trans[] = Array();
//require '../client/jquery/freichat_themes/defarg.php';
require '../client/themes/' . $cvs->freichat_theme . '/argument.php';
$frei_trans = $cvs->frei_trans;
$url = str_replace('client/main.php', '', $cvs->url);
if (isset($_SERVER['HTTP_REFERER'])) {
$referer_url = $_SERVER['HTTP_REFERER'];
} else {
$referer_url = $url;
}
if (strpos($referer_url, 'www.'
== TRUE) {
$url = str_replace('http://', 'http://www.', $url);
$url = str_replace('https://', 'https://www.', $url);
} else {
$url = str_replace('http://www.', 'http://', $url);
$url = str_replace('https://www.', 'https://', $url);
}
if (strpos($url, 'www.www.'
== TRUE) {
$url = str_replace('http://www.www.', 'http://www.', $url);
$url = str_replace('https://www.www.', 'https://www.', $url);
}
$pfromname = str_replace("'", "\'", $_SESSION[$uid . "usr_name"]);
$custom_mesg = "";
if (isset($_SESSION[$uid . "custom_mesg"])) {
if ($_SESSION[$uid . "custom_mesg"] != "" && $_SESSION[$uid . "custom_mesg"] != "i am null" && $_SESSION[$uid . "custom_mesg"] != null) {
$custom_mesg = $_SESSION[$uid . "custom_mesg"];
}
} else {
$custom_mesg = 'I am available';
}
$ACL = $cvs->get_acl();
$show_chatroom_plugin = 'enabled';
if ($cvs->show_chatroom_plugin == 'enabled'
{
if (($_SESSION[$uid . 'is_guest'] == 0 && $ACL['CHATROOM']['user'] == 'noallow'
|| ($_SESSION[$uid . 'is_guest'] == 1 && $ACL['CHATROOM']['guest'] == 'noallow'
) { //is a user
$show_chatroom_plugin = 'disabled';
}
} else {
$show_chatroom_plugin = 'disabled';
}
require_once 'jsdef.js';
require_once 'jquery/js/jquery.1.8.3.js';
require_once 'jquery/js/jquery.jscrollpane.min.js';
//for website
if ($is_mobile && $mobile != 1 && $cvs->show_mobilechat_plugin == 'enabled'
{
require 'mobile.js'; //can be used for alerts
} else {
/*
* Includes
* Effects : Clip , Explode.
* Widgets : Draggable
*/
require_once 'jquery/js/jquery-ui-frontend.js';
require_once 'jquery/js/combined.min.js'; //include SM 2_.2.97a + slick + dragx
$_SESSION[$cvs->uid . 'FreiChatX_init'] = true;
require_once 'plugins.js';
if ($cvs->show_videochat_plugin == 'enabled') {
//require '../administrator/admin_files/theme_maker/lib/js/md5.js';
require_once 'plugins/videochat/videochat.js';
require_once 'plugins/groupchat/groupchat.js';
require_once 'plugins/groupchat/tag-it.min.js';
require_once 'plugins/groupchat/jquery.tooltipster.min.js';
}
if($cvs->show_chatroom_plugin == 'enabled') {
require '../administrator/admin_files/theme_maker/lib/colorpicker/js/colorpicker.min.js';
}
require_once 'freichat.js';
}
//for mobile page
if ($mobile == 1) {
require_once 'plugins/mobile/chat/mobilechat.js';
}
if ($cvs->GZIP_handler == 'ON'
{
if ($zlib == true) {
ob_end_flush();
}
}
$_SESSION[$cvs->uid . 'main_loaded'] = true;
okay, thanks. yeah here is the PAGE_CONTAINER
>
>
>
<xen:comment>/* Chrome bug and for Google cache */</xen:comment> var _b = document.getElementsByTagName('base')[0], _bH = "{xen:jsescape $requestPaths.fullBasePath}"; if (_b && _b.href != _bH) _b.href = _bH;<xen:if is="{$title}">{xen:raw $title} | {$xenOptions.boardTitle}<xen:else ></xen:else>{$xenOptions.boardTitle}</xen:if>
<style>.JsOnly, .jsOnly { display: none !important; }</style>
@xb_web_font_link @xb_fontAwesome_CDN{xen:helper ignoredCss, {$visitor.ignoredUsers}}
{xen:raw $headElement}
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
pageContentpageWidth">
pageWidthpageContent">{xen:raw $topctrl} 1 {xen:raw $topctrl} 1 {xen:raw $beforeH1} is="{$h1}">{xen:raw $h1} is="{$title}" />{xen:raw $title} />{$xenOptions.boardTitle} {xen:raw $topctrl} {xen:raw $pageDescription.content} {xen:raw $topctrl} {xen:raw $contents} {xen:raw $sidebar}
>
>
>
>
>
>
>
>
>
>
>
>
>
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "{xen:jsescape {xen:link canonical:index}}",
"potentialAction": {
"@type": "SearchAction",
"target": "{xen:jsescape {xen:link canonical:search/search}}{xen:if $xenOptions.useFriendlyUrls, '?', '&'}keywords={search_keywords}",
"query-input": "required name=search_keywords"
}
}
>
>
>
and here is the hardcode.php
/ Data base details /
$dsn='mysql:host=mysql.hostinger.co.uk;dbname=u298018824fourm'; //DSN
$db_user='u298018824_orclm'; //DB username
$db_pass='chKu7ApOfi'; //DB password
$driver='Xenforo'; //Integration driver
$db_prefix='xf'; //prefix used for tables in database
$uid='5830e4f4235ae'; //Any random unique number$connected='YES'; //only for custom installation
$PATH = 'freichat/'; // Use this only if you have placed the freichat folder somewhere else
$installed=false; //make it false if you want to reinstall freichat
$admin_pswd='Tess123'; //backend password$debug = false;
$custom_error_handling='YES'; // used during custom installation$use_cookie=true;
/ email plugin /
$smtp_username = '';
$smtp_password = '';$force_load_jquery = 'NO';
/ Custom driver /
$usertable='login'; //specifies the name of the table in which your user information is stored.
$row_username='root'; //specifies the name of the field in which the user's name/display name is stored.
$row_userid='loginid'; //specifies the name of the field in which the user's id is stored (usually id or userid)$avatar_table_name='members'; //specifies the table where avatar information is stored
$avatar_column_name='avatar'; //specifies the column name where the avatar url is stored
$avatar_userid='id'; //specifies the userid to the user to get the user's avatar
$avatar_reference_user='id'; //specifies the reference to the user to get the user's avatar in user table
$avatar_reference_avatar='id'; //specifies the reference to the user to get the user's avatar in avatar
$avatar_field_name=$avatar_column_name; //to avoid unnecessary file changes , *do not changethen here is the main.php
session_start();
//hi, this is not php , its javascript !
header("content-type:application/x-javascript";
if (!isset($_GET['mobile'])) {
$mobile = 0;
} else {
$mobile = (int) $_GET['mobile'];
}
//we need you db connection & settings
require_once '../arg.php';
header("Cache-Control: no-cache, must-revalidate"; // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"; // Date in the past
//error_reporting(-1);
$img_req = '';
//COMM_15_DAY_NOTIFY_1
$zlib = false;
$no_get = !isset($_GET['id']) || !isset($_GET['xhash']);
//header("Content-type: text/javascript";
if ($use_cookie == 'false'{
$use_cookie = false;
} else {
$use_cookie = $use_cookie;
}
if ($use_cookie) {$_GET['xhash'] = md5($_GET['id'] . $uid);
//authentication is done via cookie
//so _GET global wont be set
} else {
//_GET must be set
if ($no_get)
exit;
}
if ($no_get && $use_cookie) {
$_SESSION[$uid . 'xhash'] = $session_id = null;
} else {
$session_id = strip_tags($_GET['id']);
$_SESSION[$uid . 'xhash'] = $_GET['xhash'];
}
if (!isset($_SESSION[$uid . 'xhash']) || ($_SESSION[$uid . 'xhash'] != $_GET['xhash'])) {
$_SESSION[$uid . 'is_cached'] = false;
}
//-----------------------------------------------------------------------------
class FCC extends FreiChat {public $banned = false;
public $session_id;public function construct() {
parent::construct();
$this->init_vars();
}public function FCC_init() {
require_once '../server/drivers/' . $this->driver . '.php';
$this->freichat_debug("main.php loaded";
if (!isset($_SESSION[$this->uid . 'rtl'])) { $_SESSION[$this->uid . 'rtl'] = false; } if (!isset($_SESSION[$this->uid . 'freistatus'])) { $_SESSION[$this->uid . 'freistatus'] = 1; } if (!isset($_SESSION[$this->uid . 'custom_mesg'])) { $_SESSION[$this->uid . 'custom_mesg'] = $this->frei_trans['default_status']; } if (!isset($_SESSION[$this->uid . 'in_room'])) { $_SESSION[$this->uid . 'in_room'] = -1; } if (isset($_SESSION[$this->uid . 'ses_id']) == false) { global $session_id; $parameters = array( "id" => $session_id, "custom_mesg" => false, "first" => false ); if (!isset($_SESSION[$this->uid . 'in_room'])) { $_SESSION[$this->uid . 'in_room'] = -1; } $sessions = new $this->driver($this->db); $sessions->uid = $this->uid; $sessions->permanent_name = $this->permanent_name; $sessions->permanent_id = $this->permanent_id; $sessions->online_time = $this->online_time; $sessions->online_time2 = $this->online_time2; $sessions->time_string = $this->time_string; $sessions->show_name = $this->show_name; $sessions->usr_list_wanted = false; $sessions->db_prefix = $this->db_prefix; $sessions->displayname = $this->displayname; $sessions->frei_trans = $this->frei_trans; $sessions->debug = $this->debug; $sessions->update_usr_info = true; $sessions->url = $this->url; $sessions->driver = $this->driver; $sessions->to_freichat_path = $this->to_freichat_path; $sessions->options = $parameters; $sessions->row_username = $this->row_username; $sessions->row_userid = $this->row_userid; $sessions->usertable = $this->usertable; $sessions->ug_ids = $this->ug_ids; $sessions->use_cookie = $this->use_cookie; $sessions->pdo_driver = $this->pdo_driver; $sessions->load_driver(); return $sessions->get_id(); // print_r($_SESSION); }}
public function checkuser_agent($type = NULL) {
$user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if ($type == 'bot'{
// matches popular bots
if (preg_match("/googlebot|adsbot|yahooseeker|yahoobot|msnbot|watchmouse|pingdom.com|feedfetcher-google/", $user_agent)) {
return true;
// watchmouse|pingdom.com are "uptime services"
}
} else if ($type == 'browser'{
// matches core browser types
if (preg_match("/mozilla\/|opera\//", $user_agent)) {
return true;
}
} else if ($type == 'mobile'{
// matches popular mobile devices that have small screens and/or touch inputs
// mobile devices have regional trends; some of these will have varying popularity in Europe, Asia, and America
// detailed demographics are unknown, and South America, the Pacific Islands, and Africa trends might not be represented, here
if (preg_match("/phone|iphone|itouch|ipod|symbian|android|htc|htc-|palmos|blackberry|opera mini|iemobile|windows ce|nokia|fennec|hiptop|kindle|mot |mot-|webos\/|samsung|sonyericsson|^sie-|nintendo/", $user_agent)) {
// these are the most common
return true;
} else if (preg_match("/mobile|pda;|avantgo|eudoraweb|minimo|netfront|brew|teleca|lg;|lge |wap;| wap /", $user_agent)) {
// these are less common, and might not be worth checking
return true;
}
}
return false;
}}
$cvs = new FCC;
$cvs->session_id = $cvs->FCC_init();$cvs->get_js_config();
$is_mobile = $cvs->check_user_agent('mobile'
;
//exit(print_r($cvs));
//print_r($_SESSION);
if ($cvs->BOOT == "no"{
//Do not load freichat
exit("freichat is disabled";
}if ($cvs->exit_for_guests == "yes" && $_SESSION[$uid . 'is_guest'] == 1) {
//dievar_dump($_SESSION);
//Do not load freichat
exit("guests are not allowed";
}$smileys = str_replace("'", "\'", json_encode($cvs->get_smileys()));
if ($cvs->GZIP_handler == 'ON'
{
$zlib = true;
if (!ob_start("ob_gzhandler")
{
ob_start();
}
}$_SESSION[$uid . 'is_cached'] = true;
if ($cvs->banned == true)
exit("you are banned";
//var_dump($construct);
if (isset($_SESSION)) {
$username = $_SESSION[$cvs->uid . 'usr_name'];
$id = $_SESSION[$cvs->uid . 'usr_ses_id'];
} else {
$cvs->freichat_debug("Session Not Yet Created in client side";
}
$frei_trans[] = Array();//require '../client/jquery/freichat_themes/defarg.php';
require '../client/themes/' . $cvs->freichat_theme . '/argument.php';
$frei_trans = $cvs->frei_trans;$url = str_replace('client/main.php', '', $cvs->url);
if (isset($_SERVER['HTTP_REFERER'])) {
$referer_url = $_SERVER['HTTP_REFERER'];
} else {
$referer_url = $url;
}if (strpos($referer_url, 'www.'
== TRUE) {
$url = str_replace('http://', 'http://www.', $url);
$url = str_replace('https://', 'https://www.', $url);
} else {$url = str_replace('http://www.', 'http://', $url);
$url = str_replace('https://www.', 'https://', $url);
}if (strpos($url, 'www.www.'
== TRUE) {
$url = str_replace('http://www.www.', 'http://www.', $url);
$url = str_replace('https://www.www.', 'https://www.', $url);
}$pfromname = str_replace("'", "\'", $_SESSION[$uid . "usr_name"]);
$custom_mesg = "";
if (isset($_SESSION[$uid . "custom_mesg"])) {
if ($_SESSION[$uid . "custom_mesg"] != "" && $_SESSION[$uid . "custom_mesg"] != "i am null" && $_SESSION[$uid . "custom_mesg"] != null) {
$custom_mesg = $_SESSION[$uid . "custom_mesg"];
}
} else {
$custom_mesg = 'I am available';
}$ACL = $cvs->get_acl();
$show_chatroom_plugin = 'enabled';
if ($cvs->show_chatroom_plugin == 'enabled'
{
if (($_SESSION[$uid . 'is_guest'] == 0 && $ACL['CHATROOM']['user'] == 'noallow'|| ($_SESSION[$uid . 'is_guest'] == 1 && $ACL['CHATROOM']['guest'] == 'noallow'
) { //is a user
$show_chatroom_plugin = 'disabled';
}
} else {
$show_chatroom_plugin = 'disabled';
}require_once 'jsdef.js';
require_once 'jquery/js/jquery.1.8.3.js';
require_once 'jquery/js/jquery.jscrollpane.min.js';//for website
if ($is_mobile && $mobile != 1 && $cvs->show_mobilechat_plugin == 'enabled'{
require 'mobile.js'; //can be used for alerts
} else {/*
* Includes * Effects : Clip , Explode. * Widgets : Draggable */requireonce 'jquery/js/jquery-ui-frontend.js';
require_once 'jquery/js/combined.min.js'; //include SM 2.2.97a + slick + dragx
$_SESSION[$cvs->uid . 'FreiChatX_init'] = true;
require_once 'plugins.js';
if ($cvs->show_videochat_plugin == 'enabled'{
//require '../administrator/admin_files/theme_maker/lib/js/md5.js';
require_once 'plugins/videochat/videochat.js';
require_once 'plugins/groupchat/groupchat.js';
require_once 'plugins/groupchat/tag-it.min.js';
require_once 'plugins/groupchat/jquery.tooltipster.min.js';
}if($cvs->show_chatroom_plugin == 'enabled'
{
require '../administrator/admin_files/theme_maker/lib/colorpicker/js/colorpicker.min.js';}
require_once 'freichat.js';
}//for mobile page
if ($mobile == 1) {
require_once 'plugins/mobile/chat/mobilechat.js';
}if ($cvs->GZIP_handler == 'ON'
{
if ($zlib == true) {
ob_end_flush();
}
}
$_SESSION[$cvs->uid . 'main_loaded'] = true;
thanks,
Hi,
Sorry, but the code is not formatted properly, can you instead send those files via email ?
admin[@]codologic.com ?
Next time, make sure to start and end with three backticks(```) for inserting code
Your previous draft for topic is pending
If you continue, your previous draft will be discarded.