Plugin Sale! Save 15% on pro plugins with discount code: FALL2020
Web Dev + WordPress + Security
GA Google Analytics Pro
GA Pro: Add Google Analytics to WordPress like a pro.
Related Posts

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..

Jeff Starr
About the Author
Jeff Starr = Designer. Developer. Producer. Writer. Editor. Etc.
Digging Into WordPress: Take your WordPress skills to the next level.
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 »
WP Themes In Depth: Build and sell awesome WordPress themes.
Thoughts
Air finally clearing here in WA. Feeling grateful to breathe again. #oxygenmatters
Past week here in WA state has been hellish. So much smoke, like living in a chimney.
Now in September, I’m where I wanted to be in March.
Spent some time updating my article on unsafe characters, once again current with latest IETF specification.
Just realized that “Neo” is an anagram for “One”. As in, “he is the One” (The Matrix).
To get VLC app to load all songs (including subfolders), go to Preferences ▸ Show All ▸ Playlist ▸ Subdirectory behavior ▸ Expand.
Switching from PhotoShop to Affinity Photo is one of the most liberating work-related things I've done in 20 years.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.