RE: What do you expect?
Wayne Luke <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.suggestions |
|---|---|
| Message-ID | <ee168769a47bcf97c27b69d119a0fa6e@osCommerce-Forums> |
This message was sent from: Suggestions and Proposals http://forums.oscommerce.com/viewtopic.php?p=191327#191327 ---------------------------------------------------------------- Actually, you are correct. I didn't like the template system you had posted earlier. Maybe it has changed but when I think of templates, there should be no PHP processing in the templates. The only thing related to PHP that is should contain are variables that hold the content. All the template systems proposed so far are simply PHP includes that happen to hold the HTML code. The HTML is not separate from the PHP. Here is the template that I use on one of my forum sites. Notice the lack of PHP in the template: [code] $stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <!-- no cache headers --> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> <meta http-equiv="Cache-Control" content="no-cache" /> <!-- end no cache headers --> <title>$vboptions[bbtitle] - powered by vBulletin</title> $headinclude </head> <body> $header $navbar <!-- text --> <table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center"> <if condition="$bbuserinfo[userid] == 0"> <!-- guest welcome message --> <tr> <td colspan="2"> <b>Welcome to the $vboptions[bbtitle].</b> <div class="smallfont"> If this is your first visit, be sure to check out the <a href="faq.php?$session[sessionurl]"><b>FAQ</b></a> by clicking the link above. You may have to <a href="register.php?$session[sessionurl]"><b>register</b></a> before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. <hr /> </div> </td> </tr> <!-- end guest welcome message --> </if> <tr valign="top"> <td class="page" style="font-size: larger; font-variant: small-caps"><b>$vboptions[bbtitle]</b></td> <td class="page" align="right"><span class="smallfont"> Members: $numbermembers, Threads: $totalthreads, Posts: $totalposts<br /> Welcome to our newest member, <a href="member.php?$session[sessionurl]u=$newu" target="_blank">$newusername</a> </span></td> </tr> </table> <!-- /text --> <!-- main --> <table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <tr align="center"> <td class="thead"><span class="smallfont"> </span></td> <td class="thead" width="100%" align="left"><span class="smallfont"><b>Forum</b></span></td> <td class="thead" width="75"><span class="smallfont"><b>Posts</b></span></td> <td class="thead" width="75"><span class="smallfont"><b>Threads</b></span></td> <td class="thead" width="150"><span class="smallfont"><b>Last Post</b></span></td> <if condition="$vboptions[showmoderatorcolumn]"> <td class="thead"><span class="smallfont"><b>Moderator</b></span></td> </if> </tr> $forumbits <tr> <td class="tfoot" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>" align="center"> <a href="forumdisplay.php?$session[sessionurl]do=markread">Mark All Forums Read</a> | <a href="showgroups.php?$session[sessionurl]">View Forum Leaders</a> </td> </tr> </table> </td></tr></table> <!-- /main --> <br /> <if condition="$showloggedinusers or $birthdays or $events"> <!-- what's going on box --> <table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <tr> <td class="tcat" colspan="2"><b>What's Going On?</b></td> </tr> <if condition="$showloggedinusers"> <!-- logged-in users --> <tr> <td class="thead" colspan="2"><a href="online.php?$session[sessionurl]">Currently Active Users</a>: $totalonline ($numberregistered members and $numberguest guests)</td> </tr> <tr valign="top"> <td class="alt2"> </td> <td class="alt1" width="100%"><span class="smallfont"> <span style="white-space: nowrap">Most users ever online was $recordusers, $recorddate at $recordtime.</span><br /> $activeusers </span></td> </tr> <!-- end logged-in users --> </if> <if condition="$birthdays"> <!-- today's birthdays --> <tr> <td class="thead" colspan="2">Today's Birthdays</td> </tr> <tr valign="top"> <td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&day=$today"><img src="$stylevar[imagesfolder]/icons/icon2.gif" alt="" title="(temporary button) View Birthdays" border="0" /></a></td> <td class="alt1"><span class="smallfont">$birthdays</span></td> </tr> <!-- end today's birthdays --> </if> <if condition="$events"> <tr> <td class="thead" colspan="2"><if condition="$vboptions['showevents']==1">Today's Events<else />Upcoming events for the next $vboptions[showevents] days</if></td> </tr> <tr valign="top"> <td class="alt2"> </td> <td class="alt1"><span class="smallfont">$upcomingevents</span></td> </tr> </if> </table> </td></tr></table> <br /> <!-- end what's going on box --> </if> <!-- icons and login code --> <!--<table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td>--> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <tr valign="top"> <td class="_alt1"> <table cellpadding="2" cellspacing="0" border="0"> <tr> <td><img src="$stylevar[imagesfolder]/on.gif" alt="on.gif" title="Contains New Posts" border="0" /></td> <td class="smallfont"> Forum Contains New Posts</td> </tr> <tr> <td><img src="$stylevar[imagesfolder]/off.gif" alt="off.gif" title="Contains No New Posts" border="0" /></td> <td class="smallfont"> Forum Contains No New Posts</td> </tr> <tr> <td><img src="$stylevar[imagesfolder]/lock.gif" alt="lock.gif" title="A Closed Forum" border="0" /></td> <td class="smallfont"> Forum is Closed for Posting</td> </tr> </table> </td> <td class="_alt1" align="right"> <if condition="$bbuserinfo[userid] == 0"> <!-- guest login --> <form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td nowrap="nowrap" class="smallfont"><b>Not cookied?</b> Login with username and password:</td> </tr> <tr> <td nowrap="nowrap"> <script type="text/javascript" src="clientscript/md5.js"></script> <input type="hidden" name="vb_login_md5password" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="do" value="login" /> <input type="text" class="bginput" name="vb_login_username" size="7" /> <input type="password" class="bginput" name="vb_login_password" size="7" /> <input type="submit" class="button" value="Login!" /> <br /><span class="smallfont"><label for="cb_cookieuser"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser" checked="checked" />Remember username/password?</label></span></td> </tr> </table> </form> <!-- end guest welcome and logout --> <else /> <!-- member logout --> <a href="login.php?$session[sessionurl]do=logout">Log Out $bbuserinfo[username]</a> <!-- end member logout --> </if> </td> </tr> </table> <!--</td></tr></table>--> <!-- / icons and login code --> <br /> <!-- timezone --> <table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center"> <tr valign="bottom"> <td class="smallfont" align="right"><span class="smallfont">All times are GMT$timediff. The time now is <span class="time">$timenow</span>.</span></td> </tr> </table> <!-- /timezone --> $footer </body> </html> [/code]