I changed the basic layout of the archive page and added a footer to the template, like I do with all the other hacks to make them look more streamlined with the forums. Screenshot is included.
Phrase Manager -> Add New Phrase
Varname: vbshout_footer
Text: Powered by <b>vBShout</b> v2.0 by <a href="http://www.infernotechnologies.net/" target="_blank">Zero Tolerance</a>
Style Manager -> Choose the Style to Edit -> "forumhome_vbshout_archive"
Replace entire template with:
Code:
<script type='text/javascript'>
<!--
postingShout = false
function _ShoutControl()
{
this.shoutid = -1
this.active = false
}
_ShoutControl.prototype.Delete = function (shoutid)
{
if (!this.active)
{
if (confirm('Are you sure to want to delete this shout message?'))
{
return this.DoDelete(shoutid)
}
}
return false
}
_ShoutControl.prototype.DoDelete = function (shoutid)
{
this.active = true
this.shoutid = shoutid
doDel = new vB_AJAX_Handler(true)
doDel.onreadystatechange(DeleteDone)
doDel.send('vbshout.php', 'do=deleteshout&id=' + this.shoutid)
return false
}
_ShoutControl.prototype.Edit = function (shoutid)
{
if (shoutid != this.shoutid)
{
if (this.active)
{
this.cancelActive(this.shoutid)
}
this.active = true
this.shoutid = shoutid
// Activate Editor
fetch_object('shout_message_edit_' + this.shoutid).style.display = ''
fetch_object('shout_message_' + this.shoutid).style.display = 'none'
}
return false
}
_ShoutControl.prototype.cancelActive = function (shoutid)
{
// Deactivate Editor
fetch_object('shout_message_edit_' + this.shoutid).style.display = 'none'
fetch_object('shout_message_' + this.shoutid).style.display = ''
return false
}
_ShoutControl.prototype.Save = function ()
{
if (this.active)
{
doShout = new vB_AJAX_Handler(true)
doShout.onreadystatechange(SaveDone)
if (postingShout)
{
alert('Posting in progress..')
return false
}
ShoutMsg = fetch_object('shout_message_editor_' + this.shoutid).value
if (ShoutMsg.replace(/ /g, '') == '')
{
alert('You must enter a shout!')
return false
}
doShout.send('vbshout.php', 'do=editshout&id=' + this.shoutid + '&shout=' + PHP.urlencode(ShoutMsg))
postingShout = true
}
return false
}
Shout = new _ShoutControl
function SaveDone()
{
if (doShout.handler.readyState == 4 && doShout.handler.status == 200)
{
postingShout = false
Shout.active = false
Shout.cancelActive(Shout.shoutid)
fetch_object('shout_message_' + Shout.shoutid).innerHTML = doShout.handler.responseText
Shout.shoutid = -1
}
}
function DeleteDone()
{
if (doDel.handler.readyState == 4 && doDel.handler.status == 200)
{
ShoutID = Shout.shoutid
postingShout = false
Shout.active = false
Shout.shoutid = -1
if (doDel.handler.responseText == 'true')
{
fetch_object('shout_top_' + ShoutID).parentNode.removeChild(fetch_object('shout_top_' + ShoutID))
}
}
}
-->
</script>
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td width='175' valign='top'>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="175" align="center">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_vbshout_stat')"><img id="collapseimg_forumhome_vbshout_stat" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_vbshout_stat].gif" alt="" border="0" /></a>
Statistics
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_vbshout_stat" style="$vbcollapse[collapseobj_forumhome_vbshout_stat]">
<tr>
<td class="alt1" align="left">
<span class="smallfont"><b>Total Shouts:</b> $TS</span>
</td>
</tr>
<tr>
<td class="alt1" align="left">
<span class="smallfont"><b>Past 24 Hours:</b> $T4</span>
</td>
</tr>
<tr>
<td class="alt1" align="left">
<span class="smallfont"><b>Your Shouts:</b> $TY</span>
</td>
</tr>
</tbody>
</table>
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="175" align="center">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_vbshout_top')"><img id="collapseimg_forumhome_vbshout_top" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_vbshout_top].gif" alt="" border="0" /></a>
Top 10 Shouters
</td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_vbshout_stat" style="$vbcollapse[collapseobj_forumhome_vbshout_stat]">
$TopTen
</tbody>
</table>
</td>
<!-- Spacer Cell -->
<td width="15"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="15" /></td>
<!-- / Spacer Cell -->
<td width='100%' valign='top'>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" align="left">
Shouts
</td>
</tr>
$Output
<tr>
<td class="tcat" align="right"><span class="smallfont">$vbphrase[vbshout_footer]</span></td>
</tr>
</table>
</td>
</tr>
</table>
$pagenav
Style Manager -> Choose the Style to Edit -> "forumhome_vbshout_archive_shout"
Replace entire template with:
Code:
<tbody id="shout_top_{$Shout['sid']}">
<tr>
<td class="thead" align="left">
<span style='float:right'>{$Shout['time']}</span>
<a href="member.php?{$session['sessionurl_q']}u={$Shout['s_by']}">{$Shout['username']}</a>
</td>
</tr>
<tr>
<td class="alt1" width="1%" align="left" id="shout_{$Shout['sid']}">
<if condition="$bbuserinfo[userid] == $Shout[s_by] OR can_moderate()">
<span class="smallfont" style='float:right'>
[<a href='#' onclick='return Shout.Edit({$Shout['sid']})'>Edit</a> | <a href='#' onclick='return Shout.Delete({$Shout['sid']})'>Delete</a>]
</span>
</if>
<span class="smallfont" id="shout_message_edit_{$Shout['sid']}" style='display:none'><input type='text' id='shout_message_editor_{$Shout['sid']}' value='{$Shout['msg_safe']}' style="width: 50%" class="bginput" /> <input type='button' class='button' onclick='Shout.Save()' value='Save' /></span>
<span class="smallfont" id="shout_message_{$Shout['sid']}">
<if condition="!$Shout[s_me]">
{$Shout['s_shout']}
<else />
<span class='highlight'>
*{$Shout['username']} {$Shout['s_shout']}*
</span>
</if>
</span>
</td>
</tr>
</tbody>
Style Manager -> Choose the Style to Edit -> "forumhome_vbshout_archive_topshouter"
Replace entire template with:
Code:
<tr>
<td class="alt1" align="left">
<span class="smallfont"><strong><a href="member.php?{$session['sessionurl_q']}u={$TTS['s_by']}">{$TTS['username']}</a>:</strong> {$TTS['TS']}</span>
</td>
</tr>
You can test the vBShout out yourself at my site if you wish, too(see my sig for a link).