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
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
By Steve99 - November 15, 2012
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: [jacgo] PHP Section code on a slideshow
By gkornbluth - November 15, 2012 - edited: November 15, 2012
I'm not sure exactly how to set up the slide show for the one that you're looking at to pull the data from your editor, but there's a recipe in my CMSB Cookbook http://www.thecmsbcookbook.com for a very robust and flexible slide show called SLIDESHOW II - A JAVASCRIPT CLASS FOR MOOTOOLS that's pretty easy to implement.
There's a set of sample files included that you can download and then modify for your needs.
If that one doesn't work for you, there are a few others as well.
Hope that helps.
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] PHP Section code on a slideshow
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!
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
By Steve99 - November 15, 2012
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
Thank you! It's works!
Jacgo
Re: [jacgo] PHP Section code on a slideshow
By Steve99 - November 16, 2012
Steve