ludachris
06-23-2009, 06:04 PM
I built a custom vB page that has a query to get user data from the db. If I wanted to include avatars on that page, would I have to modify the query to include avatar data? This is for 3.8.
Here's the existing query:
$users=$db->query("SELECT *
FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
WHERE user.userid = userfield.userid
ORDER BY $orderby $direction
LIMIT $pos,$perpage");
I'm assuming once the query is ready, I'll just need to modify the template with an IF Conditional like:
<if condition="$show['avatar']"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /><br></if>
Here's the existing query:
$users=$db->query("SELECT *
FROM " . TABLE_PREFIX . "user AS user, " . TABLE_PREFIX . "userfield AS userfield
WHERE user.userid = userfield.userid
ORDER BY $orderby $direction
LIMIT $pos,$perpage");
I'm assuming once the query is ready, I'll just need to modify the template with an IF Conditional like:
<if condition="$show['avatar']"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /><br></if>