When I click on the a user to get his profile I get my own profile.
There is no Private message option below online users.

Comments

agrigor1’s picture

I found out why the option to send private messages doesnt appear.

The problem is in
customize.js.php line 512

The problematic code is
if (pfc.getUserMeta(nickid,'away') == 'no')
and this is because the 'away' parameter is not initially set with a value "no". If someone clicks the away button, then the parameter is set to "yes". Clicking again sets it to "no" and then he allows the others to see the option to send a private message to him.

To fix this I simply changed the code to
if (pfc.getUserMeta(nickid,'away') != "yes" && (pfc.getUserMeta(nickid,'nick') != this.nickname))

This is not the best thing to be done, since the value of 'away' should be set at initialization.

Also I changed in lines 456 and 448 the "Drupal Profile" to "User Profile" which is what makes sense.

agrigor1’s picture

I still have not found a way to fix the problematic code that returns the user profile of the current user instead of the clicked user.

The problem is in line 443 of customize.js.php.
It seems that the call to

pfc.getUserMeta(nickid,'drupal_user_uid')

doesnt give any value. So from the expression
var drupal_profile_url = pfc.getUserMeta(nickid,'drupal_base_url')+'/user/'+pfc.getUserMeta(nickid,'drupal_user_uid');

what we always get the same value for drupal_profile_url which is always
htpp://example.com/user

agrigor1’s picture

Can I guess that the module never puts the user id inside the Metadata?
Unfortunately I dont know how to do this.

agrigor1’s picture

Well, it seems that enabling the private messages was not enough.
The users can only send one message that only the sender sees.
Subsequent messages are lost on both sides.

permutations’s picture

Category: bug » support
Priority: Critical » Minor
Status: Active » Closed (fixed)

The problem you describe simply does not exist. I have the module installed under Drupal 6.9 here:

http://permutations.com/drup/

Go into the chatbox and try it. When you click on a profile, you do NOT get your own profile. You're making changes to the code, breaking it, and saying it was broken when you downloaded it. This is working. It worked under Drupal 5 - I tested it extensively - and I did not touch this code in the port to Drupal 6.

permutations’s picture

Oh - P.S. Same goes for private messaging. It worked under Drupal 5, the code was untouched, and it still works correctly under Drupal 6. I just tested it.

http://permutations.com/drup/

agrigor1’s picture

You say that the problem doesnt exist!!!! Okey close your eyes to the problem and say the people reporting detailed errors pointing out possible error in code are crazy.

I am not a professional programmer, like you claim you are, but I showed you where is the problem and you still say that IT DOESNT EXIST!!!.

I use drupal 6.9 and it exists and I described in detail and as good as I could. It seems it was my fault to try to find out what the problem was in drupal 6.9, since you accussed me that I caused the problem "by trying to resolve" it.

In 6.9 my dear friend THERE IS a problem whether you like it or not :it doesnt work with private messages and it clicking the "Drupal User" also doesnt work (except in the way I described above).

I dont know why and I tried to help out debugging this.

If you want to ignore users reporting bugs, its okey with me. I have nothing personal with you. But in such a case you must declare to every member of this community that you dont care about their reports.

It was my mistake thinking that your work is for community and having people working together to make things better. I thought thats the spirit. But as you say clearly in an other issue you need donations to help the community, as you are not free lance programmer.

I will not bother you again. This is YOUR module and since YOU say it works all of us should agree with you, unless we pay you to pay attention to us.

Thank you and bye.

permutations’s picture

I cannot reproduce the problem. It does not happen on my own test site, which I gave you the link to so you could try it there, too. I can only assume it's something specific about your installation.

I can't investigate this further right now because I have a deadline on paid work.

agrigor1’s picture

Well, I also did a new installation of drupal 6.10 in a new virtual server (in my server) just to find the cause of the problem.
Unfortunately the problem occured again (as I described it above).
So I may guess that phpfreechat needs some settings in the server httpd.conf or that my settings dont allow it to work properly causing some function calls to fail.
(by the way the $base_url has been set properly to point to my site url).

Thank you for your concern.
I publish this just in case someone else has the similar problems.

agrigor1’s picture

To permutations

I guess I have something wrong in php.ini
Could you possibly tell me what should be your settings? Perhaps it would be easier for you to post the ini file in your working drupal 6 site.

Thank you (and forgive me if I was rude)

rhimes’s picture

Status: Closed (fixed) » Active

I'm experiencing the same as issue described with D6.17. Is there a required php setting?

Also - going to http://permutations.com/drup/ doesn't help too much, as I've logged on, sat in chatbox for DAYS without anyone else entering to test the pop-up displayed for another user.

But I can tell you, that in my testing on my local enviroment (so I can't post a link to mine), using the chat with different users/browsers, the "Profile" link in each users pop-up leads to the profile of the user clicking the link - NOT to the listed users' profile, which is wher I'd expect it to go.

rhimes’s picture

Category: support » bug

and I'm saying it's a bug

KarthiselvamSeeralan’s picture

Me too in same issues. Any body know about this

lee8oi’s picture

I was able to fix the profile link deal. I can Click a username in the list, and click 'Drupal Profile' and it returns the correct profile.

The problem I saw was in line 443 of sites/all/modules/phpfreechat/extras/themes/drupal/customize.js.php.

I changed +'/user/'+ to +'/?q=user/'+ and now the link is correct. I'm using drupal 6.19.

Of course as a precaution I removed the pages with chatrooms on them, disabled and uninstalled the phpfreechat module (leaving the files in the modules folder of course), then re-enabled the module, and created a new page with a new chat, and the profile link worked great. I hope this helps you guys.

P.S. if you have trouble clearing the chat. I just found that setting max_msg to 0 and recreating the chat was the best way. I think the only necessary history a chatroom needs is what starts when you connect, and clears when you disconnect. My personal preference anyways. If the Clear chat log link worked I might try using that instead, and keeping the history as it is by default. Who knows. maybe I"ll find a fix for that too :)