OmerAslan Posted March 17, 2016 Report Share Posted March 17, 2016 (edited) Hello, I am adding awards and i see the pictures on the award page but in the pilot center and profile page i can not see those images. Only says the name of the award. How can i fix this problem? Also is it easy to give awards automatically? Thanks Edited May 20, 2016 by OmerAslan Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted March 17, 2016 Moderators Report Share Posted March 17, 2016 Have you edited the pilot center/profile page? You should be able to see them as soon as you are using the default templates as I remember. What is your website url? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 17, 2016 Author Report Share Posted March 17, 2016 No i didn't edit pilot center/profile page. www.aalvirtual.com I see the awards but no pictures. Also http://aal.fltsimworld.org/index.php/profile/view/2 Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 18, 2016 Author Report Share Posted March 18, 2016 I did almost everything with your help. Hopefully this is the last topic... But i can't promise Please let's fix this also... Quote Link to comment Share on other sites More sharing options...
TennShadow Posted March 18, 2016 Report Share Posted March 18, 2016 Do you have something like the below in your code? <img src="'.$award->image.'" alt="'.$award->name.'" border="0" /> That calls the awards image on the pilots public profile. Without that you will only get the text. Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 18, 2016 Author Report Share Posted March 18, 2016 Hello Keith, Where i should look for this? Which folder? I am sorry, i a new... Quote Link to comment Share on other sites More sharing options...
TennShadow Posted March 18, 2016 Report Share Posted March 18, 2016 Hello Keith, Where i should look for this? Which folder? I am sorry, i a new... No worries. :-) Under lib/skins/YOURSKIN folder you should see a file called pilot_public_profile.tpl or .php depending on which version of PHPVMS you are running. That is the template file for the link you posted above. Just search for where your awards start on that template. My guess is you don't have code that shows the image. Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 18, 2016 Author Report Share Posted March 18, 2016 No worries. :-) Under lib/skins/YOURSKIN folder you should see a file called pilot_public_profile.tpl or .php depending on which version of PHPVMS you are running. That is the template file for the link you posted above. Just search for where your awards start on that template. My guess is you don't have code that shows the image. I found pilot_public_profile.php under core/templates. I add this code. But still i can't see the images. Not only public pilot profile also in pilot center i can't see the images. But i see them in Admin center awards place <img src="'.$award->image.'" alt="'.$award->name.'" border="0" /> Quote Link to comment Share on other sites More sharing options...
TennShadow Posted March 19, 2016 Report Share Posted March 19, 2016 Do you mind posting the code for that public profile or at least the section that deals with the awards? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 19, 2016 Author Report Share Posted March 19, 2016 of course i don't mind my frined, pilot_public_profile.php in core/templates <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php if(!$pilot) { echo '<h3>This pilot does not exist!</h3>'; return; } ?> <h3>Profile For <?php echo $pilot->firstname . ' ' . $pilot->lastname?></h3> <table> <tr> <td align="center" valign="top"> <?php if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$pilotcode.'.png')) { echo 'No avatar'; } else { echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.png'.'" alt="No Avatar" /> '; } ?> <br /><br /> <img src="<?php echo $pilot->rankimage?>" alt="" /> </td> <td valign="top"> <ul> <li><strong>Pilot ID: </strong><?php echo $pilotcode ?></li> <li><strong>Rank: </strong><?php echo $pilot->rank;?></li> <li><strong>Total Flights: </strong><?php echo $pilot->totalflights?></li> <li><strong>Total Hours: </strong><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></li> <li><strong>Location: </strong> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo Countries::getCountryName($pilot->location);?> </li> <?php // Show the public fields if($allfields) { foreach($allfields as $field) { echo "<li><strong>$field->title: </strong>$field->value</li>"; } } ?> </ul> <p> <strong>Awards</strong> <?php if(is_array($allawards)) { ?> <ul> <?php foreach($allawards as $award) { /* To show the image: <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> */ ?> <li><?php echo $award->name ?></li> <?php } ?> </ul> <?php } ?> </p> </td> </tr> </table> <!-- Google Chart Implementation - OFC Replacement - simpilot --> <img src="<?php echo $chart_url ?>" alt="Pirep Chart" /> Quote Link to comment Share on other sites More sharing options...
web541 Posted March 19, 2016 Report Share Posted March 19, 2016 Try this? <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php if(!$pilot) { echo '<h3>This pilot does not exist!</h3>'; return; } ?> <h3>Profile For <?php echo $pilot->firstname . ' ' . $pilot->lastname?></h3> <table> <tr> <td align="center" valign="top"> <?php if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$pilotcode.'.png')) { echo 'No avatar'; } else { echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.png'.'" alt="No Avatar" /> '; } ?> <br /><br /> <img src="<?php echo $pilot->rankimage?>" alt="" /> </td> <td valign="top"> <ul> <li><strong>Pilot ID: </strong><?php echo $pilotcode ?></li> <li><strong>Rank: </strong><?php echo $pilot->rank;?></li> <li><strong>Total Flights: </strong><?php echo $pilot->totalflights?></li> <li><strong>Total Hours: </strong><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></li> <li><strong>Location: </strong> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo Countries::getCountryName($pilot->location);?> </li> <?php // Show the public fields if($allfields) { foreach($allfields as $field) { echo "<li><strong>$field->title: </strong>$field->value</li>"; } } ?> </ul> <p> <strong>Awards</strong> <?php if(is_array($allawards)) { ?> <ul> <?php foreach($allawards as $award) { <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> ?> <li><?php echo $award->name ?></li> <?php } ?> </ul> <?php } ?> </p> </td> </tr> </table> <!-- Google Chart Implementation - OFC Replacement - simpilot --> <img src="<?php echo $chart_url ?>" alt="Pirep Chart" /> Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 19, 2016 Author Report Share Posted March 19, 2016 This is what i get Parse error: syntax error, unexpected '<' in /home/pilotomeraslan/public_html/aal/core/templates/pilot_public_profile.php on line 51 and pilot center still no images... Sorry Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 20, 2016 Author Report Share Posted March 20, 2016 Now i see, i add image link on one of the download and on the pilot center download page, i can't see this image also. Maybe this would give you better idea about the problem. Quote Link to comment Share on other sites More sharing options...
Moderators servetas Posted March 22, 2016 Moderators Report Share Posted March 22, 2016 <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?> <?php if(!$pilot) { echo '<h3>This pilot does not exist!</h3>'; return; } ?> <h3>Profile For <?php echo $pilot->firstname . ' ' . $pilot->lastname?></h3> <table> <tr> <td align="center" valign="top"> <?php if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$pilotcode.'.png')) { echo 'No avatar'; } else { echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.png'.'" alt="No Avatar" /> '; } ?> <br /><br /> <img src="<?php echo $pilot->rankimage?>" alt="" /> </td> <td valign="top"> <ul> <li><strong>Pilot ID: </strong><?php echo $pilotcode ?></li> <li><strong>Rank: </strong><?php echo $pilot->rank;?></li> <li><strong>Total Flights: </strong><?php echo $pilot->totalflights?></li> <li><strong>Total Hours: </strong><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></li> <li><strong>Location: </strong> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo Countries::getCountryName($pilot->location);?> </li> <?php // Show the public fields if($allfields) { foreach($allfields as $field) { echo "<li><strong>$field->title: </strong>$field->value</li>"; } } ?> </ul> <p> <strong>Awards</strong> <?php if(is_array($allawards)) { ?> <ul> <?php foreach($allawards as $award) {?> <li> <img src="<?php echo $award->image; ?>" alt="<?php echo $award->name; ?>" /><?php echo $award->name; ?></li> <?php } ?> </ul> <?php } ?> </p> </td> </tr> </table> <!-- Google Chart Implementation - OFC Replacement - simpilot --> <img src="<?php echo $chart_url ?>" alt="Pirep Chart" /> What about that? Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 22, 2016 Author Report Share Posted March 22, 2016 ok my friend, i see the images on the public profile now. This is enough for me. Thanks a lot. I see awards on pilot center but no images there and also no images on download center. This is minor problem for me. Don't bother yourself. If you have quick solution let me know. Thanks again to you all. Quote Link to comment Share on other sites More sharing options...
OmerAslan Posted March 22, 2016 Author Report Share Posted March 22, 2016 Now i get this Warning: imagecreatefromstring(): Empty string or invalid image in /home/pilotomeraslan/public_html/a/core/common/PilotData.class.php on line 1016 and on the signature i can't see the rank. Can you help me about this? 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.