• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Beginner with php and PFC

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
9 posts • Page 1 of 1

Postby Minus » Sat Aug 13, 2011 10:29 am

Good morning

This is my first experience with PHP, so i choose PFC for training me. and i have a little problem.

This is my index.php code (only change the original index.php):

Code: Select all
<?php
require_once "src/phpfreechat.class.php"; // pensez à juster le chemin
$params =  array("title"        => "Salon prive de Minus",
               "max_msg"        => 50,
               "clock"          => true,
               "serverid"       => md5(__FILE__),
               "theme"          => "msn",
               "language"       => "fr_FR",
               );
$chat = new phpFreeChat($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Tchat de Minus</title>
  </head>
  <body>
    <?php $chat->printChat(); ?>
  </body>
</html>

I don't know why the popup asking a nickname (Input require/Please enter your nickname) don't appears when someone want to connect to my chat (they are all guest).

Thnak you for your help.
Last edited by Minus on Sat Aug 13, 2011 12:02 pm, edited 1 time in total.
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top

Postby re*s.t.a.r.s.*2 » Sat Aug 13, 2011 2:15 pm

Hi,

I have tested your code, the array is fine and all looks good it worked in my local host
the last comma "," at the end of the array shouldnt be there..

but works fine

version pfc 1.3

regards
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Minus » Sat Aug 13, 2011 2:50 pm

Where must i write the last comma "," ?? I don't find !!
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top

Postby re*s.t.a.r.s.*2 » Sat Aug 13, 2011 7:19 pm

Code: Select all
$params =  array("title"        => "Salon prive de Minus",
               "max_msg"        => 50,
               "clock"          => true,
               "serverid"       => md5(__FILE__),
               "theme"          => "msn",
               "language"       => "fr_FR",
               );

See the last comma at the "fr_FR", take it out
and test the script.

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Minus » Sun Aug 14, 2011 11:51 am

Thank you very much it's ok for me too.
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top

Postby Minus » Sun Aug 14, 2011 12:24 pm

I have an another question

if i want that admin of the chat have a password , disable word censoring, and had colour to the nickname, my index.php must be like this??

I have problems to understand the system of the array

Code: Select all
<?php
require_once "src/phpfreechat.class.php"; // pensez à juster le chemin
$params =  array("title"        => "Salon prive de Minus",
               "max_msg"        => 50,
               "clock"          => true,
               "serverid"       => md5(__FILE__),
               "theme"          => "msn",
               "language"       => "fr_FR",
               );
$params['admins'] = array('admin' => 'toto');
$params['skip_proxies'] = array('censor');
$params["nickname_colorlist"] = array('#FF0000','#00FF00','#0000FF');
$chat = new phpFreeChat($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Tchat de Minus</title>
  </head>
  <body>
    <?php $chat->printChat(); ?>
  </body>
</html>

Thank you for your help
Last edited by Minus on Sun Aug 14, 2011 12:25 pm, edited 1 time in total.
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top

Postby re*s.t.a.r.s.*2 » Sun Aug 14, 2011 5:06 pm

hi,

correct looks good to me..

try it.

regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby Minus » Sun Aug 14, 2011 5:51 pm

Yes it's ok

I don't know why, when i have applied theses modifications, and opened again de chat, i have a blank page.

After a reboot of my windows 7 PC, everything is ok.

PFC is installed on a linux debian squeeze server and index.php approachable via apache2 server.

last question:

If i want add more smileys, which is the file to edit??

For example if i want add all of these smileys http://www.mouserunner.net/Spheres_Smileys1 (or animated smileys), how can i do it??

Thank you
Last edited by Minus on Sun Aug 14, 2011 5:57 pm, edited 1 time in total.
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top

Postby Minus » Mon Aug 15, 2011 12:17 pm

I've found how to do it :D

But where can i resize the smileys dash in the chat windows ?? (actually it's in auto resize value)
Minus
New member
 
Posts: 6
Joined: Sat Aug 13, 2011 10:15 am
Location: France
Top


Post a reply
9 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 22 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub