[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc class.gdbutton.inc.php,1.1,1.2
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc class.gdbutton.inc.php,1.1,1.2 |
Date: |
Thu, 29 Aug 2002 22:16:17 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv9927/inc
Modified Files:
class.gdbutton.inc.php
Log Message:
update gdbutton
Index: class.gdbutton.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.gdbutton.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.gdbutton.inc.php 29 Aug 2002 23:19:54 -0000 1.1
--- class.gdbutton.inc.php 30 Aug 2002 02:16:15 -0000 1.2
***************
*** 54,60 ****
$this->xspace = 4;
! $this->yspace = 2;
! $this->docroot =
$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'];
$this->img_dir = PHPGW_IMAGES_DIR . SEP;
}
--- 54,60 ----
$this->xspace = 4;
! $this->yspace = 4;
! $this->save_dir =
$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'] . PHPGW_IMAGES_DIR . SEP;
$this->img_dir = PHPGW_IMAGES_DIR . SEP;
}
***************
*** 77,81 ****
function gd_button()
{
! if (file_exists(PHPGW_IMAGES_DIR . SEP .
$this->filename))
{
return $this->filename;
--- 77,81 ----
function gd_button()
{
! if (file_exists($this->save_dir . $this->filename))
{
return $this->filename;
***************
*** 87,92 ****
$text_height = ImageFontHeight($this->font_size);
! $this->width = intval($this->xspace + $text_width);
! $this->height = intval($this->yspace + $text_height);
$this->xpos = ($this->width/2) - ($text_width/2);
--- 87,92 ----
$text_height = ImageFontHeight($this->font_size);
! $this->width = ($this->xspace*2) + $text_width;
! $this->height = $this->yspace + $text_height;
$this->xpos = ($this->width/2) - ($text_width/2);
***************
*** 120,124 ****
function ttf_button()
{
! if (file_exists(PHPGW_IMAGES_DIR . SEP .
$this->filename))
{
return $this->filename;
--- 120,124 ----
function ttf_button()
{
! if (file_exists($this->save_dir . $this->filename))
{
return $this->filename;
***************
*** 133,138 ****
$ypad = 10;
! $this->width = $dx + $xpad;
! $this->height = $dy + $xpad;
$this->button_init();
--- 133,138 ----
$ypad = 10;
! $this->width = ($xpad/2) + $xpad + $dx;
! $this->height = $dy + $ypad;
$this->button_init();
***************
*** 152,156 ****
function save_button()
{
! ImagePNG($this->image,$this->docroot . $this->img_dir .
SEP . $this->filename);
ImageDestroy($this->image);
--- 152,156 ----
function save_button()
{
! ImagePNG($this->image,$this->save_dir .
$this->filename);
ImageDestroy($this->image);
***************
*** 168,181 ****
$this->file_name();
! if (extension_loaded('gd') && extension_loaded('ttf'))
{
if (dl('gd.so'))
{
! return '<input type="image" src="' .
$this->img_dir . $this->ttf_button() . '" border="0" name="' . $button_name .
'">';
}
}
! elseif(extension_loaded('gd') &&
!extension_loaded('ttf'))
{
! return '<input type="image" src="' .
$this->img_dir . $this->gd_button() . '" border="0" name="' . $button_name .
'">';
}
else
--- 168,181 ----
$this->file_name();
! if (extension_loaded('gd') && $config['ttf'] == 'yes')
{
if (dl('gd.so'))
{
! return '<input type="image" src="' .
$this->img_dir . $this->ttf_button() . '" border="0" name="' . $button_name .
'" value="' . $button_name . '">';
}
}
! elseif(extension_loaded('gd'))
{
! return '<input type="image" src="' .
$this->img_dir . $this->gd_button() . '" border="0" name="' . $button_name . '"
value="' . $button_name . '">';
}
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc class.gdbutton.inc.php,1.1,1.2,
Bettina Gille <address@hidden> <=