Skip to Content Skip to Menu

Avatar Gallery (was Avatar Matrix) beta released

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 10 months ago #29386 by Raj
The part of the query

c.avatar IS NOT NULL

means that only users with an avatar uploaded will be selected. You can just delete this part and you can select from all users, with or without an avatar.

Also, change c.cb_city and c.cb_country to fields in your jos_comprofiler table (you can get the field names by going to Community Builder --> Fields in the backend, in case you don't or can't use PHPMyAdmin to look at the Joomla database). Either that or just eliminate these fields from the query if they're not doing anything.

Roger

Post edited by: Raj, at: 2007/01/19 19:50

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

  • trissel
  • trissel
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
17 years 10 months ago #29551 by trissel
Hey thanks for the fast reply, just didnt saw it was on page 10 haha.

I already did what you suggested in your post. My profiles already have avatars so thats not the problem. I changed the c.cb_city and c.cb_country but it didnt work. Checked phpAdmin to make shure the fields are correct.

Hmm it's strange.

Maybe this is something.

www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/id,29312/catid,13/limit,6/limitstart,30/

Last post (By: mediaguru) I think i just install it and mess around a little more.

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 10 months ago #29556 by Raj
post the query that's currently malfunctioning and let's have a look. also, does the avatar matrix work with other queries? you've actually observed it working? if so, then that narrows it down to a malfunctioning query. if not, then the problems are deeper.

Raj

Post edited by: Raj, at: 2007/01/22 03:20

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

  • trissel
  • trissel
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
17 years 10 months ago #29589 by trissel
Other queries are working, the most popular (by hits) works. I tried narrowing it down but till there are no profiles found.

Most popular (working)
SELECT * FROM #__comprofiler WHERE avatarapproved=1 AND avatar IS NOT NULL and banned='0' ORDER BY hits DESC

Narrowed down (not working)
SELECT sb.karma, sb.userid FROM #__sb_users ORDER BY sb.karma DESC

Post edited by: trissel, at: 2007/01/22 14:38

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 10 months ago #29591 by Raj
The "narrowed down" version needs some attention. First, all the data the avatar matrix program needs it gets from this query. So...since avatar is a field in #__comprofiler, that means that #__comprofiler must appear in the query. Second, since multiple tables, each with multiple fields, appear in the query, each table needs an alias. That way we can append the alias to beginning of each field, and SQL knows what table the field belongs to. To give a table an alias, just put the alias behind the table, with a space between. Third, we're getting data from three tables, so we have to join the three tables on the data column that contains their user id, jos_comprofiler, jos_users, and the Simpleboard table. That way we know whose karma matches up to whose avatar, even though these data are in different tables.

Try this:

SELECT u.username, u.id, c.user_id, c.avatar, sb.karma, sb.userid FROM #__comprofiler c, #__users u, #__sb_users sb WHERE c.banned='0' AND sb.karma>0 AND (u.id = c.user_id) AND (u.id = sb.userid)

I can't remember the feature set that's in .4 exactly, but if some other fields are being captioned above or below the avatars, just leave these fields blank for now.

Raj

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

  • trissel
  • trissel
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
17 years 10 months ago #29606 by trissel
Hey, I have some good news, it's working! Thank you very much Raj, i increased your Karma!

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

Moderators: beatnantkrileon
Powered by Kunena Forum