nneonneo's Shoutbox

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

Previous topic - Next topic

DeviDarkL

I tried error_reporting(0) and doesn't work  :'( any help?  :D

Shadow03

How do I decrease the amount of shouts shown on the shoutbox before they move to the history? There are like 20 shouts shown and none of them are disappearing...

nneonneo

@DeviDarkL: What's the problem you are trying to solve?

@Shadow03: $maxLines in yshout/settings.php
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!

DeviDarkL

I got some errors that pop up like:

Quote
Notice: Undefined index: forum in /home/chromeso/public_html/smf/Sources/Subs.php on line 4013

Notice: Undefined index: PortaMx in /home/chromeso/public_html/smf/Sources/Subs.php on line 4015

Notice: Undefined index: pmx_settings in /home/chromeso/public_html/smf/Sources/Subs.php on line 4043

Notice: Undefined index: pmx_blocks in /home/chromeso/public_html/smf/Sources/Subs.php on line 4048

Notice: Undefined index: PortaMx in /home/chromeso/public_html/smf/Sources/Subs.php on line 4289

I tried to add error_reporting(0) in yshout.php but the errors don't disappear, could you help me?  :)

nneonneo

Try adding
//-> start add PortaMx
require_once($sourcedir . '/PortaMx/PortaMx.php');
//-> end add PortaMx

after
require_once($sourcedir . '/Security.php');

in SSI.php.
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!

DeviDarkL

Didn't work either, the errors continue to pop up  :'(

bfeo

Quote from: nneonneo on November 15, 2008, 11:54:05 AM
@bfeo: Normally, under the chatbox refresh style ($updateTimeout >= 5, refreshTime <= 1000) the shoutbox will open one connection per host and hold that connection open for at most $updateTimeout seconds. The client will refresh the shoutbox after the connection closes, after a delay of refreshTime milliseconds.

For an autorefreshing shoutbox style ($updateTimeout = 0, refreshTime >= 5000) the PHP script will immediately read the chats file and close the connection, and the client will refresh the shoutbox every refreshTime milliseconds.

The difference is, in the latter style, no connections are held open. They are closed as soon as the chats file is done transmission. Hence, the number of connections should be much fewer.

What about the check for duplicate instances?  What effect does that have?

nneonneo

@DeviDarkL: Sorry, I can't help you then. I know next-to-nothing about PortaMx.

@bfeo: checkDuplicates ensures that each user can open at most one shoutbox (per browser -- so it is possible to have two shoutboxes open, but they would have to be in different browsers, e.g. IE and Firefox). It's not perfect, but as long as your users aren't intentionally trying to cause trouble, they will only have one shoutbox open. This reduces the number of connections to the number of users online.
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!

bizzyb0t

First off, thank you nneonneo for making a great mod for SMF. Our gaming clan uses it very often :D

Well, I was wondering, is it possible to share the space where the shoutbox resides? For instance, put something like text, images, links, to the right of the shout box (within the shoutbox table(?) but not in the text area) when it's width is say 50%?

Here's a clickable thumbnail image so you can see:
hxxp:skitch.com/bizzyb0t/5373/odc-old-dude-clan-forums-index [nonactive]
hxxp:skitch.com/bizzyb0t/5373/odc-old-dude-clan-forums-index [nonactive]

Thanks again for all your work on this mod and for continually helping to support it and answer questions!

nneonneo

#4409
I think the way to do this would be to use a table.

<table width="100%"><tr><td width="50%">
SHOUTBOX GOES HERE
</td><td>
OTHER CONTENT HERE
</td><tr></table>


In other words, in index.template.php, change
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>

into
<td class="windowbg" width="50%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
<td class="windowbg" valign="top">
OTHER CONTENT
</td>


If you do this, you'll probably want to drop the width: 50% declaration to prevent the shoutbox from becoming 25% wide.
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!

bizzyb0t

#4410
Thank you SO much! I was wracking my brain trying to do it!!  :)

I'll post up a screenshot once it gets done!!  8)



EDIT:

Here's the screenshot...

hxxp:skitch.com/bizzyb0t/5412/odc-old-dude-clan-forums-index [nonactive]
hxxp:skitch.com/bizzyb0t/5412/odc-old-dude-clan-forums-index [nonactive]

Thanks for your help, that worked wonderfully. In this screenshot, the shoutbox text is extended to the second line and it extends to a certain spot and continues on the second line. When it doesn't do that (when the shout text is short and sweet), the shoutbox width is smaller and there's blank space to the right of the news image. Is there any way to make the shoutbox take up all the room (and stay the width it is now), and push the image (assuming the image will be the same size) all the way to the right, like in my screenshot even if the shout is short? If this can be done in a way where the width of the shoutbox textarea is dynamic to the width of the image with the image being right justified, that'd be really, really awesome but static is okay too.

I greatly appreciate all your help!! I totally don't know what I'm doing but I follow instructions well and I am a professional copy-paste-er  :P

nwobhm

I did try to search this topic about shout counter. Is there a way to count users shouts in a shoutbox? And that count to be seen in profile like the message count?

funcouldron

does it work on smf2.0b4?????? i need it
Visit us at  ww.4moreFun.com

Steephh

Quote from: nneonneo on November 14, 2008, 03:40:44 PM
@HR, Steephh: No limit, no reset. You will have to clear it manually.

@bfeo: The guide also reduces the number of simultaneous connections.

Uhmm.... This was just a reply to your question if my history was empty.

http://www.simplemachines.org/community/index.php?topic=137508.msg1794603#msg1794603

Thx anyways :)

natefish

#4414
Hey there! I love this mod. It works great. I would however, like some advice:  I am looking to edit the script a little and I would assume it may take some JS and Ajax. Here's what I'm looking for:

Every time someone posts a new thread or posts a reply to a thread, I would like it to be announced in the shoutbox. It could look like this:

[Today at 02:58:30pm] Bob has posted the topic Hey What's Up?
[Today at 03:02:02pm] Jim has replied to the topic Hey What's Up?

I would like the topic name to be a link to the specific post.


I know what I described above is probably fairly advanced, but the next thing I'm looking for isn't --

I can't quite seem to find the script to add <strong> tags around to make the names of the poster bold. Can you give me a file name and line number to do that?

Like this:

[Today at 03:02:02pm] Jim: Hey guys, how's it going today?


EDIT: Also, how would I go about adding an "emote" system. Similar to "/me" could I add in something like "/wave" and have it return a "*Bob waves to everyone!"

pooya

Quote from: funcouldron on November 17, 2008, 01:24:44 PM
does it work on smf2.0b4?????? i need it

DOes it .. i tried doing it o mine and had to manualy edit the index.display.php file.

Anyways running itno this error FATtal error: Function name must be a string in /home/xxx/public_html/forums/Sources/Load.php on line 153

? and administrator button is disabled.

tyhgdgh

File error (writeLine); aborted
this happens when you post a Shout

nneonneo

@bizzyb0t: Try adding width:100% to the CSS for #yshout...

@nwobhm: I think it is doable with a custom profile line, but that's only for 2.0, and it is probably much more difficult than I initially thought it would be, since there's really no API for editing the fields AFAIK.

@funcouldrun: Yes, but it requires manual installation, plus a little change detailed on the mod main page.

@natefish: Earlier in this thread (only ~10 pages back) a little guide to doing this (for new topics only -- it shouldn't be hard to copy the code to the bottom of sendNotifications (in Subs-Post.php))

EDIT: See my reply to Gaugenstien: http://www.simplemachines.org/community/index.php?topic=137508.msg1787050#msg1787050

@pooya: That shouldn't happen. I am not sure what the error is trying to say. What does line 153 of Load.php say?

@Nfanthr33: chmod the yshout/chats folder and all its contents to 755, 777 or 666.
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!

funcouldron

Visit us at  ww.4moreFun.com

natefish

Quote from: nneonneo on November 17, 2008, 08:47:31 PM
@natefish: Earlier in this thread (only ~10 pages back) a little guide to doing this (for new topics only -- it shouldn't be hard to copy the code to the bottom of sendNotifications (in Subs-Post.php))

EDIT: See my reply to Gaugenstien: http://www.simplemachines.org/community/index.php?topic=137508.msg1787050#msg1787050

Thanks! That worked great. :)

One thing I'm wondering now -- How do I control the number of posts it will display before it starts removing them? Right now it looks like somewhere between 12 and 15 posts it starts removing the bottom one. I have put this in a box with a scroll bar, and would like to bump that up to about 20-30 posts before it does that. Is this possible?

Advertisement: