How to make rounded tables
Now we have header images and code, so we can add it to template code. How to do it varies for different forums.
In this tutorial I will show how to do it only for simple tables. For more complex tables I'll create another tutorial.
On this page I'll show how to do it with phpBB 2.0, see next pages for other forum systems.
In this tutorial I will show how to do it only for simple tables. For more complex tables I'll create another tutorial.
On this page I'll show how to do it with phpBB 2.0, see next pages for other forum systems.
phpBB
Find code for a table that you want to modify. In this example I'll show how to modify "who's online" section of forum index. This is original code for it:Code:
- <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
- <tr>
- <td class="catHead" colspan="2" height="28"><span class="cattitle"><a href="{U_VIEWONLINE}" class="cattitle">{L_WHO_IS_ONLINE}</a></span></td>
- </tr>
- <tr>
- <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
- <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
- </td>
- </tr>
- <tr>
- <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
- </tr>
- </table>
Text that will work well for header is in first row of that table, so move that code above header and remove everything other than title. Also class="cattitle" should be removed from it because we have different font for header:
Code:
- <a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a>
- <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
- <tr>
- <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
- <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
- </td>
- </tr>
- <tr>
- <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
- </tr>
- </table>
Now add first and second part of html code for header before and after table text:
Code:
- <table border="0" cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr>
- <td width="26" align="left"><img src="images/corner_left.gif" width="26" height="28" border="0" alt="" /></td>
- <td width="100%" align="left"><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></td>
- <td width="6" align="right"><img src="images/corner_right.gif" width="6" height="28" border="0" alt="" /></td>
- </tr>
- </table>
- <table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
- <tr>
- <td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
- <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
- </td>
- </tr>
- <tr>
- <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
- </tr>
- </table>
That's all. You've changed header of that table to rounded header, and you should do the same to other tables. If table doesn't have any header use for title to make empty title.