News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

Lew Cipher

#1120
Quote from: Lew Cipher on September 23, 2007, 07:52:08 PM

I am going to try this tonight & report back ASAP.

You support  your mod better than any other modder here. Thanks for being there!!!!!



Just tried this. It worked somewhat. The box went invisible BUT the command menu and the explanation of why the box was closed was still there (for regular members). I tried it twice to ensure that I didn't just make a copy/paste mistake.

Any ideas on how to get rid of the shout box command menu and closed text?

TIA!
Version: SMF 1.1.2
Many mods installed

nneonneo

Try this then:

Under
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
add
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) { echo ' '; exit; }
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!

Lew Cipher

Quote from: nneonneo on September 23, 2007, 08:25:46 PM
Try this then:

Under
if($gzipCompression) ob_start("ob_gzhandler"); // GZip for everything BUT the 404 header
add
if (!$user['is_admin'] && !$user['is_mod'] && $maintenance!==false) { echo ' '; exit; }

Thank you very much for your efforts but none of this has worked. I suppose I can live with it as-is.

I may try find help for making the box it's own collapsible bar. That would also serve the purpose.

Version: SMF 1.1.2
Many mods installed

NewPie

Quote from: nneonneo on September 23, 2007, 10:14:49 AM
Somehow, your session has become damaged; try logging out and back in.

If that doesn't work, remove the line "session_start();" right after the documentation comment.

Thank you. Infact i now only get an error now (the one i said): "Unexpected "}" at mine 317" if i remember well. But there's no } at line 317 of yshout.php, so if i remove some elements from this line, it says unexpected } at line 316 and so on. ::)

Also it's not about the session because i tried 15 times of installing this awesome mod and all of my members always get those errors.

nneonneo

#1124
@Lew Cipher: I don't know why that wouldn't work, but I suppose if it doesn't then a workaround is in order :-\

@NewPie: Yeah, I think it's because your forum seems to use sessions differently.

Anyway, 1.1.4 has _just_ been released, and I will be testing and rolling out 1.10 soon. There won't be any major changes, though, unless I find some compelling feature to put in.

Request them now :)
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!

jossanaijr

Is it possible to change the position of this shout and put it inside one board (a new category called Shoutbox)?
If yes can you help me?
I'm using SMF 1.1.4 with default theme.
Thanks,

nneonneo

Yes, it should be possible.

Remove
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

from Themes/default/index.template.php

and place
// YSHOUT HERE
if (!empty($context['current_board']) && $context['current_board']==9999) echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

where you want the shoutbox, where 9999 is the board ID which should specifically have the shoutbox.

Alternately, you may choose to insert a topic to the board with a hacked name -- i.e. add a topic and change the title *directly in the database*, containing the code
<div id="yshout">',$txt['yshout_loading'],'<br />. This method is NOT recommended.
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!

jossanaijr

Lost my shoutbox! :-[

The cut and replace did not work, no idea what I did wrong.  Then I tried to came back and it was not shown in the original place (it did not show anywhere).  :-[ :-[

So I delete (uninstall) version 1.0.8 and tried to install a fresh one 1.0.9 version BUT it says the package is corrupted ? (I'm using SMF 1.1.4).  So I tried to upload again 1.0.8 ; there is an error message too, but the package / files are shown as uploaded - BUT no shoutbox is shown in its original place!  :-[ :-[ :-[

nneonneo

Slow down -- what happened? Did you use the correct board id in place of "9999"? The package shouldn't be corrupted; try it again.

Send me or attach index.template.php, it sounds like it's been severely damaged.
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!

jossanaijr

Attached my index.template.php.   :-[
I'm using SMF 1.1.4 and I do not have shoutbox mod in my list of installed packages.
Tried to reinstall 1.0.8 and 1.0.9 without success.

nneonneo

Funny thing about your index.template.php -- the code for showing the shoutbox is only in the guest section of the file.

Right before
echo ' </span>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
else
{

add
// YSHOUT HERE
echo '
<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END

and the shoutbox will reappear. The important point is that the shoutbox does not (yet) work with SMF 1.1.4, but I am working on updating it.
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!

jossanaijr

Quote from: nneonneo on September 27, 2007, 02:59:58 PM
Funny thing about your index.template.php -- the code for showing the shoutbox is only in the guest section of the file.


and the shoutbox will reappear.
Thank you! Fixed.
QuoteThe important point is that the shoutbox does not (yet) work with SMF 1.1.4, but I am working on updating it.
But mine was and now is working fine with 1.14!

BTW: I would like to have the option to put the shoutbox in another place when installing (this is how my problems started...) Members of my forum frequently put their passwords in shoutbox because they think they are not logged yet and this is the place to put their password and try again!  Thats why I was trying to move it.  It would be nice to have the shoutbox inside one frame like a default theme board.

nneonneo

Well, it's not officially supported (as of 1.10, it is); 1.1.4 made changes which didn't actually affect the shoutbox's ability to function AFAIK.
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!

exxocet

I like this shotbox, it's lite and fast, but it seems it's impossible to run on my host: it keeps server CPU in 50% and I'm on a shared server. Anyone, any ideea?

jamppa

Error:


Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/jalo/public_html/VS-online/smf/yshout/yshout.php on line 776
File error (writeLine); aborted

Why?

Flying Drupalist

Hi nneonneo, how would I invoke the shoutbox in other sections of the site?

nneonneo

@exxocet: Odd, the newest revision should not put a CPU at 50%. Try increasing "updateTimeout" in yshout/yshout.php (do NOT increase this past the maximum script execution time, typically 30 seconds)

@jamppa: Try chmod'ding the chats folder to 777. Or, in Package Manager, go to Options, then under Cleanup Permissions select "All files are writable." and then hit "Change file permissions".

@Miraploy: Two instances cannot run simultaneously (I intend to have a fix for this, but due to the nature of the JS it may be a lot of work). That said, just using the code provided to install to other themes (the CSS and JS includes, and the <div id="yshout"> snippet) will work.
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!

pongsak

Hi nneonneo, long time not see you.
Now I've a new idea to you again.
Think when we use msn.
When the other side typing something, we'll see his status
on the status bar that he's typing something.
Could you do that?
Sometimes we don't know the other quit or typing anything?
smf 1.1.2 with dilbermc themes.
> 50 mods installed.

pongsak

Quote from: Miraploy on September 30, 2007, 09:42:54 AM
Hi nneonneo, how would I invoke the shoutbox in other sections of the site?
There're alrady a lot of answers of this type of question in this topic.
smf 1.1.2 with dilbermc themes.
> 50 mods installed.

nneonneo

Actually, yes. I implemented this feature ages ago, but later removed it because it was an incredible resource hog.

It is probably not a great idea, unless you are on dedicated hosting, though presumably something could be done to make it somewhat more efficient.
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!

Advertisement: