News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

brianjw

I cant understand the .diff file.

nneonneo

I forgot; I encoded it using the UNIX line encoding.

Reattached & fixed.
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!

comptech

@nneonneo:

Is it possible to incorporate another box on top of the existing box with just 1 line, serving as announcement box for members themselves?

We need this announcement box since the shout lines in the regular shout box is changing fast with time, esp. on a big forum. And members usually have very urgent concerns that need the attention of other members, esp. if they are looking for a specific item to buy right away from other members, etc.

brianjw

I would like to see a command in nneonneos shoutbox:
/lock

The /lock command would make it so no members could post in it until a staff member uses the command /unlock.
This command could only be used by staff. The staff should be able to be defined in the yshout.php but not by members by group.
The members should still be able to see the shouts when it's locked but the text typing area should be disabled <input disabled type="text" name="textfield" /> (something like that). However, the typing area wouldn't be disabled for the defined staff groups in yshout.php.

Let me know what you think. I would definitely like to see this as a feature :)

nneonneo

@ruelnov: Editable news items perhaps? Doesn't sound like something which would be best done using the shoutbox.

@brianjw: If I implemented it, it probably would be very similar to the existing ban command (kind of like banning everyone with "p" restrictions, but saying "Locked!" instead of "Banned").
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

OK. When will it be implemented?
Also it wouldn't ban staff ;)

odavilar

Is there a way to open nneonneo's Shoutbox in a new window or something like that?

brianjw

Yes. You can create a php file in your forum root called "shoutbox.php" then use the include commands to include yshout.php and other files needed and add code.

Not much help. Just ask nneonneo for the details lol but I think i got the right idea ;)

odavilar

but what files do i have to include into the php file? and how? just with: include('');?

nneonneo

#869
Right idea, Brian, but not quite the right implementation.

No code is really required; it's just an HTML file with the board URL interpolated in a few places:
<?php
$boardurl 'http://forum.com/path/to/forum';
echo '<html><head><title>Shoutbox</title>
<script src="'
,$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
<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?Aug92007" 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;
}
#yshout .adminlink {
font-size: 6pt;
color: #141414;
}
#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>
</head>
<body>
<br /><b>Shout Box</b><br /><br />
<div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>'
;
?>



As you can see, this is basically a thin HTML page wrapping the usual code from index.template.php. It causes the client to load all the necessary JS, and the client is then responsible for calling yshout.

All you need to do, odavilar, is change $boardurl up top (for such a simple script, I'm not going to run off to SSI just to check the board URL ;) ). Then, place the script in any web-accessible location and *boom* it's there.

This code is largely copied from glxpa's solution (http://www.simplemachines.org/community/index.php?topic=137508.msg1170765#msg1170765) and cleaned up somewhat to avoid missing variables. It has also been edited to include a small fix mentioned by me later in the thread.

*Note: Using a *relative* link (e.g. /forum/, instead of http://moo.com/forum/) for $boardurl is probably safer so that minor domain mismatches (www.xxx.yyy vs. xxx.yyy) don't prevent the script from working.
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!

cru

hi! this version works great. i would like to implememt it in my tiny portal block. is it possible to just paste a code on one of the blocks in tinyportals block manager? so that this shoutbox stays on any part of the page, easier to transfer as a block. the default tinyportal shoutbox relaods the whole webpage, so i think this one's better.

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!

Kevin Paquet

great job guys, I was about to get an paid, premium shoutbox before I saw this
\

but one question


can i make the font biggeR? how?

brianjw

@Pasaway:
There are two types of code in the index.template.php for this shoutbox, you will have one or the other.

1. If you're using <div id="yshout"></div>. Ask nneonneo.

2. If you're using a certain shoutbox code which is bigger than the div function search your index.template.php for Shout Box. Once you find it just add font tags around it.

<font size="10pt">Shout Box</font>

(you choose the size :))

nneonneo

#874
I think he means the font for the shout text. To change that:
in Themes/<theme>/index.template.php, change the font-size parameter in
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}

and
      #yshout {
         font-size: 14px;
      }

That's it -- that's all that needs to be done to change the shout text font size.
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!

spirit receiver

There's a typo in the very first post:

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

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Jul222007" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>


Line 5 should say

var board_url = "', $boardurl, '";

brianjw

nneonneo hasn't updated the first post. I believe that is the code from the very first version.
You can find the original and current codes and mods on the modsite of this mod ;)

spirit receiver

#877
brianjw, I believe you are wrong  ;)

QuoteNote: If you followed the instructions above to install to other themes, you will not need to update the other themes (since the above instructions already carry the correct 1.08 modifications).

That same error's in http://custom.simplemachines.org/mods/index.php?mod=585.

brianjw

It seems to work anyway. Ask nneonneo.

nneonneo

Odd, I never noticed that. It could be the source of many bugs in alternate themes :-\

Fixed (in post & mod page): Thanks for the quick eye, spirit receiver! :)
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: