Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Can I dynamically check for flash and substitute non-flashed skin if flash not present in browser?Can I dynamically check for flash and substitute non-flashed skin if flash not present in browser?
Previous
 
Next
New Post
2/9/2007 1:54 PM
 
I have both a flash and a non-flash version of the same skin (actually the only part of the skin that is flashed is the banner).

If I as a rule default to the flash version, is there a way to check if the incoming browser has the flash plugin and - if not present - dynamically substitute the non-flash skin/banner?

 
New Post
2/9/2007 2:57 PM
 

I dont think you can change the skin on the fly, But I am sure you can send the user to a hidden page with the copy of your flash banner page that uses an image rather than the flash.

Salar

 
New Post
2/9/2007 6:44 PM
 

Here's a little script that does the work for you... if there's no Flash, it displays an image only.  It's pulled straight from a page I built, without editing - so you may need to look hard to see what needs changing to make it work for you.  Also need to add the skinpath statements.


      <SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
     for (var i = 0; i < words.length; ++i)
     {
  if (isNaN(parseInt(words[i])))
  continue;
  var MM_PluginVersion = words[i];
     }
 var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
   && (navigator.appVersion.indexOf("Win") != -1)) {
 document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
 document.write('on error resume next \n');
 document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
 document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
  document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
 document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
 document.write(' ID="script" WIDTH="730" HEIGHT="261" ALIGN="">');
 document.write(' <PARAM NAME=movie VALUE="ara-index-ani.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>  ');
 document.write(' <EMBED src="ara-index-ani.swf" quality=high bgcolor=#FFFFFF  ');
 document.write(' swLiveConnect=FALSE WIDTH="730" HEIGHT="261" NAME="ara-index-ani" ALIGN=""');
 document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
 document.write(' </EMBED>');
 document.write(' </OBJECT>');
} else{
 document.write('<IMG SRC="script.gif" WIDTH="730" HEIGHT="261" usemap="#script" BORDER=0>');
}
//-->
</SCRIPT>
        <!--this replaces flash animation with static image if flash plug-in is not found-->
        <NOSCRIPT>
        <img src="script.gif" width="730" height="261" usemap="#script" border=0>
        </NOSCRIPT>

Hope this helps.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Can I dynamically check for flash and substitute non-flashed skin if flash not present in browser?Can I dynamically check for flash and substitute non-flashed skin if flash not present in browser?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out