PHP Section code on a slideshow

8 posts by 4 authors in: Forums > CMS Builder
Last Post: November 16, 2012   (RSS)

By jacgo - November 15, 2012

Hi, All

Here is my slideshow code:
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/slideshow.js"></script>
<LINK rel=stylesheet type=text/css href="../css/slideshow.css">
</head>

<body>
<div id="slider2">
<div id="children">
<img src="../images/2010081114532150.jpg" border="0"/>
<img src="../images/20120809172049596.jpg" border="0"/>
<img src="../images/2010081114532150.jpg" border="0"/>
<img src="../images/20120809172049596.jpg" border="0" style="display:block;"/>
</div>
</div>


Each of <img> tag is the slideshow image.

The slideshow look like :
http://174.132.79.189/~quanmax/en/slideshow/simple.html

I created a Single Record section image for the slideshow.

But don't know how to make the section php code as a slide image (each line each image).

Hope somebody help.

Thanks a lot!

Re: [jacgo] PHP Section code on a slideshow

Hi,
You can use this as a base to work from:
<div id="slider2">
<div id="children">
<?php foreach ($yourRecord['images'] as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" border="0"/>
<?php endforeach ?>
</div>
</div>


Hope this helps.

Re: [gkornbluth] PHP Section code on a slideshow

Hi Jac,

This post will give you a good idea of how I would set up a slideshow in CMS Builder:


http://www.interactivetools.com/forum/gforum.cgi?post=95580#95580


You could use the section layout and foreach loop suggested in the article, and adapt the html and javascript to work for your slideshow system.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com

Re: [steve99] PHP Section code on a slideshow

By jacgo - November 15, 2012


Hi,
You can use this as a base to work from:
<div id="slider2">
<div id="children">
<?php foreach ($yourRecord['images'] as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" border="0"/>
<?php endforeach ?>
</div>
</div>


Hope this helps.



HiSteve

Only first image show on this slide show.
You can find it here:
http://174.132.79.189/~quanmax/en/slideshow/simple.php

The 11111 is the orgenal code.
The 22222 is the code from
<?php foreach ($yourRecord['images'] as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>" border="0"/>
<?php endforeach ?>



Jac

Re: [jacgo] PHP Section code on a slideshow

Hi Jac,
Delete your original code block and all should work fine. It's not scrolling through properly with your JavaScript code since there are two DIV elements with the same ID on that page.

Hope this helps.

Re: [steve99] PHP Section code on a slideshow

By jacgo - November 15, 2012

Hi Steve

Thank you! It's works!

Jacgo

Re: [jacgo] PHP Section code on a slideshow

Great! Glad to help.

Steve