Jump to content

Questions About Awards


flyalaska

Recommended Posts

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 :P

Link to comment
Share on other sites

  • 1 year later...

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 "<br />";

    $i++;
}

Link to comment
Share on other sites

  • 1 year later...

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 />";


}

Link to comment
Share on other sites

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