FreiChat related discussions
[SOLVED] Connect FreiChat with AlphaUserPoints!!!

I am a little confused , did you try outputting the simple link in my previous post ?

And open your chrome console , click the network tab ,
Then click on the request made by freichat . You will find it easily because
it makes request every 5 second s,
And see if there is any error in the response .

Also check if there is any error in the chrome console .

I am a little confused , did you try outputting the simple link in my previous post ? And open your chrome console , click the network tab , Then click on the request made by freichat . You will find it easily because it makes request every 5 second s, And see if there is any error in the response . Also check if there is any error in the chrome console .
Necessity is the mother of all inventions!

OK I did as you said...

I added your simple link...

I did what you said with chorme's console...

In to the tab response it gives me this:

{"user_array":["Simos"],"id_array":["185"],"img_array":["http:\/\/www.gravatar.com\/avatar\/76ba15f5f8417501976957b87fa73dc8?s=24&d=wavatar"],"room_array":[{"room_name":"TECH SUPPORT","0":"TECH SUPPORT","room_id":"3","1":"3","online_count":"0","2":"0"},{"room_name":"MAIN CHAT","0":"MAIN CHAT","room_id":"1","1":"1","online_count":"0","2":"0"}],"chatroom_messages":[],"chatroom_users_div":"<div>","in_room":-1,"last_chatroom_usr_id":null,"time":"13284619640.012171001328461964","chatroom_mesg_time":"13284619640.012130001328461964","islog":"userloggedin","status":1,"messages":[],"userdata":"<a href="#"> Test link ","count":1,"username":"GreenMadness","userid":"62"}


In to the b errors hasn't something about freiChat!!!

Simple link doesn't show up again!!!

</a></div>

OK I did as you said... I added your simple link... I did what you said with chorme&#039;s console... In to the tab response it gives me this: &amp;lt;code&amp;gt; {&quot;user_array&quot;:[&quot;Simos&quot;],&quot;id_array&quot;:[&quot;185&quot;],&quot;img_array&quot;:[&quot;http:\/\/www.gravatar.com\/avatar\/76ba15f5f8417501976957b87fa73dc8?s=24&amp;d=wavatar&quot;],&quot;room_array&quot;:[{&quot;room_name&quot;:&quot;TECH SUPPORT&quot;,&quot;0&quot;:&quot;TECH SUPPORT&quot;,&quot;room_id&quot;:&quot;3&quot;,&quot;1&quot;:&quot;3&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;2&quot;:&quot;0&quot;},{&quot;room_name&quot;:&quot;MAIN CHAT&quot;,&quot;0&quot;:&quot;MAIN CHAT&quot;,&quot;room_id&quot;:&quot;1&quot;,&quot;1&quot;:&quot;1&quot;,&quot;online_count&quot;:&quot;0&quot;,&quot;2&quot;:&quot;0&quot;}],&quot;chatroom_messages&quot;:[],&quot;chatroom_users_div&quot;:&quot;&amp;lt;div&amp;gt;&amp;lt;\/div&amp;gt;&quot;,&quot;in_room&quot;:-1,&quot;last_chatroom_usr_id&quot;:null,&quot;time&quot;:&quot;13284619640.012171001328461964&quot;,&quot;chatroom_mesg_time&quot;:&quot;13284619640.012130001328461964&quot;,&quot;islog&quot;:&quot;userloggedin&quot;,&quot;status&quot;:1,&quot;messages&quot;:[],&quot;userdata&quot;:&quot;&amp;lt;a href=&#039;#&#039; &amp;gt; Test link &amp;lt;\/a&amp;gt;&quot;,&quot;count&quot;:1,&quot;username&quot;:&quot;GreenMadness&quot;,&quot;userid&quot;:&quot;62&quot;} &amp;lt;/code&amp;gt; In to the b errors hasn&#039;t something about freiChat!!! Simple link doesn&#039;t show up again!!!
www.greenmadness.net

That is really odd .

Can you send me the freichat.php file to my mail .
evnix[dot]com[@]gmail[dot]com

I will run it here and see for myself .

That is really odd . Can you send me the freichat.php file to my mail . evnix[dot]com[@]gmail[dot]com I will run it here and see for myself .
Necessity is the mother of all inventions!

Your code is correct .I cant say anything about the query since i dont have
alphauserpoints .

First problem , where is the .= used for concatenating the strings .
I can see only " = " after the $text variable , make it $text .= .....


Another problem is , you have added the link inside the div created for each user
But if you see the parent div has a onmousedown event set , so your link will be disabled .

So even if you place the link before the parent div , your link will work , but then
chatwindows won't get opened on clicking the users .

Hence , i would like to know your objective , Do you want to open the profile and
the chatwindow simultaneously when the user is clicked or anything else ?

Your code is correct .I cant say anything about the query since i dont have alphauserpoints . First problem , where is the .= used for concatenating the strings . I can see only &quot; = &quot; after the $text variable , make it $text .= ..... Another problem is , you have added the link inside the div created for each user But if you see the parent div has a onmousedown event set , so your link will be disabled . So even if you place the link before the parent div , your link will work , but then chatwindows won&#039;t get opened on clicking the users . Hence , i would like to know your objective , Do you want to open the profile and the chatwindow simultaneously when the user is clicked or anything else ?
Necessity is the mother of all inventions!

Goodmorning... (I don't know if you have night or day there)

Well I found it!!! :D I added style='display:inline;' inside and now I can see it and it works too!!! But as you said, it make two things. When I do click on the icon it gives me user's profile and opens a chat window with this user too!!! There is no problem with that, cause I add a target="_new" so it gives me the profile to a new windows!!! :)

<a style="display:inline;" href="index.php?option=com_alphauserpoints&view=account&userid=%22.%24data.%22&Itemid=24" target="_new;">
<div id="UserProfile_Normal" onmouseover="id='UserProfile_MOver'" onmouseout="id='UserProfile_MOut'" title="&Pi;&rho;&omicron;&phi;ί&lambda; &Chi;&rho;ή&sigma;&tau;&eta;" alt="profile">&nbsp;</div>
</a>

So it's ok with that!!! :) Let's talk about AlphaUserPoints query that should be out of foreach ($result as $res) loop. First of all, what is the problem if it stays inside???

Goodmorning... (I don&#039;t know if you have night or day there) Well I found it!!! :D I added &amp;lt;strong&amp;gt;style=&#039;display:inline;&#039;&amp;lt;/strong&amp;gt; inside &amp;lt;strong&amp;gt;&amp;lt; a &amp;gt;&amp;lt;/strong&amp;gt; and now I can see it and it works too!!! But as you said, it make two things. When I do click on the icon it gives me user&#039;s profile and opens a chat window with this user too!!! There is no problem with that, cause I add a &amp;lt;strong&amp;gt;target=&quot;_new&quot;&amp;lt;/strong&amp;gt; so it gives me the profile to a new windows!!! :) &amp;lt;code&amp;gt; &amp;lt;a style=&#039;display:inline;&#039; href=&#039;index.php?option=com_alphauserpoints&amp;view=account&amp;userid=&quot;.$data.&quot;&amp;Itemid=24&#039; target=_new;&amp;gt; &amp;lt;div id=&#039;UserProfile_Normal&#039; onMouseOver= id=&#039;UserProfile_MOver&#039; onMouseOut= id=&#039;UserProfile_MOut&#039; title=&#039;Προφίλ Χρήστη&#039; alt=&#039;profile&#039;&amp;gt;&amp;nbsp;&amp;lt;/div&amp;gt; &amp;lt;/a&amp;gt; &amp;lt;/span&amp;gt; &amp;lt;/code&amp;gt; So it&#039;s ok with that!!! :) Let&#039;s talk about AlphaUserPoints query that should be out of &amp;lt;strong&amp;gt;foreach ($result as $res)&amp;lt;/strong&amp;gt; loop. First of all, what is the problem if it stays inside???
www.greenmadness.net

There is no problem with it being inside the loop .

But ,
Imagine , there are 10 users online , so for each user , your
query will run 9 times . so total 90 times , it will have to query the database .


My advice is that you join your query with the existing query inside the get_user() [ or get_buddies() or get_guests()]

That will save lot of your server resources.

There is no problem with it being inside the loop . But , Imagine , there are 10 users online , so for each user , your query will run 9 times . so total 90 times , it will have to query the database . My advice is that you join your query with the existing query inside the get_user() [ or get_buddies() or get_guests()] That will save lot of your server resources.
Necessity is the mother of all inventions!

Do you know JOIN in SQL ?

You need to JOIN your query with the existing query .

Well , if you don't know there is one more alternative

Do you know JOIN in SQL ? You need to JOIN your query with the existing query . Well , if you don&#039;t know there is one more alternative
Necessity is the mother of all inventions!

I am not so good in SQL but I undertand what you mean. I don't know how to syntax it and wher to place all this!!! :(

I am not so good in SQL but I undertand what you mean. I don&#039;t know how to syntax it and wher to place all this!!! :(
www.greenmadness.net

Don't worry , i will help you with this .
But the problem is i don't have AlphaUserpoints ,

So i will JOIN the query and give you , you just make any corrections
if required , fine ?

Also tell me , which driver have you integrated with FreiChatX

Don&#039;t worry , i will help you with this . But the problem is i don&#039;t have AlphaUserpoints , So i will JOIN the query and give you , you just make any corrections if required , fine ? Also tell me , which driver have you integrated with FreiChatX
Necessity is the mother of all inventions!

Okay, fine!!! :) What do you mean, which driver I have integrated with FreiChatX"??? I didn't get it at all...

Okay, fine!!! :) What do you mean, which driver I have integrated with FreiChatX&quot;??? I didn&#039;t get it at all...
www.greenmadness.net

I mean while installation , what did you select ,

which driver did you select . You can see that by going to
~/freichat/arg.php

Search for $driver= And check what is the name of your driver .

After getting that go to
~/freichat/server/drivers/Your_DRiver.php

In get_users() , replace the query by which i send you be mail ,
Because i am unable to post it here .

I mean while installation , what did you select , which driver did you select . You can see that by going to ~/freichat/arg.php Search for $driver= And check what is the name of your driver . After getting that go to ~/freichat/server/drivers/Your_DRiver.php In get_users() , replace the query by which i send you be mail , Because i am unable to post it here .
Necessity is the mother of all inventions!

OK, I found the driver joomla.php file but I can't find the get_users(). I found it but there is no query around there!!! Is this into joomla.php file???

OK, I found the driver joomla.php file but I can&#039;t find the &amp;lt;strong&amp;gt;get_users()&amp;lt;/strong&amp;gt;. I found it but there is no query around there!!! Is this into joomla.php file???
www.greenmadness.net

Oh , If you are using the basic Joomla file , then all the queries will be
in base.php in the same folder .

Oh , If you are using the basic Joomla file , then all the queries will be in base.php in the same folder .
Necessity is the mother of all inventions!

I added your query in base.php and I aslo remove mine from freichat.php but it isn't work properly. It look like loading the users list and stays there, on loading!!!

I added your query in base.php and I aslo remove mine from freichat.php but it isn&#039;t work properly. It look like loading the users list and stays there, on loading!!!
www.greenmadness.net

Can you add this line var_dump($result);
before the loop in freichat.php

Then check in the request response , what do you get .

Also , check if the query i sent , is working in phpmyadmin or not .

Can you add this line var_dump($result); before the loop in freichat.php Then check in the request response , what do you get . Also , check if the query i sent , is working in phpmyadmin or not .
Necessity is the mother of all inventions!

OK!!! Give me some time... I just came back to home!!! I am doing it now...

OK!!! Give me some time... I just came back to home!!! I am doing it now...
www.greenmadness.net

In request response I get this message "This request has no response data available". In phpmyadmin gives me syntax errors because of the variables!!!

In request response I get this message &quot;This request has no response data available&quot;. In phpmyadmin gives me syntax errors because of the variables!!!
www.greenmadness.net
123
453
44
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft