Announcement

Collapse
No announcement yet.

How do I figure out if someone has an avatar or not?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rawhide
    replied
    Oh, I'm sorry, I misread your post.

    I'm looking at this line
    Code:
    <if condition="($post[field7] != 'Unknown') AND ($post[field6] != 'Unknown') AND ($post[field8] != 'Unknown')">
    Do you have the field set to only accept valid responses and not to accept a blank response, made it mandatory and run an SQL query to change all existing users to Unknown?

    Same sort of thing goes with field16
    Code:
    <if condition="($post[field16] == 'No') OR ($post[avatarurl] == '')">

    Leave a comment:


  • Charlie O'Leary
    replied
    I actually don't care about that part of it, that's working fine. The part I care about mainly is...

    Code:
    <if condition="($post[field16] == 'No') OR ($post[avatarurl] == '')">
    My board is a community forum for World of Warcraft. Everyone has the option to use their own personal avatar or an avatar based on their character class/geneder/race combo. If field16 is no ("use custom avatar") OR they don't have a custom avatar set, it checks to see if they have their class/gender/race combo set. If none are set, a "?" avatar is displayed. Later on I check to see if they set field16 to yes to display a custom avatar. If it is set to use AND they have an avatar uploaded it displays it.

    I guess what I'm looking for is variable that will figure out if they have an avatar uploaded or otherwise linked to the site.

    Leave a comment:


  • Rawhide
    replied
    Replace:
    Code:
    <if condition="$show['avatar']">
    with:
    Code:
    <if condition="$bbuserinfo[options] & 2 OR $bbuserinfo['userid'] == 0">
    That will show avatars for everyone that has selected it and guests.

    Alternativly, use:
    Code:
    <if condition="$bbuserinfo[options] & 2>
    If you do not want guests to see avatars



    Or use my remote avatar hack:
    http://www.vbulletin.org/forum/showthread.php?t=131706
    It includes protections to prevent oversize images and malicious code.

    Leave a comment:


  • Charlie O'Leary
    replied
    Sorry, I should be more specific. I have a template that displays an avatar based on user input. Here's a sample of the code...

    Code:
    <if condition="$show['avatar']">
    <!-- If the viewer wants to show avatars... -->
    <if condition="($post[field16] == 'No') OR ($post[avatarurl] == '')">
    <!-- If the poster does not want to display a custom avatar or they have not set one, create one for them... -->
    <if condition="($post[field7] != 'Unknown') AND ($post[field6] != 'Unknown') AND ($post[field8] != 'Unknown')">
    <!-- If they have their gender, race and class set, create the avatar... -->
    The problem is that it doesn't seem like the avatarurl being blank is working, so I need to find a better way for a conditional to figure out if a poster has a URL linked or uploaded or not.

    Leave a comment:


  • The dman
    replied
    Can't you see them in the memberlist?

    Leave a comment:


  • How do I figure out if someone has an avatar or not?

    Title pretty much says it all. I'm trying to figure out if a user has uploaded an avatar or has one set at all. I've used the 'avatarurl' option, but it only seems to work sometimes. I need a better solution if there is one.

Related Topics

Collapse

Working...
X