Customizing Frei Chat
How can to customize Frei-chat (a live chat for Elgg 1.8 like Facebook or Google chat) 
Editing the plugins in Frei chat
Open the file
elgg\mod\chat\vendors\freichat\installation\install.php (before installation)
or
elgg\mod\chat\vendors\freichat\arg.php (after installation)
And change this code
$show_translate_plugin = \'enabled\';
$show_chatroom_plugin = \'disabled\';
$show_videochat_plugin = \'disabled\';
$show_save_plugin = \'enabled\';
$show_smiley_plugin = \'enabled\';
$show_mail_plugin = \'enabled\';
And change this code
$ACL = array(
\'FILE\' => array(
\'user\' => \'allow\',
\'guest\' => \'allow\'
),\'TRANSLATE\' => array(
\'user\' => \'allow\',
\'guest\' => \'allow\'
),\'SAVE\' => array(
\'user\' => \'allow\',
\'guest\' => \'allow\'
),\'SMILEY\' => array(
\'user\' => \'allow\',
\'guest\' => \'allow\'
),\'MAIL\' => array(
\'user\' => \'allow\',
\'guest\' => \'allow\'
),\'VIDEOCHAT\' => array(
\'user\' => \'noallow\',
\'guest\' => \'noallow\'
));
Replacing the plugins in Frei chat
Example: Smiles after Send file
Open the file
elgg\mod\chat\vendors\freichat\client\freichat.js
Cut this code
if(freidefines.PLUGINS.showsmiley == 'enabled')
{
if((freidefines.GEN.is_guest == 1 && freidefines.ACL.SMILEY.guest == "allow") || (freidefines.GEN.is_guest == 0 && freidefines.ACL.SMILEY.user == "allow"))
{
pluginhtml += '<span id="freismilebox"><span id="frei_smileys_'+id+'" class="frei_smileys none">'+FreiChat.smileylist(id)+'</span> </span>';
pluginhtml += '<a href="javascript:void(0)" title="'+freidefines.titles_smiley+'" onmousedown="FreiChat.smiley(\''+id+'\')"> <img id="smile_'+id+'" src="'+FreiChat.make_url(freidefines.smileyimg)+'" alt="-" /> </a> ';
}
}
And paste it after this code
if(freidefines.PLUGINS.show_file_send == 'true' )
{
if((freidefines.GEN.is_guest == 1 && freidefines.ACL.FILE.guest == "allow") || (freidefines.GEN.is_guest == 0 && freidefines.ACL.FILE.user == "allow"))
{
pluginhtml = '<span id="freifilesend'+id+'"><a href="javascript:void(0)" onClick="FreiChat.upload(\''+user+'\',\''+id+'\')"><img id="upload'+id+'" src="'+FreiChat.make_url(freidefines.uploadimg)+'" title='+freidefines.titles_upload+' alt="upload" /> </a></span>';
}
}
Removing Powered By EvNix
Open the file
elgg\mod\chat\vendors\freichat\client\freichat.js
And delete this code
<div id='evnix"+randstr+"power' class='evnix"+randstr2+"power'><font size='1'>"+freidefines.pwdby+" <a href='http://www.evnix.com' target='_blank'>EvNix</a></font></div>
Removing the Additional options
Open the file
elgg\mod\chat\vendors\freichat\client\freichat.js
And delete this code
<span onmousedown='FreiChat.freichatTool(\"nooptions\")'> <img id='frei_img' src="+FreiChat.make_url(freidefines.toolimg)+" title='"+freidefines.opt_txt+"' alt='option'/> </span>
Chat only for logged users
Open the file
elgg\mod\chat\views\default\chat\chat.php
And change this code
if (elgg_get_plugin_setting('chat_installed', 'chat') == 'yes') {
With this
if (elgg_get_plugin_setting('chat_installed', 'chat') == 'yes' && isloggedin()) {
Chat only for friends
Open the file
elgg\mod\chat\vendors\freichat\server\drivers\Elgg.php
After this code
$result = $this->getList();
Add this code
$query = "SELECT guid_two FROM " . DBprefix . "entity_relationships WHERE guid_one = " . $_SESSION[$this->uid . 'usr_ses_id'] . " AND relationship = 'friend'";
$friendsarray = $this->db->query($query)->fetchAll();$friends = array();
foreach($friendsarray as $array){
$friends[] = $array[0];
}if(count($friends) == 0){
$result = array();
}
else{
for($i=0; $i<count($result); $i++){
if(!in_array($result[$i]['session_id'], $friends)){
unset($result[$i]);
}
}
}
$result = array_values($result);
You can to use already customized Chat with Purity Theme by Alex Falk
How to install Elgg Chat
(thanks RiverVanRain for this video tutorial)



Chat for Elgg with Purity Theme: http://weborganizm.org/sfera/v/65/elgg-customizations – already customized
Hello,
i wanted to remove the Powered by EvNix but it is not located in the freichat.js! How can i remove it? Thx
Just repeat the aboving steps:
Open the file
elgg\mod\chat\vendors\freichat\client\freichat.js
And delete this code
<div id='evnix"+randstr+"power' class='evnix"+randstr2+"power'><font size='1'>"+freidefines.pwdby+" <a href='; target='_blank'>EvNix</a></font></div>
If you need to do another hacks then try it:
Open the file
elgg\mod\chat\vendors\freichat\lang\english.php
And delete\change this
$frei_trans['pwdby'] = 'Powered By';
thanks,
it removes Powered by but what about EvNix ?
how we can remove EvNix ?
See Alex Falk's following reply here:
http://elgghacks.com/customizing-frei-chat/comment-page-1/#comment-6123
add this css
.frei_user_brand font{
display: none;
}
where the css place ?
Add it in the file chat\vendors\freichat\index.php after this code:
<style type="text/css">
I can't find any evnix div in freichat.js
…/mod/chat/vendors/freichat/client$ grep -i evnix freichat.js
…/mod/chat/vendors/freichat/client$ grep -i randstr2 freichat.js
…/mod/chat/vendors/freichat/client$ grep -i power freichat.js
I'm using latest frei-chat with elgg 1.8.3.
Clearnig this is possible $frei_trans['pwdby'] = 'Powered By';.
Stil EvNiX keeps showing ..
Any help is highly appreciated.
Thx in advance
The aboving examples for Frei Chat ver.1.3 only.
Latest version is Frei Chat ver.1.5 with external js including 'PoweredBy'
So. You can to solve this problem with Hack4FreiChat by Alex Falk.
1. Download http://weborganizm.org/sfera/v/65/elgg-customizations and UnZip it.
2. Replace
elgg\mod\chat\views\default\chat\chat.php
With
hack4freichat/chat.php
3. Open the folder
elgg\mod\chat\vendors\freichat\client\
And add this file
hack4freichat/hack.js
Done!
Important! FreiChat's author says: 'Link to evnix.com must not removed or altered from the code'
Hello!
This hack does not work for me. I use the Joomla version, but I think the difference is not that big. When I try to load, the chat hangs saying: Fetching…user..data
kindly wait
loading………..
any ideas how to solve that?
Big difference if you using this Elgg hack for Joomla
U try connect to DB via Elgg code.
If you use the aboving hack only (not hacks in article) that U need replace some codes strings in the file:
chat.php
into
hack4freichat.zip
OR
Open your Joomla file:
chat.php
And add this code
<script type="text/javascript" language="javascipt" src="YOUR_PATH_HERE_chat/vendors/freichat/client/hack.js?time=<?php echo time(); ?>" ></script>
Sure, don't forget about it:
hack.js from hack4freichat.zip
Hi, yes I know this. The chat.php in Joomla is called mod_freichatx.php.
All I did is changing the line:
$document->addScript(';.time()); from mod_freichatx.php to
$document->addScript($host.'freichat/client/hack.js?time='.time()); For shure I placed hack.js at the right directory. I think the "same" thing is done in the chat.php hack.
But this dit not help so far.
For the moment I use the css hack, but I would prefer the "offline" version…
OK.
I tried Frei ChatX v6.3.2.
Before installing I opened this file:
freichat\installation\drivers\Joomla.php
And replaced this code:
<script type="text/javascript" language="javascipt" src="http:// evnix-dot-com.appspot.com/?time=<?php echo time(); ?>" ></script>
With Alex Falk hack code:
<script type="text/javascript" language="javascipt" src="http:// MY_PATH_TO/hack.js?time=<?php echo time(); ?>" ></script>
Next I opened this file:
freichat\installation\contents.php
And replaced this code:
<script type="text/javascript" language="javascipt" src="http:// evnix-dot-com.appspot.com/?time=\'. time() .\'" ></script>
With AF hack code also:
<script type="text/javascript" language="javascipt" src="http:// MY_PATH_TO/hack.js?time=\'. time() .\'" ></script>
Now U try it
Mr. pianist
Hi i downloaded the hack chat.php and hack.jc and install in right folder hide the powered by but……. i can see my friend's online but can't able to chat popup is not getting open pls help me reply soon
Thankyou
Hi, syed.
What is FreiChat version?
Also, go to Administration -> Plugins page and try to replace the FreiChat plugin in bottom…
Hi
I'm using frei-chat 1.5 and Elgg 1.8.5
Thankyou
I found this bug too…
Error inside the FreiChat (with ChatRooms).
It will be solved only when disabling the ChatRooms
Open the file
elgg\mod\chat\vendors\freichat\arg.php
And replace this code
$show_chatroom_plugin = 'enabled';
With this
$show_chatroom_plugin = 'disabled';
Also, Go to FreiChatX Parameters:
Administration -> Settings -> Chat -> Access admin panel of chat
And enable this*
Remove Jquery Conflicts About
*need [Yes]
And disable this*
Show Jquery Animations
*need [No]
still same problem pls help
Hey, folks!
Need new FreiChatHack version.
Check http://weborganizm.org/sfera/v/65/elgg-customizations for free downloading
how to download purity theme from.the above link?
You need the invitation or Join to http://weborganizm.org
Hello bro,
Would u plz help me to remove "powered by EvNix" tag from v7.2. I am using joomla with it. Thanks in advance
You can to download my plugin 'FreiChat for Elgg' from my sfera: http://weborganizm.org/sfera/v/65/elgg-customizations
Just copy folder 'freichat' from 'chat/vendor' and then install it as new chat on your Joomla website
Enjoy!
Thanks for your reply. But i want to remove only the powered by tag from latest version. I want to learn how to do that. Thanks
Hi
bro i have big problem which i fine it is chat plugin when it is active mod
That time if i add or any other user will add means page will reload when i will put the chat in deactivate mod it will not load the page just Ajax icon will lode and it will get add
only i know that you only to help me so
again Thank's lot for helping so much
I created one page:
And can't found no one issues with Frei chat on your website
hallo
I use freichat 1.6, when I tried to hack the plugin to use hack4freichat freichat disappeared and did not appear again, please let me know to remove evnix: D
Just http://weborganizm.org/sfera/v/65/elgg-customizations
Q&A about the customizations of the Elgg plugin – Frei Chat aka Elgg Chat likes Facebook Chat in my chan on guruteka: http://weborganizm.org/guruteka/chan/273/chat-like-facebook
To remove the 'Powered by EvNix' eyesore on the chat, go to mod/chat/vendors/freichat/lang/english.php replace:
Line 13: $frei_trans['pwdby'] = 'Powered by';
with
$frei_trans['pwdby'] = '<noscript>';
It's old trick …and don't work now
sorry BUT that trick works for me. try it first before you give comment
Cool
Work ok with OLD FreiChat versions < 7.0 only
But DONT work with the new editions of it
This works w/ 7.2 on Elgg 1.8.8
How to remove 'powered by evnix' in elgg chat window.
What is FreiChat version?
receive an invitation to http://weborganizm.org/
then download my 'Facebook like ajax chat for Elgg' from http://weborganizm.org/sfera/v/65/elgg-customizations
Chat only for logged users Tip for Elgg 1.8.X
=============================================
For Elgg 1.8.X
the string to identify logged users it isn't:
isloggedin()
but:
elgg_is_logged_in()
So, the right way is:
if (elgg_get_plugin_setting('chat_installed', 'chat') == 'yes' && elgg_is_logged_in())
Thanks
Please how can i show friends list whether offline or online in freichat in Elgg? Please help
not able to use chat.
what to do after
shows step 1
See my video tutorial about the installation of the Elgg Chat:
Hope it help to you more
thankx for video its working….but not showing online or offline friends…not able to chat..ohh plz help me…do we have some other option for chat..
1. Go to Administration -> Plugins -> Chat -> Settings (URL: )
2. Click on 'Access admin panel of chat' (URL: )
3. Enter your password on the FreiChat Admin page (URL: )
4. Change FreiChat General settings (URL: ) with Unchecking the user&guest access for any plugins and Click 'Submit'.
Cheers
how to remove fri chat & chat room in home page ,& what is fri chat admin url , thanks in advance
1. Go to Administration -> Plugins -> Chat -> Settings (URL: )
2. Click on 'Access admin panel of chat' (URL: )
3. Enter your password on the FreiChat Admin page (URL: )
4. Change FreiChat General settings (URL: ) with Unchecking the user&guest access for 'Chatroom' plugin and Click 'Submit'.
Now you disabled 'Chatroom'
Please is there a way to show all friends whether offline or online?
Why need it?
Just use these Chat settings:
Client side -> I. Show Guests or Resgistered Users -> Buddies
And you can to see all your friends online and offline >300 ms time left also.
Of course, you'll not see the users that a long time didn't go to the site
Thanks for your reply.
Pls is there no way to increase the time the chat takes to remove the user data from the table when offline?
1. Go to Administration -> Plugins -> Chat -> Settings (URL: )
2. Click on 'Access admin panel of chat' (URL: )
3. Enter your password on the FreiChat Admin page (URL: )
4. Change FreiChat Additional settings on the tab 'Additional' (URL: ) with your own parameters for 'Busy time out' and 'Offline time out' sections and Click 'Submit'.
Thanks i appreciate
Hi. Thanks for informations. how can i use user's real avatar instead of the freichat default avatar?
I'm still working on it. ;D
The new version Frei chat version will coming soon from http://weborganizm.org/sfera/v/65/elgg-customizations
How to become an invite for http://weborganizm.org/ ?
Regards
From http://weborganizm.org/ : '$5 – one time payment to join. You should receive an invitation Email after your payment'
But soon I'm going to talk with the owner of weborganizm.org about the Christmas gifts for our ElggHackers
Follow us
Hello please asset me how to remove the "Powered By Codologic" from the chat box,above mentioned div tag is not there in my freichat.js,and Smiles are not shown in the chat.
FreiChat older than FreiChatX version 7.2 (is vendor not for Elgg included!) have a very limited functionality for free using
Hello I am using Frei Chat 1.6.1 these tricks are not working in this version please help me how to do in this version
thanking you….
You need Chat like Facebook 2 from http://weborganizm.org/sfera/v/1016/elgg-chat-plugin only