Jump to content

Member image in Pilots list


Jeff

Recommended Posts

If any are interested in adding an image for each member on your site on the pilots list page, here you go.

Add the table header that will hold the image headline:

<th>Image</th>

Next add the table data that will call for the image:

<td align= "center"><img src="<?php echo fileurl('/images/members/'.$pilot->pilotid.'.jpg'); ?>" width="50px" height="75px" alt="<?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?>" />

You will need to change this:

('/images/members/'

if your images are located in another directory.

You will also need to change this:

pilotid.'.jpg'

if you are using another type of image format (gif, png...etc)

You can change the image size

width="50px" height="75px"

to suit your needs.

NOTE! You have to name the image as a numerical in order for this to work. If your member is VA0001, VA0015, then your image is 1.jpg, 15.jpg...etc

You cannot use multiple image formats with this code. You must choose one format (jpg, gif, png)

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