T.Fujikiの日記: 3がつ3にちです (3)
--- inputbox.php.orig 2007-03-03 22:24:26.000000000 +0900
+++ inputbox.php 2007-03-03 22:49:25.000000000 +0900
@@ -59,6 +59,12 @@
getBoxOption($inputbox->labeltext,$input,'labeltext');
getBoxOption($inputbox->br, $input, 'break');
getBoxOption($inputbox->hidden, $input, 'hidden');
+
+ getBoxOption($inputbox->align, $input, 'align');
+ if( $inputbox->align == '' ){
+ $inputbox->align = 'center';
+ }
+
$inputbox->lineBreak();
$inputbox->checkWidth();
@@ -87,7 +93,7 @@
class Inputbox {
var $type,$width,$preload,$editintro, $br;
var $defaulttext,$bgcolor,$buttonlabel,$searchbuttonlabel;
- var $hidden;
+ var $hidden, $align;
function InputBox( &$parser ) {
$this->parser =& $parser;
@@ -121,7 +127,7 @@
$searchform=<<<ENDFORM
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
- <td align="center" bgcolor="{$this->bgcolor}">
+ <td align="{$this->align}" bgcolor="{$this->bgcolor}">
<form name="searchbox" action="$searchpath" class="searchbox">
<input class="searchboxInput" name="search" type="{$type}"
value="{$this->defaulttext}" size="{$this->width}" />{$this->br}
@@ -222,7 +228,7 @@
$createform=<<<ENDFORM
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
-<td align="center" bgcolor="{$this->bgcolor}">
+<td align="{$this->align}" bgcolor="{$this->bgcolor}">
<form name="createbox" action="$action" method="get" class="createbox">
<input type='hidden' name="action" value="edit" />
<input type="hidden" name="preload" value="{$this->preload}" />
@@ -242,7 +248,8 @@
function lineBreak() {
# Should we be inserting a <br /> tag?
- $cond = ( strtolower( $this->br ) == "no" );
+ # $cond = ( strtolower( $this->br ) == "no" ); // This method doesn't work properly.(tf)
+ $cond = (strtolower( $this->br ) == "no") ? 1 : 0;
$this->br = $cond ? '' : '<br />';
}
3がつ3にちです (3) More ログイン