Jump to content

Recommended Posts

Posted (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 by OmerAslan
  • Moderators
Posted

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?

Posted

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.

Posted

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.

Posted

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" />

Posted

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" />

Posted

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" />

Posted

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

  • Moderators
Posted

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

Posted

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.

Posted

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?

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