Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] vBShout v2.0 Details »»
[AJAX] vBShout v2.0
Version: 2.0, by Zero Tolerance Zero Tolerance is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 07-27-2005 Last Update: 04-22-2006 Installs: 1831
Uses Plugins Template Edits
Additional Files  
No support by the author.

[high]Staff Edit/Update[/high]

I have released an updated version of this hack (version 2.0.1), this version fixes some security issues with this hack. All version prior to this one allow users to insert html in their shouts, this can cause problems with them using html that breaks the site layout or malicious javascript. Download the new zip file (vBshout_fixed.zip) and upload the new vbshout.php file to patch/upgrade. If you want to manual instructions they are in the zip file, in the file bugfixes.txt

Second Staff update

I've uploaded a new version of this hack, dubbed '2.0.2'. This one should fix the html injection issues without breaking special characters. To upgrade, download the new zip file and upload the new vbshout.php file.

Please note that this only fixes the html injection issues. I do not use this hack on my own forum (although I've tested this on a client's board) so I will not be fixing the server load issues. I suggest you do not install this hack if you can't deal with the extra server load, as it's rather intensive.

- Brad

[high]End staff edit[/high]

Well, been a while since I've been to vb.org and released anything, thought i'd break the trend and whip up something quick while I have a little spare time.

A shoutbox as you would assume, a very simple one to start off with, but does include AJAX Technology, which pushes the shoutbox 1 step closer to live, messages from other people will appear with no refreshing, and so will yours that you post

A preview is below, i'd estimate a 50 second installation max

Primary Features:
- AJAX Technology (no refreshing)
- Administration control an display element options
- Fast format editor

Change Log::

- v1.1:
WOL (Who's Online) Correction

- v1.2:
New Posting Featurs (Bold/Italic/Underline/Colour/Font)
Admin Controls

- Change location/position of shoutbox
- Change number of shouts displayed
- Switch vbcode/similes on/off
- v1.3
Firefox javascript issue fixed
New Admin Controls

- Command Activation
- Swtch extra format options on/off
- Change position of editor (above/below messages)
New Commands

- /prune (Clears the shoutbox completely)
- /prune [username] (Clears all shouts posted by specified user)
- v1.4
Usergroup HTML Markup For Usernames
Clear Editor Button
Emoticons Pop Up Menu
Time display configurated to vBulletin settings
Username Links To Profile
New Admin Conrols

New vBShout Position (Directly Above Forums)
Banned Users
Banned Usergroups
Banned Permissions
Smilie Pop-Up Box Height
Smilie Pop-Up Box Width
New Commands

"/me" - Action message (all users are able to use this command)
/pruneshout [shout] - Deletes a single shout
- v1.5
Improved Smilies Display
XHTML 1.0 Transitional Valid (couple of errors fixed)
New Admin Options

Shoutbox Height
Smilies To Show
Shout Messages Order
Banned Permissions (fixed)
- v1.6
Bug Fixes:

- Unable to delete shouts that used /me command fixed
- Shouts being displayed from bottom-upwards only showed first 20 shouts
Automatically parses URL's

- v2.0
New Archive

- Displays shouts and pages
- Stats and top 10 shouters
- AJAX Edit/Delete (staff can edit/delete all shouts)
Enjoy,

- Zero Tolerance

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #452  
Old 09-04-2005, 10:51 PM
zemic zemic is offline
 
Join Date: Sep 2004
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats a point actually! Stupid question........ if they collapse it, does that mean it doesnt load the shoutbox at all when the page is loaded? or does it load the shoutbox, just not display it?
Reply With Quote
  #453  
Old 09-05-2005, 05:06 AM
whitetigergrowl whitetigergrowl is offline
 
Join Date: Jun 2004
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by zemic
Thats a point actually! Stupid question........ if they collapse it, does that mean it doesnt load the shoutbox at all when the page is loaded? or does it load the shoutbox, just not display it?
I've never noticed a performance hit on my website with it collapsed. It may still load it, but as long as its collapsed, anytime they visit the site, it will remain collapsed.

But that duplicate smiley issue REALLY needs to be fixed. Otherwise, its a neat little box!
Reply With Quote
  #454  
Old 09-08-2005, 12:34 PM
thecool thecool is offline
 
Join Date: Jul 2005
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

morning folks, i have vbShout 2.0 installed, but i can't get to the archive, the shoutbox link isn't clickable.

whats the code to make the like clickable and where do i put it?

also, i don't have [edit][delete][add settings] when i go to vbshout options in the general options control panel
Reply With Quote
  #455  
Old 09-08-2005, 04:00 PM
y2krazy y2krazy is offline
 
Join Date: Jun 2003
Location: Houston, Texas
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #456  
Old 09-08-2005, 05:21 PM
ckmarkhsu ckmarkhsu is offline
 
Join Date: Nov 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

work great ...good hack
Reply With Quote
  #457  
Old 09-08-2005, 08:29 PM
Metro Man Metro Man is offline
 
Join Date: Dec 2003
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Error in RC3

this error on shoutbox an then the user is logout

15Warning: Invalid argument supplied for foreach() in /vbshout.php on line 288
Reply With Quote
  #458  
Old 09-09-2005, 05:30 AM
Vizionz Vizionz is offline
 
Join Date: Jul 2003
Location: Chicago
Posts: 524
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works fine for me i just doing it from scratch though so maybe just remove it and reinstall
Reply With Quote
  #459  
Old 09-09-2005, 05:34 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to have smilies show up as inline images (class="inlineimg") like it does in the shout edit/delete area? That would help with shouts where smilies throw the line off.
Reply With Quote
  #460  
Old 09-09-2005, 11:56 AM
Schwartz12 Schwartz12 is offline
 
Join Date: Apr 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

not sure if this has been answered, but any chance on replicating this into a chatroom system?

It's really good. My users absolutely love it.

Mainly I would just want it on a seperate page than the homepage and have a "users in the chat" on the homepage.

But I believe the AJAX part is what people like about it.

Is AJAX very server intensive?
Reply With Quote
  #461  
Old 09-09-2005, 06:21 PM
Valter Valter is offline
 
Join Date: Aug 2005
Location: Sarajevo
Posts: 2,432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Metro Man
Error in RC3

this error on shoutbox an then the user is logout

15Warning: Invalid argument supplied for foreach() in /vbshout.php on line 288
Just go to options and choose to hide completely Shoutbox for users who have no permissions to view shouts.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07032 seconds
  • Memory Usage 2,338KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete