I have been fighting this for over 27 hours. I have finally decided to post it as an issue. This is the code i am currently using to post flash to my header:
<head>
<title><?php if (isset($head_title )) { echo $head_title; } ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="<?php echo base_path() . path_to_theme(); ?>/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {}
var params = {
base: "."
}
var attributes = {}
swfobject.embedSWF("<?php echo base_path() . path_to_theme(); ?>/slideshow.swf", "flashcontent", "974", "250", "9.0.0", "<?php echo base_path() . path_to_theme(); ?>/expressinstall.swf", flashvars, params, attributes);
</script>
<?php echo $head; ?>
<script type="text/javascript" src="<?php echo get_full_path_to_theme(); ?>/script.js"></script>
<?php echo $styles ?>
<?php echo $scripts ?>
<!--[if IE 6]><link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie6.css" type="text/css" /><![endif]-->
<script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script>
</head>
<div class="Header">
<div id="flashcontent">
<!-- Insert non-Flash content here -->
</div>
</div>
The code above is correct and displays the flash file i want played but
i want it displayed on all pages and not just the admin pages.
Please help. This has been annoying me for hours.
Comments
Comment #1
SonnyRSA commentedIm having the same problem.
My flash header works perfectly in all browsers on the homepage. As soon as i move to any other pages it stops showing.
Any ideas as to why this is happening would be greatly appreciated.
Thanks
Comment #2
dman commentedSo where do you expect to get the
base_path() . path_to_theme();functions from? From a library that you've not included?Admin pages almost always include their scripts with drupal_add_js(). When this routine is first called, Drupal ensures that a bunch of libraries like drupal.js and jquery.js are included on the page as well.
If you are not including your code the same way Drupal does, it does not know that you are expecting to have the libraries and (if there is no other code being included incidentally) will not include that foundation for you.
Comment #3
dave reid