mirror of
https://github.com/php/web-pres2.git
synced 2026-03-24 07:22:08 +01:00
- Fixed some call-time-pass-by-reference warnings. - Allow a new tag "div" , on which effect=slide works as well. - Changed how body tags are added, so that we can pick a CSS class for the body tag dependent on the template. - Changed some of the ways on how slide XML is opened, related to incomplete PHP 6 implementations of functions. #- Rasmus, I tested those changes with a few of your talks as well, they look # fine here, but you might want to double check.
27 lines
858 B
PHP
27 lines
858 B
PHP
<?php /*
|
|
A bit of fancy footwork to get the browser's inside dimensions in
|
|
pixels. Should work on both NS4+ and IE4+. If it doesn't we default
|
|
it to something sane. The dimensions are returned to the server via
|
|
a Javascript cookie so as to not muck up our nice clean URL. The
|
|
function is called if we don't have the dimensions already, or on a
|
|
resize event to fetch the new window dimensions.
|
|
*/?>
|
|
<script type="text/javascript" language="JavaScript" defer="defer">
|
|
<!--
|
|
function get_dims() {
|
|
var winW = 1024;
|
|
var winH = 650;
|
|
|
|
if (window.innerWidth) {
|
|
winW = window.innerWidth;
|
|
winH = window.innerHeight;
|
|
} else if (document.all) {
|
|
winW = document.body.clientWidth;
|
|
winH = document.body.clientHeight;
|
|
}
|
|
document.cookie="dims="+winW+"_"+winH;
|
|
location.reload(false);
|
|
}
|
|
//-->
|
|
</script>
|