phpFreeChat was developped with an aim of simplicity and flexibilty.
Setting it up is relatively simple. All parameters are centralized in an array and passed as parameters on the instantiation of the phpFreeChat object.
We can thus :
You need to create a new theme (for example mytheme
) :
phpfreechat/themes/mytheme/
phpfreechat/themes/mytheme/style.css
span.pfc_heure, span.pfc_date { color: red; }
theme
parameter in your chat script:
$params["theme"] = "mytheme";
As an examples, see these demos: 1, 2
Follow the above instructions for the theme creation. Then I suppose you
have a directory phpfreechat/themes/mytheme/
.
phpfreechat/themes/mytheme/smileys/
smiley1.png
, smiley2.gif
, and
smiley3.jpg
phpfreechat/themes/mytheme/smileys/theme
and
enter the keyboard to image mapping smileys' description, for example :
smiley1.png :) :-) smiley2.gif :( :-( smiley3.jpg :D :-D :o)
Each line begins with the image filename followed by the list of the string characters to replace by that image. Only use spaces to separate the smileys string matches.
theme
parameter in your chat script:
$params["theme"] = "mytheme";
As an examples, see these demos: 1, 2, 3, 4
A command is a php classe. So, to write your own command, you need to
write a new php classe (as an example look at the
src/commands/nick.class.php
file).
Each command class inherite from a virtual pfcCommand
class.
This virtual class define the command interface. Currently the only virtual
method to implement is: function run(...)
You have some API you can use to write your command:
pfccontainer.class.php
)pfctools.php
)@todo : to write
As an examples, have a look to this demo: 1
(try to type /roll 2d6
)
@todo : to write
As an examples, have a look to the default file container source code.