Quote:
Originally Posted by sabret00the
alternative "shoutbox" template
if you're like me and have borders around your .page template this is a neccessity.
|
Your code still has a bug, got it fixed
It should be working fine if you have a table outside the whole forum.
See the bug in jaliam's post
here.
HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head><title>$vboptions[bbtitle] - $vbphrase[shoutbox_shoutbox]</title>
$headinclude
$headinsert
<!--<script language="JavaScript" src="vbcode.js"></script>-->
</head>
<body$onload>
$header
$navbar
<table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
<td width="50%" align="left">
$pagenav
</td>
<td width="50%" align="right"><normalfont><a href="java_script_:window.location=window.location">$vbphrase[shoutbox_reload]</a></normalfont></td>
</tr>
</table>
<br/>
<table cellspacing="0" border="0">
<tr>
<td width="49%" valign="top" align="left">
<table cellspacing="0" border="0" class="" width="$stylevar[tablewidth]" align="center">
<tr>
<td width="50%" valign="top" class="">
<table cellpadding="5" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" width="100%" valign="top">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('shoutbox_shoutbits')"><img id="collapseimg_shoutbox_shoutbits" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_shoutbox_shoutbits].gif" alt="" border="0" /></a>
<normalfont><b>$vbphrase[shoutbox_the_shoutbox_at] $datetime $successand++++</b></normalfont></td>
</tr>
</table>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="">
<tbody id="collapseobj_shoutbox_shoutbits" style="$vbcollapse[collapseobj_shoutbox_shoutbits]">
$shoutbits
</tbody>
</table>
<table cellpadding="3" cellspacing="3" border="0" width="100%">
<tr>
<td width="50%" valign="top" class="">
<table cellpadding="5" cellspacing="1" border="0" width="100%">
<tr>
<td class="thead" width="100%" valign="top">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('shoutbox_options')"><img id="collapseimg_shoutbox_options" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_shoutbox_options].gif" alt="" border="0" /></a>
<normalfont><b>$vbphrase[shoutbox_shoutbox_options]</b></normalfont></td>
</tr>
</table>
<table class="alt1" cellpadding="3" cellspacing="3" border="0" width="100%">
<tbody id="collapseobj_shoutbox_options" style="$vbcollapse[collapseobj_shoutbox_options]">
<tr class="alt1">
<td class="alt1">
<if condition="$vboptions['shoutbox_enableuserview'] == 1 || $vboptions['shoutbox_enableusernoview'] == 1 || $vboptions['shoutbox_allowdatebegin'] == 1 || $vboptions['shoutbox_allowdatecutoff'] == 1 || $vboptions['shoutbox_allowshoutsperpage'] == 1"> <form action="shoutbox.php" method="post" name="vbform">
<if condition="$vboptions['shoutbox_enableuserview'] == 1">$vbphrase[shoutbox_shouts_by_user] <input type="text" class="bginput" name="username" value="$username" size="40" maxlength="85" tabindex="4" /><br></if><if condition="$vboptions['shoutbox_enableuserview'] == 1">$vbphrase[shoutbox_exclude_shouts_by_user] <input type="text" class="bginput" name="nousername" value="$nousername" size="40" maxlength="85" tabindex="5" /><br></if><if condition="$vboptions['shoutbox_allowdatecutoff'] == 1"><phrase 1="<input type='text' class='bginput' name='datecutoff' value='$datecutoff' size='5' maxlength='5' tabindex='6' />">$vbphrase[shoutbox_shouted_in_the_last_x_days]</phrase><br></if><if condition="$vboptions['shoutbox_allowdatebegin'] == 1"><phrase 1="<input type='text' class='bginput' name='datebegin' value='$datebegin' size='5' maxlength='5' tabindex='7' />">$vbphrase[shoutbox_shout_in_the_last_x_days_ago]</phrase><br></if><if condition="$vboptions['shoutbox_allowshoutsperpage'] == 1">$vbphrase[shoutbox_shouts_per_page] <input type="text" class="bginput" name="perpage" value="$perpage" size="5" maxlength="5" tabindex="8" /><br></if><input type="submit" name="go" value="$vbphrase[shoutbox_go]" class="bginput" tabindex="9" accesskey="g"></form></if>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</td>
<!-- ---------------------------- -->
<td width="2%" valign="top" align="center"></td>
<!-- ---------------------------- -->
<td width="49%" valign="top">
<if condition="$vboptions['shoutbox_showstats'] == 1">
<table cellpadding="5" cellspacing="0" border="0" width="100%">
<tr>
<td class="thead" width="100%" valign="top">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('shoutbox_stats')"><img id="collapseimg_shoutbox_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_shoutbox_stats].gif" alt="" border="0" /></a>
<normalfont><b>$vbphrase[shoutbox_shoutbox_stats]</b></normalfont></td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0" width="100%">
<tbody id="collapseobj_shoutbox_stats" style="$vbcollapse[collapseobj_shoutbox_stats]">
<tr class="alt1">
<td width="80%" valign="middle"><normalfont><b>$vbphrase[shoutbox_shoutbox_stats_total_shouts]</b></normalfont></td>
<td width="20%" valign="middle" align="right"><normalfont>$totalshouts</normalfont></td>
</tr>
<tr class="alt2">
<td width="80%" valign="middle"><normalfont><b>$vbphrase[shoutbox_shoutbox_stats_shouts_today]</b></normalfont></td>
<td width="20%" valign="middle" align="right"><normalfont>$todayshouts</normalfont></td>
</tr>
<tr class="alt1">
<td width="80%" valign="middle"><normalfont><b>$vbphrase[shoutbox_shoutbox_stats_last_24_hours]</b></normalfont></td>
<td width="20%" valign="middle" align="right"><normalfont>$twentyfourhourshouts</normalfont></td>
</tr>
<tr class="alt2">
<td width="80%" valign="middle"><normalfont><b>$vbphrase[shoutbox_shoutbox_stats_your_shouts]</b></normalfont></td>
<td width="20%" valign="middle" align="right"><normalfont>$usershouts</normalfont></td>
</tr>
</tbody>
</table>
</if>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td class="" width="100%">
<br/><br/>
<if condition="$vboptions['shoutbox_allownewshouts'] != 1"><br/><center><normalfont><b>$vboptions[shoutbox_closereason]</b></normalfont></center><br/><else /><if condition="$SHOUTBOX_PERMS['shoutpost'] == 1"><table cellpadding="5" cellspacing="0" border="0" width="100%" class="">
<form action="shoutbox.php" name="vbform" method="post" onsubmit="return validatePost(this, 0, $vboptions[postminchars], $vboptions[postmaxchars]);" onreset="vB_RESET(this);">
<input type="hidden" name="do" value="addshout">
<tr>
<td class="thead" width="100%">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('shoutbox_shout')"><img id="collapseimg_shoutbox_shout" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_shoutbox_shout].gif" alt="" border="0" /></a>
<normalfont class="thead"><b>$vbphrase[shoutbox_add_new_shout]</b></normalfont></td>
</tr>
</table>
<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%" class="alt1">
<tbody id="collapseobj_shoutbox_shout" style="$vbcollapse[collapseobj_shoutbox_shout]">
<tr class=""><td width=100%>
<if condition="$bbuserinfo['usergroupid'] == 1 && $SHOUTBOX_PERMS['shoutpost'] == 1">Nickname: <input type="text" class="bginput" name="shoutusername" value="" size="40" maxlength="<if condition="$vboptions['maxuserlength'] != 0">$vboptions[maxuserlength]</if>" tabindex="1" /><br /></if>
<if condition="$vboptions['shoutbox_usestandardtextarea'] == 1">
<textarea name="message" rows="15" cols="75" style="width:100%; height:250px" wrap="virtual" tabindex="2"></textarea><else />
$messagearea
</if>
</td></tr></table></td></tr></table>
<table cellpadding="8" cellspacing="0" border="0" width="100%">
<tr class="">
<td width="100%" align="center"><smallfont><b>[ <if condition="$vboptions['shoutbox_allowsmilies'] == 1"><phrase 1="<a href='misc.php?$session[sessionurl]do=showsmilies' class='small' target='_blank'>" 2="$vbphrase[shoutbox_enabled]" 3="</a>">$vbphrase[shoutbox_smilies_enabled_disabled]</phrase><else /><phrase 1="" 2="$vbphrase[shoutbox_disabled]" 3="">$vbphrase[shoutbox_smilies_enabled_disabled]</phrase></if> - <if condition="$vboptions['shoutbox_allowbbcode'] == 1"><phrase 1="<a href='misc.php?$session[sessionurl]do=bbcode' class='small' target='_blank'>" 2="$vbphrase[shoutbox_enabled]" 3="</a>">$vbphrase[shoutbox_vbcode_enabled_disabled]</phrase><else /><phrase 1="" 2="$vbphrase[shoutbox_disabled]" 3="">$vbphrase[shoutbox_vbcode_enabled_disabled]</phrase></if> - <if condition="$vboptions['shoutbox_allowimage'] == 1"><phrase 1="<a href='misc.php?$session[sessionurl]do=bbcode#imgcode' class='small' target='_blank'>" 2="$vbphrase[shoutbox_enabled]" 3="</a>">$vbphrase[shoutbox_imgcode_enabled_disabled]</phrase><else /><phrase 1="" 2="$vbphrase[shoutbox_disabled]" 3="">$vbphrase[shoutbox_imgcode_enabled_disabled]</phrase></if> - <if condition="$vboptions['shoutbox_allowhtml'] == 1"><phrase 1="" 2="$vbphrase[shoutbox_enabled]" 3="">$vbphrase[shoutbox_html_enabled_disabled]</phrase><else /><phrase 1="" 2="$vbphrase[shoutbox_disabled]" 3="">$vbphrase[shoutbox_html_enabled_disabled]</phrase></if> ]</b></smallfont>
<br/></td>
</tr>
<tr class="">
<td width="100%"><input type="submit" name="comment_submit" value="$vbphrase[shoutbox_shout_now]" class="bginput" tabindex="3" accesskey="s"></form></td>
</tr>
</form>
</tbody>
</table> <else /><br/><center><normalfont><b>$vbphrase[shoutbox_noshoutperms]</b></normalfont></center><br/></if></if><br/>
<br/>
<if condition="$vboptions['shoutbox_showtopshouters'] == 1">
<table cellpadding="5" border="0" width="100%">
<tr>
<td class="thead" width="100%">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('shoutbox_topshouters')"><img id="collapseimg_shoutbox_topshouters" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_shoutbox_topshouters].gif" alt="" border="0" /></a>
<normalfont><b>$vbphrase[shoutbox_shoutbox_leaderboard]</b></normalfont></td>
</tr>
</table>
<table cellpadding="5" cellspacing="0" border="0" width="100%">
<tbody id="collapseobj_shoutbox_topshouters" style="$vbcollapse[collapseobj_shoutbox_topshouters]">
$topshouterbits
</tbody>
</table>
</if>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- <table cellpadding="3" cellspacing="3" border="0" width="100%"> -->
<!-- </table> -->
<table cellpadding="2" cellspacing="0" border="0" width="$stylevar[tablewidth]" align="center">
<tr>
<td width="50%" align="left">
$pagenav
</td>
</tr>
</table>
<center>$shoutbox_copyright</center>
$footer
</body>
</html>