Flash header
Vially - July 9, 2008 - 08:19
| Project: | Ubiquity |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hello there.
I would like to replace the current headbgplus.jpg with a flash file of exactly 940 x 120. I have tried doing that, and my relevand part of code looks like this:
<![endif]-->
<?php print $scripts; ?>
</head>
<body class="<?php print $body_classes; ?>">
<div id="container">
<div id="header" width="940" height="120">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="940" height="120"> <param name="movie" value="header.swf" /> <param name="quality" value="high" /> <param name="wmode" value="Transparent" /> <param name="menu" value="false" /> <param name="scale" value="noscale" /> <embed src="header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="XXX" height="XXX" wmode="Transparent" menu="false" scale="noscale"></embed> </object>
</div>
<?php if ($primary_links): ?>
<div id="navigation" class="menu <?php if ($primary_links) { print "withprimary"; } if ($secondary_links) { print " withsecondary"; } ?> ">
<?php if ($primary_links): ?><div id="primary" class="clear-block">
<?php print theme('menu_links', $primary_links); ?>
</div><?php endif; ?>However, the flash file does not seem to display, and I don't know where to look next. Could anyone enlighten me :) ?
Thank you,
Vially.

#1
Try headerimage(http://drupal.org/project/headerimage) and flashnode (http://drupal.org/project/flashnode) - this combination could be helpful for you..
#2
'param value' and 'embed src' are pointing to your actual swf file. You are only giving relative path here which is nonsense. Path should look like this: "< ? php print $base_path . '/' . $directory; ? >/yourfile.swf" (the php code is filled with spaces to avoid rendering it with line breaks.
This points to the theme directory. Copy your swf file to the theme directory and you're done.
(Haven't tested, just writing this from scratch)
#3
Hmm, trie with no luck. Maybe I'm missing something...
New code:
<?php // $Id: page.tpl.php,v 1.2.2.3 2008/04/28 08:27:16 melon Exp $
//
// Ubiquity Drupal theme page.tpl.php file
//
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language ?>" xml:lang="<?php print $language ?>">
<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<!--[if IE]>
<style type="text/css" media="screen">@import "/<?php print $directory ?>/fix-ie.css";</style>
<![endif]-->
<?php print $scripts; ?>
</head>
<body class="<?php print $body_classes; ?>">
<div id="container">
<div id="header" width="940" height="120">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="940" height="120"> <param name="movie" value="<?php print $base_path() . $directory; ?>/header.swf" /> <param name="quality" value="high" /> <param name="wmode" value="Transparent" /> <param name="menu" value="false" /> <param name="scale" value="noscale" /> <embed src="<?php print $base_path() . $directory; ?>/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="120" wmode="Transparent" menu="false" scale="noscale"></embed> </object>
</div>
<?php if ($primary_links): ?>
<div id="navigation" class="menu <?php if ($primary_links) { print "withprimary"; } if ($secondary_links) { print " withsecondary"; } ?> ">
<?php if ($primary_links): ?><div id="primary" class="clear-block">
<?php print theme('menu_links', $primary_links); ?>
</div><?php endif; ?>
<?php if ($secondary_links): ?><div id="secondary" class="clear-block">
<?php print theme('menu_links', $secondary_links); ?>
</div><?php endif; ?>
</div><?php endif; ?>
<?php print $search_box; ?>
</div>
#4
$base_path is not a function, remove parentheses.
If you cannot make it work, forget the php variable and try out your flash code with the path of "/header.swf" (then copy the header.swf file to drupal root)
#5
Problem solved. It was header-inner that needed to be modified, and some corrections to the php code. Here is the entire page.tpl.php modified code, for anyone interested. It also gets the path with $base_path, thanks to melon.
<?php // $Id: page.tpl.php,v 1.2.2.3 2008/04/28 08:27:16 melon Exp $
//
// Ubiquity Drupal theme page.tpl.php file
//
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language ?>" xml:lang="<?php print $language ?>">
<head>
<title><?php print $head_title; ?></title>
<?php print $head; ?>
<?php print $styles; ?>
<!--[if IE]>
<style type="text/css" media="screen">@import "/<?php print $directory ?>/fix-ie.css";</style>
<![endif]-->
<?php print $scripts; ?>
</head>
<body class="<?php print $body_classes; ?>">
<div id="container">
<div id="header">
<div id="header-inner" width="940" height="120">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="940" height="120"> <param name="movie" value="<?php print $base_path . $directory; ?>/header.swf" /> <param name="quality" value="high" /> <param name="wmode" value="Transparent" /> <param name="menu" value="false" /> <param name="scale" value="noscale" /> <embed src="<?php print $base_path . $directory; ?>/header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="940" height="120" wmode="Transparent" menu="false" scale="noscale"></embed> </object>
</div>
<?php if ($primary_links): ?>
<div id="navigation" class="menu <?php if ($primary_links) { print "withprimary"; } if ($secondary_links) { print " withsecondary"; } ?> ">
<?php if ($primary_links): ?><div id="primary" class="clear-block">
<?php print theme('menu_links', $primary_links); ?>
</div><?php endif; ?>
<?php if ($secondary_links): ?><div id="secondary" class="clear-block">
<?php print theme('menu_links', $secondary_links); ?>
</div><?php endif; ?>
</div><?php endif; ?>
<?php print $search_box; ?>
</div>
<div id="wrapper">
<div id="wrapper-main">
<div id="main">
<div id="main-inner">
<?php if ($breadcrumb): print $breadcrumb; endif; ?>
<?php if ($content_top):?><div id="content-top"><?php print $content_top; ?></div><?php endif; ?>
<?php if ($title): ?><h1 class="title"><?php print $title; ?></h1><?php endif; ?>
<?php if ($tabs): ?><div class="tabs-pri"><?php print $tabs; ?></div><br class="clear" /><?php endif; ?>
<?php if (isset($tabs2)): ?><div class="tabs-sec"><?php print $tabs2; ?></div><br class="clear" /><?php endif; ?>
<?php print $help; ?>
<?php print $messages; ?>
<?php print $content; ?>
<?php print $feed_icons; ?>
<?php if ($content_bottom): ?><div id="content-bottom"><?php print $content_bottom; ?></div><?php endif; ?>
</div>
</div>
</div>
<?php if ($sidebar_left): ?><div id="sidebar-left" class="column sidebar">
<div id="sidebar-left-inner">
<?php print $sidebar_left; ?>
</div>
<div class="clear zero"> </div>
</div><?php endif; ?>
<?php if ($sidebar_right): ?><div id="sidebar-right" class="column sidebar">
<div id="sidebar-right-inner">
<?php print $sidebar_right; ?>
</div>
<div class="clear zero"> </div>
</div><?php endif; ?>
</div>
<div id="footer">
<div id="footer-inner">
<?php print $footer_message; ?>
</div>
</div>
</div>
<?php print $closure; ?>
</body>
</html>
#6
#7
Automatically closed -- issue fixed for two weeks with no activity.