Photo Gallery, MP3 page, and Calander

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 3, 2008   (RSS)

Re: [immerse1] Photo Gallery, MP3 page, and Calander

By Dave - September 3, 2008

Hi Joel,

>how do i make the time 12 hour instead of 24 hour

On the website pages the date will be displayed with a tag like this:
<?php echo date("D, M jS, Y g:i:s a", strtotime($newsRecord['date'])) ?>

All those letters are formatting codes that tell it what to show. D means "Day of Week", etc. You can see a list of the formatting codes here: http://www.php.net/date

Figure out what format you want the date in first, then insert the formatting codes to show them that way.

>and then give the admin an option for AM or PM.

If you edit your date field under: Admin > Section Editors you'll see an option for: [_] use 24 hour time when specifying hours

If you uncheck that the date fields will show as 12 hour AM/PM fields.

> I need it to show up as a link on the page thats goes to the MP3

You can use the same tag you're using to pass the MP# to the player you have now, just put it in a link:

<a href="<?php echo $upload['urlPath'] ?>">Download MP3 : <?php echo $upload['filename'] ?></a><br/>

>How do I get the images to load as thumbnails that are links to the large images.

Put a link around the image (new code in red):

<a href="<?php echo $upload['urlPath'] ?>"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" border="0" /></a><br><br>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Photo Gallery, MP3 page, and Calander

thank you dave, this helped work out my problems.