echo '</font></font></a><br><font size="1"> ' . $row2['personalText'] . '</font></a></td><td class="windowbg2">' . $row2['usertitle'] . '</td>';
echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
echo '<td class="windowbg2" align="center">';
echo '<i>' . $row2['location'] . '</i>';
echo '</td><td class="windowbg">';
How due I change the usertitle code so that it will display usertitles instead it wi;; show members avatar?
I'm not sure how the directories work really, but as a start you can try
echo '</font></font></a><br><font size="1"> ' . $row2['personalText'] . '</font></a></td><td class="windowbg2"><img src="' . $row2['avatar'] . '"></td>';
I think, based on the context that this is what you want, but it's a little hard to tell for sure.
Yeah I tried that all that shows up is the avatar name not the picture...I am trying to change a php article to show the persons avatar in that table instead of there personal text.
So you tried
<img scr="' . $row2['avatar'] . '">
and you got the avatar name? That's pretty strange. Could I see it in action?
http://www.devilsrejectsdod.com/smf/index.php?page=11 this is the link give me a csec and I will put in avatar
I put it in Like you had it and it dispalys nothing...
Okay. It's not just printing the avatar name, though. It's indicating that an image should go there. Now it's just a matter of telling it where the avatar directory is.
At the beginning of your php article, add
global $modsettings;
Change the img tag to
<img scr="' . $modSettings['avatar_url'] . '/' . $row2['avatar'] . '">
That will probably only work if the images are on your server. I haven't looked into avatars enough to have much more information, though.
nope That ain't it
This is the full orginal code http://www.tinyportal.net/smf/index.php?topic=5423.msg63479#msg63479
Well, it seems I have a typo that neither one of us caught. Let's try it again.
<img src="' . $modSettings['avatar_url'] . '/' . $row2['avatar'] . '">
Also, I need to know for sure what your current code is so that I can compare it to the source code on your page so I can see what's going on.
Thats it thanks for all your help +2 to Karma for you
Here is another question is there a way to lock the tables so they are all the same so they don't ofset from the one above it...look http://www.devilsrejectsdod.com/smf/index.php?page=11
Quote from: JPDeni on September 27, 2006, 01:23:49 AM
<img src="' . $modSettings['avatar_url'] . '/' . $row2['avatar'] . '">
I don't believe this will work for offsite (remotely stored) avatars, which would require a conditional: if the $row['avatar'] started with "http", just use the value (or, rather, only prepend the "$modSettings['avatar_url'] . '/' ." when it doesn't start that way).
You're right jacortina. More would have to be done. I just gave him the information that I could find pretty easily, since this is the first time I've looked at avatars.
humanporkrind, in order to get all the tables lined up, you would need to add width tags to each of the table cells in the first row of each table.
So add it with in this
echo '<table border="0" cellspacing="1" cellpadding="5" align="center" class="bordercolor">
This is better code for the avatar.
Make sure you add
global $context;
to the top of your article. (Or, if you've already got a "global" line, add $context to it.) and then use the following code for your avatar:
if (!empty($context['user']['avatar']) && isset($context['TPortal']['userbox']['avatar']))
echo $context['user']['avatar']['image'];
[/code[