News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

Adolfo


Adolfo

Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.

Yes, exactly, I'm wanting it for Tinyportal :)
If you find a solution, it would be sooooo fantastic :)

Ryuoh

Quote from: Adolfo on March 29, 2007, 06:35:46 AM
Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.

Yes, exactly, I'm wanting it for Tinyportal :)
If you find a solution, it would be sooooo fantastic :)
I would also love to be able to put it in a tinyportal center block

nneonneo

@Poisonhearts: You need to install it to your particular theme; see the link on the mod page for details.

@TinyPortal users: I will try to get it to work. Presently, I'm trying to put the code into a PHP block.
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!

brianjw

Aku's way worked for a while but then I upgraded or something and it stopped working. :-\ So now we're waiting for a tinyportal way. :)

@nneonneo: See felblog because they have been able to integrate there blogging system in tinyportal. Maybe get permission from Bloc to make that an integration ;)

JSizzal

Is there a way to make the
Quotesection quote only what the member types and not take up the entire length of the shoubox.

!!

Thanks for all your help!

nneonneo

@brianjw: I'm working on it.
@JSizzal: I'm sorry, I do not understand the question.
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!

nneonneo

#487
OK, sorry to doublepost, but I have managed to make it work in TinyPortal.
It can be seen at
http://nneonneo.ath.cx/advforums/guinea_smf/index.php?theme=3
(note that the default theme has the shoutbox installed in the header, like the default installation, and the Babylon theme has it in the TP block on the top, labelled SB_Test).

It's extremely easy to set up, but it looks horrendous (due to wrapping) in the right or left blocks. To make it work there would take a fair bit of appearance modification.
In the center, though, I think it looks OK.

Code: add a "phpbox" block, and put
echo '<div id="yshout"></div>';
in the box.
For the *default* theme (and other themes modified to use the SB), please find the lines which say "// YSHOUT HERE" in the index.template.php file and delete the data from the "// YSHOUT HERE" to the matching "// YSHOUT END". Note that this will prevent the mod uninstallation from working properly; the yshout files will be deleted but the modifications in index.template.php will stay.
There should be 3 (three) such blocks of code. Remove each block and save the file. This is to be done on the default theme and any SB-modified themes.

Next, find the index.template.php for that theme, and place the code
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

after
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';


This code is (currently) identical to the first block of code installed in index.template.php, but I may change the CSS to suit TP needs in the future (these instructions will be posted on the main mod site).

EDIT: Long overdue change to prevent the header check from breaking things.
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!

Adolfo

Thanks nneonneo for this tinyportal conversion!
Have you ever considered to transform your shoutbox in a true chat room?
I do not know if it's already possible, but it would be very cool to open the shoutbox in a separate page integrated with SMF (something like calendar or gallery) :)

nneonneo

There are already chat mods there which seem to work just fine -- I'd prefer to keep my mod the way it is :)
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!

brianjw

I will try this some time this afternoon. Thanks nneonneo :)

Windwalker

With the standard theme, the shoutbox is working fine.
But although I made adjustments to index.template.php, I do not get it to work with another theme.

I always get the "...loading shoutbox..." message.

Has someone solved this problem?

nneonneo

Have you forgotten to add all the parts? There are two blocks which *must* be added to another theme:
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
',empty($options['collapse_header']) ? 'loadChat();':'','
}, { "yshout":"id"});
var board_url = "', $boardurl, '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar42007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#shouts .owner a {
color: #F00;
}
#shouts .moderator a {
color: #00F;
}
</style>';
// YSHOUT END

after
/* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
Standards compliance mode happens when you use xhtml... */
if ($context['browser']['needs_size_fix'])
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

and of course
echo '<div id="yshout">loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
where you want the SB to appear.
If either are missing, the loading will fail.
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!

JSizzal

Oh I meant..

So the {quote} and {code} only quotes/codes what the user wrote not the entire line.



JohnnyMcKinney

#494
I added your code and there three different spots to add it... A little help. Do I add the code underneath the code above or inside of it?

Also maybe you can look into this and tell me if this is possible.

http://www.simplemachines.org/community/index.php?topic=158750.0

If so do you think you can stick to the task ;)


Quote from: nneonneo on March 28, 2007, 07:31:51 PM
1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.

I would like that, I dont have a server so its my hosts problem. Will it make users load up my webpage slower?

greyknight17

nneonneo, great mod. I just tried to test it out locally on Tiny Portal before using it Live and got this error:

Parse error: parse error, unexpected T_STRING in C:\wamp\www\smf112\Sources\Load.php(1735) : eval()'d code(35) : eval()'d code on line 1

In your Tiny Portal instructions, you say to delete ALL those // YSHOUT HERE to // YSHOUT END...except for the one we are copying right? I saw that the first one to copy after the other code is already in the correct place. I tried everything from the steps outlined but couldn't get it to work.

I have one more question. Is there any way to delete that first field and only allow members to post (so it will put in their names by default)?

Thanks.

nneonneo

@JSizzal: It uses the BB parser. What do you want done differently?
@Johnny: I'm very busy ATM (who isn't?) so I don't really have time to look at the forms request...
The typers will probably cause lag. Until I figure out how to open a "listener" connection from the client, I won't really be able to support it.
Finally, what do you mean by three spots? There are three pieces of code, yes, but I don't really understand the question...
@greyknight17: The problem is with the PHP code you've inserted into the phpbox (I hope I didn't post it wrong =\), not with the index.template.php.
The phpbox block must read
echo '<div id="yshout"></div>';
and nothing else, or it will fail.
If you want members only, set allowGuests to false in yshout/yshout.php. That will disable the first field so it is the username, and also give guests an error message when they access the shoutbox ("You must be logged in to use the shoutbox!")
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!

nneonneo

Brian, no offense, but the "/me" thing is getting a little irritating. Also, I can see when I get a PM, so I'd prefer if you didn't clutter this topic with PM notifications.

Thanks :)
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!

brianjw

Sorry about that :) lol i just learned its a feature so i been messing with it. *Removed*

Windwalker

Quote from: nneonneo on April 01, 2007, 06:40:29 PM
Have you forgotten to add all the parts? There are two blocks which *must* be added to another theme:

Yes of course.
I just followed the new instructions in http://custom.simplemachines.org/mods/index.php?mod=585 (it used to be the pieces of code to add, wasn't it?), but this doesn't help either.
Unfortunately, I can't show you my SMF 1.1.2 board, because it's locally running.
My real board on the webserver is still SMF 1.0.10, not yet upgraded...

Advertisement: