Skip to Content Skip to Menu

Avatar Gallery (was Avatar Matrix) beta released

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
18 years 1 month ago #19449 by Raj
Choose a look and then paste the CSS into your template. The CSS formats the table, table cells, and table contents generated by the module. Do a "View Source" on a page with the matrix on it, and then look at the CSS classes, and you can kind of see what CSS classes control what tags. That lets you play around with it.

As for pagination, I've never looked into it. I'm not a big fan of pagination, to be honest. I guess it's a matter of personal taste, but I'd rather get 500 avatars on a page.

Raj

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
18 years 1 month ago #19906 by Raj


Post edited by: Raj, at: 2006/09/02 23:23

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

18 years 1 month ago #20093 by DavidOrtmann
Replied by DavidOrtmann on topic Re:Beta of Avatar Matrix .4 available for download
Hi there.
I am desperately looking for a way to show all my users, ordered by their last Login-Date. Do you have any idea what the correct SQL command would be? I tried a lot, but always got "no profiles found".

I think it should be similar to the field which shows the last date the profile was saved, and the lastonlinedate should come from the table sessions - but I cannot go further.

Any help?

Thanks a lot,
David

P.S.: BTW, the link to the forge you provided is not working.

Post edited by: DavidOrtmann, at: 2006/09/02 23:01

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
18 years 1 month ago #20095 by Raj
Perhaps this? :

SELECT u.username, u.id, u.lastvisitDate, c.user_id, c.avatar, c.cb_city, c.cb_country FROM #__comprofiler c, #__users u WHERE c.banned=0 AND c.avatar IS NOT NULL AND (u.id = c.user_id) ORDER BY u.lastvisitDate DESC

The lastvisitDate is actually in jos_users.

In the module backend, there's an entry called "CB Field to caption below each avatar." Use simply lastvisitDate in this field. That's not a CB field, but I was thinking about CB fields at the time, and it didn't occur to me that any field from the recordset returned by the query could be captioned, but it can.

Let me know if it works. Obviously, you'll want to change c.cb_city and c.cb_country to fields that are present in your database, and add whatever others you need.

Raj

Post edited by: Raj, at: 2006/09/02 23:24

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

18 years 1 month ago #20116 by DavidOrtmann
Replied by DavidOrtmann on topic Re:Beta of Avatar Matrix .4 available for download
Hi there,
thank you for answering!

Yes, its working perfectly now. Eventually I ended up with the following code (after deleting some example fields you provided and the c.avatar IS NOT NULL command so that all users, even without an avatar, are displayed):

SELECT u.username, u.id, u.lastvisitDate, c.user_id, c.avatar FROM #__comprofiler c, #__users u WHERE c.banned=0 AND (u.id = c.user_id) ORDER BY u.lastvisitDate DESC

Great job!

BTW: I understand all of the code, except (u.id = c.user_id). What does it mean?

David

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
18 years 1 month ago #20127 by Raj
Great!

(u.id = c.user_id) is what's known as an SQL join...it's literally saying "construct the results set such that the id field from jos_users is matched to the user_id field from jos_comprofiler."

That's necessary because the username that the Avatar Matrix needs to put above the avatars is in jos_users, the Joomla registration table, whereas CB creates a table called jos_comprofiler and puts its information in fields there. In order to know what data goes with what user, the two tables have to share one column with unique values for each user. They can then be matched or "joined" on this column so that Joomla knows what data belong to what user.

Raj

Post edited by: Raj, at: 2006/09/03 13:51

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

Moderators: beatnantkrileon
Powered by Kunena Forum