FreiChat related discussions
breaking the views> how to fix install?

The issuse I am having is installing Freichat on elgg 1.8

I get to the box that says add the following lines in your
Add the following lines in your
head.php in views/default/page/elements/in the header(before

tag)

then this code

<!--===========================FreiChatX=======START=========================-->
<!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
Then remove FreiChatX tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation -->

<?php if(isset($_SESSION["guid"])==true) {$ses=$_SESSION["guid"]; } else {$ses=0;}
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

if(is_file("/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php")){

require "/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php";

$temp_id = $ses . $uid;

return md5($temp_id);

}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not
found!');";
}

return 0;
}
}
?> <script type="text/javascript" language="javascipt" src="http://planofaction.info/mod/chat/vendors/freichat/client/main.php?id=&lt;?php%20echo%20%24ses;?&gt;&amp;xhash=&lt;?php%20echo%20freichatx_get_hash(%24ses);%20?&gt;"></script><link rel="stylesheet" href="http://planofaction.info/mod/chat/vendors/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css">
<!--===========================FreiChatX=======END=========================-->


Problem is, I dont see a Head tag.
in
/home/mrcoffee/public_html/views/default/page/elements/head.php
I see

<?php /**
* The standard HTML head
*
* @uses $vars['title'] The page title
*/

// Set title

if (empty($vars['title'])) {
$title = elgg_get_config('sitename');
} else {
$title = elgg_get_config('sitename') . ": " . $vars['title'];
}

global $autofeed;
if (isset($autofeed) && $autofeed == true) {
$url = full_url();
if (substr_count($url,'?')) {
$url .= "&view=rss";
} else {
$url .= "?view=rss";
}
$url = elgg_format_url($url);
$feedref = <<<END

<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />

END;

} else {
$feedref = "";
}

$js = elgg_get_loaded_js('head');
$css = elgg_get_loaded_css();

$version = get_version();
$release = get_version(true);
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="ElggRelease" content="&lt;?php echo $release; ?&gt;">
<meta name="ElggVersion" content="&lt;?php echo $version; ?&gt;">
<title><?php echo $title; ?></title>
<?php echo elgg_view('page/elements/shortcut_icon', $vars); ?><?php foreach ($css as $link) { ?><link rel="stylesheet" href="&lt;?php%20echo%20%24link;%20?&gt;" type="text/css">
<?php } ?><?php $ie_url = elgg_get_simplecache_url('css', 'ie');
$ie7_url = elgg_get_simplecache_url('css', 'ie7');
$ie6_url = elgg_get_simplecache_url('css', 'ie6');
?><!--[if gt IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
<![endif]--><!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie7_url; ?>" />
<![endif]--><!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" />
<![endif]--><?php foreach ($js as $script) { ?><script type="text/javascript" src="&lt;?php%20echo%20%24script;%20?&gt;"></script><?php } ?><script type="text/javascript">
// <![CDATA[
<?php echo elgg_view('js/initialize_elgg'); ?>
// ]]>
</script>
The issuse I am having is installing Freichat on elgg 1.8 I get to the box that says add the following lines in your Add the following lines in your head.php in views/default/page/elements/in the header(before &amp;lt;head&amp;gt; tag) then this code &amp;lt;!--===========================FreiChatX=======START=========================--&amp;gt; &amp;lt;!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code Then remove FreiChatX tables frei_session &amp; frei_chat if necessary The best/recommended way is using the module for installation --&amp;gt; &amp;lt;?php if(isset($_SESSION[&quot;guid&quot;])==true) {$ses=$_SESSION[&quot;guid&quot;]; } else {$ses=0;} if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php&quot;)){ require &quot;/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;http://planofaction.info/mod/chat/vendors/freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://planofaction.info/mod/chat/vendors/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; Problem is, I dont see a Head tag. in /home/mrcoffee/public_html/views/default/page/elements/head.php I see &amp;lt;?php /** * The standard HTML head * * @uses $vars[&#039;title&#039;] The page title */ // Set title if (empty($vars[&#039;title&#039;])) { $title = elgg_get_config(&#039;sitename&#039;); } else { $title = elgg_get_config(&#039;sitename&#039;) . &quot;: &quot; . $vars[&#039;title&#039;]; } global $autofeed; if (isset($autofeed) &amp;&amp; $autofeed == true) { $url = full_url(); if (substr_count($url,&#039;?&#039;)) { $url .= &quot;&amp;view=rss&quot;; } else { $url .= &quot;?view=rss&quot;; } $url = elgg_format_url($url); $feedref = &amp;lt;&amp;lt;&amp;lt;END &amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS&quot; href=&quot;{$url}&quot; /&amp;gt; END; } else { $feedref = &quot;&quot;; } $js = elgg_get_loaded_js(&#039;head&#039;); $css = elgg_get_loaded_css(); $version = get_version(); $release = get_version(true); ?&amp;gt; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt; &amp;lt;meta name=&quot;ElggRelease&quot; content=&quot;&amp;lt;?php echo $release; ?&amp;gt;&quot; /&amp;gt; &amp;lt;meta name=&quot;ElggVersion&quot; content=&quot;&amp;lt;?php echo $version; ?&amp;gt;&quot; /&amp;gt; &amp;lt;title&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/title&amp;gt; &amp;lt;?php echo elgg_view(&#039;page/elements/shortcut_icon&#039;, $vars); ?&amp;gt; &amp;lt;?php foreach ($css as $link) { ?&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo $link; ?&amp;gt;&quot; type=&quot;text/css&quot; /&amp;gt; &amp;lt;?php } ?&amp;gt; &amp;lt;?php $ie_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie&#039;); $ie7_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie7&#039;); $ie6_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie6&#039;); ?&amp;gt; &amp;lt;!--[if gt IE 7]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;!--[if IE 7]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie7_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;!--[if IE 6]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie6_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;?php foreach ($js as $script) { ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo $script; ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;?php } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; // &amp;lt;![CDATA[ &amp;lt;?php echo elgg_view(&#039;js/initialize_elgg&#039;); ?&amp;gt; // ]]&amp;gt; &amp;lt;/script&amp;gt; &amp;lt;?php echo $feedref; $metatags = elgg_view(&#039;metatags&#039;, $vars); if ($metatags) { elgg_deprecated_notice(&quot;The metatags view has been deprecated. Extend page/elements/head instead&quot;, 1.8); echo $metatags; } Now.. What do i Do? if i click YES in the has Plugin Settings Step 2: Have you done the chat installation? Turn this on only after you finish the installation. it seems to destroy the views. Also, I;m using Socialize Me theme. Please help reguarding this, as I Love Freichat!

Try adding the copy-paste code before the lines

<?php foreach ($css as $link) { 
?>

Try adding the copy-paste code before the lines &amp;lt;code&amp;gt;&amp;lt;?php foreach ($css as $link) { ?&amp;gt;&amp;lt;/code&amp;gt;
Necessity is the mother of all inventions!

Thanks for the quick reply..
Code now looks like this.

Also, here is a Pastebin URL that you can reply to/read code better

http://pastebin.com/hQzUbyQy

<?php /**
* The standard HTML head
*
* @uses $vars['title'] The page title
*/

// Set title

if (empty($vars['title'])) {
$title = elgg_get_config('sitename');
} else {
$title = elgg_get_config('sitename') . ": " . $vars['title'];
}

global $autofeed;
if (isset($autofeed) && $autofeed == true) {
$url = full_url();
if (substr_count($url,'?')) {
$url .= "&view=rss";
} else {
$url .= "?view=rss";
}
$url = elgg_format_url($url);
$feedref = <<<END

<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />

END;
<?php foreach ($css as $link) {
?><!--===========================FreiChatX=======START=========================--><!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code
Then remove FreiChatX tables frei_session & frei_chat if necessary
The best/recommended way is using the module for installation --><?php if(isset($_SESSION["guid"])==true) {$ses=$_SESSION["guid"]; } else {$ses=0;}
if(!function_exists("freichatx_get_hash")){
function freichatx_get_hash($ses){

if(is_file("/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php")){

require "/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php";

$temp_id = $ses . $uid;

return md5($temp_id);

}
else
{
echo "<script>alert('module freichatx says: hardcode.php file not
found!');";
}

return 0;
}
}
?> <script type="text/javascript" language="javascipt" src="http://planofaction.info/mod/chat/vendors/freichat/client/main.php?id=&lt;?php%20echo%20%24ses;?&gt;&amp;xhash=&lt;?php%20echo%20freichatx_get_hash(%24ses);%20?&gt;"></script><link rel="stylesheet" href="http://planofaction.info/mod/chat/vendors/freichat/client/jquery/freichat_themes/freichatcss.php" type="text/css"><!--===========================FreiChatX=======END=========================-->

} else {
$feedref = "";
}

$js = elgg_get_loaded_js('head');
$css = elgg_get_loaded_css();

$version = get_version();
$release = get_version(true);
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ElggRelease" content="&lt;?php echo $release; ?&gt;"><meta name="ElggVersion" content="&lt;?php echo $version; ?&gt;">

<title><?php echo $title; ?></title>
<?php echo elgg_view('page/elements/shortcut_icon', $vars); ?><?php foreach ($css as $link) { ?><link rel="stylesheet" href="&lt;?php%20echo%20%24link;%20?&gt;" type="text/css">
<?php } ?><?php $ie_url = elgg_get_simplecache_url('css', 'ie');
$ie7_url = elgg_get_simplecache_url('css', 'ie7');
$ie6_url = elgg_get_simplecache_url('css', 'ie6');
?><!--[if gt IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
<![endif]--><!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie7_url; ?>" />
<![endif]--><!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" />
<![endif]--><?php foreach ($js as $script) { ?><script type="text/javascript" src="&lt;?php%20echo%20%24script;%20?&gt;"></script><?php } ?><script type="text/javascript">
// <![CDATA[
<?php echo elgg_view('js/initialize_elgg'); ?>
// ]]>
</script>
Thanks for the quick reply.. Code now looks like this. Also, here is a Pastebin URL that you can reply to/read code better http://pastebin.com/hQzUbyQy &amp;lt;?php /** * The standard HTML head * * @uses $vars[&#039;title&#039;] The page title */ // Set title if (empty($vars[&#039;title&#039;])) { $title = elgg_get_config(&#039;sitename&#039;); } else { $title = elgg_get_config(&#039;sitename&#039;) . &quot;: &quot; . $vars[&#039;title&#039;]; } global $autofeed; if (isset($autofeed) &amp;&amp; $autofeed == true) { $url = full_url(); if (substr_count($url,&#039;?&#039;)) { $url .= &quot;&amp;view=rss&quot;; } else { $url .= &quot;?view=rss&quot;; } $url = elgg_format_url($url); $feedref = &amp;lt;&amp;lt;&amp;lt;END &amp;lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS&quot; href=&quot;{$url}&quot; /&amp;gt; END; &amp;lt;?php foreach ($css as $link) { ?&amp;gt; &amp;lt;!--===========================FreiChatX=======START=========================--&amp;gt; &amp;lt;!-- For uninstalling ME , first remove/comment all FreiChatX related code i.e below code Then remove FreiChatX tables frei_session &amp; frei_chat if necessary The best/recommended way is using the module for installation --&amp;gt; &amp;lt;?php if(isset($_SESSION[&quot;guid&quot;])==true) {$ses=$_SESSION[&quot;guid&quot;]; } else {$ses=0;} if(!function_exists(&quot;freichatx_get_hash&quot;)){ function freichatx_get_hash($ses){ if(is_file(&quot;/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php&quot;)){ require &quot;/home/mrcoffee/public_html/mod/chat/vendors/freichat/hardcode.php&quot;; $temp_id = $ses . $uid; return md5($temp_id); } else { echo &quot;&amp;lt;script&amp;gt;alert(&#039;module freichatx says: hardcode.php file not found!&#039;);&amp;lt;/script&amp;gt;&quot;; } return 0; } } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; language=&quot;javascipt&quot;src=&quot;http://planofaction.info/mod/chat/vendors/freichat/client/main.php?id=&amp;lt;?php echo $ses;?&amp;gt;&amp;xhash=&amp;lt;?php echo freichatx_get_hash($ses); ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;http://planofaction.info/mod/chat/vendors/freichat/client/jquery/freichat_themes/freichatcss.php&quot; type=&quot;text/css&quot;&amp;gt; &amp;lt;!--===========================FreiChatX=======END=========================--&amp;gt; } else { $feedref = &quot;&quot;; } $js = elgg_get_loaded_js(&#039;head&#039;); $css = elgg_get_loaded_css(); $version = get_version(); $release = get_version(true); ?&amp;gt; &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt; &amp;lt;meta name=&quot;ElggRelease&quot; content=&quot;&amp;lt;?php echo $release; ?&amp;gt;&quot; /&amp;gt; &amp;lt;meta name=&quot;ElggVersion&quot; content=&quot;&amp;lt;?php echo $version; ?&amp;gt;&quot; /&amp;gt; &amp;lt;title&amp;gt;&amp;lt;?php echo $title; ?&amp;gt;&amp;lt;/title&amp;gt; &amp;lt;?php echo elgg_view(&#039;page/elements/shortcut_icon&#039;, $vars); ?&amp;gt; &amp;lt;?php foreach ($css as $link) { ?&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;&amp;lt;?php echo $link; ?&amp;gt;&quot; type=&quot;text/css&quot; /&amp;gt; &amp;lt;?php } ?&amp;gt; &amp;lt;?php $ie_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie&#039;); $ie7_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie7&#039;); $ie6_url = elgg_get_simplecache_url(&#039;css&#039;, &#039;ie6&#039;); ?&amp;gt; &amp;lt;!--[if gt IE 7]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;!--[if IE 7]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie7_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;!--[if IE 6]&amp;gt; &amp;lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&amp;lt;?php echo $ie6_url; ?&amp;gt;&quot; /&amp;gt; &amp;lt;![endif]--&amp;gt; &amp;lt;?php foreach ($js as $script) { ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;&amp;lt;?php echo $script; ?&amp;gt;&quot;&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;?php } ?&amp;gt; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; // &amp;lt;![CDATA[ &amp;lt;?php echo elgg_view(&#039;js/initialize_elgg&#039;); ?&amp;gt; // ]]&amp;gt; &amp;lt;/script&amp;gt; &amp;lt;?php echo $feedref; $metatags = elgg_view(&#039;metatags&#039;, $vars); if ($metatags) { elgg_deprecated_notice(&quot;The metatags view has been deprecated. Extend page/elements/head instead&quot;, 1.8); echo $metatags; } I attached a screenshot to explain whats going on. the chat button is clearly seen, as is the Chat Box-fully working. its when logged out that the views get messed up. seems like its strangling the built in slider from Socialize Me theme. there&#039;s three photos uploaded three are stock.the Websites Wanting image. a baseball player, and a Girl. Any other advice?

I noticed, the view breaks even if I dont add that code.
set have you installed to NO, website goes back to normal. set to YES it breaks again.

I noticed, the view breaks even if I dont add that code. set have you installed to NO, website goes back to normal. set to YES it breaks again.

Can you provide us with two test accounts , so that we may know what exactly is causing your problem

Can you provide us with two test accounts , so that we may know what exactly is causing your problem
Necessity is the mother of all inventions!
150
5
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft