Jump to content

A relatively straight forward request


dazwalsh

Recommended Posts

hi guys, fantastic system just in process of skinning now, but a nice touch would be for the flag of the country the pilot is from to appear next to the name on the front page for the new hires.

if its easy and simple enough could someone give it a try?

Thank you

Darren

Link to comment
Share on other sites

i got it working late last night, its amazing what you can get done in the early hours haha

heres the code if anyone was interested, just make sure you have the link to the images right.

this code goes after the pilot lastname in frontpage_recentpilots.tpl in the templates folder

<img src="../../lib/images/countries/<?php echo $pilot->location?>.png">

its my first forray into php systems and i must admit its mind boggling some of the stuff but im slowly learning how to understand how it all works

what i have to do now is rename the flags to match up with the location on registration, so instead of example ca.png it will have to be Canada.png.

www.hawaiianva.org is the site, a heavy skinning of the system but getting there!

Thanks Nabeel, once ive finished and everything running smoothly il donate something :)

Link to comment
Share on other sites

  • Administrators

Don't rename the images, it's going to pick it up automatically; the flags are stored in the shortname format, and it maps the full name to the long name (there's a official ISO list with the abbreviations). For instance, if you look on: http://www.hawaiianva.org/index.php/profile/view/1 the flag image shows up

The site looks great!

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