Chat display problem in daemon mode - probably css problem

Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
Number of replies: 10
I found problem with chat displaying in 'daemon mode'. It looks awful, while the same chat on the same Moodle platform, but in normal mode looks okay.

Here is screen with chat working in daemon mode:
Daemon mode
As we can see above - border around avatar is solid blue/purple, font is different than font used in whole moodle platform.


Here is a screen with the same chat running in 'normal mode':
Normal mode
As we can see above, border around avatars is nice shadow, and font and its color is the same as declared in theme.

I think the problem is in inheriting of css styles. I haven't found any css styles describing chat in daemon mode. Problem is independent from selected theme.

Does anybody have similar problem? Or found a solution?

Regards, Łukasz Sanokowski
Attachment daemonMode.gif
Average of ratings: -
In reply to Łukasz Sanokowski

Odp: Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
I'm sorry for the third image at the bottom of the first post. It was automatically doubled. I can't delete it.
In reply to Łukasz Sanokowski

Re: Odp: Chat display problem in daemon mode - probably css problem

by Israel Forés -
Hi Lukasz.

look the chatd.php script (your_moodle/mod/chat/). There are a function that show the users in the chatroom:

get_user_window

good luck
Farso
In reply to Israel Forés

Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
You're right Israel, thanks for advice.
In function get_user_window there are is css style described, where I changed display settings of user list (it is exactly in line 255 of chatd.php file).

What is more, in folder gui_sockets in file chatinput.php in line 48 we can change input box parameters (box where we enter text chatting).

Howewer I can't find where to change display parameters of left frame of chat window. I need to change border of avatar image and font parameters. I'm looking forward for advice.

Regards, Łukasz Sanokowski
In reply to Łukasz Sanokowski

Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by Israel Forés -
look at the lib.php script. I think that there are a function that paint the pictures. Something like that:

messague->picturre = print_user_pricture


Good Luck!!!!
farso
In reply to Israel Forés

Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
I checked this file lib.php:

In line 701 we can edit parameters of table, which is surrounding every sentence posted in chat. There is also some code responsible for displaying pictures (at line 701 too), but I could't change border of avatars there, neither by css code nor by simple border="0".

Line 702 is responsible for displaying user name: I used css tags in <span ...>$outinfo</span>

I have not found code responsible for displaying text entered by users, and I can not change parameters of avatars.

I give up at the moment, chat looks now okay, and what is most important it works quite fast in daemon mode -> it's useful.

Regards, and thanks for help
Łukasz Sanokowski
In reply to Łukasz Sanokowski

Re: Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by محمد العثيمين -
i have the same problem and i would be appreciatful if u explain more on how to fix the left side problem plz
In reply to محمد العثيمين

Odp: Re: Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
Hello

I don't know how to change displaying of text in left frame of chat running in daemon mode. If you want to change font of list of users in right frame you need to modify this section in chatd.php file:

$users = array_merge($this->chatrooms[$info['chatid']]['users'], $this->db_users[$info['chatid']]);
echo '<div>'.sizeof($users).get_string('activeusers').'</div>';

echo '<table style="width: 100%; font-size:11px;"><tbody>';

foreach ($users as $usersessionid => $userid) {

As you can see - you can add css style tags in green colored section.


Regards

In reply to Łukasz Sanokowski

Re: Odp: Re: Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by محمد العثيمين -
First of all. thanks for your reply.
Secondly, I went to the Chatd.php file but I have not find these lines:
$users = array_merge($this->chatrooms[$info['chatid']]['users'], $this->db_users[$info['chatid']]);
echo '<div>'.sizeof($users).get_string('activeusers').'</div>';

echo '<table style="width: 100%; font-size:11px;"><tbody>';

foreach ($users as $usersessionid => $userid) {
By the way, I use version 1.93
Thirdly, if I found this line (green one) , does do you mean I should add some extra coding like :
font-xize:11px, align:right (( in side the blew one )).
echo '<table style="width: 100%; font-size:11px;"><tbody>';
Sorry for disturbing
In reply to محمد العثيمين

Odp: Re: Odp: Re: Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by Łukasz Sanokowski -
I uploaded my chatd.php file with this post. It is chatd.php file taken from Moodle 1.9.0 package, and then patched with pathch tkaen from here http://tracker.moodle.org/browse/MDL-14631. Green field iside "style" tag is a place where You can write any css tags.

Regards
In reply to Łukasz Sanokowski

Re: Odp: Re: Odp: Re: Odp: Re: Odp: Re: Odp: Chat display problem in daemon mode - probably css problem

by محمد العثيمين -
Many thanks for you. I will try it and I hope to do it successfully brother.