How to Display animated logo in the Portal Masthead / Logon

How to Display animated logo in the Portal
Masthead

Summary


The purpose of this article is displaying the animated logo
in the portal masthead. The idea behind this article is to check whether FLASH
is installed on the end user machine to display the animated logo. If FLASH is
not installed then display the ordinary image.



Introduction


Generally for displaying any different logo in the portal
masthead we would upload through the Portal Themes. Even flash image also we
can upload through the same way. What will happen if the end user doesn’t have
FLASH installed on his/her machine?


The below sample code would identify whether FLASH is
installed or not on the client user machine at runtime. Based on this we can
display animated image if FLASH is installed else display the normal image.


The below code should be placed in the Headeriview.jsp
which is inside the masthead.par.


**********************************************************************************




<!-- // FLASH Installation Check code Starts Here ></pre><pre> </pre><pre><script language="JavaScript" type="text/javascript"></pre><pre> </pre><pre><!

// -

// Globals


// Major version of Flash required


var requiredMajorVersion = 5;


// Minor version of Flash required


var requiredMinorVersion = 0;


// Minor version of Flash required


var requiredRevision = 0;


// the version of javascript supported


var jsVersion = 1.0;


// -

// ></pre><pre></script></pre><pre><script language="VBScript" type="text/vbscript"></pre><pre><! // Visual basic helper required to detect Flash Player ActiveX control version information

Function VBGetSwfVer(i)


on error resume next


Dim swControl, swVersion


swVersion = 0



set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))


if (IsObject(swControl)) then


swVersion = swControl.GetVariable("$version")


end if


VBGetSwfVer = swVersion


End Function


// ></pre><pre></script></pre><pre> </pre><pre> </pre><pre><script language="JavaScript1.1" type="text/javascript"></pre><pre> </pre><pre><! // Detect Client Browser type></pre><pre></script></pre><pre><! ***** Animated Logo Implementation Ends Here ***** -->





**********************************************************************************







Conclusion


You have learned in this article how to display animated
image in the masthead only if FLASH is installed on the client machine. This
code snippet may be useful in other places where you want to display animated
logo.






Display Animated Logo in the Portal Login Branding Image dynamically






This article is for displaying the animated logo
in the portal Login Page. The idea behind this article is to check whether FLASH is installed on the end user machine to display the animated logo. If FLASH is
not installed then display the ordinary image



The below sample code would identify whether FLASH is
installed or not on the client user machine at runtime. Based on this we can display animated image if FLASH is installed else display the normal image.





The below code should be placed in the umLogonBotArea.txt
which is inside the com.sap.portal.runtime.logon.par.

**********************************************************************************



<!-- // FLASH Installation Check code Starts Here ></pre><pre> </pre><pre><script language="JavaScript" type="text/javascript"></pre><pre> </pre><pre><!

// -

// Globals
// Major version of Flash required

var requiredMajorVersion = 5;


// Minor version of Flash required


var requiredMinorVersion = 0;


// Minor version of Flash required


var requiredRevision = 0;


// the version of javascript supported


var jsVersion = 1.0;


// -

// ></pre><pre></script></pre><pre><script language="VBScript" type="text/vbscript"></pre><pre><! // Visual basic helper required to detect Flash Player ActiveX control version information

Function VBGetSwfVer(i)


on error resume next


Dim swControl, swVersion


swVersion = 0
set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))


if (IsObject(swControl)) then


swVersion = swControl.GetVariable("$version")


end if


VBGetSwfVer = swVersion


End Function


// ></pre><pre></script></pre><pre> </pre><pre> </pre><pre><script language="JavaScript1.1" type="text/javascript"></pre><pre> </pre><pre><! // Detect Client Browser type

******************************************



No comments:

Post a Comment