> On Sunday, Oct 26, 2003, at 15:34 US/Central, Brian
> Candler wrote:
>
> > So I don't think what you propose would be any
> improvement.
> >
>
--- James A Baker <[EMAIL PROTECTED]> wrote:
> I concur. What he was suggesting sounded much like
> what's already in place to me as well.
>
Thanks Brian and James for your comments. I think you
both missed the point I�m trying to convey. Let�s take
an example.
Let�s see how the folder list is generated for the
folders.html template according to my method.
1. folders.html template:
<HTML>
.
.
${FOLDERLIST}
.
.
</HTML>
2. folders.tags definition file:
$hashTable{'FOLDERLIST'} = <<'XXX';
<table width="100%" border="0" cellpadding="2"
cellspacing="0" class="folderlist">
${INBOX}
${DRAFTS}
${SENT}
${TRASH}
</table>
XXX
$hashTable{'INBOX'} = <<'XXX';
<tr>
<td align="left" valign="top">
<img src="/webmail/images/folder.gif" width="21"
height="16" alt="Folder" title="Folder" />
<input type="radio" name="DELETE" value="INBOX"
/>
<a class="folderlink" href="${url}">INBOX</a>
<font class="folderlistunread" style="color:
#800000" size="-1">${unread_count}</font>
</td>
<td align="right" valign="top">
<span class="foldercnt" style="color:
#000000">${total_count}</span>
</td>
</tr>
XXX
$hashTable{'DRAFTS'} = <<'XXX';
<tr>
<td align="left" valign="top">
<img src="/webmail/images/folder.gif" width="21"
height="16" alt="Folder" title="Folder" />
<input type="radio" name="DELETE" value="Drafts"
/>
<a class="folderlink" href="${url}">Drafts</a>
<font class="folderlistunread" style="color:
#800000" size="-1">${unread_count}</font>
</td>
<td align="right" valign="top">
<span class="foldercnt" style="color:
#000000">${total_count}</span>
</td>
</tr>
XXX
.
.
Processing of the folders.html template:
1. Process INBOX Tag
(a) Calculate url
(b) Calculate unread_count
(c) Calculate total_count
(d) Parse the INBOX tag and replace ${url},
${unread_count} and ${total_count}
2. Do Step 1 for DRAFTS, SENT and TRASH Tags
3. Parse the FOLDERLIST tag and replace ${INBOX},
${DRAFTS}, ${SENT} and ${TRASH} tags
4. Parse the folders.html template and replace the
${FOLDERLIST}
See how the folder list is currently generated. There
is a [#L#] tag in the folders.html template. Following
tags are also available in the folders.html template:
[#$UNREAD=(%u unread messages)#]
[#$INBOX=INBOX#]
[#$DRAFTS=Drafts#]
[#$SENT=Sent#]
[#$TRASH=Trash#]
[#$FOLDERICON=@@folder.gif, width="21" height="16"
alt="Folder" title="Folder"@ @#]
[#$FOLDERSICON=@@folders.gif, width="21" height="16"
alt="Folders" title="Folders"@ @#]
So, where is the rest of the HTML code? It�s mixed
into C language code like:
printf("<table width=\"100%%\" border=\"0\"
cellpadding=\"2\" cellspacing=\"0\"
class=\"folderlist\">\n");
printf("%s<input type=\"radio\" name=\"DELETE\"
value=\"", img);
printf(" <font class=\"subfolderlistunread\"
style=\"color: #800000\" size=\"-1\">");
James is going to rewrite templates with CSS. If large
number of CSS tags are inside the C code, does he has
the freedom to change, add or drop these CSS tags
without changing the C programs?
What if an user want to drop the radio button? Can
they do with CSS? :)
What if an user want different icons for Inbox,
Drafts, Sent and Trash?
What if an user want different color for a hard coded
element like above?
See according to the method I proposed, users do have
the full freedom to decide the presentation, change
the HTML, add or drop CSS tags, etc. The SqWebMail
does not even have to be aware what language the
template is written (eg. HTML, XML, etc)!
I know this is a big change if we were to change the
SqWebMail to suit the method I proposed. But isn�t it
worth for the long run?
Best regards
Sagara
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/