1
vinit
Default Template: system_userform.html issue
  • 2004/10/15 17:18

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


Hi i was trying to modify the system_userform.html in the default template to provide a tabular view for the login page.
I was able to create is succesfully. Just had one problem. All the table automatically got width of 100% that was weired. could someone look into this code and tell me where am i wrong.


Quote:

<div algin="center">
<table align="center" cellpading="5" class="outer">
<tr>
<th align="center" colspan="2"><{$lang_login}></th>
</tr>

<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td align="right">
<form action="user.php" method="post">
<{$lang_username}> &nbsp;
</td>
<td>
<input type="text" name="uname" size="26" maxlength="25" value="<{$usercookie}>" />
</td>
</tr>
<tr>
<td align="right"><{$lang_password}> &nbsp;</td>
<td>
<input type="password" name="pass" size="21" maxlength="25" />
</td>
</tr>
<tr>
<td> &nbsp;</td>
<td>
<input type="hidden" name="op" value="login" />
<input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" />
<input type="submit" value="<{$lang_login}>" />
</form>
</td>
</tr>
<tr>
<td > &nbsp;</td>
<td><{$lang_notregister}></td>
</tr>
<tr> <td colspan="2">&nbsp;</td></tr>
</table>

</div>

<br />

<div align="center">
<table align="center" cellpading="5" class="outer">
<tr>
<th align="center" colspan="2"> <{$lang_lostpassword}>
</th>
</tr>

<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><{$lang_noproblem}></td>
</tr>
<tr >
<td align="right" >
<form action="lostpass.php" method="post">
<{$lang_youremail}>&nbsp;
</td>
<td>
<input type="text" name="email" size="26" maxlength="60" /><input type="hidden" name="op" value="mailpasswd" />
</td>
</tr>
<tr>
<td > &nbsp;</td>
<td>
<input type="submit" value="<{$lang_sendpassword}>" />
</form>
</td>
</tr>
<tr> <td colspan="2">&nbsp;</td></tr>
</table>
</div>


2
ackbarr
Re: Default Template: system_userform.html issue

you didn't do anything wrong. The default theme's css has a style defined similar to this:
le="color: #000000"><?php table {width: 100%; padding: 3; font-size: small;}

which sets every table's default width to 100%.

To override this behavior, you need a hook to identify the tables you don't want to be 100%. A common way to add a hook is to add a <div> tag with an id around the entire contents of that template:

le="color: #000000"><?php <div id="userform"> <!--other HTML here--> </div>


then in your stylesheet add:
le="color: #000000"><?php #userform table { width:auto;}

3
ackbarr
Re:Default Template: system_userform.html issue

actually I see you already have a div surrounding your tables. You could add the id to that div instead of creating an additional one.

4
vinit
Re:Default Template: system_userform.html issue
  • 2004/10/15 17:37

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


thx for that great tip let me test it.
And would even suggest you to test it. because this really looks better than the deault login page

5
vinit
Re:Default Template: system_userform.html issue
  • 2004/10/15 17:52

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


just added

xoops.css
Quote:

#free_table table {width: 300px; }


modified the div tag with id="free_table"

and things really looked good.

note: some might need to change widht as per the font size used in there theme other wise this one looks good.

6
vinit
Re:Default Template: system_userform.html issue
  • 2004/10/15 17:57

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


Modified Code

Quote:

<br />
<br />
<br />
<div id="free_table">
<table align="center" cellpadding="5" width="200" class="outer">
<tr> <th align="center" colspan="2">
<{$lang_login}>
</th> </tr>

<tr> <td colspan="2">&nbsp;</td></tr>
<tr > <td align="right" >
<form action="user.php" method="post">
<{$lang_username}> &nbsp;</td>
<td><input type="text" name="uname" size="26" maxlength="25" value="<{$usercookie}>" />

</td></tr>
<tr >
<td align="right"><{$lang_password}> &nbsp;</td>
<td>
<input type="password" name="pass" size="26" maxlength="25" /> </td>
</tr>
<tr >
<td colspan="2" align="center">
<input type="hidden" name="op" value="login" />
<input type="hidden" name="xoops_redirect" value="<{$redirect_page}>" />
<input type="submit" value="<{$lang_login}>" />
</form>
</td>
</tr>
<tr>
<td colspan="2" align="center"><{$lang_notregister}></td></tr>
<tr> <td colspan="2">&nbsp;</td></tr>
</table>
</div>

<br />

<div id="free_table">
<table width="200" align="center" cellpadding="5" class="outer">
<tr> <th align="center" colspan="2">
<{$lang_lostpassword}></th>

</tr>

<tr> <td colspan="2">&nbsp;</td></tr>
<tr> <td colspan="2" align="center"><{$lang_noproblem}></td>
<tr > <td align="right" >
<form action="lostpass.php" method="post">
<{$lang_youremail}>&nbsp; </td>
<td>
<input type="text" name="email" size="26" maxlength="60" /><input type="hidden" name="op" value="mailpasswd" />
</td>
</tr>
<tr >
<td colspan="2" align="center">
<input type="submit" value="<{$lang_sendpassword}>" />
</form>
</td>
</tr>
<tr> <td colspan="2">&nbsp;</td></tr>
</table>
</div>

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!