Kieran
February 15, 2010, 9:10pm
1
Hey,
If you would like an awards table if your site, use this code. The table is totally plain, but fully customisable using your standard table css/html.
profile_mail.tpl
<p>
<strong>My Awards</strong><br />
<?php
if(!$allawards)
{
echo 'No awards yet';
}
else
{
/* To show the image:
<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
*/
?>
<ul>
<table width="790" border="0" cellspacing="5" cellpadding="5">
<?php foreach($allawards as $award){ ?>
<tr>
<td width="25%"><center><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></center></td>
<td width="25%"><center><?php echo $award->name ?></center></td>
<td width="50%"><center><?php echo $award->descrip ?></center></td>
</tr>
<?php } ?>
</table>
</ul>
<?php
}
?>
</p>
pilots_public_profile.tpl
<p>
<strong><?php echo $userinfo->firstname; ?>'s Awards</strong><br />
<?php
if(!$allawards)
{
echo $userinfo->firstname . 'has no awards yet.';
}
else
{
/* To show the image:
<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
*/
?>
<ul>
<table width="790" border="0" cellspacing="5" cellpadding="5">
<?php foreach($allawards as $award){ ?>
<tr>
<td width="25%"><center><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></center></td>
<td width="25%"><center><?php echo $award->name ?></center></td>
<td width="50%"><center><?php echo $award->descrip ?></center></td>
</tr>
<?php } ?>
</table>
</ul>
<?php
}
?>
</p>
Kyle
February 15, 2010, 9:42pm
2
Can you post a picture of it please? I just want to see what is like before i put it on my site. Thank You
Kieran
February 15, 2010, 9:51pm
3
No problem, Coming right up.
Kieran
February 26, 2010, 8:41pm
5
Glad you like it
I recommend some CSS Styles as this one is bland.
hello!where i can find this 2 folders??
profile_mail.tpl
and
pilots_public_profile.tpl
hello!where i can find this 2 folders??
profile_mail.tpl
and
pilots_public_profile.tpl
They are in Core/Templates.
But you should copy those files to lib/skin/YOUR_SKIN_NAME to edit them. Otherwise when you do an update they will be overwritten.
Cool, works like a dream!
wonderful, very easy and wunderful. I like it
Txmmy83
September 10, 2010, 7:59pm
12
very usefull thank you so much
Best Regards
Thomas
Jeff
March 23, 2011, 4:18am
13
I’ve done something terribly wrong here. I am trying to set this in a table, but can’t get it to lineup correctly. Can someone please help with this table?
<table width="100%" border="1" bgcolor="#042233" id="tabledlist" class="tablesorter">
<thead>
<tr>
<th width="25%" border="0">Award</th>
<th width="25%" border="0">Award Name</th>
<th width="50%" border="0">Description</th>
</tr>
</thead>
<?php
if(!$allawards)
{
echo $userinfo->firstname . 'has no awards yet.';
}
else
{
/* To show the image:
<img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" />
*/
?>
<ul>
<table width="790" bgcolor="#042233" border="1" cellspacing="5" cellpadding="5">
<?php foreach($allawards as $award){ ?>
<tr>
<td width="25%"><center><img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /></center></td>
<td width="25%"><center><?php echo $award->name ?></center></td>
<td width="50%"><center><?php echo $award->descrip ?></center></td>
</tr>
<?php } ?>
</table>
</ul>
<?php
}
?>
I know how to do tables for everything else, but this one is being stubborn.