• 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

tiny suggestion

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

Post a reply
5 posts • Page 1 of 1

Postby Rhialto » Wed Apr 19, 2006 2:11 pm

When displaying the nickname, sometimes it get displayed on 2 lines if there is a dash (-) in it. I suggest you add NOBR around it. Same goes for the nick list window.
Rhialto
Member
 
Posts: 30
Joined: Sat Apr 15, 2006 7:40 am
Location: Canada
Top

Postby phpfreechat » Wed Apr 19, 2006 3:24 pm

This is a CSS IE bug, I didn't found yet a workeround.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Rhialto » Wed Apr 19, 2006 5:32 pm

When it's time to render HTML, add <nobr>$nick</nobr>
Rhialto
Member
 
Posts: 30
Joined: Sat Apr 15, 2006 7:40 am
Location: Canada
Top

Postby phpfreechat » Wed Apr 19, 2006 8:59 pm

Thank you I integrated you tip to the pfc source code (0.x and 1.x branche), here is the patch :
Code: Select all
Modified: branches/0.x/themes/default/templates/pfcclient.js.tpl.php
===================================================================
--- branches/0.x/themes/default/templates/pfcclient.js.tpl.php  2006-04-19 19:40:32 UTC (rev 456)
+++ branches/0.x/themes/default/templates/pfcclient.js.tpl.php  2006-04-19 19:54:05 UTC (rev 457)
@@ -341,8 +341,11 @@
    {
      var li = document.createElement('li');
      li.setAttribute('class', '<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(nicks[i]));
-      var txt = document.createTextNode(nicks[i]);
-      li.appendChild(txt);
+      // nobr is not xhtml valid but it's a workeround
+      // for IE which doesn't support 'white-space: pre' css rule
+      var nobr = document.createElement('nobr');
+      nobr.appendChild(document.createTextNode(nicks[i]));
+      li.appendChild(nobr);
      ul.appendChild(li);
    }
    var fc = nickdiv.firstChild;
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Rhialto » Wed Apr 19, 2006 11:25 pm

Another way in CSS is something like .nowrap { white-space: nowrap } but I think that does not work with IE5 but it's fine with IE6.
Rhialto
Member
 
Posts: 30
Joined: Sat Apr 15, 2006 7:40 am
Location: Canada
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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