Skip to Content Skip to Menu

Avatar Gallery (was Avatar Matrix) beta released

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 7 months ago #32498 by Raj
You could construct a query that contains the first name and last name fields, then set the options so that the fields are echoed below each avatar. That will put them on different lines, not a single line. However, that may be better anyway, since a full name on a single line will probably be long enough to mess with the avatar spacing.

Raj

Post edited by: Raj, at: 2007/03/05 16:58

Post edited by: Raj, at: 2007/03/05 16:58

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

  • Himgoku
  • Himgoku
  • OFFLINE
  • Posts: 11
  • Thanks: 2
  • Karma: 1
17 years 7 months ago #32502 by Himgoku
Replied by Himgoku on topic Re:Beta of Avatar Matrix .4 : pagination hack
I'm using Beta of Avatar Matrix .5.
So I want to use the Full Name in a Mootools Bubble Tip and not as a description under the Avatar. Thus preventing messing up the Avatar spacing.

This is the SQL query string I'm using:

SELECT * , cb_motto FROM #__comprofiler WHERE avatar != '' AND avatar NOT LIKE 'gallery%' AND banned = '0' AND avatarapproved = '1' AND approved = '1' AND confirmed = '1' AND avatar NOT LIKE 'NULL' ORDER BY RAND()


I don't want an avatar matrix with 'no photo' avatars in it. I just want to show profiles with a photo.

I tried other queries, but then profiles with no photo still show up.

Himgoku

CB 2.0 RC
Joomla 3.3.3

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 7 months ago #32503 by Raj
Maybe this

SELECT u.username, u.id, c.cb_motto, c.user_id, c.avatar FROM #__comprofiler AS c, #__users AS u WHERE c.avatar NOT LIKE 'NULL' AND c.banned=0 AND c.approved = '1' AND c.confirmed = '1' AND (u.id = c.user_id) ORDER BY RAND()

The key is c.avatar NOT LIKE 'NULL'. Before users create an avatar, this field has a default value of NULL.

Post edited by: Raj, at: 2007/03/05 17:24

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 7 months ago #32505 by Raj
Oh wait...you said you want to use the firstname and lastname. Then try

SELECT u.username, u.id, c.firstname, c.lastname, c.cb_motto, c.user_id, c.avatar FROM #__comprofiler AS c, #__users AS u WHERE c.avatar NOT LIKE 'NULL' AND c.banned=0 AND c.approved = '1' AND c.confirmed = '1' AND (u.id = c.user_id) ORDER BY RAND()

Any fields to be captioned have to follow the SELECT statement, otherwise data for those fields isn't available to program.

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

  • Himgoku
  • Himgoku
  • OFFLINE
  • Posts: 11
  • Thanks: 2
  • Karma: 1
17 years 7 months ago #32513 by Himgoku
Replied by Himgoku on topic Re:Beta of Avatar Matrix .4 : pagination hack
I've got it: :)

SELECT u.name, u.id, c.cb_motto, c.user_id, c.avatar FROM #__comprofiler AS c, #__users AS u WHERE c.avatar != '' AND c.avatar NOT LIKE 'NULL' AND c.banned=0 AND c.approved = '1' AND c.confirmed = '1' AND (u.id = c.user_id) ORDER BY RAND()

Auto approve avatar is set to yes on my site.
That's why I have to add: WHERE c.avatar != ''
otherwise profiles with no photo still show up.

Now I have to figure out why the Mootools tooltips work in FF and not in IE (runtime error on line 1803) :dry:

Himgoku

CB 2.0 RC
Joomla 3.3.3

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

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 7 months ago #32515 by Raj
Congrats on the query!

I find IE 7 gives me javascript errors on a lot of sites. I just add

<SCRIPT language="JavaScript">
<!--
function silentErrorHandler() {return true;}
window.onerror=silentErrorHandler;
//-->
</SCRIPT>

to the head of my of template, and that intercepts all IE errors and cancels them.

Raj

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

Moderators: beatnantkrileon
Powered by Kunena Forum