ercio Posted September 24, 2015 Report Share Posted September 24, 2015 (edited) I just started using Lance skin www.virtualvarig.com and get some errors 1 - pilot tab not showing any pilots. I added 1 hub , 2 airports 1 aircraft ad one route. 2 - cant register anyone , because no HUB or location can be choose. PILOTLIST <?php if(!$pilot_list) { echo 'There are no pilots!'; return; } ?> <style> .borders{ margin-left: 100px; margin-right:100px; } </style> <div class="borders"> <h3><?php echo $title?></h3> <table class="table"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> pilot-list REGISTER FORM [indent=1]<style> .bg{ background-color: #ffffff; margin-left: 200px; margin-right: 200px; border-bottom-color: aqua; } a{ color:#212121; } </style> <div class="bg"> <h3>Registration</h3> <p>Welcome to the registration form for <?php echo SITE_NAME; ?>. After you register, you will be notified by a staff member about your membership.</p> <form method="post" action="<?php echo url('/registration');?>"> <dl> <dt>First Name: *</dt> <dd><input type="text" name="firstname" value="<?php echo Vars::POST('firstname');?>" /> <?php if($firstname_error == true) echo '<p class="error">Please enter your first name</p>'; ?> </dd> <dt>Last Name: *</dt> <dd><input type="text" name="lastname" value="<?php echo Vars::POST('lastname');?>" /> <?php if($lastname_error == true) echo '<p class="error">Please enter your last name</p>'; ?> </dd> <dt>Email Address: *</dt> <dd><input type="text" name="email" value="<?php echo Vars::POST('email');?>" /> <?php if($email_error == true) echo '<p class="error">Please enter your email address</p>'; ?> </dd> <dt>Select Airline: *</dt> <dd> <select name="code" id="code"> <?php foreach($airline_list as $airline) { echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>'; } ?> </select> </dd> <dt>Hub: *</dt> <dd> <select name="hub" id="hub"> <?php foreach($hub_list as $hub) { echo '<option value="'.$hub->icao.'">'.$hub->icao.' - ' . $hub->name .'</option>'; } ?> </select> </dd> <dt>Location: *</dt> <dd><select name="location"> <?php foreach($country_list as $countryCode=>$countryName) { if(Vars::POST('location') == $countryCode) { $sel = 'selected="selected"'; } else { $sel = ''; } echo '<option value="'.$countryCode.'" '.$sel.'>'.$countryName.'</option>'; } ?> </select> <?php if($location_error == true) { echo '<p class="error">Please enter your location</p>'; } ?> </dd> <dt>Password: *</dt> <dd><input id="password" type="password" name="password1" value="" /></dd> <dt>Enter your password again: *</dt> <dd><input type="password" name="password2" value="" /> <?php if($password_error != '') echo '<p class="error">'.$password_error.'</p>'; ?> </dd> <?php //Put this in a seperate template. Shows the Custom Fields for registration Template::Show('registration_customfields.tpl'); ?> <dt>reCaptcha</dt> <dd> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="[url="https://www.google.com/recaptcha/api.js?hl=<?php"]https://www.google.c...api.js?hl=<?php[/url] echo $lang;?>"> </script> </dd> <dt></dt> <dd><p>By clicking register, you're agreeing to the <li><a href="<?php echo url('/Ruleregs'); ?>">terms and conditions</a></li></p></dd> <dt></dt> <dd><input type="submit" name="submit" value="Register!" /></dd> </dl> </form> </div>[/indent] Edited September 24, 2015 by servetas added the part of codes in [code][/code] backets Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted September 24, 2015 Moderators Report Share Posted September 24, 2015 The templates are using wrong values on their foreach functions. It is $allpilots instead of $pilot_list, $allairlines instead of $airline_list, $allhubs instead of $hub_list and $countries instead of $country_list. I hope this solves the problem. 1 Quote Link to comment Share on other sites More sharing options...
ercio Posted September 24, 2015 Author Report Share Posted September 24, 2015 Hi George are you from PHPvms or Lance? I try to register and I still cant. I deleted this part on the bottom, because I don't want this and still cant register: <?php //Put this in a seperate template. Shows the Custom Fields for registration Template::Show('registration_customfields.tpl'); ?><p><dt>reCaptcha</dt> <dd> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="[url=" Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 15, 2015 Report Share Posted October 15, 2015 what file is that code in? Thanks Rick http://www.flyvfrwpr.com/phpvms/index.php Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted October 15, 2015 Moderators Report Share Posted October 15, 2015 It's on your templates folder/frontpage_main.tpl or .php Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 15, 2015 Report Share Posted October 15, 2015 TY Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 15, 2015 Report Share Posted October 15, 2015 the only foreach referrals in those flies point to ACARS flight results, and pireps Thanks Rick Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 16, 2015 Moderators Report Share Posted October 16, 2015 Hi George are you from PHPvms or Lance? I try to register and I still cant. I deleted this part on the bottom, because I don't want this and still cant register: <?php //Put this in a seperate template. Shows the Custom Fields for registration Template::Show('registration_customfields.tpl'); ?><p><dt>reCaptcha</dt> <dd> <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?> <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div> <script type="text/javascript" src="[url=" You can't just delete the recaptcha code in registration form and expect process to go through. If you don't need the recaptcha, you'll need to modify 'Registration' module too. Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php if(!$pilot_list) { echo 'There are no pilots!'; return; } ?> <style> .borders{ margin-left: 100px; margin-right:100px; } </style> <div class="borders"> <h3><?php echo $title?></h3> <table class="table"> <thead> <tr> <th>Pilot ID</th> <th>Name</th> <th>Rank</th> <th>Flights</th> <th>Hours</th> </tr> </thead> <tbody> <?php foreach($pilot_list as $pilot) { /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ // To skip a retired pilot, uncomment the next line: //if($pilot->retired == 1) { continue; } ?> <tr> <td width="1%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a> </td> <td> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></td> <td><?php echo $pilot->totalflights?></td> <td><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></td> <?php } ?> </tbody> </table> </div> My question here Is When I leave the pilots.tpl default I get only the hubs that have pilots in them There are no pilots here is on the margin and about 4 times across the bottom of the page http://i228.photobuc...zpsurzfhlya.png when I remove the code in the first 8 lines I get all the hubs, but an error code pointing to the line that has the <foreach> argument on it http://i228.photobuc...zps3ezzm4ma.png How do I get the hub list with.....there are no pilots here....in the hubs that have no pilots in them? Thanks Rick Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 21, 2015 Moderators Report Share Posted October 21, 2015 Try this: <table> <?php $sql1 = "SELECT * FROM phpvms_pilots"; $pilots = DB::get_results($sql1); $sql2 = "SELECT * FROM phpvms_airports"; $airps = DB::get_results($sql2); foreach($airps as $airp) { if($airp->hub > 0) { $h = $airp->icao; $p = "SELECT * FROM phpvms_pilots WHERE hub = '$h'"; $pi = DB::get_results($p); ?> <thead> <tr><td align="center" colspan="6" ><font size="4"><?php echo $airp->icao;?> (<?php echo $airp->name;?>)</font></td></tr> <tr><th style="text-align: center;" bgcolor="#00405e" colspan="6"> </th></tr> <tr> <td>Pilot ID</td> <td>Pilot Location</td> <td>Pilot Name</td> <td>Pilot Rank</td> <td>Pilot Total Flights</td> <td>Pilot Total Hours</td> </tr> </thead> <?php foreach($pi as $p) { if(!$pi) { ?> <tr><td colspan="6">No Pilots At This HUB</td></tr> <?php } else { $rank = "SELECT * FROM phpvms_ranks WHERE rank = '$p->rank'"; $ran = DB::get_row($rank); ?> <tr> <td><a href="<?php echo url('/profile/view/'.$p->pilotid);?>"><?php echo $p->code.$p->pilotid;?></a></td> <td><img src="<?php echo Countries::getCountryImage($p->location);?>" alt="<?php echo Countries::getCountryName($p->location);?>" ></td> <td><?php echo $p->firstname.' '.$p->lastname?></td> <td><img src="<?php echo $ran->rankimage?>" alt="<?php echo $p->rank;?>" ></td> <td><?php echo $p->totalflights;?></td> <td align="center"><?php echo Util::AddTime($p->totalhours, $p->transferhours); ?></td> </tr> <?php } } } } ?> </table Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 Didn't work Got Parse error: syntax error, unexpected end of file in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxx.com/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 66 across he top of the page Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 21, 2015 Moderators Report Share Posted October 21, 2015 What's in line 66? Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 it's the last line </div> Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 21, 2015 Moderators Report Share Posted October 21, 2015 Can copy your whole codes? Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 I returned them to default where should I put that code in? Quote Link to comment Share on other sites More sharing options...
ercio Posted October 21, 2015 Author Report Share Posted October 21, 2015 this skinn has several erros !!! servetas helped me with the most. $. recommend Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 21, 2015 Moderators Report Share Posted October 21, 2015 The code I provided is for the whole page. replace all content with mine. Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 It printed this to many times to count pretty much a whole page Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() in /hermes/bosoraweb047/b82/ipg.xxxxxxxxxxxxx/Catch22/phpvms/lib/skins/lance/pilots_list.php on line 32 Warning: Invalid argument supplied for foreach() then it printed the hubs to many times to count pretty much about 5 or 6 pages and inserted pilots into hubs randomly as well as the hubs they are supposed t be in I replaced the code on the page with the code you put up line 32 is line 32 I took this line out of the php file and it did about the same thing just sort of opposite <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 21, 2015 Moderators Report Share Posted October 21, 2015 Did you replace the whole pilots_list.php with my code? Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 21, 2015 Report Share Posted October 21, 2015 yes I replaced it in both the php and tpl file I also tried it with just the php changed, and the default tpl Rick Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 22, 2015 Moderators Report Share Posted October 22, 2015 Attached, I'm sending you my pilots_list.php which is working as we have this conversation. Put this file inside your skin folder and if it doesn't work then I think you better reinstall phpvms. pilots_list.php Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 22, 2015 Report Share Posted October 22, 2015 your file you posted didn't work either, so I copied the default one from the core templates folder to the lance skin folder and.....BAM!.....works like a champ so there must have been something corrupt in the original file now I can get to work customizing I tried your code again with the same results.....do you have a custom module or style sheet, or css style that I don't have Thanks Rick Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 24, 2015 Moderators Report Share Posted October 24, 2015 your file you posted didn't work either, so I copied the default one from the core templates folder to the lance skin folder and.....BAM!.....works like a champ so there must have been something corrupt in the original file now I can get to work customizing I tried your code again with the same results.....do you have a custom module or style sheet, or css style that I don't have Thanks Rick I do have a custom CSS but that shouldn't be a problem since it can be modified. Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 25, 2015 Report Share Posted October 25, 2015 This is what I get when I use your code http://i228.photobucket.com/albums/ee182/captthud/WPR/web1_zpsn5zweebb.jpg This is with the default php file I added a little code o get the lines in This is basically what I'm tying to get but with a little larger text and the columns lined up http://i228.photobucket.com/albums/ee182/captthud/WPR/web2_zps2lqpmxmo.jpg Rick Quote Link to comment Share on other sites More sharing options...
Moderators Parkho Posted October 25, 2015 Moderators Report Share Posted October 25, 2015 Can u try it with google chrome or firefox? Quote Link to comment Share on other sites More sharing options...
Captthud Posted October 25, 2015 Report Share Posted October 25, 2015 this would be in chrome http://i228.photobucket.com/albums/ee182/captthud/WPR/web3_zpsqxkftvkc.jpg Quote Link to comment Share on other sites More sharing options...
mltpilot Posted January 31, 2016 Report Share Posted January 31, 2016 Same problems with me too! Registration not working. Quote Link to comment Share on other sites More sharing options...
Melli Posted December 7, 2016 Report Share Posted December 7, 2016 nice skin but my links are written in "white" on white background. i dont find in css to change. can someone help me please? Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted December 7, 2016 Report Share Posted December 7, 2016 (edited) Do a quick search in your css for all the #ffffff or #FFFFFF or #fff or #FFF I know that is not the exact answer you are looking for but will have to do until someone comes along who knows this skin that can tell you. When I can't find something I wild cared it and 99% of the time, I find it. Scratch that. I just checked and they (Lance) actually embedded css in the layout.php file. I put a fix for this issue on the other post I linked to one or two posts down from this one. Edited December 7, 2016 by TAV1702 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted December 7, 2016 Report Share Posted December 7, 2016 nice skin but my links are written in "white" on white background. i dont find in css to change. can someone help me please? My other post is accurate on what top search for, but if you can give me some screenshots I'll take a look. I just got requested to install this template for another person, so While I am at it, I might as well take a look and help others out. So get me some screenshots and I'll give you a hand, EXCEPT, we are going to discuss it in your other post in the skinning thread http://forum.phpvms.net/topic/22701-free-phpvms-template-lance/#entry127194 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.