Skip to Content Skip to Menu

Avatar Gallery (was Avatar Matrix) beta released

17 years 6 months ago #37373 by tomsawyer1234
Replied by tomsawyer1234 on topic Avatar Matrix .5 sort by number of connexions?
I Would like to sort members by numbers of connexions. Show fisrt, people who have the more connexion.

can someone help me to built the query?

tks in advance.


Florian

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37402 by Raj
This seems to work:

SELECT c.avatar, COUNT(m.referenceid) AS numConnections, c.user_id, u.id, u.username FROM #__comprofiler AS c, #__users AS u, #__comprofiler_members AS m WHERE (c.user_id = u.id) AND (c.user_id = m.referenceid) AND c.banned='0' and m.accepted='1' GROUP BY m.referenceid ORDER BY numConnections DESC

There's a nuance, however. On the Connections Tab in the CB Admin backend, there's an option for allowing cross connections. In other words, some connections are one way, and others are two way.

I'm not sure whether this query can distinguish between the two types, or even whether it should. The problem would lie with separating out the one-way connections. If you have your configuration set to allow cross-connections, then I think this is the answer.

Raj

Please Log in or Create an account to join the conversation.

  • Dr.Mazika
  • Dr.Mazika
  • OFFLINE
  • Posts: 13
  • Thanks: 0
  • Karma: 1
17 years 6 months ago #37415 by Dr.Mazika
Replied by Dr.Mazika on topic Re:Beta of Avatar Matrix .4 : pagination hack
Please i wanna to know if Pagination are allowed in this version

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37416 by Raj
Nope, sorry...haven't done that yet.

Roger

Please Log in or Create an account to join the conversation.

17 years 6 months ago #37438 by tomsawyer1234
Replied by tomsawyer1234 on topic Re:Avatar Matrix .5 sort by number of connexions?
tks a lot for the code!
I love your module. It is a great tool.

for the next version it could be interesting to choose whether you want to display or nor the title "Results of Search #.." on the module layout.

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 6 months ago #37440 by Raj
The title of the module can be turned off and the title of the search displayed instead. You can make the search title anything you want.

Roger

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum