Show Categories
424
5
galihdjx posted Jul 29 '15 at 3:36 pm

Help me, when i tried to install codoforum in local machine with xampp, in step 3 get error
Fatal error: Maximum execution time of 30 seconds
exceeded in C:\xampp\htdocs\sys\vendor\illuminate\database\Illuminate\Database\Connection.php on line 337

please help

recent by Colder  ·  Oct 6 '15 at 9:38 am
104
2
nurul.chamidah posted Oct 5 '15 at 7:22 am

i am installed freichat on customized website in localhost. whenever i am not logged in in two different browser, it will work as guest to guest chat. but if i logged in,, it is not showing online user, only getting list of online user.
i've read some post forum earlier. and i've tried to press f12, network, select any request. and this is the result

<br />
<b>Fatal error</b>:  Call to a member function rowCount() on a non-object in <b>C:\xampp\htdocs\freichat\server\drivers\base.php</b> on line <b>215</b><br />

but after i check at that file, it only counting banned user. how i can fix this problem? thanks

777
7

Social Logins Not Work.

Im trying to make Functional this but not work...

My error Say: You cannot access this page directly.

I Configured Alll Settings in config.php, and activated all apps in social....dont understand what is the problem:

look: www.venezolanosen.com

http://venezolanosen.com/sys/Ext/hybridauth/?hauth.start=Twitter&hauth.time=1437736733

http://venezolanosen.com/sys/Ext/hybridauth/?hauth.start=Facebook&hauth.time=1437737519

recent by Seanlionel  ·  Oct 4 '15 at 1:47 am
343
2
Jara posted Aug 18 '15 at 11:43 pm

Hi!

I had problem with plugin uni login. After I set everything properly, I still got an fatal error: Class 'Hybrid_Exception' not found...

Problem was caused by notice message in sys/CODOF/Util.php file when method start_sesstion (on line 76) tried to start session again. To disable restarting session you can use condition like

if (session_status() == PHP_SESSION_NONE) {
    session_start();
}

or somethin like

if(session_id() == '') {
    session_start();
}

I hope it some someone helps...

recent by Seanlionel  ·  Oct 4 '15 at 1:45 am
366
3

A few questions:

  1. Do you have the Hebrew language file that I will not have to translate my forum?
  2. After I translate it', it's not good because I want everything written from right to left . but it write left to right like English - how to fix this ?
  3. The icon and menus I need everything to be right how to fix it ?
  4. You wirte that after I translate the web I can from bacend change language -Where is it ?
  5. I need to aligine all the qestions - that evreyone can wirte in the fourm from right to left
recent by aung  ·  Oct 1 '15 at 10:28 am
600
8
thaGH05T posted Dec 2 '14 at 2:32 am

Having issues pulling avatars from somewhere other than the default Gravatar? Using a CMS such as Joomla! or WordPress? Then this tutorial is for you!

NOTE: Version at the time of this tutorial was 9.6

Introduction

The avatar integration process as explained by the Codologic team is a bit tricky for early coders such as myself. I had the basic concept which I pulled from HERE, but I couldnt find where in my driver file I was supposed to edit. So I started off editing the base.php driver file which caused me some headache. I recommend going to the above link to get familiar with the process before continuing, but I am going to try to make this idiot proof, so lets get started.

What You Need To Know

There are a few things that you need to know before we begin. The files that I refer to here as "driver" files are specific to your CMS. The driver file that we will create is not going to work for you if you do not have Kunena installed in Joomla!. So you will need to use some critical thinking while you do this. Everything that we use a relative path for is just that, relative, so you will need to know your own file hierarchy before continuing. last but not least; for gods sake don't just copy and paste the code here because it will likely break your chat.

Gather The Info

You will need a few pieces of information to create the driver file that will import your avatars for use in Freichat. The first thing you need is where in the world are you pulling your avatars. If you are using Joomla! as a CMS and a forum such as Kunena then you can easily grab them by going to /media/kunena/avatars/users. If you are using another CMS or different forum etc. then you may need to look around a bit to find the path of your users avatars. In that path you will notice that the names of the given avatars are user specific. In this case it uses their ID in the file name. write down the path and set this aside.

We now need to find out how it is stored in the forum database. Is it a relative path or a full link? To do this, go to your database and search for your forum's users table. For Kunena it will be something like jos_kunena_users. if you look at a record in that table you will see a column named something similar to "avatar". Take not of what is in that field for a user. In my case each users value for avatar was users/avatar(ID).png. So we now know that we will have to call the avatar from the jos_kunena_users table from the avatar column with a relative path of /media/kunena/avatars/. Let me digress a bit. Kunena has smaller avatars for each user in a different folder path like: media/kunena/avatars/resized/size36/. If your forum has an option to use resized images I suggest you use them because it cuts down on page load time. The image will be fitted to the size used by Freichat anyways.

We need to check a few global variables at this point. Head over to file/path/to/freichat/hardcode.php and look at the last line.

$avatar_field_name = 'avatar';

If your forum's user table uses "avatar" as its column name for the avatar path, then you are ok. If not, then you need to change this value to the column name of your forum's avatar column name. Kunena is already named avatar so no change needed for us here. You can go back to your database now and look in the frei_config table to determin if show_name column is set to either guest or user. This will determine which we will need to add in our driver file we are going to create.

Creating The Driver File

Now we need to start putting together the driver file. Open up your favorite editor (I use Notepad++) and create a file named whatever your forum software name is .php, so for me it would be Kunena.php Then we need to start writing a bit of code. start off with the code below.

<?php

require 'Joomla.php';

class Kunena extends Joomla {

    public function __construct($db) {
        //parent::__construct($db);
        $this->db = $db;
    }
}

Notice the "require 'Joomla.php';" part. You will need to replace this with the name of your current driver file. You can find this in hardcode.php. You also need to change line 5 to match the class associated with your driver. In my case it would be:

class Kunena extends Joomla {

But in your case you may need to change Joomla with the name of your driver file without the .php. I dont know what all the class-names are but you can always ask the Codologic creators. Then you will need to copy and past these three functions from base.php located in file/path/to/freichat/server/drivers

//------------------------------------------------------------------------------   
    public function avatar_url($res) {
        $murl = str_replace("server/freichat.php", "", $this->url);
        $avatar_url = $murl . 'client/jquery/user.jpeg';
        return $avatar_url;
    }

//------------------------------------------------------------------------------   
    public function get_guests() {

        $query = "SELECT DISTINCT status_mesg,username,session_id,status,guest,in_room
                   FROM frei_session
                  WHERE time>" . $this->online_time2 . "
                   AND session_id<>" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                   AND status<>2
                   AND status<>0";
//echo $query;

        $list = $this->db->query($query)->fetchAll();
        return $list;
    }

//------------------------------------------------------------------------------ 
    public function get_users() {

        $query = "SELECT DISTINCT status_mesg,username,session_id,status,guest,in_room
                   FROM frei_session
                  WHERE time>" . $this->online_time2 . "
                   AND session_id<>" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                   AND guest=0
                   AND status<>2
                   AND status<>0";

        $list = $this->db->query($query)->fetchAll();

        return $list;
    }

//------------------------------------------------------------------------------

between the last two curly braces in the driver file you are creating. Now you should have:

<?php

require 'Joomla.php';

class Kunena extends Joomla {

    public function __construct($db) {
        //parent::__construct($db);
        $this->db = $db;
    }

 //------------------------------------------------------------------------------   
    public function avatar_url($res) {
        $murl = str_replace("server/freichat.php", "", $this->url);
        $avatar_url = $murl . 'client/jquery/user.jpeg';
        return $avatar_url;
    }

//------------------------------------------------------------------------------   
    public function get_guests() {

        $query = "SELECT DISTINCT status_mesg,username,session_id,status,guest,in_room
                   FROM frei_session
                  WHERE time>" . $this->online_time2 . "
                   AND session_id<>" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                   AND status<>2
                   AND status<>0";
//echo $query;

        $list = $this->db->query($query)->fetchAll();
        return $list;
    }

//------------------------------------------------------------------------------ 
    public function get_users() {

        $query = "SELECT DISTINCT status_mesg,username,session_id,status,guest,in_room
                   FROM frei_session
                  WHERE time>" . $this->online_time2 . "
                   AND session_id<>" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                   AND guest=0
                   AND status<>2
                   AND status<>0";

        $list = $this->db->query($query)->fetchAll();

        return $list;
    }

//------------------------------------------------------------------------------

}

So the three functions that we are going to work with, to reiterate, are avatar_url(), get_guests(), and get_users(). For avatar_url() we want to make the following changes. Make sure you use your relative path depending on your setup and not just copy mine.

$murl = str_replace($this->to_freichat_path, "", $this->url);
        $avatar_url = $murl . 'media/kunena/avatars/resized/size36/' . $res[$this->avatar_field_name];
        return $avatar_url;

That should replace the function, not be appended to it. Now for get_users() you need to change the query between the quotes to suite your needs which in my case looks like this now:

$query = "SELECT DISTINCT f.status_mesg,f.username,f.session_id,f.status,f.guest,f.in_room,k.avatar
                               FROM frei_session AS f
                               LEFT JOIN " . DBprefix . "kunena_users AS k ON f.session_id=k.userid
                              WHERE time>" . $this->online_time2 . "
                               AND f.session_id!=" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                               AND f.status!=2
                               AND f.status!=0";

The difference here is we are adding ,k.avatar to the SELECT DISTINCT and adding a LEFT JOIN after the FROM statement. k.avatar is the field you will be pulling from the table, so if your column name was not avatar and you already changed the name in the hardcode.php file then set k.avatar to k.whatever your column name is. The way this LEFT JOIN works is kunena_users needs to be the table where your avatar path for your users lives, and f.session_id needs equal k.userid. In a bit more depth, we are trying to correlate the user from the frei_session table with the user in the jos_kunena_users table. and to do this we use the user ID of that user because it will match. After you do that and understand what you did, simply add the ,k.avatar and the LEFT JOIN statement to the get_users() function. The get_guests() and get_users() functions will look almost identical except for one AND statement will be added to get_users(). This is what makes this function unique because the AND statement makes the query return any record where f.guest is equal to 0.

Finish It Up

I know that was a lot to take in and you are waiting to be done with this but I assure you we are near the end. All you have to do now is save your new driver file and upload it to the drivers directory: file/path/to/freichat/server/drivers. and change your driver to the name of your file in hardcode.php, obviously leaving off the file extension. At that point just go back and refresh your site and check out your new avatars being pulled from wherever you chose to pull them from.

Example Driver File

Below is an example driver file which was named Kunena.php and in the hardcode.php the driver was changed to Kunena. I have added comments to let you know what exactly needs to be changed and why.

<?php

require 'Joomla.php'; // Needs to be the name of the CURRENT driver file you are using. You can find this is "path/to/freichat/hardcode.php"

class Kunena extends Joomla { // "Joomla" Needs to be whatever class you are extending from. Likely this will ALSO be the name of the old driver file as it is in this case.

    public function __construct($db) {
        //parent::__construct($db);
        $this->db = $db;
    }

//------------------------------------------------------------------------------
    public function avatar_url($res) {

        // Builds the avatar URL.
        $murl = str_replace($this->to_freichat_path, "", $this->url);
        $avatar_url = $murl . 'media/kunena/avatars/resized/size36/' . $res[$this->avatar_field_name]; // Needs to be the path to your avatar folder, relative or absolute. Take into account the path that is stored in your database as well.


        return $avatar_url;
    }

//------------------------------------------------------------------------------   
    public function get_guests() {

                                                                                                // Below we are adding ,k.avatar because the value "k" will be assigned as the table name and avatar is the field name in which the path to each users avatar is.
        // Queries the db and assigns it to $query.                                                // look at LEFT JOIN; you need to make sure that kunena_users is your table name where the avatars for your users live and also be sure the f.session can correlate to the k.userid to grab the correct avatar.
        $query = "SELECT DISTINCT f.status_mesg,f.username,f.session_id,f.status,f.guest,f.in_room,k.avatar 
                               FROM frei_session AS f
                               LEFT JOIN " . DBprefix . "kunena_users AS k ON f.session_id=k.userid
                              WHERE time>" . $this->online_time2 . "
                               AND f.session_id!=" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                               AND f.status!=2
                               AND f.status!=0";
//echo $query;

        // Creates an array of everything the query asked for.
        $list = $this->db->query($query)->fetchAll();
        //Returns the array.
        return $list;
    }

//------------------------------------------------------------------------------ 
    public function get_users() {

        // Queries the db and assigns it to $query.                                                // Do the exact same thing as the get_guests() function. Don't copy and past because the AND statements are a bit different.
        $query = "SELECT DISTINCT f.status_mesg,f.username,f.session_id,f.status,f.guest,f.in_room,k.avatar
                               FROM frei_session AS f                               
                               LEFT JOIN " . DBprefix . "kunena_users AS k ON f.session_id=k.userid
                              WHERE time>" . $this->online_time2 . "
                               AND f.session_id!=" . $_SESSION[$this->uid . 'usr_ses_id'] . "
                               AND f.guest=0
                               AND f.status!=2
                               AND f.status!=0";
        // Creates an array of everything the query asked for.
        $list = $this->db->query($query)->fetchAll();
        //Returns the array.
        return $list;
    }

//------------------------------------------------------------------------------    

}
254
1
petepacific posted Sep 17 '15 at 10:46 am

I have purchased the Platinum suite of FreiChat - Great software by the way!

However, everything works fine on desktop but NOT on mobile/tablet. It seems it doesn't load (at all) on iOS or Android.

Is there anything else I need to set up before being able to provide it to our clients on mobile? I have pasted the required code snippet during installation below the </header> tag, but I am not sure if additional steps have to be taken for responsive versions of the theme?

And another question: Is my Platinum license to be renewed periodically? Because there is not much information on the site about that (as far as I can see).

Thanks!

150
2
Roadkingscot posted Sep 13 '15 at 5:49 pm

I've installed Freight on my server and confirmed that the correct code is in the header of my index file for my default theme. I can also log into the backend side of Freichat. It doesn't matter what location I select but I cannot get the Freichat component to display on my site.

My configuration is as follows;
PHP Built On Linux boscustweb5006.eigbox.net 3.14.27 #1 SMP Wed Dec 17 21:04:05 EST 2014 x86_64
Database Version 5.5.44-0ubuntu0.12.04.1-log
Database Collation
PHP Version 5.3.29
Web Server Apache/2
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.3.1 Stable [ Ember ] 11-June-2014 13:30 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12

I'm using the Pixeldot template, but Freichat doesn't appear to work with any of my templates.

When I installed the app I put it into a freichat subdirectory of my main website directory.

Can anyone please help, as I'd really like to get chat working on my site as soon as possible.

341
2
successcard posted Sep 9 '15 at 1:30 pm

Hello everyone, I am new here. I want to use the codoforum php script as my website's forum. I have read the license for free users but I want to find out if it is possible for me to change the favicon to my website's favicon. If it is possible, then I will like someone to show me how. Thanks and will be waiting for your comments!

186
1

I've install freichat on apache 2.4, i use php 5.6.12 and mysql 5.6
the problems is freichat not displaying in browser(firefox last version)
there's an error message :
<br />
<b>Fatal error</b>: Call to a member function fetchAll() on boolean in <b>C:\Apache24\htdocs\custom\freichat\arg.php</b> on line <b>65</b><br />

Must I have to activate the PDO extensions?
I need help. Sorry for bad english
thanks smile

recent by admin  ·  Sep 7 '15 at 4:37 pm
173
4
GTRP posted Sep 3 '15 at 1:35 pm

Hi,
Today i was writing on a topic and i tried to write this as normal text or into a quote :

*a
*a

In normal text, it gives :
a
a

Best i can do is :
*a
a

And it's the same in quote

I think you should change this and allow only BBCodes
And about the other style things such as text align center etc... i heard about the responsive problem but i have an idea.

(my english is going to be quite bad because i don't know how to explain my idea)

Why don't you create a simple icon on the grid that can work like the 'headers' bloc
When you hover that icon, you can choose bbcodes (B,I,U,S,Center,left,right etc...)
By the way it should reduce the numbers of icons on the editor

recent by GTRP  ·  Sep 5 '15 at 10:08 am
248
2

I got SSO working!!! However, it doesn't seem to fetch my avatar. smile

Here is my client.php file...

<?php

/**

  • You do not have to edit sso.php file
  • This file/code should get executed when Codoforum sends a request
  • to the path <SSO Get User Path> as defined in SSO plugin settings
  • in Codoforum backend
  • */

require 'sso.php';

/**

  • The SSO client id and secret MUST be same as that set in the Codoforum
  • SSO plugin settings
    */
    $settings = array(

    "client_id" => 'removedforsecuritypurposes',
    "secret" => 'removedforsecuritypurposes',
    "timeout" => 6000
    );

$sso = new codoforum_sso($settings);

$account = array();

/**

  • Here comes your logic to check if the user is logged in or not.
  • A simple example would be using PHP SESSION
    */
    if (USER_IS_LOGGED_IN) {

    $account['uid'] = USERID; //Your logged in user's userid
    $account['name'] = USERNAME; //Your logged in user's username
    $account['mail'] = EMAILID; //Your logged in user's email id
    $account['avatar'] = ''; //not used as of now
    }

$sso->output_jsonp($account); //output above as JSON back to Codoforum
exit();

recent by rogue  ·  Sep 2 '15 at 9:01 pm
Categories
Actions
Hide topic messages
Enable infinite scrolling
All posts under this topic will be deleted ?
Previous
Next
With selected deselect topics
Pending draft ... Click to resume editing
Discard draft