mattsmith Posted December 10, 2012 Report Posted December 10, 2012 What do you change to make more than 1 recent bid show up Quote
Felipe Posted December 10, 2012 Report Posted December 10, 2012 <?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. 1 Quote
mattsmith Posted December 10, 2012 Author Report Posted December 10, 2012 <?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?? Quote
Felipe Posted December 11, 2012 Report Posted December 11, 2012 Well... so there might be only one bid at this time... Quote
mattsmith Posted December 11, 2012 Author Report Posted December 11, 2012 But i know there's more than 1 bid Quote
Moderators servetas Posted December 11, 2012 Moderators Report Posted December 11, 2012 Are you sure? Go to your admin panel and on the Pilots & Groups->View Bids. Quote
mattsmith Posted December 11, 2012 Author Report Posted December 11, 2012 Yes there are currently 2 bids Quote
loplo Posted December 12, 2012 Report Posted December 12, 2012 I have the same issue. I've tested with more than one bids. I even had 10 bids for testing purposes and only one was shown. Quote
Felipe Posted December 12, 2012 Report Posted December 12, 2012 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> 1 Quote
loplo Posted December 13, 2012 Report Posted December 13, 2012 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. Quote
Administrators simpilot Posted December 13, 2012 Administrators Report Posted December 13, 2012 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. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.