‘Click to activate and use this control’ WorkAround

This issue is related to an EOLAS patent. So, in  Microsoft browser versions 6 and 7 and Opera Version 9 need to be activated to be used. For more information, please see link:

http://en.wikipedia.org/wiki/Eolas

But there is an workaround to this .

We can load the plugin from an external javascript instead of embedding it on the page.

Adobe Dreamweaver CS3 does that work for you, if you don’t want to code that: When you insert, for example, flash it creates the code in the main page and a script file that contains the function witch loads the flash movie into the page.

Code in the Main Page

<script type=”text/javascript”>
AC_FL_RunContent( ‘codebase’,’http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0&#8242;,’width’,’187′,’height’,’548′,’src’,’file:///W|/www/NewTrocaFraldas/templates/trocafraldas/flash/right’,’quality’,’high’,’pluginspage’,’http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&#8217;,’movie’,’file://’ );

//end AC code
</script>

<noscript>

<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0” width=”187″ height=”548″>
      <param name=”movie” value=”file:///” />
      <param name=”quality” value=”high” />
      <embed src=”file://” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”187″ height=”548″></embed>
</object>

</noscript>

 Code in external javascript

function AC_FL_RunContent(){
  var ret =
    AC_GetArgs
    (  arguments, “.swf”, “movie”, “clsid:d27cdb6e-ae6d-11cf-96b8-444553540000”
     , “application/x-shockwave-flash”
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_Generateobj(objAttrs, params, embedAttrs)
{
  var str = ”;
  if (isIE && isWin && !isOpera)
  {
    str += ‘<object ‘;
    for (var i in objAttrs)
    {
      str += i + ‘=”‘ + objAttrs[i] + ‘” ‘;
    }
    str += ‘>’;
    for (var i in params)
    {
      str += ‘<param name=”‘ + i + ‘” value=”‘ + params[i] + ‘” /> ‘;
    }
    str += ‘</object>’;
  }
  else
  {
    str += ‘<embed ‘;
    for (var i in embedAttrs)
    {
      str += i + ‘=”‘ + embedAttrs[i] + ‘” ‘;
    }
    str += ‘> </embed>’;
  }

  document.write(str);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType)

{
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();   

    switch (currArg){ 
      case “classid”:
        break;
      case “pluginspage”:
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case “src”:
      case “movie”: 
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs[“src”] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case “onafterupdate”:
      case “onbeforeupdate”:
      case “onblur”:
      case “oncellchange”:
      case “onclick”:
      case “ondblClick”:
      case “ondrag”:
      case “ondragend”:
      case “ondragenter”:
      case “ondragleave”:
      case “ondragover”:
      case “ondrop”:
      case “onfinish”:
      case “onfocus”:
      case “onhelp”:
      case “onmousedown”:
      case “onmouseup”:
      case “onmouseover”:
      case “onmousemove”:
      case “onmouseout”:
      case “onkeypress”:
      case “onkeydown”:
      case “onkeyup”:
      case “onload”:
      case “onlosecapture”:
      case “onpropertychange”:
      case “onreadystatechange”:
      case “onrowsdelete”:
      case “onrowenter”:
      case “onrowexit”:
      case “onrowsinserted”:
      case “onstart”:
      case “onscroll”:
      case “onbeforeeditfocus”:
      case “onactivate”:
      case “onbeforedeactivate”:
      case “ondeactivate”:
      case “type”:
      case “codebase”:
      case “id”:
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case “width”:
      case “height”:
      case “align”:
      case “vspace”:
      case “hspace”:
      case “class”:
      case “title”:
      case “accesskey”:
      case “name”:
      case “tabindex”:
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs[“classid”] = classid;
  if (mimeType) ret.embedAttrs[“type”] = mimeType;
  return ret;
}

 

 

 

 

 

 

Comments (2)

How to add Flash to Joomla template

As far as I know,there are 2 options for adding flash into Joomla template:

1. Adding flash as a module

2. Hardcoding the flash into index.php

There are some issues to take care off when choosing one of these options:

If option 1 is choosen, we must be carefull with the editor that we are using in Joomla. Most of the editors, cleans some tags when adding the flash code, for example, <EMBED> tag. This is bad, because if we want flash to work in firefox, the embed tag must be present. I used Joomla FCK Editor and even this editor has an option to exclude some tags to clean, it always clean when we save the module. A BUG to resolve!!!

Using the flash as a module does not allow us too  to create code to prevent the annoying thing “click to activate and use this control” (Please see post ” ‘Click to activate and use this control ‘ WorkAround”).

So, it leads me to the 2 nd option, hardcoding the flash in index.php.

Please see post ‘Click to activate and use this control ‘ WorkAround to see an example.

 

 

 

 

 

 

 

 

Comments (2)

Best Free Template Sites

Since my first developement in Joomla, I have been searching for good Free Template Sites.

Having a free template, gives you time to spend in other important things in your development.

Unless you want to have a unique template, totally customized, you can search in several sites for those templates.

It doesn’t mean that you cannot change the template you are using it. If you can easily , edit images , change them, and know how to change css style, you can have a customized template.

But my experience tells me if you want that, it is better to learn to create your own template.

So, here is my contribution list and my comments about each one:

http://www.joomlaos.de/

In my opinion, this is the best site I have ever seen, with hundreads of free templates.

It allows  preview  and demo live site view.

http://www.osskins.com

This site has a lot of free and payed templates, not only for Joomla, but also for Drupal, Typo3 and WordPress.

It allows  preview  and demo live site view too.

Later I will provide more links.

Comments (3)

Welcome!

Hi all!

This Blog comes in the sequence of 2/3 years developing  in Joomla.

It will help me, not only to structure and collect  my research information, but also to help other possible Joomla Developers in finding usefull solutions to their problems.

I hope it helps and at the same time, I expect to receive usefull comments and suggestions.

Thanks and good Work!!

Leave a Comment

Follow

Get every new post delivered to your Inbox.