Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security
BBQ Pro: Block Bad Queries
BBQ Pro: The fastest firewall to protect your WordPress.

Slideshow Code for Dead Letter Art

[ Icon: DLa Joker ] Pardon this post! I am posting this information online for personal references purposes. I may need to revisit this code at some point in the future, and if I post it here I will always know where to find it (trust me, it would disappear into the abyss if I tried storing it offline). So, although it is intended solely for myself, feel free to extract and use anything you like, as long as commented attribution remains. What we have here are two different methods for including a slideshow on a web page. The first method employs the techniques discussed in this article, while the second method skips the Flash and employs only the JavaScript portion of the slideshow. Here is some additional help with embedding Flash content, including slideshows, and JavaScript techniques.

Main Slideshow

<?php // main slideshow // ?>
<div class="midright">
<!-- slideshow inclusion by perishablepress.com -->
<script type="text/javascript">
<!--//--><![CDATA[//><!-- 
if (flash.ver[7]) {
   document.write(
      '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="225" id="slideshow" align="middle">' +
      '<param name="movie" value="http://deadletterart.com/dla/images/slideshow/slideshow.swf" />' +
      '<param name="allowScriptAccess" value="sameDomain" />' +
      '<param name="quality" value="high" />' +
      '<param name="bgcolor" value="#000" />' +
      '<param name="base" value="." />' +
      '<embed src="http://deadletterart.com/dla/images/slideshow/slideshow.swf" base="." quality="high" bgcolor="#000" width="300" height="225" name="slideshow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
      '<\/object>'
   );
}
else if (flash.installed) {
   document.write('<form id="slideshow" name="slideshow" action="null"><a href="#" onmouseover="this.href=theimage[i][1];return false">');
   document.write('<img name="imgslide" class="y" id="imgslide" src="' + theimage[0][0] + '" border="0" alt="DLa Slideshow" />');
   document.write('<\/a><\/form>');
} else {
   document.write('<form id="slideshow" name="slideshow" action="null"><a href="#" onmouseover="this.href=theimage[i][1];return false">');
   document.write('<img name="imgslide" class="y" id="imgslide" src="' + theimage[0][0] + '" border="0" alt="DLa Slideshow" />');
   document.write('<\/a><\/form>');
}
//--><!]]>
</script>
<noscript><div><img src="http://deadletterart.com/dla/images/slideshow/1.jpg" class="y" alt="Serious Business" /></div></noscript>
</div>

Alternate Slideshow

<?php // alt slideshow // ?>
<div class="midright">
 <!-- slideshow inclusion by perishablepress.com -->
 <form id="slideshow" name="slideshow" action="null">
  <div>
   <a href="#" onmouseover="this.href=theimage[i][1];return false">
    <script type="text/javascript">
     <!--//--><![CDATA[//><!--
      document.write('<img name="imgslide" class="y" id="imgslide" src="'+theimage[0][0]+'" border="0" alt="DLa Slideshow" />');
     //--><!]]>
    </script>
   </a>
  </div>
  <noscript>
   <p><img src="http://deadletterart.com/dla/images/slideshow/1.jpg" class="y" alt="Serious Business" /></p>
  </noscript>
 </form>
</div>

More sweet code snippets on the way..

About the Author
Jeff Starr = Web Developer. Security Specialist. WordPress Buff.
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Thoughts
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Crazy that we’re almost halfway thru 2024.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.