• 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

User list and window resize bugs in beta4

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

Post a reply
21 posts • Page 1 of 2 • 1, 2

Postby shanek » Sun Aug 13, 2006 3:46 am

I'm testing out the beta4 for our website. The URL is here:

http://www.guamislandchat.com/phpfreechat-1.0-beta/

(Kerphi, your login will still work if you wish to help test this.)

There are two problems:

1) the user list doesn't show to the right. The chat works; you can put enter text and see each others' messages, but no user list. Just a blank white box.

2) I have the container sized to fit the window. But the contents don't resize to match! The smiley box and any other part that's larger than the container just hangs off the bottom.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Sun Aug 13, 2006 9:39 pm

I prefere concentrate on the first point for the moment.

I looked at your chat and I found that nickname list should be updated because the AJAX HTTP request is well sent/received.

I got womething like that :
Code: Select all
pfc.updateNickList('b006b694407a0629de39046d07290b91',Array('kerphi'));

The question is : Why this javascript code doesn't work ... ?

Maybe a answer is that it is in conflicts with another pieace of javascript in this page.
Could you try removing one by one the elements of this page and see when the chat work in order to identify the quilty ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby shanek » Mon Aug 14, 2006 7:44 pm

Okay:

I commented out my onResize() function; no change. I uncommented that and commented out my onLoad() function; no change. I commented out the line including Dean Edwards's IE7 script; no change, although I really didn't expect there to be as that script's only supposed to run on IE (it fixes problems with IE's standards compliance) and I'm using FireFox, although it fails the same way on IE as well.

The only other script on the page is one that obfuscates the email address to fool spam scrapers (no change when commented out).

So I then decided to employ a "scorched Earth" policy and commented them all out, leaving the only JavaScript behind the bits used by PHPFreeChat. Still no change. I don't see the user list to the right.

So, then, no conflict with any other JavaScript.

Oh, and the only JavaScript error that FireFox reports is: "Error: Expected color but found 'undefined'. Error in parsing value for property 'background-color'. Declaration dropped."
Last edited by shanek on Mon Aug 14, 2006 7:45 pm, edited 1 time in total.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Mon Aug 14, 2006 10:45 pm

This is strange because http://www.guamislandchat.com/phpfreech ... simple.php works well ...
Something in your page is impacting the chat ... Maybe try to isolate your theme in a empty page.
Or zip & email me your theme + your configured chat page.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby shanek » Tue Aug 15, 2006 4:21 am

Will do.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Tue Aug 15, 2006 12:27 pm

Ok I got the file and I analysed the bug.

1) You have keep old obsolete code for the user profile links (pfcclient-custo.js.tpl.php). This code worked only for 0.9.x I think.
Try to update content of your pfcclient-custo.js.tpl.php with that:
Code: Select all
pfcClient.prototype.updateNickList = function(tabid,lst)
  {
    this.nicklist[tabid] = lst;
    var nicks   = lst;
    var nickdiv = this.gui.getOnlineContentFromTabId(tabid).firstChild;
    var ul = document.createElement('ul');
    for (var i=0; i<nicks.length; i++)
    {
      var li = document.createElement('li');
      if (nicks[i] != this.nickname)
      {
        // this is someone -> create a privmsg link
        var img = document.createElement('img');
        img.setAttribute('src', '<?php echo $c->getFileUrlFromTheme('images/user.gif'); ?>');
        img.alt = this.i18n._('Private message');
        img.title = img.alt;
        img.style.marginRight = '5px';
        var a = document.createElement('a');
        a.setAttribute('href', '');
        a.pfc_nick = nicks[i];
        a.onclick = function(){pfc.sendRequest('/privmsg', this.pfc_nick); return false;}
        a.appendChild(img);
        li.appendChild(a);
      }
      else
      {
        // this is myself -> do not create a privmsg link
        var img = document.createElement('img');
        img.setAttribute('src', '<?php echo $c->getFileUrlFromTheme('images/user-me.gif'); ?>');
        img.alt = '';
        img.title = img.alt;
        img.style.marginRight = '5px';
        li.appendChild(img);
      }
     

      // 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');
      var a = document.createElement('a');
      a.pfc_nick = nicks[i];
      a.setAttribute('href','http://www.guamislandchat.com/profiles/viewprofile.php?username='+nicks[i]);
      a.setAttribute('target','_blank');
      a.appendChild(document.createTextNode(nicks[i]));
      a.setAttribute('class', '<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i])));
      a.setAttribute('className', '<?php echo $prefix; ?>nickmarker <?php echo $prefix; ?>nick_'+ hex_md5(_to_utf8(nicks[i]))); // for IE6
      nobr.appendChild(a);
      li.appendChild(nobr);
      li.style.borderBottom = '1px solid #AAA';
     
      ul.appendChild(li);
    }
    var fc = nickdiv.firstChild;
    if (fc)
      nickdiv.replaceChild(ul,fc);
    else
      nickdiv.appendChild(ul,fc);
    this.colorizeNicks(nickdiv);
  }

(I just wrote it for you)
But be carfull this piece of code will change untile the 1.0 final is released.

2) You must play with the 'pfc_channels_content' height value (by default it's 440px)
I think you should adjust height of this area when you 'Enlarge' the top container.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby shanek » Thu Aug 17, 2006 4:37 am

Thanks, Kerphi. The code works. Hopefully it won't have to be changed too much for the release.

As for #2, setting a height for pfc_channels_content results in just a thin line for the chat window. Besides, isn't that what the "height" parameter is supposed to do?
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby shanek » Thu Aug 17, 2006 6:33 am

Okay, I fixed the problem with some JavaScript. Apparently, neither the "height" parameter nor the "height" property of the pfc_channels_content style supports a percentage.

So that's going, but now I have bug #3:

I can create a new room with /join <room name>. I can use the join command on another user to enter the room. These two users can see each other in the new room, but cannot type messages--or, they can type the message, but it never shows up. You don't even see your own message. Click back to the original room and it works fine.

Multiple rooms work when they're set up with parameters, but not when they're created with the /join command.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Thu Aug 17, 2006 9:59 am

2) Right, you can't use % for the height in the 1.x branche. This is due to the absolute positionning of the <div> childs.

3) I will look at your problem in a few days, remember me if I forgot.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby phpfreechat » Tue Aug 22, 2006 9:40 pm

About (3),

Could you give me the exact parameter list of your phpfreechat config ?
Could you also give me a secondary test account ? I have created kerphi one but I need two in order to test multiusers.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby shanek » Wed Aug 23, 2006 8:15 pm

Here's the parameters I set up:

Code: Select all
$params["nick"] = $username;  // setup the intitial nickname
if (isAdmin($username)) {
   $params["isadmin"] = "true";
} else {
   $params["isadmin"] = "false";
}
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["title"] = $siteName;
$params["channels"]  = array("General Chat");
$params["max_nick_len"] = "16";
$params["width"] = "95%";
$params["frozen_nick"] = "true";
$params["max_msg"] = "0";
$params["lockurl"] = "http://www.guamislandchat.com";
$params["theme"] = "guamislandchat";
$params["proxys_cfg"]["censor"]["words"] = array("fuck","shit","piss","cunt","bitch","asshole"); // this is the list of words to banish
$params["proxys_cfg"]["censor"]["replaceby"] = "*"; // this is the charactere to use when a censored word is found

I set you up a second user. I'll email you the info.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Wed Aug 23, 2006 10:10 pm

be carreful :
$params["isadmin"] = "false";
is same as :
$params["isadmin"] = true;

remove the " around the false string.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby shanek » Wed Aug 23, 2006 10:37 pm

Noted. Thanks.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby shanek » Fri Sep 01, 2006 3:58 pm

kerphi: any info on this problem yet?
Last edited by shanek on Fri Sep 01, 2006 3:58 pm, edited 1 time in total.
shanek
Member
 
Posts: 30
Joined: Mon Jun 19, 2006 2:22 pm
Top

Postby phpfreechat » Fri Sep 01, 2006 4:52 pm

Sorry for the delay, I have a lot of work at my work these days.
I will look at your problem this weekend.

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

Next

Post a reply
21 posts • Page 1 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

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