Jump to content

[SOLVED] Awards


OmerAslan

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Moderators

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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