mattsmith Posted December 10, 2012 Report Share Posted December 10, 2012 What do you change to make more than 1 recent bid show up Quote Link to comment Share on other sites More sharing options...
Felipe Posted December 10, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
mattsmith Posted December 10, 2012 Author Report Share Posted December 10, 2012 Ok Thanks Quote Link to comment Share on other sites More sharing options...
mattsmith Posted December 10, 2012 Author Report Share 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 Link to comment Share on other sites More sharing options...
Felipe Posted December 11, 2012 Report Share Posted December 11, 2012 Well... so there might be only one bid at this time... Quote Link to comment Share on other sites More sharing options...
mattsmith Posted December 11, 2012 Author Report Share Posted December 11, 2012 But i know there's more than 1 bid Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted December 11, 2012 Moderators Report Share Posted December 11, 2012 Are you sure? Go to your admin panel and on the Pilots & Groups->View Bids. Quote Link to comment Share on other sites More sharing options...
mattsmith Posted December 11, 2012 Author Report Share Posted December 11, 2012 Yes there are currently 2 bids Quote Link to comment Share on other sites More sharing options...
loplo Posted December 12, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
Felipe Posted December 12, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
loplo Posted December 13, 2012 Report Share 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 Link to comment Share on other sites More sharing options...
Administrators simpilot Posted December 13, 2012 Administrators Report Share 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 Link to comment Share on other sites More sharing options...
loplo Posted December 14, 2012 Report Share Posted December 14, 2012 Thanks! Solved it. Quote Link to comment Share on other sites More sharing options...
Ariel Posted May 22, 2013 Report Share Posted May 22, 2013 [deleted by author] Quote Link to comment Share on other sites More sharing options...
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.