TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 488
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 212
  • Total: 212

Need some Coding Help

Started by humanporkrind, September 27, 2006, 12:20:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Porky

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?

JPDeni

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.

Porky

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.

JPDeni

So you tried

<img scr="' . $row2['avatar'] . '">
and you got the avatar name? That's pretty strange. Could I see it in action?

Porky


Porky

I put it in Like you had it and it dispalys nothing...

JPDeni

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.

Porky


Porky


JPDeni

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.