cvs: phpweb /include layout.inc
| From: | Gabor Hojtsy | Date: | Sat, 16 Aug 2003 08:42:29 +0000 |
| Subject: | cvs: phpweb /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20397@lists.php.net to get a copy of this message | ||
goba Sat Aug 16 04:42:29 2003 EDT
Modified files:
/phpweb/include layout.inc
Log:
Add shortcut function to print out news images (right aligned images
in the /images/news dir, pointing to an URL and having an ALT)
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.185 phpweb/include/layout.inc:1.186
--- phpweb/include/layout.inc:1.185 Fri Aug 15 06:46:40 2003
+++ phpweb/include/layout.inc Sat Aug 16 04:42:28 2003
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.185 2003/08/15 10:46:40 goba Exp $ */
+/* $Id: layout.inc,v 1.186 2003/08/16 08:42:28 goba Exp $ */
// Set the static content root differently on php.net
$_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ?
@@ -252,6 +252,13 @@
echo make_image($file, $alt, $align, $extras, $dir, $border);
}
+// Shortcut to usual news image printing (right floating
+// image from the news dir with an alt and an URL)
+function news_image($URL, $image, $alt)
+{
+ echo "<a href=\"$URL\">" . make_image("news/$image", $alt,
"right") . "</a>";
+}
+
// Return HTML code for a submit button image
function make_submit($file, $alt = FALSE, $align = FALSE, $extras = FALSE,
$dir = '/images', $border = 0)
@@ -708,4 +715,4 @@
echo substr($links, 0, -2);
}
-/* vim: set noet ts=4 sw=4 ft=php: : */
\ No newline at end of file
+/* vim: set noet ts=4 sw=4 ft=php: : */