- Moderated by:
- Support
-
- rank:
-
Freshman
- registered:
- September 2004
- Status:
- offline
- last visit:
- 18.09.04
- Posts:
- 2
Hello PostNuke
I have had my blogg site up for a while now and started to use some flash. I want to be able to add a flash logo to the PostNukeSilver theme.. All of them actually..
I tried and tried last night and failed.. I searched these forums (and others) and tried a few things but I never got it right... I don't know any PHP or anytihing I just cut and paist stuff. And I know HTML OK...
Here is the logo I want to use..
http://dufus.us/nuke/themes/PostNukeSilver/images/logo.swf
Here is the code of the SubSilver Theme.php
Code
{
$slogan = pnConfigGetVar('slogan');
$sitename = pnConfigGetVar('sitename');
$banners = pnConfigGetVar('banners');
$type = pnVarCleanFromInput('type');
// We will come back to main page when the site logo is clicked.
// To be redirected somewhere else, enter a fully qualified URL
$siteurl = 'index.php';
echo '</head><body>' . '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>';
// logo and banner
echo '<table width="100%" border="0" cellspacing="0" cellpadding="4"><tr>' .
'<td><a href="' . $siteurl . '" target="_top">' . '<span class="logo">' . '<img src="themes/' . $GLOBALS['thename'] . '/images/logo.gif" width="231" height="68" alt="' . $sitename . '">' . '</span>' . '</a></td><td align="right" width="468">' . '<span class="banner">';
if ((!empty($banners)) && (!pnSecAuthAction(0, '::', '::', ACCESS_EDIT))) {
pnBannerDisplay(1);
} else {
// for testing theme only, comment out or delete the next line in the production environment
echo '<img src="themes/' . $GLOBALS['thename'] .
'/images/samplebanner.gif" alt="a sample banner, for testing only...">';
}
I would also like to put a flash banner in place of the banner..
Could sombody please lend a hand to this newbe!
Thanks!
Dave -
- rank:
-
Freshman
- registered:
- December 2004
- Status:
- offline
- last visit:
- 03.08.05
- Posts:
- 15
This might be a bit more complicated than you were looking for but here's what I did. The following displays a Flash banner if the user has the Flash plug-inis present. If not, it displays a .gif. Replace the image HTML with the following:
Code
<!--
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="471" HEIGHT="63" ALIGN="">');
document.write(' <PARAM NAME=movie VALUE="<!--[$imagepath]-->/banner-curtains.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#96002A> ');
document.write(' <EMBED src="<!--[$imagepath]-->/banner-curtains.swf" quality=high bgcolor=#96002A ');
document.write(' swLiveConnect=FALSE WIDTH="471" HEIGHT="63" NAME="script" 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="<!--[$imagepath]-->/banner-curtains.gif" WIDTH="471" HEIGHT="63" usemap="#script" BORDER=0>');
}
//-->
</script>
<noscript>
<img src="<!--[$imagepath]-->/banner-curtains.gif" width="471" height="63" usemap="#script" border=0>
</noscript>
