Questions About Awards

I’m working on the awards, I got them to show. The problem is they run on the same line. SO much that you have to scroll over to see them all. Is there a way to only show 4 per line?

Another problem. How do I show the images on the public profiles? All I see is the text.

Eddie

I put mine into a table to show one per line, with the description of each award on the right hand side. Try the below to show the image…i think it is commented out on the actual code already.

For example ; http://linkvirtual.info/index.php/profile/view/28

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

Whilst on the subject of awards, would it be possible to have awards automatically added to pilots that have completed a certain amount of hours? It’s a little tedious adding awards manually for 180 pilots

Your format would not work on my site. I use ribbons for awards, and would need to go about 5 across then jump down to the next line after 5.

http://www.flyaka.net/index.php/profile/view/1

Some of my ribbons are for hours. It sucks do them manually. Adding a auto award would be a time saver.

Yeah i see now, didnt realise Nice looking site you’ve got there, anyway.

Use line breaks after each image:

<br />

or enclose them in <p> (paragraph) tags

That would stack one image on top of each other. I want 5 across

then after 5 break to the next line.

Then you need to write some PHP code to loop, something like this:

$break = 5;
$i=0;

// This loop should already be there
foreach (.....)
{

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

    $i++;
}

http://members.pulseair.co.uk//index.php/profile/view/18

Does it take a certain amount of time for these to load/register on the pilots profile?

I Updated mine about 8-10hrs ago and still nothing :cry:

http://members.pulseair.co.uk//index.php/profile/view/18

Does it take a certain amount of time for these to load/register on the pilots profile?

I Updated mine about 8-10hrs ago and still nothing :cry:

Perhaps you edited the wrong template?

Perhaps i did 

erm? it is the Public_Profile.tpl correct?

Yes, I think that one is public_profile.tpl

Hi gentlemen,

I see when I click your link that you got this code to work. I am looking for the same thing. I need to be able to put my awards in a five across and then start a new row beneath five across then another row, etc.

I looked at the code here, but it is not working for me. Where can I find one of these loop codes and where exactly do I put it. I am a complete novice with all this code, so I pretty much have almost no understanding of how to make this work on my own.

I am in no hurry here and I really do appreciate all you guys have done for the virtual flight community. Take care and I look forward to any feedback.

Scott

Then you need to write some PHP code to loop, something like this:

$break = 5;
$i=0;

// This loop should already be there
foreach (…)
{

  if($i%$break == 0)
    echo “
”;

  $i++;
}

That’s in public_profile.tpl . You have to add that $i and $break variables in there

Hi Nabel

i found a error in your code

your code:

$break = 5;
$i=0;

// This loop should already be there
foreach (.....)
{

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

   $i++;
}

my correction:

$break = 5;
$i=0;

// This loop should already be there
foreach (.....)
{
   $i++;

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


}