cvs: pres2 / display.php keyboard.js.php show.php

From: Date: Thu, 09 Apr 2009 17:02:25 +0000
Subject: cvs: pres2 / display.php keyboard.js.php show.php
Groups: php.pres 
Request: Send a blank email to pres+get-1549@lists.php.net to get a copy of this message
rasmus Thu Apr 9 17:02:25 2009 UTC Modified files: /pres2 display.php keyboard.js.php show.php Log: IE Support http://cvs.php.net/viewvc.cgi/pres2/display.php?r1=1.41&r2=1.42&diff_format=u Index: pres2/display.php diff -u pres2/display.php:1.41 pres2/display.php:1.42 --- pres2/display.php:1.41 Sat Jul 21 14:02:53 2007 +++ pres2/display.php Thu Apr 9 17:02:25 2009 @@ -40,7 +40,7 @@ class html extends display { function _presentation(&$presentation) { - global $pres, $browser_is_IE; + global $pres; // Determine if we should cache // need to fix this check @@ -68,7 +68,17 @@ $body_style = "margin-top: 5em;"; break; default: - $body_style = "margin-top: " . ($browser_is_IE ? "0px" : "8em") . ";"; + $body_style = "margin-top: 8em;"; + + /* Not too nice, since $body_style is saved to $this->body_style + * but I don't think it will have this big impact + */ + echo "<!--[if lt IE 8]>\n"; + echo "<style type=\"text/css\">\n"; + echo "body { margin-top: 0px; }\n"; + echo "</style>\n"; + echo "<![endif]>\n"; + break; } $this->body_style = $body_style; @@ -311,12 +321,16 @@ echo "<div align=\"center\" style=\"font-size: $smallerfontsize;\">$p->speaker</div><br />\n"; if(!empty($p->url)) echo "<div align=\"center\" style=\"font-size: $smallerfontsize;\"><a href=\"$p->url\">$p->url</a></div><br />\n"; + if(!empty($p->twitter)) { + echo "<div align=\"center\" style=\"font-size: $smallerfontsize;\">Twitter: $p->twitter</div><br />\n"; + } if(!empty($p->copyright)) { for($i=10; $i>$parts; $i--) echo "<br />\n"; $str = str_replace('(c)','&copy;',$p->copyright); $str = str_replace('(R)','&reg;',$str); echo "<div align\=\"center\" style=\"font-size: 1em\">$str</div>\n"; } + } } @@ -819,14 +833,12 @@ // Navbar layout templates switch($pres->template) { case 'mysql': - if(!strstr($_SERVER['HTTP_USER_AGENT'],'MSIE')) { ?> <div class="bsticky"> <img style="margin-bottom: -0.3em" src="images/bottomswoop.gif" width="100%" height="50" /> <span class="c4">&copy; Copyright 2002 MySQL AB</span> </div> <?php - } break; case 'css': echo "</div>\n"; http://cvs.php.net/viewvc.cgi/pres2/keyboard.js.php?r1=1.20&r2=1.21&diff_format=u Index: pres2/keyboard.js.php diff -u pres2/keyboard.js.php:1.20 pres2/keyboard.js.php:1.21 --- pres2/keyboard.js.php:1.20 Thu May 3 11:28:39 2007 +++ pres2/keyboard.js.php Thu Apr 9 17:02:25 2009 @@ -9,7 +9,7 @@ } function keypressHandler(e) { var e; - if(document.all) { //it's IE + if(document.all) { //it's IE & Opera e = window.event.keyCode; } else { e = e.which; @@ -44,13 +44,6 @@ <?php if(!isset($_COOKIE['dims'])) {?> get_dims(); <?php } ?> - - // make banner sticky on old Windows IEs - <?php - if (!$GLOBALS['css_supports_fixed']) { - echo('window.setInterval("fixNavigation()", 250);'); - } - ?> <?php if (!isset($_GET['effects']) || ($_GET['effects'] != 'no')) { ?> // find any div objects with an effect attribute @@ -89,3 +82,9 @@ //--> </script> + +<!--[if lt IE 6]> +<script type="text/javascript"> +window.setInterval("fixNavigation()", 250); +</script> +<![endif]--> \ No newline at end of file http://cvs.php.net/viewvc.cgi/pres2/show.php?r1=1.61&r2=1.62&diff_format=u Index: pres2/show.php diff -u pres2/show.php:1.61 pres2/show.php:1.62 --- pres2/show.php:1.61 Thu May 3 11:28:39 2007 +++ pres2/show.php Thu Apr 9 17:02:25 2009 @@ -4,12 +4,8 @@ require_once 'config.php'; $c = compact('presentationDir', 'baseDir', 'showScript', 'helpPage', 'baseFontSize', 'flashFontScale', 'pdfFontScale', 'pdfResourceFile', 'pdf_font', - 'pdf_font_bold', 'pdf_example_font', 'jsKeyboard', 'css_supports_fixed'); - require_once 'sniff.php'; - if ($browser_is_IE) { - echo "IE is not supported - please use Firefox, Safari, Konqueror or just about anything else."; - exit; - } + 'pdf_font_bold', 'pdf_example_font', 'jsKeyboard'); + set_time_limit(0); // PDF generation can take a while if(!strlen($_SERVER['PATH_INFO'])) { header('Location: http://'.$_SERVER['HTTP_HOST'].$baseDir);

« previous php.pres (#1549) next »