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

Reply
 
Thread Tools
Dion Dev Shoutbox v2.0 (uses AJAX) Details »»
Dion Dev Shoutbox v2.0 (uses AJAX)
Version: 2.00, by DionDev DionDev is offline
Developer Last Online: Aug 2012 Show Printable Version Email this Page

Category: Chat Modifications - Version: 3.8.2 Rating:
Released: 04-01-2009 Last Update: 04-01-2009 Installs: 43
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Preview:

http://www.diondev.com/vb

Screenshots:

(see attached)

Features:

- Uses AJAX so new shouts show up without the page having to be refreshed
- Set the title and other language features to anything you want
- Will ignore empty shouts, and ones that are being repeated one after the other
- Enter how many shouts you want it to show
- Enter how many days you want it to store shouts in the database (even forever)
- Enable or disable guest shouting
- Members names are linked to their profile pages
- Admins can delete shouts directly through the shoutbox itself
- A fully customizable shout archive with pagination
- Works with any custom theme automatically
- Parses BBcode, smilies, and images if you allow it to
- Installation takes about 5 minutes and is all done through the admin CP
- You can even modify the amount of time it waits in between checking for new shouts
- Plus lots more!

Installation instructions:

1.a) Extract the "ddshoutbox2.zip" file onto your computer using a program like winrar, or winzip

2. Log in to your admin CP, everything will be done within here

3.a) Go to Plugins & Products -> Manage Products
3.b) Click on the "[Add/Import Product]" link
3.c) Browse for the "product-ddsb2.xml" file
3.d) Click on the "Import" button

4. Upload all the ".js" and ".php" files into your main vbulletin directory (the same directory as index.php)

5 Decide where you want the shoutbox on your site (I recommend the top of your forum index)

If you want the shoutbox at the top of your forum index, go to the "FORUMHOME" template, find:
"<!-- / guest welcome message -->
<br />
</if>"
Copy and paste the contents of "template.txt" underneath.

If you want it at the top of every page, go to the "navbar" template, find:
"<!-- / nav buttons bar -->
<br />"
Copy and paste the contents of "template.txt" underneath.

6.a) Go to vBulletin Options -> vBulletin Options
6.b) Select "Dion Dev Shoutbox v2.0 Options"
6.c) Click on the "Edit Settings" button
6.d) Edit all of the values as you desire
6.e) Click on the "Save" button

Additional options:

1. If you want to change the time in which it checks for new shouts, open up "shoutshow.js" with notepad, find "timeint = 2000" at the top of the file, and change "2000" to the time (in milliseconds) you want it to wait before checking for new shouts. 1 second equals 1000 milliseconds. If you want shouts to show up faster, set it to a lower number. If you are worried about server load, set it higher. Don't forget to upload it to your server after you change it so the new timer takes effect.

2. You can edit the shoutbox width and height by changing the iframe width="100%" and height="200" attributes from the "template.txt" file.

You're done! Please donate anything you can spare to donations@diondev.com before removing my copyright notice.

Download Now

File Type: zip ddshoutbox2.zip (9.5 KB, 538 views)

Screenshots

File Type: jpg ddsbadmin.jpg (119.7 KB, 0 views)
File Type: gif ddshoutbox2.gif (12.7 KB, 0 views)

Show Your Support

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

Comments
  #52  
Old 04-24-2009, 07:09 AM
DionDev DionDev is offline
 
Join Date: Mar 2008
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Expect version 2.1 within the next couple of weeks.
Reply With Quote
  #53  
Old 04-24-2009, 07:14 AM
adiboy.net adiboy.net is offline
 
Join Date: Nov 2005
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Some noob questions and feedback.

Question 1
Is this shoutbox server intensive?

Question 2
Will there be pruning after, say, 24 hours or 48 hours?

Question 3
Can admin have the choice to position the the date/time be on the extremely left or right?

Question 4
Will this work with forums with vBSEO installed?
Reply With Quote
  #54  
Old 04-24-2009, 08:44 PM
DionDev DionDev is offline
 
Join Date: Mar 2008
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adiboy.net View Post
Some noob questions and feedback.

Question 1
Is this shoutbox server intensive?

Question 2
Will there be pruning after, say, 24 hours or 48 hours?

Question 3
Can admin have the choice to position the the date/time be on the extremely left or right?

Question 4
Will this work with forums with vBSEO installed?
1. no.

2. you set the pruning timer to however many days you want.

3. that can be done by editing one of the php files

4. yes
Reply With Quote
  #55  
Old 04-26-2009, 10:56 PM
bc641990 bc641990 is offline
 
Join Date: Apr 2007
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question 1
Can this be styles to something like Inferno Shoutbox?

i only have one question :-D

download, i hate iframes, but this is the fast shoutbox around
Reply With Quote
  #56  
Old 04-27-2009, 10:49 PM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this

Tagged, Nominated and Installed
Reply With Quote
  #57  
Old 04-28-2009, 02:19 AM
mysql101 mysql101 is offline
 
Join Date: Aug 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice simple shoutbox.

my only problem with it is that the ajax redraws the entire content of the text shown to the users every 2 seconds. You can increase the timer, but it's worthless as it makes the shoutbox feel laggy.

The proper way to do it is to append only new content to the output div OR have a hash of the last output to the user, and redraw only if the hash changes (new content to display).
Reply With Quote
  #58  
Old 04-28-2009, 03:23 AM
mysql101 mysql101 is offline
 
Join Date: Aug 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i made a quick hack to allow this shoutbox to work without redrawing constantly and add a userlist.

new table:

Code:
CREATE TABLE `shoutbox_hash` (
  `userid` int(11) NOT NULL default '0',
  `hash` varchar(128) NOT NULL default '0',
  `ts` int(10) NOT NULL default '0',
  UNIQUE KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



at the top of showshout.php, above the <table> tag, I have added:
Code:
ob_start ();

at the bottom, just after the </table>, I added:

Code:
$o = ob_get_contents ();
ob_clean ();

$hash = md5 ($o);

$user_id = $vbulletin->userinfo['userid'];

$q = "select hash from shoutbox_hash where userid = ".$user_id;
$res = $db->query ($q);
$row = mysql_fetch_assoc ($res);

if ($_REQUEST['hash'] != '1' || $row['hash'] != $hash) {
        $t = time () - 60;
        $q = "select u.username, u.userid from user u, shoutbox_hash h where h.userid = u.userid and h.ts > $t order by u.username";
        $res = $db->query ($q);
        $i = 0;
        $users = array ();
        while ($row = mysql_fetch_assoc ($res)) {
                $i++;
                $users[] = "<a target='_user' href='/member.php?u=".$row['userid']."'>".$row['username']."</a>";
        }
        if ($i) {
                echo "<b>Users in chat</b>: ".implode (", ", $users)."<br>";
        }

        echo $o;
}
$q = "replace into shoutbox_hash (userid, hash, ts) values (".$user_id.", '".$hash."', ".time ().")";
$db->query ($q);
Then in shoutshow.js, I replaced the setInterval with:

Code:
setInterval ("showshout('1');", 4000);

Finally, I replaced the showshout() function with:


Code:
function showshout(e)
{
  htmlrequest = ajaxfunction();

  if (htmlrequest == null)
  {
    alert ('Browser does not support HTTP requests');
    return;
  }

  htmlrequest.open('GET', 'shoutshow.php?hash=' + e, true);
  htmlrequest.setRequestHeader('If-Modified-Since', 'Thu, 01 Jan 1970 00:00:00 GMT');
  htmlrequest.onreadystatechange = statechanged;
  htmlrequest.send(null);
}


This change is a temp fix for me - it won't reduce server load, but it will reduce bandwidth consumption by a large margin.
Reply With Quote
  #59  
Old 04-28-2009, 11:52 AM
DionDev DionDev is offline
 
Join Date: Mar 2008
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mysql101, that is an excellent hack, and I will be testing it out myself and implementing it into the next version!
Reply With Quote
  #60  
Old 04-28-2009, 07:05 PM
keharris53 keharris53 is offline
 
Join Date: Jun 2007
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to add a shoutbox to a specific sub forum, i.e. "forumdisplay.php?f=57"? Thanks.
Reply With Quote
  #61  
Old 04-29-2009, 12:53 AM
mysql101 mysql101 is offline
 
Join Date: Aug 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking that once you generate the output for the display, it should be stored somewhere, and that is the only output used. Then whenever someone makes a post (to shoutinsert.php), you wipe it out. So anytime shoutshow.php is called and there is no stored content, you regenerate it.

That will reduce the server load portion.
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 04:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06107 seconds
  • Memory Usage 2,340KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete