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

Notification sound upon entering chat

This forum is now locked as we will no longer be developing the v1.x branch

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

Topic locked
3 posts • Page 1 of 1

Postby Hobbiest » Wed Jan 19, 2011 7:10 pm

I tried this far:

Code: Select all
function alert()
{
$objResponse = new xajaxResponse();


                $objResponse->addAssign("alert","innerHTML","<embed src='entered.wav' hidden=true autostart=true loop=false>");
return $objResponse->getXML();
}

in srcphpfreechat.class.php:
and
Code: Select all
<span id='alert'></span>

in defaultchat.html.tpl.php

I have entered.wav in defaut and in the root.

I get no error messages but it doesn't work. Any help is appreciated.
Hobbiest
Member
 
Posts: 15
Joined: Wed Jan 19, 2011 1:12 am
Top

Postby Hobbiest » Thu Jan 20, 2011 3:21 am

I found out that in commands/ join.class.php
the below line (about line 50) outputs automatic text
Code: Select all
 $cmdp["param"] = _pfc("%s joins %s",$u->getNickname(), $channame);

The text appear in watermark like faded grey color. If we could make that as a message text, such as "Hi" , we could get the sound notification.

here is an eloboration of the join message
Code: Select all
 // show a join message
      $cmdp = $p;
      $cmdp["param"] = _pfc("%s joins %s",$u->getNickname(), $channame);
      $cmdp["recipient"] = $chanrecip;
      $cmdp["recipientid"] = $chanid;
      $cmdp["flag"] = 2;
      $cmd =& pfcCommand::Factory("notice");
      $cmd->run($xml_reponse, $cmdp);

can someone change _pfc("%s joins %s",$u->getNickname(), $channame);

to something like write("Hi or Hello",$u->getNickname(), $channame);


to output message($msgid = $ct->write) text in the chat table?
Last edited by Hobbiest on Thu Jan 20, 2011 3:30 am, edited 1 time in total.
Hobbiest
Member
 
Posts: 15
Joined: Wed Jan 19, 2011 1:12 am
Top

Postby Hobbiest » Mon Jan 24, 2011 7:32 pm

This is solved by me and posted at Contributions.
Hobbiest
Member
 
Posts: 15
Joined: Wed Jan 19, 2011 1:12 am
Top


Topic locked
3 posts • Page 1 of 1

Return to Feature Requests (v1.x)

Who is online

Users browsing this forum: No registered users and 0 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