Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-12-2014, 03:15 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,526
Kyttias is on a distinguished road
Default Addon: Frei Chat (Facebook-like Messenger)

edit: Here's a link to a screenshot of this in action!

I talked with HoF about this a little bit and finally got Frei Chat to work. (I got it to work with 1.3.4, I haven't asked him how much is different about what we're doing in regards to earlier versions, but it's worth a shot?)

Download it (you can go ahead and grab the free version).

Once downloaded, open it up and add the entire freichat folder to your Mysidia directory. So: <where you have Mysidia installed>/freichat.

Run the installer: <Mysidia>/freichat/installation/index.php

Follow the directions for a Customized integration.

-

step 01. Database host is probably localhost. Table prefix is not required. In fact, this should be the same general information you're using for Mysidia itself, as found in inc/config.php (just in case you've forgotten your database username and password). Fill all that basic stuff in. On this page you'll also be making your own admin password, so, do remember it. Hit submit. Let it create tables. Hit next.

-

step 02. Open up Notepad or some text editor. It's going to ask you to "Copy-paste the following code after <head> tag in your index.php or your template/theme file". For now, paste this into the open text editor so you definitely don't lose it - but no need to save it. Double click their box with code if you're having trouble highlighting it, then use a copy shortcut.

-

step 03. It's actually going to go into <Mysidia>/classes/class_template.php, (class_menu works as well, it's what I was using previously, but not everyone even uses the built in menu). Scroll to the very bottom, and after the ?> paste the code they gave you in. Yes, after. The code you paste actually opens a new set of php brackets, so it's ok. <b>Now</b>, delete the the Freichat comments about uninstalling (for whatever reason, if I don't, everything is very unhappy). That's everything from <!-- to -->, the title, too. Save. (If you need to reupload your file via FTP, do so now. Do so every time I remind you to save after changes.)

-

step 04. Hit done. Give it your url. Hit submit. You should be able to see the chat in the corner of the iframe they show you. If not, go up a bit and hit submit again after making sure you have followed all previous steps correctly. So, now that we can see it, hit yes.

-

step 05. Here we're doing user authentication. Ignore the skip it, we're doing this. Keep scrolling down, and it gives an example code and asks you to make the modifications necessary to it. To save you the trouble, here's what you're going to:

Go back to the code you pasted into class_template.php and find $ses=null;.

Replace that line with the following:

PHP Code:
$mysidia Registry::get("mysidia");
if(
$mysidia->user->isloggedin)

    
$ses $mysidia->user->uid//tell freichat the userid of the current user

    
setcookie("freichat_user""LOGGED_IN"time()+3600"/"); // *do not change -> freichat code
}
else {
    
$ses null//tell freichat that the current user is a guest

    
setcookie("freichat_user"nulltime()+3600"/"); // *do not change -> freichat code

-

step 06. Save and hit done. They'll pop an iframe again. The chat on the side may or may not have a 'fake' user on it, this is it doing it's testing. Don't be surprised if it says no one is online at this point. If logged out, log in. Or, even if you are logged in, log out, and log back in (and heck, this may be unnecessary). Hit done.

-

step 07. Here it's verifying that it can find you. If it has errors here, again, double check everything we've done so far. Make sure things open have saved, etc. If everything's fine, congrats! Proceed. (I ended up getting a blank page, and this is not supposed to happen. If you did, too, just keep reading anyway--)

-

step 08. The rest should be a breeze. If you used the default prefix when installing the Mysidia database, the tables you need to find the users is adopts_users, and the columns are username and uid. If you did not use adopts_ when you created your site, use whatever you did create. For those who got a blank page, if you try to reload it's going to try and get you to reinstall everything (ugh), just open up ~/freichat/hardcode.php - not to follow the reinstall instructions, but to continue on manually. At the bottom you'll see this:

PHP Code:
/* 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) 
Change it to:
PHP Code:
/* Custom driver */
$usertable='adopts_users'//specifies the name of the table in which your user information is stored.
$row_username='username'//specifies the name of the field in which the user's name/display name is stored.
$row_userid='uid'//specifies the name of the field in which the user's id is stored (usually id or userid) 
*the avatar info isn't changing because Mysidia actually doesn't keep the avatar data in the users table. =| (I'll try to work on an inevitable work around for this?)

I'll try and make this guide clearer if need be.

Freichat Admin Panel
You'll want to go into <yoursite.com/whatever>/freichat and hit 'administer' to change a few things.

The second button from the top (looks like a book) on the admin panel for freichat will let you decide guest settings and all sorts of things you'll want to configure. I can't guarantee 'Only your Buddies' in 'Who should be on the online users list' will work. You'll want to set 'Show Avatar' to no, because I can't get those to work properly.

The sixth icon (a cog) has to do with the chatroom link that shows up in the upper left of your page. But the ninth icon (briefcase) will allow you to disable it completely, along with other settings.

The eighth button from the top (looks like an image) on the admin panel for freichat lets you modify the theme.

There may be some graphical errors (overlapping text) going on with the appearance of the chat box itself. You will need to fine tune some going ons in here. If the online status text is overlapping the users online area, then I would make these changes: In the freichat admin panel, click the eighth icon (a picture?) and by basic or silver or whatever design you're using, hit 'Design'. Open up the chatbox (it has the buddylist). See where the chatbox says 'i am available'? Click that the container holding that. Or, rather, don't click the text, or the arrow icon next to it, click just a tiny bit beneath and between them. It should pop up that you're editting DIV#frei_option_bar_status.frei_option_bar_status so here I want you to change the width to 120px.

OR manually: in ~/freichat/client/themes/basic/styles.css (or silver, or whichever theme you're using), find .frei_option_bar_status and set its width property to 120px.


-



Huge thanks to HoF for helping me on AIM to figure out how to modify the authentication code!

Last edited by Kyttias; 11-14-2014 at 12:22 PM.
Reply With Quote
 

Tags
chat, chatroom, facebook-like chat, messenger


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone tried Facebook features on their site? Kesstryl Feedback and Suggestions 1 07-17-2012 11:08 PM
Yahoo Instant Messenger.. please help! solskenn Other Chat 0 05-10-2012 11:00 AM
Facebook Like Site Nemesis Other Chat 0 06-04-2011 11:02 AM
Adoptable Search Addon [by Kae] Kaeliah Mys v1.1.x Mods 16 01-25-2011 07:05 PM
Facebook Connect fadillzzz Questions and Supports 6 09-01-2010 01:48 PM


All times are GMT -5. The time now is 04:30 PM.

Currently Active Users: 9825 (0 members and 9825 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636