NicePHP77 Posted December 5, 2013 Share Posted December 5, 2013 Have a feature on our cart that allows a scrolling banner, but since upgrade to php5, the images aren't showing. Here is scrollinghead file which is followed by main php file, any suggestions would greatly help! <script type="text/javascript" src="includes/carousel/jquery.js"></script> <script type="text/javascript" src="includes/carousel/jquery.carouFredSel.js"></script><script type="text/javascript" language="javascript"> $(document).ready(function(){$("#image_carousel2").carouFredSel({ circular: true, infinite: true, auto : true, height : <?echo ($brands_image_size);?>, items: { width : <?echo ($brands_image_size+4);?>, height : <?echo ($brands_image_size);?>, }, scroll: { items: <?echo ceil( (1/($brands_image_size+4))*1000);?>, fx: "<?echo $brands_box_effect;?>", duration: 750, pauseOnHover: 3000 },}); });</script><STYLE>.image_carousel2 { padding: 15px 0 15px 40px; position: relative;}.image_carousel2 img { border: 1px solid #ccc; background-color: white; padding: 9px; margin: 7px; display: block; float: left;}.clearfix { float: none; clear: both;}</STYLE> ------------------------- BELOW IS OTHER MAIN FILE <? $brands_image_size= 80; $brands_box_bkcolor = "#EEEEEE"; $brands_box_effect = "scroll"; require(DIR_WS_INCLUDES . 'scrollingbrandshead.php'); $num_brands_query = "select `manufacturers_id` from `manufacturers`;"; $num_brands_result = mysql_query($num_brands_query); $num_brands = mysql_num_rows($num_brands_result); $display_brands_query = "select manufacturers_id,manufacturers_name,manufacturers_image from manufacturers where manufacturers_image != '' ORDER BY RAND() Limit 18;"; $display_brands_result = mysql_query($display_brands_query); $num_brands_with_images = mysql_num_rows($display_brands_result);?><?php if($num_brands_with_images >3){?><div class="ui-widget-content ui-corner-all infoBoxContents"><table cellspacing=4 cellpadding=4 height=<?echo ($brands_image_size+4);?> width=100% align=center style="background-color:<?echo $brands_box_bkcolor;?>"> <tr> <td> <a href=allmanufacturers.php?<?echo tep_session_name().'='. tep_session_id();?>><span style="color:<? echo MENU_ITEM_COLOR;?>; font-size:17px; font-weight:bold;">Shop by<br />Brand</span></a> </td> <td align=center> <div class="image_carousel"> <div id="image_carousel2" style="background-color:#<?echo $brands_box_bkcolor;?>"> <? while($display_brands_row = mysql_fetch_array($display_brands_result)){ if(file_exists(DIR_WS_IMAGES . $display_brands_row['manufacturers_image']) && $display_brands_row['manufacturers_image'] != ""){ echo "<span style='background-color:#FFFFFF; border:1px solid #BBBBBB; ;height:".($brands_image_size-2)."px; width:".($brands_image_size+2)."px; float: left; display:inline-block; vertical-align:middle;'>"; //div content echo "<a HREF=index.php?manufacturers_id=" . $display_brands_row['manufacturers_id'] . "><table valign=center align=center width=100% height=100%><tr><Td align=center>"; echo tep_image(DIR_WS_IMAGES . $display_brands_row['manufacturers_image'], $display_brands_row['manufacturers_name'], ($brands_image_size-4),($brands_image_size- ,'style=" float:left; display:inline-block vertical-align:middle"' ); echo "</td></tr></table></a>"; echo "</span>"; } } ?> </div> <div class="clearfix"></div> </div> </td> </tr></table></div><? }?> Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/ Share on other sites More sharing options...
QuickOldCar Posted December 5, 2013 Share Posted December 5, 2013 Use the full <?php code tags and not the short <? There are unquoted href attributes. echo "<a href='index.php'>HOME</a>"; As of php version 5.5.0 you should be using mysqli and not mysql http://www.php.net/manual/en/function.mysqli-connect.php Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461379 Share on other sites More sharing options...
NicePHP77 Posted December 9, 2013 Author Share Posted December 9, 2013 I still couldn't get it to work, any suggestions? Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461825 Share on other sites More sharing options...
MDCode Posted December 9, 2013 Share Posted December 9, 2013 So you're defining the variables after already using them? Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461827 Share on other sites More sharing options...
NicePHP77 Posted December 9, 2013 Author Share Posted December 9, 2013 i tried to change the code above with the suggesitons, but the images missing still show. you can see the site at discounters paradise dot com. i am complete noob to php advanced so I am not sure about defining... Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461835 Share on other sites More sharing options...
Ch0cu3r Posted December 9, 2013 Share Posted December 9, 2013 On your site what image carousel are you referring to? The only carousel I see is Shop By Brand and all images appear to be loading. Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461842 Share on other sites More sharing options...
NicePHP77 Posted December 9, 2013 Author Share Posted December 9, 2013 yes, the shop by brand. i think it reloads each time you refresh, you just caught a page where the images were all showing. but it doesn't always work, some show and some don't even tho there are images for the manufactures of one's that don't show. Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461854 Share on other sites More sharing options...
Ch0cu3r Posted December 9, 2013 Share Posted December 9, 2013 It is trying to load the images from /includes/modules/kiss_image_thumbnailer/thumbs/76x72_brand_name.png For some reason the 76x72 thumbnails for a few of brand names cannot be found. Are you sure all 76x72 thumbnails for all brands exist? Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461857 Share on other sites More sharing options...
joallen Posted December 9, 2013 Share Posted December 9, 2013 Your query: $display_brands_query = "select manufacturers_id,manufacturers_name,manufacturers_image from manufacturers where manufacturers_image != '' ORDER BY RAND() Limit 18;"; Change To: $display_brands_query = "select manufacturers_id,manufacturers_name,manufacturers_image from manufacturers where manufacturers_image IS NOT NULL ORDER BY RAND() Limit 18;"; Just noticed your select statement was correct....could potentially be the smiley face in your script?????....lol. Can you edit your post and ensure your script is placed between the script tag in the forum?? It would help us help you... Thank you! =0) Cheers! Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461860 Share on other sites More sharing options...
NicePHP77 Posted December 10, 2013 Author Share Posted December 10, 2013 Awesome!!! I changed code as you mentioned above AND deleted all thumbs in the kissmt directory so it would regen them and it works great now! Thanks!!!! Link to comment https://forums.phpfreaks.com/topic/284546-scrolling-banner/#findComment-1461969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.