cvs: phpweb /include layout.inc shared-manual.inc

From: Date: Sun, 19 Jan 2003 13:24:42 +0000
Subject: cvs: phpweb /include layout.inc shared-manual.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15180@lists.php.net to get a copy of this message
goba Sun Jan 19 08:24:42 2003 EDT Modified files: /phpweb/include layout.inc shared-manual.inc Log: - Allow spacer() to return string if needed. - Use default parameters if possible... - Add spacer to manual sidebar to make it look the same in Mozilla then in IE Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.114 phpweb/include/layout.inc:1.115 --- phpweb/include/layout.inc:1.114 Sun Jan 19 08:14:11 2003 +++ phpweb/include/layout.inc Sun Jan 19 08:24:41 2003 @@ -1,17 +1,17 @@ <?php -/* $Id: layout.inc,v 1.114 2003/01/19 13:14:11 goba Exp $ */ -# spacer() -# print a IMG tag for a sized spacer GIF -# +/* $Id: layout.inc,v 1.115 2003/01/19 13:24:41 goba Exp $ */ -function spacer($width=1, $height=1, $align=false, $extras=false) { - printf('<img src="/images/spacer.gif" width="%d" height="%d" border="0" alt="" %s%s />', - $width, - $height, - ($align ? 'align="'.$align.'" ' : ''), - ($extras ? $extras : '') - ); +// Print an image for a sized spacer +function spacer($width = 1, $height = 1, $return = false, $align = false, $extras = false) +{ + $function = ($return ? "sprintf" : "printf"); + return $function('<img src="/images/spacer.gif" width="%d" height="%d" border="0" alt="" %s%s />', + $width, + $height, + ($align ? "align=\"$align\" " : ""), + ($extras ? $extras : "") + ); } # resize_image() @@ -236,7 +236,7 @@ ?>&nbsp; </td> </tr> - <tr bgcolor="#333366"><td colspan="2"><?php spacer(1,1);?></td></tr> + <tr bgcolor="#333366"><td colspan="2"><?php spacer(); ?></td></tr> <tr bgcolor="#666699"> <td align="right" valign="top" colspan="2"><font color="#ffffff"> <form method="post" action="/search.php" class="thin"> @@ -258,7 +258,7 @@ </font> </td> </tr> - <tr bgcolor="#333366"><td colspan="3"><?php spacer(1,1);?></td></tr> + <tr bgcolor="#333366"><td colspan="3"><?php spacer(); ?></td></tr> </table> <?php @@ -274,7 +274,7 @@ <tr valign="top"><td class="sidebar"><?php echo $SIDEBAR_DATA?></td></tr> </table> </td> - <td bgcolor="#cccccc" background="/gifs/checkerboard.gif" width="1"><?php spacer(1,1);?></td> + <td bgcolor="#cccccc" background="/gifs/checkerboard.gif" width="1"><?php spacer(); ?></td> <?php endif; ?> <td> <table cellpadding="10" cellspacing="0" width="100%"> @@ -298,12 +298,12 @@ if ($enclosed) { echo "</td></tr></table></td>"; if(isset($RSIDEBAR_DATA)) {?> -<td bgcolor="#cccccc" background="/gifs/checkerboard.gif" width="1"><?php spacer(1,1);?></td> +<td bgcolor="#cccccc" background="/gifs/checkerboard.gif" width="1"><?php spacer(); ?></td> <td width="175" bgcolor="#f0f0f0"> <table width="100%" cellpadding="4" cellspacing="0"> <tr valign="top"><td class="sidebar"><?php echo $RSIDEBAR_DATA?></td></tr> </table> -<?php spacer(175);?> +<?php spacer(175); ?> </td> <?php } echo "</tr></table>\n"; @@ -311,7 +311,7 @@ ?> <table border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr bgcolor="#333366"><td><?php spacer(1,1);?></td></tr> + <tr bgcolor="#333366"><td><?php spacer(); ?></td></tr> <tr bgcolor="#9999cc"> <td align="right" valign="bottom"> <?php @@ -327,7 +327,7 @@ ?> </td> </tr> - <tr bgcolor="#333366"><td><?php spacer(1,1); ?></td></tr> + <tr bgcolor="#333366"><td><?php spacer(); ?></td></tr> </table> <table border="0" cellspacing="0" cellpadding="6" width="100%"> Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.159 phpweb/include/shared-manual.inc:1.160 --- phpweb/include/shared-manual.inc:1.159 Tue Jan 7 15:23:52 2003 +++ phpweb/include/shared-manual.inc Sun Jan 19 08:24:41 2003 @@ -31,7 +31,7 @@ make_link('./', make_image('caret-t.gif', '^') . $HOME[1] ) . '<br></td></tr>'; - $SIDEBAR_DATA.= '<tr bgcolor="#cccccc"><td></td></tr>'; + $SIDEBAR_DATA.= '<tr bgcolor="#cccccc"><td>' . spacer(1, 1, TRUE) . '</td></tr>'; if (($HOME[1] != $UP[1]) && $UP[1]) { $SIDEBAR_DATA.= '<tr valign="top"><td>' .

« previous php.mirrors (#15180) next »