nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

machmanx

Thanks, nneonneo, I don't know what I was thinking when I put that memory increase code in the yshout.js file when it was a PHP error, lol.  I put that code in the yshout.php, added the global variables and now, I haven't had a PHP error since Sept. 30 :D  Now everything is going fine, sweet.

Now I had a question, why does the shoutbox slow down sometimes or fail to scroll automatically sometimes?  I have to refresh the page to fix the autoscroll problem.  So why does this happen?

KnottyMars

#4001
Great shoutbox, Ive been learning alot reading in this topic. I really like the ability to customize this the way you want. Im a bit new, but wanted to know how to change the position of the timestamp.

I followed directions in page 150 something and removed the today and the seconds.

It has moved the time to the left of the user name which is different from what it was. Example:

This is what is was:
[12:00:00]
KnottyMars: <shout text>

This is what it is now:

[12:00:00] KnottyMars: <shout text>

How can I put the user name on the next line, I have the timestamp small so it doesnt make the window much bigger, I know this must seem like a huge newb question, but Im still learning the basics.

One other question, when the SB first loads, it defaults to the top, then after a second or so, the scroll bar (thanks for that also on page 157) moves to the bottom. Is there anyway that it can default to the bottom of the shouts. Keep in mind that I DONT want to reverse the shout order, I know how to do that. I just want it to default to the bottom of the shouts instead of the top.

At least I managed to get this far without buggering up the SB lol.

Forum: www.world-racers.com/forum (both issues are viewable)

Ive just turned guest view on. Thanks for any help you can give  :D

Pяηѕѕ LF

hello,

it's possible if I create an action=shoutbox page I put this shoutbox in this page?

thanks.

1.1.21 Default

nneonneo

@MothMan: I am not sure about the Global Headers and Footers mod. However, I do know that moving the shoutbox(); call in index.template.php to right after
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

then it should show up where you want it (after the Info Center).

@F.L.A.M.E.R: I just mean that there should be absolutely nothing before the very first <?php and absolutely nothing after the last ?>. Some text editors may put extra garbage into these files which makes things not work.

@machmanx: The scroll issue is probably a client-side thing (i.e. in the Javascript), and I'm not sure what you mean about the shoutbox slowing down (might be a hosting problem, or again a client-side issue). What browser are you using, and are the problems showing on other browsers or other accounts?

@KnottyMars: If you just want the timestamp and the username separated, like this:
[01:23 PM]
username: hello world

then it is doable by editing preg_timeformat, and adding
<br />
to the end of the return statement, which will insert a line break after the time stamp.

@ア尺乇刀丂乇丂: I know that people have had success using the Site Integration Mod to this effect: see http://www.simplemachines.org/community/index.php?topic=137508.msg1715050#msg1715050
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Adish - (F.L.A.M.E.R)

Quote@F.L.A.M.E.R: I just mean that there should be absolutely nothing before the very first <?php and absolutely nothing after the last ?>. Some text editors may put extra garbage into these files which makes things not work.

Nothings there. Its all right there. Still a problem :(

nneonneo

Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Adish - (F.L.A.M.E.R)


picos

Quote from: nneonneo on September 30, 2008, 10:00:03 PM
@picos: Hmm, it kind of sounds like the same problem as F.L.A.M.E.R. I don't know why this happens. I added some protection against hacking in the latest version (otherwise users may be able to delete shouts without permission). As long as the shouts were generated on 1.21 and the shoutbox is 1.21, it *should* work, but I think the login problem may have something to do with it. Are you at least able to delete forum posts? How about shoutbox bans?

Hi, I fixed the problem with signing in and the cookies... but the error still appears when trying to delete shouts.  I cleared the cache etc and still it errors.  I turned off the gzipCompression (false)  but that never helped.

nneonneo

@F.L.A.M.E.R: You will have to ask your host about it. I can't see anything wrong with the file, and it works fine on my host.

@picos: May I take a look at your forum, under an account which can delete shouts?
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

machmanx

This is the new error I get, just by clicking on "History":-

Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 437 bytes) in /home2/megablas/public_html/forum/yshout/class.tail.php on line 228

I'm assuming this is due to the home.txt getting full?

Isn't there a way the home.txt can be archived on it's own?  So every time memory gets full, the shoutbox archives the chat into a file in a folder and then clears home.txt?

nneonneo

How big is history.home.txt?
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

machmanx

I've deleted the file, my bad.  It was 16.xx MB in size.  But now the shoutbox is ok.  It's still a hassle to have to clear it.  This would make it 20 days, but now that my site is more popular, I expect that number to go down, which means more cleanups. :(

nneonneo

#4012
Hmm, now that you mention it, I think there might be a way to clear the history.

It would, unfortunately, require that someone actually uses the History page once in a while (before it becomes too big, that is), but hopefully that will not be too much of a problem (if no one uses History, you can just disable it by setting $historyPath to '')

In yshout.php, change $mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);

to
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines(10000); // number of lines to keep, change this to whatever you need
$text=$mytail->output(PLAIN);
$handle=fopen($historyPath,"w");
fwrite($handle, $text);
fclose($handle);
$mytail = new tail($historyPath);
$mytail->setGrep(".*");
$mytail->setNumberOfLines($n);
$text=$mytail->output(PLAIN);


Basically, this will run the tail function twice. The first prunes the file to 10000 lines (user-specifiable), and the second actually produces the real output. While somewhat wasteful, as long as people aren't constantly requesting your history file, it should be fine.

EDIT: To make it work 100%, you also need to hack class.tail.php:
change
$post_line = "\n";
to
$post_line = "";
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Adish - (F.L.A.M.E.R)

Quote from: nneonneo on October 04, 2008, 05:13:38 PM
@F.L.A.M.E.R: You will have to ask your host about it. I can't see anything wrong with the file, and it works fine on my host.

Ok, What exactly i have to ask them ? I think it maybe due to javascript usage, but if its so then the command button also wont be working. Actually the whole shoutbox. Any help will be appritiated. :)

Stef001

Can i already use the Advanced Shoutbox in SMF 2.0 Beta 4?
SMF 2.0.2 | SimplePortal 2.3.5

jepot5

I am trying to use Adv_sb 1.21 for 1.1.6 and I am getting a package corrupted error. Please help.

nneonneo

@Normally: Yes. See the bottom of http://www.simplemachines.org/community/index.php?topic=137508.msg1730702#msg1730702

@jepot5: Hmm. Maybe you can try remaking the package; just extract it all out and put the contents in a new zip file. If that doesn't work, you will have to do a manual install...

@F.L.A.M.E.R: Commands work? That's really weird. Maybe it is something odd in the History file.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

Adish - (F.L.A.M.E.R)

Quote from: nneonneo on October 05, 2008, 01:51:48 PM
@F.L.A.M.E.R: Commands work? That's really weird. Maybe it is something odd in the History file.

I am going to fall of laughter, comon some solution by any chance...! i am out of all options i think. :(

itisme1760

On my site where the shoutbox is installed (http://www.laatedaa.com/forums/ [nofollow]) the shoutbox pops up for 1 sec, then goes away (no it is not in the news header).  But it still shows "Shoutbox" on top, just no shoutbox to be seen!

How can I fix this?  Thanks.

jamie-16

How do you make this go in middle of forum ?

Advertisement: