vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Chat Modifications - Dion Dev Shoutbox v2.0 (uses AJAX) (https://vborg.vbsupport.ru/showthread.php?t=210126)

CFodder 04-05-2009 07:13 PM

Quote:

Originally Posted by DionDev (Post 1784363)
... Cfodder I checked your site and it seems to be quite slow. This lag could cause a large delay in the AJAX response ...

Slow it could possibly be, but the shouts appear in the archive immediately and I don't think it would be that slow that they still don't appear after 2 days in the main shoutbox area.

Reycer 04-05-2009 09:34 PM

Also, is there any way that we would be able to see the IP's of the Guest Comments?

DionDev 04-07-2009 08:50 PM

Quote:

Originally Posted by mdelcour (Post 1784627)
Also, is there any way that we would be able to see the IP's of the Guest Comments?

i'll add it to the next version list.

Reycer 04-10-2009 04:21 PM

um. We discovered today that the shoutbox dosen't recognize characters such as "&" or "$" any reason why?

DevJw 04-12-2009 01:42 PM

Quote:

Originally Posted by columbonet (Post 1783077)
Is there an edit I can do to allow mods to delete chatbox posts? We only have 2 admins and don't have time to monitor the chatbox.

I editted shoutshow.php so supermoderators can now also delete shouts.
Find:
PHP Code:

if ($vbulletin->userinfo['permissions']['adminpermissions']) 

New:
PHP Code:

  if ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) 

Quote:

Originally Posted by mdelcour (Post 1788310)
um. We discovered today that the shoutbox dosen't recognize characters such as "&" or "$" any reason why?

I've edited shoutinsert.js and now it works.
At the end of the file:
Code:

  var url = 'shoutinsert.php';
  var params = 'body=' + document.getElementById('body').value;

I changed it to:
Code:

  var url = 'shoutinsert.php';

  var value = document.getElementById('body').value;
  if (encodeURIComponent) {
    url = encodeURIComponent(value);
  } else {
    url = escape(value);
  }
 
  var params = 'body=' + url;


Note to the creator:
I had to change line 44 in shoutshow.php because it was not showing the time.
Old:
PHP Code:

$shout_time vbdate($vbulletin->options['ddsb_time'], $row['shout_time']); 

New:
PHP Code:

$shout_time date($vbulletin->options['ddsb_time'], $row['shout_time']); 


DionDev 04-16-2009 11:46 AM

Quote:

Originally Posted by DevJw (Post 1789573)
I editted shoutshow.php so supermoderators can now also delete shouts.
Find:
PHP Code:

if ($vbulletin->userinfo['permissions']['adminpermissions']) 

New:
PHP Code:

  if ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) 


I've edited shoutinsert.js and now it works.
At the end of the file:
Code:

  var url = 'shoutinsert.php';
  var params = 'body=' + document.getElementById('body').value;

I changed it to:
Code:

  var url = 'shoutinsert.php';

  var value = document.getElementById('body').value;
  if (encodeURIComponent) {
    url = encodeURIComponent(value);
  } else {
    url = escape(value);
  }
 
  var params = 'body=' + url;


Note to the creator:
I had to change line 44 in shoutshow.php because it was not showing the time.
Old:
PHP Code:

$shout_time vbdate($vbulletin->options['ddsb_time'], $row['shout_time']); 

New:
PHP Code:

$shout_time date($vbulletin->options['ddsb_time'], $row['shout_time']); 


Thos are some great fixes! By the way, you should use the vbdate function. It is a vbulletin function which is like the php date() function, but I believe it also shows the date in the time zone the user specified in their profile.

adiboy.net 04-20-2009 03:05 PM

Can the time and date be on the extremely left instead of on the right?

Chadi 04-21-2009 03:19 AM

Can someone please explain how to get this working if I uploaded all the files neatly inside a directory called "shoutbox"? I tried already, modified the files and couldn't get this working

I changed all instances of:

require_once('global.php');

to

require_once('/global.php');

I changed the template code to add /shoutbox/ before the shoutbox.php code, still didn't work.

DionDev 04-21-2009 04:44 AM

Quote:

Originally Posted by Chadi (Post 1795668)
Can someone please explain how to get this working if I uploaded all the files neatly inside a directory called "shoutbox"? I tried already, modified the files and couldn't get this working

I changed all instances of:

require_once('global.php');

to

require_once('/global.php');

I changed the template code to add /shoutbox/ before the shoutbox.php code, still didn't work.

It won't work that way because the shoutbox uses paths relative to the main vbulletin directory.

Maybe the next version I release will be in its own folder.

Milez 04-23-2009 08:08 PM

Quote:

Originally Posted by DionDev (Post 1795704)
Maybe the next version I release will be in its own folder.

Sweet as soon as this happens I will try this on my big board. Awesome plugin (have tested it) with a very active and dedicated designer - so refreshing! Great work Dion.

Uhm, any time frame on the changes? I can beta test ;)

DionDev 04-24-2009 07:09 AM

Expect version 2.1 within the next couple of weeks.

adiboy.net 04-24-2009 07:14 AM

Some noob questions and feedback. :D

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?

DionDev 04-24-2009 08:44 PM

Quote:

Originally Posted by adiboy.net (Post 1797969)
Some noob questions and feedback. :D

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

bc641990 04-26-2009 10:56 PM

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

mikey1991 04-27-2009 10:49 PM

thanks for this

Tagged, Nominated and Installed

mysql101 04-28-2009 02:19 AM

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).

mysql101 04-28-2009 03:23 AM

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.

DionDev 04-28-2009 11:52 AM

mysql101, that is an excellent hack, and I will be testing it out myself and implementing it into the next version!

keharris53 04-28-2009 07:05 PM

Any way to add a shoutbox to a specific sub forum, i.e. "forumdisplay.php?f=57"? Thanks.

mysql101 04-29-2009 12:53 AM

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.

TheInsaneManiac 04-30-2009 06:54 PM

can you put the files in their own folder. My ftp is already messy enough.

Milez 05-04-2009 07:49 AM

Dion any chance you will be updating this with mysql's changes and putting it into its own folder soon? Just checking on the status, it's a great mod!

kyrenator 05-04-2009 09:19 AM

works perfect :)

thanks

matt691 05-05-2009 08:41 AM

thanks installed it yesterday but forgot to mark it.

very good mod thanks

but only one issue so far is that the pound symbol (£) comes up as an A with two dots above it or something similar not sure about other special characters but as this can be a popular one is there a way to fix it?

DionDev 05-06-2009 10:25 PM

Quote:

Originally Posted by Milez (Post 1804172)
Dion any chance you will be updating this with mysql's changes and putting it into its own folder soon? Just checking on the status, it's a great mod!

I will be in the near future, I have just been really busy with other things.

Version 2.1 will include some of the hacks posted in this thread, will be in its own folder, and will have a collapsable box style that flows better with the forums.

stud 05-06-2009 10:39 PM

any ETA on that new version?

DionDev 05-08-2009 06:34 AM

Quote:

Originally Posted by stud (Post 1806096)
any ETA on that new version?

1-2 weeks.

m0rgulvale 05-08-2009 09:49 PM

i got some weird errors today... any ideas what is wrong? should i do DB repair function or is this not a big deal?

First Error:

Database error in vBulletin :

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections
/home/laserpoi/public_html/laser_pointer_forums_3/forum/includes/class_core.php on line 311

MySQL Error :
Error Number :
Request Date : Friday, May 8th 2009 @ 05:22:21 PM
Error Date : Friday, May 8th 2009 @ 05:22:21 PM
Script : http://laserpointerforums.com/laser_.../shoutshow.php
Referrer : http://laserpointerforums.com/laser_...m/shoutdiv.php
IP Address : x.x.x.x
Username :
Classname : vB_Database
MySQL Version :



After that i got more errors like this:


Database error in vBulletin 3.8.2:

Invalid SQL:
SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>1241763334;

MySQL Error : Out of memory (Needed 1048548 bytes)
Error Number : 5
Request Date : Friday, May 8th 2009 @ 05:22:14 PM
Error Date : Friday, May 8th 2009 @ 05:22:23 PM
Script : http://laserpointerforums.com/laser_.../shoutshow.php
Referrer : http://laserpointerforums.com/laser_...m/shoutdiv.php
IP Address : x.x.x.x
Username : asdasdasd
Classname : vB_Database
MySQL Version :

m0rgulvale 05-08-2009 09:52 PM

here are mysql and php settings:

PHP Max Post Size 80.00 MB
PHP Maximum Upload Size 40.00 MB
PHP Memory Limit 256.00 MB

MySQL Packet Size 36.00 MB

should i change any of this stuff around?

computergeek 05-09-2009 03:14 AM

I was using the old shoutbox 2 from like 2006 or something. it used a flat file to pull data to the box for the 50 posts. It had almost 0 server load.

https://vborg.vbsupport.ru/showthread.php?t=93097

maybe this will help you for the next version.

However i can't confirm it but i think that version is weak on security. Have had to injections to my server from vbulliten even after the latest upgrade adn the only thing i can see that is still not updated was this old hack.

So be careful with any code you use from that link if you do.

Anxiously await update! the secial characters fix didn't work for me.

i even tried all this

Code:


  var value = document.getElementById('body').value;
  var amp = "%26";
  txt = value.replace(/&/gi, amp)
  var params = 'body=' + txt;

i checked the DB too and it never makes it. Every character works except for the ampersand... no matter what i try, even escape().

irritating!

DionDev 05-09-2009 05:03 AM

This version is no longer supported, as I have released a new version:

https://vborg.vbsupport.ru/showthread.php?t=213225

Geez 05-29-2009 12:49 AM

I installed this (running 3.8.2) and an error message showed up on the forum index when i completed the installation by pasting the text into the FORUMHOME template:


Quote:

.....................................result resource in [path]/shoutshow.php on line 12
(could not copy the entire error message)



i uploaded all the extra files and everything.

adrianobr 05-30-2009 08:39 PM

Very good ...

Seems a very efficient system, I USAL on my forum.
Would have a problem to make some adjustments to work with vbadvanced?

Thanks
adrianobr

socalmike 07-29-2009 05:54 PM

Oops, maybe I should read the other posts as this has come up before. Sorry :)
_____________________________________

Help, I just upgraded to VB 3.8.3 and then added the latest version of the Shoutbox but . . .

Getting an error emailed to me:

Database error in vBulletin :

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Can't
connect to MySQL server on '205.178.146.72' (4)
/data/13/1/147/147/1310636/user/1403651/htdocs/forum/includes/class_core.php on line
311

MySQL Error :
Error Number :
Request Date : Wednesday, July 29th 2009 @ 02:40:03 PM
Error Date : Wednesday, July 29th 2009 @ 02:41:03 PM
Script : http://www.chasingthechuckwagon.com/forum/shoutshow.php
Referrer : http://www.chasingthechuckwagon.com/forum/shoutdiv.php
IP Address : 79.31.23.58
Username :
Classname : vB_Database
MySQL Version :

It appears the shoutbox is working great but I believe I am getting this error sent to me with each Shout! posting.

Any ideas?

Thanks,

Mike

ricardoNJ 08-16-2009 06:03 AM

Everything is installed well but I can see the shoutbox in my forum! :(

ricardoNJ 08-16-2009 03:43 PM

Hi, is there any way to see any characters in spanish language like: "canción, España", ecc???

gr8whtd0pe 08-20-2009 01:22 AM

To make it collapseable I just wrapped it in this:

Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr>
<td class="tcat" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_shoutout')"><img id="collapseimg_forumhome_shoutout" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
                        Shout Out!
                </td>
        </tr>
</thead>
<tbody>
        <tr>
                <td class="alt2" colspan="2" id="collapseobj_forumhome_shoutout">

Then after his code:

Code:

</td></tr></tbody></table>
<br />

Demo:
http://www.wvmotorsports.com

ricardoNJ 08-25-2009 11:51 PM

Uninstalled 'cause my hosting said! :(

goxy63 10-16-2009 12:09 PM

Quote:

Originally Posted by ricardoNJ (Post 1874460)
Uninstalled 'cause my hosting said! :(

Get better host plan, Iam on hostgator shared one and its no problem or just sometimes...

This is one of mods that I "must" have on vb4, as now on vb3.8 bunch of users are using this one
Iam using previous version where even guests can comment (as this is bringing even more interest and registrations)

Hope that developer will work on it, ready for small donation regarding to brandfree

Cheers

Drocr 11-04-2009 04:21 AM

This is the best chatbox, I just wish there were no bugs, please update it!


All times are GMT. The time now is 01:36 PM.

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.01459 seconds
  • Memory Usage 1,867KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (8)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete