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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,105
  • Total Topics: 21,345
  • Online today: 1,072
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 647
  • Total: 647

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

Thats it thanks for all your help +2 to Karma for you

Porky

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

jacortina

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).

JPDeni

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.

Porky

So add it with in this
echo '<table border="0" cellspacing="1" cellpadding="5" align="center" class="bordercolor">

JPDeni

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[

This website is proudly hosted on Crocweb Cloud Website Hosting.