HTML5 Slideshow Support Product Page
Dynamic SS in PHP not showing image
Reported 30 Aug 2012 11:26:51
1
has this problem
30 Aug 2012 11:26:51 Chris Nield posted:
I cant get the image to show in dynamic SS. The images are in the server folder & the title & description are showing but no image. I can get a static version to work but I need dynamic. Using php & DW 8.<?php require_once('Connections/pawfect_mainsite.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_pawfect_mainsite, $pawfect_mainsite); $query_rsSS = "SELECT * FROM slideshow_sli ORDER BY slideshow_sli.sorter"; $rsSS = mysql_query($query_rsSS, $pawfect_mainsite) or die(mysql_error()); $row_rsSS = mysql_fetch_assoc($rsSS); $totalRows_rsSS = mysql_num_rows($rsSS); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link rel="stylesheet" type="text/css" href="Styles/dmxHTML5Slideshow.css" /> <script type="text/javascript" src="ScriptLibrary/jquery-latest.pack.js"></script> <script type="text/javascript" src="ScriptLibrary/jquery.easing.1.3.js"></script> <script type="text/javascript" src="ScriptLibrary/dmxHTML5Slideshow.js"></script> </head> <body> <div class="dmxSlideshow" id="slideshow1" style="width:640px;height:480px;"> <?php do { ?> <div class="dmxSlide" id="<?php echo $_GET['id_sli']; ?>"> [img]<?php echo $row_rsSS['image_sli']; ?>" border="0" alt="" /> </div> <?php } while ($row_rsSS = mysql_fetch_assoc($rsSS)); ?> <div class="dmxAbout">Generated by <a href="http://www.dmxzone.com/go?17708">HTML5 Slideshow Dreamweaver Extension</a> 1.2.0</div> </div> <script type="text/javascript"> // <![CDATA[ jQuery(document).ready( function() { jQuery("#slideshow1").dmxHTML5Slideshow( {"width": 640, "height": 480, "controls": {"enabled": false}, "description": {"position": "bottom"}, "kenburns": {"enabled": false}} ); } ); // ]]> </script> </body> </html> <?php mysql_free_result($rsSS); ?>
Replies
Replied 30 Aug 2012 11:31:25
30 Aug 2012 11:31:25 Teodor Kuduschiev replied:
Please provide a link to your page.
Replied 30 Aug 2012 21:43:23
30 Aug 2012 21:43:23 Chris Nield replied:
Replied 31 Aug 2012 06:10:35
31 Aug 2012 06:10:35 Teodor Kuduschiev replied:
The paths you gave to your images:
www.pawfection.co.nz/1.jpg
www.pawfection.co.nz/2.jpg
www.pawfection.co.nz/3.jpg
Appear to be wrong.
www.pawfection.co.nz/1.jpg
www.pawfection.co.nz/2.jpg
www.pawfection.co.nz/3.jpg
Appear to be wrong.
Replied 31 Aug 2012 07:58:58
31 Aug 2012 07:58:58 Chris Nield replied:
Hi Teodor, I tried changing the code to the below but it still doesn't work. Am I doing it wrong? If you look at the page now you can see one of the images of a dog 1.jpg. Is there a video or tutorial that shows how to do the dynamic slideshow?
This is the path to image 1
www.pawfection.co.nz/Demos/Images/Slideshow/1.jpg
This is the code I tried to put in
TEST PAGE www.pawfection.co.nz/test_slideshow.php
Regards Chris
This is the path to image 1
www.pawfection.co.nz/Demos/Images/Slideshow/1.jpg
This is the code I tried to put in
<img src="<?php echo "Demos/Images/Slideshow/"." $row_rsSS['image_sli']"; ?>
TEST PAGE www.pawfection.co.nz/test_slideshow.php
Regards Chris
Replied 31 Aug 2012 08:23:44
31 Aug 2012 08:23:44 Teodor Kuduschiev replied:
<img src="<?php echo "Demos/Images/Slideshow/"." $row_rsSS['image_sli']"; ?>
Is wrong.
your path needs to be:
<img src="Demos/Images/Slideshow/<?php echo $row_rsSS['image_sli']; ?>" />
Replied 31 Aug 2012 22:35:54
31 Aug 2012 22:35:54 Chris Nield replied:
Thanks Teodor, that solved it. For anyone looking at my code above, my final settings are slightly different with the alt tag using the title from the recordset, but here it is
So I put the folder path befor the php tags.
--------------------------------------------
A question Teodor, can I write this path in PHP? As then I could store the path in the DB & concantinate it to the image cloumn, then when I select dynamic image in the wizard I would have the whole path & image. I thought the path step would be part of the wizard.
But thanks again Teodor, great help. Chris
[img]Demos/Images/Slideshow/<?php echo $row_rsSS['image_sli']; ?>" border="0" alt="<?php echo $row_rsSS['title_sli']; ?>" />
So I put the folder path befor the php tags.
--------------------------------------------
A question Teodor, can I write this path in PHP? As then I could store the path in the DB & concantinate it to the image cloumn, then when I select dynamic image in the wizard I would have the whole path & image. I thought the path step would be part of the wizard.
But thanks again Teodor, great help. Chris
Replied 01 Sep 2012 06:21:31
01 Sep 2012 06:21:31 Teodor Kuduschiev replied:
Hello Chris,
If you have stored the whole image path to your DB, then you would not needed to write Demos/Images... by hand.
If you have stored the whole image path to your DB, then you would not needed to write Demos/Images... by hand.