Helpful Information
 
 
Category: Programming Articles
[TIP] Leave Comments

This isnt a very in depth thing but some people never seem to think about thr wonderul <!-- --> tag.

You should always leave comments in your code when creating complex tables and templets. lets take the welcome pannel for instance.
This mod has one big table then one row, then a 3 cells with tables rows and cells inside them and some with tables rows and cells inside the tables inside the cell with tables rows and cells.
confusing eh?

well if you leave comments you can look for them and instantly know exactly where you are.
so we can turn something like this:

<table border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#0055CC">
<td colspan="3">
<normalfont>Welcome to {boardtitle}!
</td>
</tr>
<tr>
<td bgcolor="#DDDDDD">
<smallfont>Avater:
<table>
<tr>
<td>
<br><img src="avater.gif">
</td>
</tr>
</table>
</td>
</tr>
</table>

(left out most of the pannle caouse i was pressed for time)

into this:

<!-- Start main table -->
<table border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">

<!-- catagory like row/cell -->
<tr bgcolor="#0055CC">
<td colspan="3">
<normalfont>Welcome to {boardtitle}!
</td>
</tr>

<!-- main row with the three main cells -->
<tr>
<!-- avater cell -->
<td bgcolor="#DDDDDD">
<smallfont>Avater:

<!-- avater table -->
<table>
<tr>
<td>
<br><img src="avater.gif">
</td>
</tr>
</table>

<!-- end avatar cell -->
</td>
<!-- end main row -->
</tr>
<!-- end main table -->
</table>


see wasnt that less confusing?

anyway thats my tip. enjoy :)

Nice tip, it can be useful for finding code for a specific part of your design. :)

yup yup










privacy (GDPR)