Re: [PRES] cvs: pres2 / index.php keyboard.js.php objects.php
| From: | Rasmus Lerdorf | Date: | Sun, 27 Apr 2003 17:18:53 +0000 |
| Subject: | Re: [PRES] cvs: pres2 / index.php keyboard.js.php objects.php | ||
| References: | 1 | Groups: | php.pres |
| Request: | Send a blank email to pres+get-664@lists.php.net to get a copy of this message | ||
I still get an IE6 error. "Line 12, Object required". And there are some
nasty output problems still. See:
Compare this slide on Mozilla and IE, for example:
http://talks.php.net/show/top7-nyc/2
I don't have the patience for getting this stuff to work with IE, but if
you are into it... ;)
-Rasmus
On Sun, 27 Apr 2003, Christian Wenz wrote:
> wenz Sun Apr 27 12:41:49 2003 EDT
>
> Modified files:
> /pres2 index.php keyboard.js.php objects.php
> Log:
> navbar is now sticky on older Windows IE versions (tested with v4 and v5.x). On IE6 sticky is
> supposed to work with CSS.
>
> Index: pres2/index.php
> diff -u pres2/index.php:1.24 pres2/index.php:1.25
> --- pres2/index.php:1.24 Sat Apr 26 13:59:01 2003
> +++ pres2/index.php Sun Apr 27 12:41:49 2003
> @@ -104,7 +104,7 @@
> <body>
> <?php
>
> - echo '<div class="sticky" align="center" style="width:
> 100%;"><div class="navbar">';
> + echo '<div id="stickyBar" class="sticky" align="center"
> style="width: 100%;"><div class="navbar">';
>
> $logo1 = $pres[1]->logo1;
> echo "<img src=\"$logo1\" align=\"left\" style=\"float:
> left;\">";
> Index: pres2/keyboard.js.php
> diff -u pres2/keyboard.js.php:1.10 pres2/keyboard.js.php:1.11
> --- pres2/keyboard.js.php:1.10 Sun Apr 27 11:58:04 2003
> +++ pres2/keyboard.js.php Sun Apr 27 12:41:49 2003
> @@ -41,6 +41,13 @@
> var currentEffect = 0;
>
> onload = function() {
> + // make banner sticky on old Windows IEs
> + <?php
> + if (!$css_supports_fixed) {
> + echo('window.setInterval("fixNavigation()", 250);');
> + }
> + ?>
> +
> // find any div objects with an effect attribute
> var divs = document.getElementsByTagName('div');
> for (var i=0; i < divs.length; i++) {
> @@ -60,5 +67,19 @@
> }
> }
> }
> +
> +function fixNavigation() { //helper function for making navbar sticky
> + if (document.layers) {
> + document.layers["stickyBar"].left = window.pageXOffset;
> + document.layers["stickyBar"].top = window.pageYOffset;
> + } else if (document.all) {
> + document.all("stickyBar").style.posLeft = document.body.scrollLeft;
> + document.all("stickyBar").style.posTop = document.body.scrollTop;
> + } else if (document.getElementById) {
> + document.getElementById("stickyBar").style.left = window.pageXOffset;
> + document.getElementById("stickyBar").style.top = window.pageYOffset;
> + }
> +}
> +
> //-->
> </script>
> Index: pres2/objects.php
> diff -u pres2/objects.php:1.136 pres2/objects.php:1.137
> --- pres2/objects.php:1.136 Sat Apr 26 13:44:23 2003
> +++ pres2/objects.php Sun Apr 27 12:41:49 2003
> @@ -289,7 +289,7 @@
> break;
>
> case 'php2':
> - echo "<div class=\"sticky\" align=\"$this->titleAlign\"
> style=\"width: 100%\"><div class=\"navbar\">";
> + echo "<div id=\"stickyBar\" class=\"sticky\"
> align=\"$this->titleAlign\" style=\"width: 100%\"><div
> class=\"navbar\">";
> echo "<table style=\"float: left;\" width=\"60%\"
> border=\"0\" cellpadding=0 cellspacing=0><tr>\n";
> if(!empty($this->logo1)) $logo1 = $this->logo1;
> else $logo1 = $pres[1]->logo1;
> @@ -336,7 +336,7 @@
> break;
>
> case 'mysql':
> - echo "<div class=\"sticky\" align=\"$this->titleAlign\"
> style=\"width: 100%\"><div class=\"navbar\">";
> + echo "<div id=\"stickybar\" class=\"sticky\"
> align=\"$this->titleAlign\" style=\"width: 100%\"><div
> class=\"navbar\">";
> echo "<table style=\"float: left;\" width=\"60%\"
> border=\"0\"><tr>\n";
> if(!empty($this->logo1)) $logo1 = $this->logo1;
> else $logo1 = $pres[1]->logo1;
> @@ -384,7 +384,7 @@
>
> case 'php':
> default:
> - echo "<div class=\"sticky\" align=\"$this->titleAlign\"
> style=\"width: 100%;\"><div class=\"navbar\">";
> + echo "<div id=\"stickybar\" class=\"sticky\"
> align=\"$this->titleAlign\" style=\"width: 100%;\"><div
> class=\"navbar\">";
> if(!empty($this->logo1)) $logo1 = $this->logo1;
> else $logo1 = $pres[1]->logo1;
> if(!empty($this->logoimage1url)) $logo1url = $this->logoimage1url;
> @@ -563,7 +563,7 @@
> list($dx,$dy) =
> getFlashDimensions($this->titleFont,$this->title,flash_fixsize($this->titleSize));
> $dx = $winW; // full width
> ?>
> -<div align="<?=$this->titleAlign?>" class="sticky">
> +<div align="<?=$this->titleAlign?>" class="sticky"
> id="stickyBar">
> <embed src="<?=$baseDir?>flash.php/<?echo
> time()?>?type=title&dy=<?=$dy?>&dx=<?=$dx?>&coid=<?=$coid?>"
> quality=high loop=false
>
> pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
> type="application/x-shockwave-flash" width="<?=$dx?>"
> height="<?=$dy?>">
>
>
>
>