Moderators: OldWolf, re*s.t.a.r.s.*2
//
// show a welcome message
// yokhannan <yokhannan@gmail.com>
//
unset($cmdp);
$cmdp["param"] = str_replace('_', '', _pfc("%s, welcome to our chatroom!",$u->nick, $channame));
$cmdp["recipient"] = $chanrecip;
$cmdp["recipientid"] = $chanid;
$cmdp["flag"] = 2;
$cmd =& pfcCommand::Factory("notice");
$cmd->run($xml_reponse, $cmdp);
"_".$args[0]."_"
Yokhannan wrote:No where in the code can I find exactly why he has done this... so (to me and this bit of code)... it's a bug. (perhaps he can explain??)
kerphi wrote:Yes I can explain. _pfc(...) function is used to translate all the chat strings.
These translations are located in i18n/xx_XX/main.php files (replace xx_XX by your local).
When _pfc(...) doesn't find any translations for the label, then it just append and prepend the '_' characteres to the string. So it's easier to find what has not been translated
OPEN:
/src/commands/join.class.php
FIND:
// register the user (and his metadata) in the channel
BEFORE, ADD:
//
// show a welcome message
// yokhannan <yokhannan@gmail.com>
//
unset($cmdp);
$cmdp["param"] = _pfc("%s, welcome to our chatroom!",$u->nick, $channame);
$cmdp["recipient"] = $chanrecip;
$cmdp["recipientid"] = $chanid;
$cmdp["flag"] = 2;
$cmd =& pfcCommand::Factory("notice");
$cmd->run($xml_reponse, $cmdp);
OPEN:
18n/xx_XX/main.php files (replace xx_XX by your local)
FIND:
?>
BEFORE, ADD:
// line 62 in join.class.php
$GLOBALS["i18n"]["%s, welcome to our chatroom!"] = "%s, welcome to our chatroom!";
moreins wrote:hello
the code is working for me but im getting the message twice...one under the other1...
can any1 help me?
Return to Feature Requests (v1.x)
Users browsing this forum: No registered users and 2 guests