[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: etemplate/inc class.html.inc.php,1.7,1.8
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: etemplate/inc class.html.inc.php,1.7,1.8 |
Date: |
Sun, 29 Sep 2002 12:33:49 -0400 |
Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv14868
Modified Files:
class.html.inc.php
Log Message:
some more browser detection and using title instead of alt for images for all
browsers but netscape 4.x
Index: class.html.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.html.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.html.inc.php 29 Sep 2002 12:59:24 -0000 1.7
--- class.html.inc.php 29 Sep 2002 16:33:47 -0000 1.8
***************
*** 15,30 ****
class html
{
var $prefered_img_title;
function html()
! {
! global $HTTP_USER_AGENT;
!
// should be Ok for all HTML 4
compatible browsers
! $this->prefered_img_title =
stristr($HTTP_USER_AGENT,'konqueror') ? 'title' : 'alt';
}
function div($content,$options='')
{
! return "<div $options>\n$content</div>\n";
}
--- 15,34 ----
class html
{
+ var $user_agent,$ua_version;
var $prefered_img_title;
function html()
! {
// should be Ok for all
HTML 4 compatible browsers
! if (!eregi('compatible; ([a-z_]+)[/
]+([0-9.]+)',$GLOBALS['HTTP_USER_AGENT'],$parts))
!
eregi('^([a-z_]+)/([0-9.]+)',$GLOBALS['HTTP_USER_AGENT'],$parts);
! list(,$this->user_agent,$this->ua_version) = $parts;
! $this->user_agent = strtolower($this->user_agent);
! $this->prefered_img_title = $this->user_agent == 'mozilla' &&
$this->ua_version < 5 ? 'ALT' : 'TITLE';
! //echo "<p>HTTP_USER_AGENT='$GLOBALS[HTTP_USER_AGENT]',
UserAgent: '$this->user_agent', Version: '$this->ua_version', img_title:
'$this->prefered_img_title'</p>\n";
}
function div($content,$options='')
{
! return "<DIV $options>\n$content</DIV>\n";
}
***************
*** 38,45 ****
{
if (is_array($value)) $value = serialize($value);
- $del = strchr($value,'"') ? "'" : '"';
if (!$ignore_empty || $value && !($name == 'filter' &&
$value == 'none')) // dont need to send all the empty vars
{
! $html .= "<INPUT TYPE=HIDDEN NAME=\"$name\"
VALUE=$del$value$del>\n";
}
}
--- 42,48 ----
{
if (is_array($value)) $value = serialize($value);
if (!$ignore_empty || $value && !($name == 'filter' &&
$value == 'none')) // dont need to send all the empty vars
{
! $html .= "<INPUT TYPE=HIDDEN NAME=\"$name\"
VALUE=\"".htmlspecialchars($value)."\">\n";
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: etemplate/inc class.html.inc.php,1.7,1.8,
Ralf Becker <address@hidden> <=