• 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

[FIX] Can\'t hide smileys

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

Post a reply
4 posts • Page 1 of 1

Postby Yusuke » Sun Apr 02, 2006 9:06 pm

$params = array();
$params["nick"] = "guest".rand(1,1000);
$params["serverid"] = md5(__FILE__);
$params["language"] = "fr_FR";
$params["btn_sh_whosonline"] = false;
$params["showsmileys"] = false;
$params["btn_sh_smileys"] = false;


I placed those lines, and the smileys are still there
Zapped my cookies, even reboot, still there.
The button for who's online isn't showing though, but both the smiley button AND the smileys windows are there.

What did i do wrong?
How can i do to have phpfreechat not showing the smiley box?
I placed onload="pfc.showHideSmileys()" in the body tag, but that's not really clean

Yusuke
Last edited by Yusuke on Sun Apr 02, 2006 9:29 pm, edited 1 time in total.
Yusuke
New member
 
Posts: 3
Joined: Sun Apr 02, 2006 9:03 pm
Top

Postby phpfreechat » Sun Apr 02, 2006 9:35 pm

It's now fixed in the subversion repository.
Thank you for the bug report
It will be ok in the next release but if you can't wait, here is the patch:
Code: Select all
Modified: trunk/themes/default/templates/pfcclient.js.tpl.php
==============================================================================
--- trunk/themes/default/templates/pfcclient.js.tpl.php (original)
+++ trunk/themes/default/templates/pfcclient.js.tpl.php Sun Apr  2 22:33:57 2006
@@ -899,19 +899,24 @@
  {
    var content = $('<?php echo $prefix; ?>smileys');
    var btn = $('<?php echo $prefix; ?>showHideSmileysbtn');
-    if (!btn) return;
    if (this.showsmileys)
    {
-      btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-on.gif'); ?>";
-      btn.alt = this.i18n.hidesmiley;
-      btn.title = btn.alt;
+      if (btn)
+      {
+        btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-on.gif'); ?>";
+        btn.alt = this.i18n.hidesmiley;
+        btn.title = btn.alt;
+      }
      content.style.display = 'block';
    }
    else
    {
-      btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-off.gif'); ?>";
-      btn.alt = this.i18n.showsmiley;
-      btn.title = btn.alt;
+      if (btn)
+      {
+        btn.src = "<?php echo $c->getFileUrlFromTheme('images/smiley-off.gif'); ?>";
+        btn.alt = this.i18n.showsmiley;
+        btn.title = btn.alt;
+      }
      content.style.display = 'none';
    }
    this.refresh_Chat();
@@ -977,7 +982,6 @@
      style['height'] = '100%';
      Element.setStyle(smileysdiv, style);
    }
-
    if (this.showsmileys)
    {
      style['height'] = '';

regards,
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Yusuke » Sun Apr 02, 2006 11:21 pm

looks like it works

nice and quick, chapeau :)
Yusuke
New member
 
Posts: 3
Joined: Sun Apr 02, 2006 9:03 pm
Top

Postby Yusuke » Sun Apr 02, 2006 11:33 pm

while i'm at it, anyway to kick/ban ppl yet?
or is it still to be implemented?
Yusuke
New member
 
Posts: 3
Joined: Sun Apr 02, 2006 9:03 pm
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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