From: Carsten K. <car...@us...> - 2002-03-28 06:50:51
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory usw-pr-cvs1:/tmp/cvs-serv20470 Modified Files: text2png.php Log Message: Fixes to update plugin with new HtmlElement functions. Index: text2png.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/text2png.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -2 -b -p -d -r1.9 -r1.10 --- text2png.php 10 Jan 2002 04:16:33 -0000 1.9 +++ text2png.php 28 Mar 2002 06:50:48 -0000 1.10 @@ -1,4 +1,25 @@ <?php // -*-php-*- rcs_id('$Id$'); +/* + Copyright 1999, 2000, 2001, 2002 $ThePhpWikiProgrammingTeam + + This file is part of PhpWiki. + + PhpWiki is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PhpWiki is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PhpWiki; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + /** * File loading and saving diagnostic messages, to see whether an @@ -36,8 +57,5 @@ extends WikiPlugin // we don't have png and/or gd. $error_html = _("Sorry, this version of PHP cannot create PNG image files."); - $link = QElement('a', - array('href' => "http://www.php.net/manual/pl/ref.image.php", - 'class' => 'rawurl'), - "http://www.php.net/manual/pl/ref.image.php"); + $link = "http://www.php.net/manual/pl/ref.image.php"; $error_html .= sprintf(_("See %s"), $link) ."."; trigger_error( $error_html, E_USER_NOTICE ); @@ -90,8 +108,6 @@ extends WikiPlugin // FIXME: Error manager does not transform URLs passed // through it. - $error_html .= QElement('a', - array('href' => "http://www.php.net/manual/en/function.imagecreate.php", - 'class' => 'rawurl'), - "PHP web page"); + $link = "http://www.php.net/manual/en/function.imagecreate.php"; + $error_html .= sprintf(_("See %s"), $link) ."."; trigger_error( $error_html, E_USER_NOTICE ); return; @@ -134,5 +150,5 @@ extends WikiPlugin // create an <img src= tag to show the image! - $html = ""; + $html = HTML(); if ($success > 0) { if (defined('text2png_debug')) { @@ -149,6 +165,6 @@ extends WikiPlugin } $urlpath = DATA_PATH . "/images/$l/"; - $html .= Element('img', array('src' => $urlpath . $filename, - 'alt' => $text)); + $html->pushContent(HTML::img(array('src' => $urlpath . $filename, + 'alt' => $text))); } else { trigger_error(sprintf(_("couldn't open file '%s' for writing"), |