cvs: phpweb /include layout.inc
| From: | Gabor Hojtsy | Date: | Wed, 13 Aug 2003 13:48:03 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20214@lists.php.net to get a copy of this message | ||
goba Wed Aug 13 09:48:03 2003 EDT
Modified files:
/phpweb/include layout.inc
Log:
Convert right/left image alignment to CSS floating
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.179 phpweb/include/layout.inc:1.180
--- phpweb/include/layout.inc:1.179 Sat Aug 9 09:22:54 2003
+++ phpweb/include/layout.inc Wed Aug 13 09:48:03 2003
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.179 2003/08/09 13:22:54 goba Exp $ */
+/* $Id: layout.inc,v 1.180 2003/08/13 13:48:03 goba Exp $ */
// Set the static content root differently on php.net
$_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ?
@@ -196,13 +196,23 @@
$sizeparams = '';
}
+ // Convert right or left alignment to CSS float,
+ // but leave other alignments intact (for now)
+ if (in_array($align, array("right", "left"))) {
+ $align = ' style="float: ' . $align . ';"';
+ } elseif ($align) {
+ $align = ' align="' . $align . '"';
+ } else {
+ $align = '';
+ }
+
// Return with image built up
return sprintf('<img src="%s/%s" alt="%s"%s%s%s />',
$webdir,
$file,
($alt ? $alt : ''),
$sizeparams,
- ($align ? ' align="' . $align . '"' : ''),
+ $align,
($extras ? ' ' . $extras : '')
);
return $image;