Jump to content

Recommended Posts

Posted

<?php MainController::Run('FrontBids', 'RecentFrontPage', x); ?>

Change the "x" for the number of bids you want to show. Mine, for example, is 10. But I suggest you to fill it with a number that fits better to your layout. ;)

  • Like 1
Posted

<?php MainController::Run('FrontBids', 'RecentFrontPage', x); ?>

Change the "x" for the number of bids you want to show. Mine, for example, is 10. But I suggest you to fill it with a number that fits better to your layout. ;)

I have done this but its still only showing 1 bid??

Posted

Try to check your foreach() on the frontpage_recentbids.tpl.

Mine is this way and it works fine:

<table class="table table-condensed">
   <thead>
 <tr>	 
  <th>Voo</th>
  <th>Trecho</th>
  <th>Piloto</th>
 </tr>
   </thead>   
<tbody>
<?php
foreach($lastbids as $lastbid)
{
?>
 <tr>
  <td><?php echo $lastbid->code . $lastbid->flightnum; ?></td>
  <td><?php echo $lastbid->depicao; ?> - <?php echo $lastbid->arricao; ?></td>
<?php
 $params = $lastbid->pilotid;
 $pilot = PilotData::GetPilotData($params);
 $pname = $pilot->firstname;
 $psurname = $pilot->lastname;
?>
  <td><a href="http://vai.aero/index.php/profile/view/<?php echo $lastbid->pilotid; ?>"><?php echo $pname; ?> <?php echo $psurname; ?></a></td>
 </tr>	 
  <?php
  }
  ?>
</tbody>
</table>

  • Like 1
Posted

Well, using parts of your code solved it.

It seems that the foreach was pretty buggy, and it was the default one used.

LE:

After removing my test bids, my page is messed up. Having no bids I'm receiving an error.

I've changed to be like this:

<?php
if(!$lastbids)
{
echo 'No bids have been made';
return;

}
foreach($lastbids as $lastbid);
{
?>

and now I'm getting only one bid. This part of the code is messing things up.

  • Administrators
Posted

Not knowing what you have after this;

foreach($lastbids as $lastbid);
{
?>

for starters you need to remove the semi-colon after your foreach command. That is stopping the loop right there.

  • Like 1
  • 5 months later...

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