Welcome to WebmasterWorld Guest from 54.166.112.74

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

slideshow with php and mysql

   
10:04 pm on Jun 12, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,
I dont have any content manager, I do everything myself,
however I would like to add a slideshow to the dynamic created pages, and just dont know how.
Some pages may have 5 photos and some may have 10 photos.
I could do it manually, just insert the full code in mysql, but I guess there is a better way, to insert the pattern to the image or inclusive the image itself into the database and then just get all the images that belong to that id.

The slideshow where I code the images is like this, with one small and one big image.
Any ideas?
<div id="dg-image-gallery" class="dg-image-gallery">
<div class="dg-image-gallery-image">
<img class="dg-image-gallery-thumb" alt="Foto lägenhet som uthyres nära Puerto Banus och stranden - Marbella" src="../fotos_viviendas/Comunes/sdamadenochepool.jpg">
<span class="dg-image-gallery-caption">The pool</span>
<span class="dg-image-gallery-large-image-path">../fotos_viviendas/Comunes/damadenochepool.jpg</span>
</div>
Thanks,
11:28 pm on Jun 18, 2012 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



or inclusive the image itself into the database and then just get all the images that belong to that id.


This is my favored approach to the dilemma. It's easy to allow your user to connect all kinds of images then to a certain identifier. As far as slideshow code goes, you can pre-load the page with the images (or thumbnails) or you could use an asynchronous call (AJAX) to retrieve them on the fly.