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

Sounds on away!

Post a bug fix, a new feature, a theme ...

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

Post a reply
12 posts • Page 1 of 1

Postby neohunter » Sat Nov 04, 2006 8:21 pm

hi, i made a modification for pfc, now it play sounds =).

but i dont know how to upload it... you are developing on SVN or something?

i want to contribute
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby neohunter » Sat Nov 04, 2006 9:41 pm

btw you can see it on

www.unionro.org/chat
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby phpfreechat » Sun Nov 05, 2006 9:52 am

Yes, pfc uses SVN : http://sourceforge.net/svn/?group_id=158880
Please submit here the patch.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby neohunter » Fri Nov 10, 2006 5:46 pm

ok i will do it!
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby neohunter » Fri Nov 10, 2006 6:19 pm

mmm i need a developer account. ><_
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby phpfreechat » Mon Nov 13, 2006 3:33 pm

No, you just have to generate the diff and to post by copy/paste the result in a post here.
(use the "svn diff" command)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby neohunter » Thu Nov 16, 2006 5:26 am

Ok this is the diff. mmm of course i can put here the new images ( sounds on and off ) and the sound (swf). but... you can obtain it from my website, wtb, i have troubles witch my chat when comes over 90 users... feels very lagged ... im admin on a game server (around 600 online users).

Index: client/chat.js.tpl.php
===================================================================
--- client/chat.js.tpl.php (revision 869)
+++ client/chat.js.tpl.php (working copy)
@@ -14,6 +14,7 @@
var pfc_start_minimized = <?php echo $json->encode($start_minimized); ?>;
var pfc_nickmarker = <?php echo $json->encode($nickmarker); ?>;
var pfc_clock = <?php echo $json->encode($clock); ?>;
+var pfc_snd = <?php echo $json->encode($snd); ?>;
var pfc_showsmileys = <?php echo $json->encode($showsmileys); ?>;
var pfc_showwhosonline = <?php echo $json->encode($showwhosonline); ?>;
var pfc_focus_on_connect = <?php echo $json->encode($focus_on_connect); ?>;
@@ -102,6 +103,8 @@
'images/minimize.gif',
'images/smiley-on.gif',
'images/smiley-off.gif',
+ 'images/sound-on.gif',
+ 'images/sound-off.gif',
'images/online-on.gif',
'images/online-off.gif',
'images/bt_strong.gif',
Index: client/pfcclient.js
===================================================================
--- client/pfcclient.js (revision 869)
+++ client/pfcclient.js (working copy)
@@ -100,6 +100,12 @@
this.clock = (cookie == 'true');
if (cookie == '' || cookie == null)
this.clock = pfc_clock;
+
+ //SONIDO
+ cookie = getCookie('pfc_snd');
+ this.snd = (cookie == 'true');
+ if (cookie == '' || cookie == null)
+ this.snd = pfc_snd;

cookie = getCookie('pfc_showsmileys');
this.showsmileys = (cookie == 'true');
@@ -1383,7 +1389,51 @@
// $('pfc_chat').scrollTop += 30;
},

+
+
+
+
+
+
/**
+ * SONIDO
+ */
+ snd_swap: function()
+ {
+ if (this.snd) {
+ this.snd = false;
+ } else {
+ this.snd = true;
+ }
+ this.refresh_snd();
+ setCookie('pfc_snd', this.snd);
+ },
+ refresh_snd: function( root )
+ {
+ var snd_icon = $('pfc_snd');
+ if (this.snd)
+ {
+ snd_icon.src = this.res.getFileUrl('images/sound-on.gif');
+ snd_icon.alt = this.res.getLabel('Reproducir sonidos');
+ snd_icon.title = snd_icon.alt;
+ }
+ else
+ {
+ snd_icon.src = this.res.getFileUrl('images/sound-off.gif');
+ snd_icon.alt = this.res.getLabel('Reproducir sonidos');
+ snd_icon.title = snd_icon.alt;
+ }
+ },
+
+
+
+
+
+
+
+
+
+ /**
* Connect/disconnect button
*/
connect_disconnect: function()
Index: client/pfcgui.js
===================================================================
--- client/pfcgui.js (revision 869)
+++ client/pfcgui.js (working copy)
@@ -301,6 +301,10 @@
var rx = new RegExp('^\[[0-9]+\](.*)','ig');
document.title = document.title.replace(rx,'$1');
document.title = '['+this.windownotifynb+']'+document.title;
+ // Sonido
+
+ flash = '<object style="visibility:hidden" classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0"> <param name="movie" value="src/snd.swf"> <param name="quality" value="High"> <embed src="src/snd.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1"></object>';
+ if (pfc.snd == true)document.getElementById('snd').innerHTML=flash;
},
unnotifyWindow: function()
{
@@ -537,6 +541,19 @@
btn.appendChild(img);
cmdcontainer.appendChild(btn);

+ // SONIDO
+ var btn = document.createElement('div');
+ btn.setAttribute('class', 'pfc_btn');
+ btn.setAttribute('className', 'pfc_btn'); // for IE6
+ var img = document.createElement('img');
+ img.setAttribute('id', 'pfc_snd');
+ img.setAttribute('src', pfc.res.getFileUrl('images/sound-on.gif'));
+ img.onclick = function(){ pfc.snd_swap(); }
+ btn.appendChild(img);
+ cmdcontainer.appendChild(btn);
+ document.write('<div style="visibility:hidden" id="snd"></div>');
+
+
// button smileys on/off
if (pfc_btn_sh_smileys)
{
Index: pfcglobalconfig.class.php
===================================================================
--- pfcglobalconfig.class.php (revision 869)
+++ pfcglobalconfig.class.php (working copy)
@@ -82,6 +82,7 @@
var $shownotice = 3; // show: 0 = nothing, 1 = just nickname changes, 2 = join/quit, 3 = 1+2
var $nickmarker = true; // show/hide nicknames colors
var $clock = true; // show/hide dates and hours
+ var $snd = true; // Start with sounds
var $openlinknewwindow = true; // used to open the links in a new window
var $notify_window = true; // true : appends a prefix to the window title with the number of new posted messages

Index: snd.swf
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: snd.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby neohunter » Thu Nov 16, 2006 5:28 am

mmm btw i over the spanish translation cause the current one is very incomplete. there is the complete one:

<?php
/**
* i18n/es_ES/main.php
*
* Copyright @2006 Stephane Gully <stephane.gully@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

/**
* Spanish translation of the messages (utf8 encoded!)
*
* @author Stephane Gully <stephane.gully@gmail.com>
* @translated by Jose Juan Calvo <josejuancalvo@gmail.com>
* @translated by Arnold Roa <arnoldroa@hotmail.com>
*/

// line 45 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["My Chat"] = "Mi chat";

// line 201 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s not found, %s library can't be found."] = "%s no encontrada, la libreria %s no se ha encontrado.";

// line 355 in phpfreechat.class.php
$GLOBALS["i18n"]["Please enter your nickname"] = "Por favor introduce tu nickname";

// line 565 in phpfreechat.class.php
$GLOBALS["i18n"]["Text cannot be empty"] = "El texto no puede estar vacio";

// line 392 in phpfreechat.class.php
$GLOBALS["i18n"]["%s changes his nickname to %s"] = "%s ha cambiado su nickname a %s";

// line 398 in phpfreechat.class.php
$GLOBALS["i18n"]["%s is connected"] = "%s está conectado";

// line 452 in phpfreechat.class.php
$GLOBALS["i18n"]["%s quit"] = "%s se ha desconectado";

// line 468 in phpfreechat.class.php
$GLOBALS["i18n"]["%s disconnected (timeout)"] = "%s se ha desconectado (timeout)";

// line 262 in phpfreechat.class.php
$GLOBALS["i18n"]["Unknown command [%s]"] = "comando desconocido [%s]";

// line 149 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s doesn't exist: %s"] = "%s no existe: %s";

// line 180 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["You need %s"] = "Tu necesitas %s";

// line 241 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s doesn't exist, %s library can't be found"] = "%s no encontrada, la libreria %s no se ha encontrado";

// line 280 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s doesn't exist"] = "%s no existe";

// line 433 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s directory must be specified"] = "se debe indicar el directorio %s";

// line 439 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s must be a directory"] = "%s debe ser un directorio";

// line 446 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s can't be created"] = "%s no puede ser creado";

// line 451 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s is not writeable"] = "%s no se puede escribir";

// line 496 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s is not readable"] = "%s no se puede leer";

// line 469 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s is not a file"] = "%s no es un fichero";

// line 491 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["%s is not a directory"] = "%s no es un directorio";

// line 23 in chat.html.tpl.php
$GLOBALS["i18n"]["PHP FREE CHAT [powered by phpFreeChat-%s]"] = "PHP FREE CHAT [powered by phpFreeChat-%s]";

// line 296 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Hide nickname marker"] = "Ocultar los colores del nickname";

// line 304 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Show nickname marker"] = "Mostrar los colores del nickname";

// line 389 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Disconnect"] = "Desconectar";

// line 395 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Connect"] = "Conectar";

// line 427 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Magnify"] = "Maximizar";

// line 434 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Cut down"] = "Minimizar";

// line 345 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Hide dates and hours"] = "Ocultar fechas y horas";

// line 353 in javascript1.js.tpl.php
$GLOBALS["i18n"]["Show dates and hours"] = "Mostrar fechas y horas";

// line 21 in chat.html.tpl.php
$GLOBALS["i18n"]["Enter your message here"] = "Introduzca aquí su mensaje";

// line 24 in chat.html.tpl.php
$GLOBALS["i18n"]["Enter your nickname here"] = "Introduzca aquí su nickname";

// line 93 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["Error: undefined or obsolete parameter '%s', please correct or remove this parameter"] = "Error: parámetro no definido u obsoleto '%s', por favor corríjalo o elimine este parámetro";

// line 48 in phpfreechattemplate.class.php
$GLOBALS["i18n"]["%s template could not be found"] = "No se ha encontrado la plantilla %s";

$GLOBALS["i18n"]["Error: '%s' could not be found, please check your themepath '%s' and your theme '%s' are correct"] = "Error: no se ha encontrado '%s', por favor verifica que son correctos el directorio del tema (themepath) '%s' y el tema '%s' ";

// line 33 in chat.html.tpl.php
$GLOBALS["i18n"]["Bold"] = "Negrita";

// line 34 in chat.html.tpl.php
$GLOBALS["i18n"]["Italics"] = "Itálica";

// line 35 in chat.html.tpl.php
$GLOBALS["i18n"]["Underline"] = "Subrayado";

// line 36 in chat.html.tpl.php
$GLOBALS["i18n"]["Delete"] = "Tachado";

// line 37 in chat.html.tpl.php
$GLOBALS["i18n"]["Pre"] = "Pre";

// line 38 in chat.html.tpl.php
$GLOBALS["i18n"]["Mail"] = "Correo electrónico";

// line 39 in chat.html.tpl.php
$GLOBALS["i18n"]["Color"] = "Color";

// line 86 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Hide smiley box"] = "Ocultar emoticones";

// line 87 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Show smiley box"] = "Mostrar emoticones";

// line 88 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Hide online users box"] = "Ocultar usuarios en línea";

// line 89 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Show online users box"] = "Mostrar usuarios en línea";

// line 75 in pfccommand.class.php
$GLOBALS["i18n"]["%s must be implemented"] = "%s se debe implementar";

// line 343 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["'%s' parameter is mandatory by default use '%s' value"] = "El parametro '%s' es obligatorio, por defecto usa el valor '%s'";

// line 378 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["'%s' parameter must be a positive number"] = "El parametro '%s' deber ser un número positivo";

// line 386 in phpfreechatconfig.class.php
$GLOBALS["i18n"]["'%s' parameter is not valid. Available values are : '%s'"] = "El parametro '%s' no es válido. Los valores posibles son : '%s'";

// line 186 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["My room"] = "Mi Sala";

// line 19 in unban.class.php
$GLOBALS["i18n"]["Missing parameter"] = "Parametro desconocido";

// line 38 in ban.class.php
$GLOBALS["i18n"]["banished from %s by %s"] = "Baneado %s por %s";

// line 23 in banlist.class.php
$GLOBALS["i18n"]["The banished user's id list is:"] = "Los usuarios baneados son:";

// line 32 in banlist.class.php
$GLOBALS["i18n"]["Empty"] = "Vacio";

// line 34 in banlist.class.php
$GLOBALS["i18n"]["'/unban {id}' will unban the user identified by {id}"] = "/unban {id}' will unban the user identified by {id}";

// line 35 in banlist.class.php
$GLOBALS["i18n"]["'/unban all' will unban all the users on this channel"] = "'/unban all' will unban all the users on this channel";

// line 24 in update.class.php
$GLOBALS["i18n"]["%s quit (timeout)"] = "%s ha salido (timeout)";

// line 46 in join.class.php
$GLOBALS["i18n"]["%s joins %s"] = "%s ha entrado a %s";

// line 31 in kick.class.php
$GLOBALS["i18n"]["kicked from %s by %s"] = "expulsado de %s por %s";

// line 38 in send.class.php
$GLOBALS["i18n"]["Can't send the message, %s is offline"] = "No se puede enviar el mensaje, %s esta desconectado";

// line 27 in unban.class.php
$GLOBALS["i18n"]["Nobody has been unbanished"] = "Nadie ha sido desbaneado";

// line 42 in unban.class.php
$GLOBALS["i18n"]["%s has been unbanished"] = "%s ha sido baneado";

// line 49 in unban.class.php
$GLOBALS["i18n"]["%s users have been unbanished"] = "%s usuarios han sido desbaneados";

// line 47 in auth.class.php
$GLOBALS["i18n"]["You are not allowed to run '%s' command"] = "Usted no puede ejecutar %s";

// line 66 in auth.class.php
$GLOBALS["i18n"]["Can't join %s because you are banished"] = "no puedes entrar a %s porque estas baneado";

// line 76 in auth.class.php
$GLOBALS["i18n"]["Can't join %s because the channels list is restricted"] = "";

// line 89 in auth.class.php
$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "No esta permitido cambiar el nombre";

// line 56 in noflood.class.php
$GLOBALS["i18n"]["Please don't post so many message, flood is not tolerated"] = "NO FLOOD!";

// line 109 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Private message"] = "Mensaje privado";

// line 110 in pfcclient.js.tpl.php
$GLOBALS["i18n"]["Close this tab"] = "Cerrar esta pestaña";

// line 199 in pfcgui.js.tpl.php
$GLOBALS["i18n"]["Do you really want to leave this room ?"] = "Realmente deseas salir de esta sala?";

// line 169 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["Error: '%s' is a private parameter, you are not allowed to change it"] = "el parametro %s es privado, usted no puede cambiarlo.";

// line 253 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["'%s' parameter must be an array"] = "el parametro %s debe ser un arreglo";

// line 265 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["'%s' parameter must be a boolean"] = "el parametro %s debe ser una variable boleana ";

// line 271 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["'%s' parameter must be a charatere string"] = "el parametro %s debe ser una cadena";

// line 395 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["'%s' must be writable"] = "el directorio %s debe ser escribible";

// line 425 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["'%s' directory doesn't exist"] = "el directorio %s no existe ";

// line 544 in pfcglobalconfig.class.php
$GLOBALS["i18n"]["Please correct these errors"] = "Por favor corrija estos errores";

// line 21 in pfcinfo.class.php
$GLOBALS["i18n"]["Error: the cached config file doesn't exists"] = "Error: No se encuentra el archivo de cache";

// line 190 in phpfreechat.class.php
$GLOBALS["i18n"]["Error: the chat cannot be loaded! two possibilities: your browser doesn't support javascript or you didn't setup correctly the server directories rights - don't hesitate to ask some help on the forum"] = "El chat no pudo ser cargado. Es posible que los directorios no tengan los permisos adecuados o que su navegador no soporte JavaScript";

// line 31 in help.class.php
$GLOBALS["i18n"]["Here is the command list:"] = "Lista de comandos:";

// line 63 in identify.class.php
$GLOBALS["i18n"]["Succesfully identified"] = "Ha sido identificado!";

// line 68 in identify.class.php
$GLOBALS["i18n"]["Identification failure"] = "Hubo un error al identificarse";

// line 25 in send.class.php
$GLOBALS["i18n"]["Your must be connected to send a message"] = "DNecesita conectarse para enviar un mensaje";

// line 87 in chat.js.tpl.php
$GLOBALS["i18n"]["Click here to send your message"] = "Haga click aqui para enviar su mensaje";

// line 80 in chat.js.tpl.php
$GLOBALS["i18n"]["Enter the text to format"] = "Ingrese el texto al que desea darle formato";

// line 81 in chat.js.tpl.php
$GLOBALS["i18n"]["Configuration has been rehashed"] = "La configuracion ha sido recargada";

// line 82 in chat.js.tpl.php
$GLOBALS["i18n"]["A problem occurs during rehash"] = "Hubo un problema al actualizar la configuración";

// line 83 in chat.js.tpl.php
$GLOBALS["i18n"]["Choosen nickname is allready used"] = "El nickname elejido ya existe";

// line 84 in chat.js.tpl.php
$GLOBALS["i18n"]["phpfreechat current version is %s"] = "La version actual de phpfreechat es %s";

// line 85 in chat.js.tpl.php
$GLOBALS["i18n"]["Maximum number of joined channels has been reached"] = "Se ha alcanzado el numero maximo de salas.";

// line 86 in chat.js.tpl.php
$GLOBALS["i18n"]["Maximum number of private chat has been reached"] = "Se ha alcanzado el numero maximo de salas privadas";

// line 88 in chat.js.tpl.php
$GLOBALS["i18n"]["Send"] = "Enviar";

?>
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby neohunter » Sat Nov 18, 2006 8:29 pm

kerphi im interesting in be a developer, there is anyway to do it without posting diff ?
neohunter
New member
 
Posts: 7
Joined: Sat Nov 04, 2006 8:05 pm
Top

Postby phpfreechat » Sun Nov 19, 2006 7:30 pm

please contact me by jabber at stephane.gully@gmail.com
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Tue Nov 28, 2006 6:50 pm

neohunter thank you, I just integrated your work in the pfc official source code.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Sat Dec 02, 2006 6:14 pm

neohunter, you translation has many problems with charactere encoding ... I cannot integrate that, please correct the errors and I will do it.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
12 posts • Page 1 of 1

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 16 guests

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