Jump to content

script to create badge


Otacilio Jales

Recommended Posts

  • 3 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 2 months later...

Thought I would share this... I made this yesterday, then saw the desire for it on here. Wings On Air and USA Flight Club are using this and we got the idea from one of our members who just made the avatar. It is a work in progress as I haven't taken the style jiberish out, yet and put it into css. As you can see this is just creating a background for a table and having the avatar a person uploads to the site and everything else, which makes every users badge custom to them. Problem is, you can't download from your site with it set up this way, and that's a bumber, so I'm trying to figure out how to modify the badge in phpvms to adjust the layout of the badge.

Any help there would be appreciated.

Here is the code:

***********************************************************************************************************************************

<div align="left">

<table>

<tr>

<td style="width: 235px; height: 300px; background: url('<?php echo SITE_URL.'/lib/avatars/avatar_back_wingsonair.png'; ?>')"><br /><br /><br /><center>

<p>

<center><b><font face="Arial" size="+1" color="#FF0000"><?php echo $pilotcode . ' - ' . $userinfo->firstname; ?></font></b></center>

<center><b><font face="Arial" color="#000000"><?php echo $userinfo->rank;?></font></b></center>

<table align="left" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td><?php

if(!file_exists(SITE_ROOT.AVATAR_PATH.'/'.$pilotcode.'.png')) {

echo 'No Avatar you can upload an Avatar by going to the pilot center, then go to edit profile';

} else {

echo '<img src="'.SITE_URL.AVATAR_PATH.'/'.$pilotcode.'.png'.'" alt="No Avatar" width="115" height="115" /> ';

}

?>

</td>

</tr>

</table></td>

<td><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="<?php echo PilotData::getPilotAirlineLogo(Auth::$userinfo->pilotid); ?>" align="top" width="70px" height="70px" /></td>

</tr>

<tr>

<td><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" align="left" style="max-width: 70px" /></td>

</tr>

</table></td>

</tr>

</table>

</center>

<center><b><font face="Arial" color="#000000">Member Since:</font></b> <b><font color="#152F8C"><?php echo (date('m/d/Y', strtotime($userinfo->joindate))); ?></font></b></center>

</td>

</tr>

</table>

</div>

********************************************************************************************************************************************************

  • Thanks 1
Link to comment
Share on other sites

Been Hard at work coding for the new badge system. Going off the avatar idea above in this topic, we've been able to get this far. My avatar here was created using the badge system in phpvms, but it is not the finished project. That's right, this is the badge that is currently implemented in phpvms, so you will be able to allow users to choose there background or keep it at just one, use the code to have different backgrounds depending on the rank of the user, or even have the logo shown on the badge to represent a division or airline if you have multiple in your VA. (there will also be the option to show more data) When the code is finished, it will be released here. Thanks!

WOA101.png

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

Been Hard at work coding for the new badge system. Going off the avatar idea above in this topic, we've been able to get this far. My avatar here was created using the badge system in phpvms, but it is not the finished project. That's right, this is the badge that is currently implemented in phpvms, so you will be able to allow users to choose there background or keep it at just one, use the code to have different backgrounds depending on the rank of the user, or even have the logo shown on the badge to represent a division or airline if you have multiple in your VA. (there will also be the option to show more data) When the code is finished, it will be released here. Thanks!

WOA101.png

Nice work, like much of this code! those days I did not have time to shake, I'm coming over now thanks!

Link to comment
Share on other sites

  • 2 weeks later...

I actually made badges for my pilots when there were only a couple of us and sent them to them as pdf files to put their own photo on. Now we have 9 pilots I like the avatar idea and will be putting the badge as the avatar for each pilot. Thanks guys for the idea. I created the badge in MS Publisher but since the avatar is a jpg, I will be using Corel Photoshop to make ours and "paste" the photos on them and output jpgs for the avatars.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

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