Jump to content

Recommended Posts

Posted

I have the Aword Images Showing in the pilot Center but how do i make so only a certain amount of awords are shown per line? I tis starting to look really bad when a pilot has too many awords. I am using this code..

<ul style="margin-top: 0px; margin-left: 2px;">

<?php foreach($allawards as $award){ ?>

<img src="<?php echo ($award->image);?>" alt="<?php echo ($award->descrip);?>" />

<?php } ?>

</ul>

<?php } ?>

Thanks!

Posted

ok sorry for the wait

check in your profile_main.tpl

search this

<strong>My Awards</strong><br />
		<?php
		if(!$allawards)
		{
			echo 'No awards yet';
		}
		else
		{

		?>	

and after delete all and add this:

<?php 

$break = 5;
$i=0;

foreach($allawards as $award){ ?>


<img src="<?php echo $award->image?>" title="<?php echo $award->descrip?>" />

<?php 

{
   $i++;

   if($i%$break == 0)
       echo "<br />";


}

?>

my full code is:

<p>

		<strong>My Awards</strong><br />
		<?php
		if(!$allawards)
		{
			echo 'No awards yet';
		}
		else
		{

		?>	



<?php 

$break = 5;
$i=0;

foreach($allawards as $award){ ?>

<img src="<?php echo $award->image?>" title="<?php echo $award->descrip?>" />

<?php 

{
   $i++;

   if($i%$break == 0)
       echo "<br />";


}

?>
			<?php } ?>



		<?php
		}
		?>
	</p>

</td>

</tr>
</table>
</div>
</div>

  • Like 1
Posted

ok sorry for the wait

check in your profile_main.tpl

search this

<strong>My Awards</strong><br />
		<?php
		if(!$allawards)
		{
			echo 'No awards yet';
		}
		else
		{

		?>	

and after delete all and add this:

<?php 

$break = 5;
$i=0;

foreach($allawards as $award){ ?>


<img src="<?php echo $award->image?>" title="<?php echo $award->descrip?>" />

<?php 

{
   $i++;

   if($i%$break == 0)
       echo "<br />";


}

?>

my full code is:

<p>

		<strong>My Awards</strong><br />
		<?php
		if(!$allawards)
		{
			echo 'No awards yet';
		}
		else
		{

		?>	



<?php 

$break = 5;
$i=0;

foreach($allawards as $award){ ?>

<img src="<?php echo $award->image?>" title="<?php echo $award->descrip?>" />

<?php 

{
   $i++;

   if($i%$break == 0)
       echo "<br />";


}

?>
			<?php } ?>



		<?php
		}
		?>
	</p>

</td>

</tr>
</table>
</div>
</div>

Nvm! Works now! Thanks for the code +1 :)

  • 2 months later...
Posted

Hi

This is great and just what i have been looking for. Just one question I have used the code above but one of my awards is a set of wings. can anyone tell me how I can put it at the top. I can be viewed here http://www.caalair.com/index.php/profile/view/1

You will see what i mean when you look at the link. I would like wings at the top centre followed by the ribbons in rows of 5 below.

Thanking you in advance.

Alan

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...