UBB.Dev
Posted By: sirdude [7.2.1] - Naked shoutbox - 08/18/2007 5:36 AM
The shoutbox has been a problem for some sites in that it was perceived to be causing issues on boards ranging from small 'hiccups' to 'catastrophic whatever'.

Some people suggested the idea of opening the shoutbox in it's own window.. Hence the 'naked shoutbox' is born:

Steps to implement:

create a new file called nakedshout.tpl

past the following into it:
Code
{* Script Version 7.2.1 *}
{* SD - Mod: The naked shoutbox is born! *}

<html>
<head>
<link rel="stylesheet" href="{$stylesheet}" type="text/css" />
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/ubb_jslib.js"></script>
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/shoutbox.js"></script>
<script language="javascript" type="text/javascript">
var confirmText = "{$lang.CONFIRM}";
var notLogged = "{$lang.NO_SHOUT}";

var baseurl = "{$config.BASE_URL}";
var fullurl = "{$config.FULL_URL}";
var imagedir = "{$style_array.general}";
var myUid = '{$myid}'; // Don't get excited, you can't exploit this :D
var submitClicked = "{$lang.SUBMIT_CLICKED}";
</script>
<title>Naked Shout - powered by UBB.threads™</title>
</head>
<body>

<table width="810px" height="610px" cellpadding="0" cellspacing="0" border="0">
<tr><td>
{$tbopen}
<tr>
<td class="tdheader">{$lang.SHOUT_BOX}</td>
</tr>
<tr>
<td class="alt-1">
<div id="shout_box" style="height:600px; width: 800px; overflow:auto;">
<div id="shout_content" style="height: 584px;">
</div>
</div>
<form name="shoutbox" method="post" action = "" onsubmit="shoutit();return false;">
<div align="center">
<span id="shout_field">
<input type="text" name="shoutbody" size="80" class="form-input" maxlength="255" value="" onenter="shoutit()" />
</span>
<span id="sending_field" style="display:none">
Sending...
</span>
<br />
<input type="button" name="shoutbutton" value="{$lang.SHOUT_IT}" class="form-button" onclick="shoutit()" />
<input type="reset" value="{$lang.RESET_IT}" class="form-button" />
</div>
<div id="shout_uid" style="display:none;">
Delete this shout?<input type="button" class="form-button" id="del_yes" value="Yes" /><input type="button" class="form-button" id="del_no" value="No" />
</div>
</form>
</td>
</tr>
{$tbclose}

</td></tr></table>
<script type="text/javascript">getShouts(0);</script>
</body>
</html>

upload to /templates/default directory

Step 1 - Done!

create a new file called nakedshout.inc.php

paste the following into it:
PHP Code

<?php

if(!defined("UBB_MAIN_PROGRAM")) exit;

function &
page_nakedshout_gpc () {
return array(
"input" => "",
"wordlets" => "" ,
"user_fields" => "",
"regonly" => 1,
"admin_only" => 0,
"admin_or_mod" => 0,
);
}
// end page_picupload_gpc

function &page_nakedshout_run () {
global
$style_array,$smarty,$user,$in,$ubbt_lang,$config,$forumvisit,$visit,$dbh,$var_start,$var_eq,$var_sep,$var_extra;
extract($in, EXTR_OVERWRITE | EXTR_REFS); // quick and dirty fix - extract hash values as vars

// -------------------
// Just the facts maam
$smarty_data = array();
define('NO_WRAPPER',1);
$stylesheet = "{$config['BASE_URL']}/styles/{$style_array['css']}";

$smarty_data = array(
"stylesheet" => $stylesheet,
"myid" => $user['USER_ID'],
);

return array(
"header" => array (
"title" => "",
"refresh" => 0,
"user" => $user,
"Board" => "",
"bypass" => 0,
"onload" => "",
"breadcrumb" => "",
),
"template" => "nakedshout",
"data" => & $smarty_data,
"footer" => false,
"location" => "",
);
}
?>



upload to /scripts dir..

Then you can decide to put a link to it anywhere you want. I chose to add it to the header.tpl and make it part of 'My Stuff' menu, but you can do whatever you want.

the header.tpl code is:
Code

{* SD - Mod (My Shouts) *}
<tr><td class="popup_menu_content">
<a href="{$config.BASE_URL}/ubbthreads.php{$var_start}ubb{$var_eq}nakedshout" target="_blank">My Shoutbox</a>
</td></tr>

added after the 'My Posts' stuff.

the KEY thing to note is the URL. namely http://yourboard/url/ubbthreads.php?ubb=nakedshout (add target="_blank", if you want a new window) and you are done.

Notes:
  • you can disable your shoutbox in the portal and this will still run fine.
  • feel free to change the .tpl heights and widths to your liking. i made mine a large window
  • you can also edit /ubbt_js/shoutbox.js and change the update frequency to less than 30secs.. find:
    Code
    function startTimer(){
    shoutTimer = setTimeout("getShouts()",30000);
    }
    and change the 30000 to whatever number of milliseconds you want. ie: if you want 5seconds, the number will be 5000.

    Keep in mind of the burden on your board. Most shoutboxes aren't too lively, so i had no problem setting it to 5secs smile


Oh and here's some screenies (note: livewell is just a lang file for my favorite customer - Mitch P !):

[Linked Image]
and
[Linked Image]
and
[Linked Image]

upload all files and *poof* done!

enjoy,
SD
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/18/2007 5:42 AM
whoopsie. just ignore the 'Bash' and the extra check box stuff in the screenie. i stripped it out of the .tpl for you, so no worries.

that is for another modification.. Push (new member) is the author of that feature and it's really quite neat.

there are a couple more tweaks that i might post here later. namely, /me and right click wallops. i already have the /me colorizing going on and the wallops (trout slams etc) can be added later..

enjoy smile
Posted By: Ian_W Re: [7.2x] - Naked shoutbox - 08/18/2007 2:15 PM
Thanks smile

Looking forward to the other features smile

BTW - what is/are bash, Wallops etc.?
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/18/2007 4:14 PM
wallop is : click on user name and slap them with a trout or whatever

bash is : if there is a sequence of shouts that seem funny together, you can check the checkboxes and hit the 'Bash' button. That saves it as a post to a special 'Bash forum' for time immemorial.

examples of bash are:

[Linked Image]
and
[Linked Image]
and
[Linked Image]
and
[Linked Image]
and
[Linked Image]
and
[Linked Image]
and
[Linked Image]

The idea came from the website, http://bash.org, where IRC and IM conversation snippets are saved to be rated and read for future..
Posted By: AllenAyres Re: [7.2x] - Naked shoutbox - 08/18/2007 8:05 PM
hmm.. will this work as a guestbook? May need to allow guest posting and a way to add their name to it.
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/18/2007 8:54 PM
you mean the shoutbox would be a seperate page, where the shouts get logged to some DB table ?

or am i missing your idea ?
Posted By: AllenAyres Re: [7.2x] - Naked shoutbox - 08/19/2007 4:20 AM
I think so smile

Someone was asking for a guestbook on their site. I've never used one so... smile
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/19/2007 4:22 AM
I have found that most "available" guestbook scripts SUCK!, so I made my own on www.realmhq.com lol... I had needs no one catered to (both a captcha with the ability to approve entries, which one would think would be simple)
Posted By: AllenAyres Re: [7.2x] - Naked shoutbox - 08/19/2007 5:35 AM
That looks good gizzy smile
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/19/2007 6:02 AM
Dankie <3...

I used to use a paid solution on it, but their captcha wasn't worth the zend encoded container it came in... It never worked, always let spam in, etc...
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/19/2007 6:10 AM
well, giz just take your form (nice form btw) and threads-ize it.

just add a table ubbt_GUESTBOOK and modify it to sit in the middle of the portal page ?

modify ubbthreads.php to slam that puppy in, instead of the feeder forum topics or above them..

makes sense ?

a giz-guestbook mod!! ?

weird how a naked shoutbox thread turns into a giz-guestbook.. laugh
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/19/2007 6:21 AM
'eh, doesn't motivate me... Feel free to gank my forms though lol..
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/19/2007 6:23 AM
..er /me looks up 'gank'

if you mean sending me the code.. i can shoehorn it in.

if not, i'm too lazy to view source / copy... you have the form handy in some format laugh
Posted By: AllenAyres Re: [7.2x] - Naked shoutbox - 08/19/2007 6:32 AM
oui, free giz-guestbook!

or make it a paid mod, let us play with it smile
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/19/2007 6:38 AM
lol the form is there, it's called "view source" sd wink...

as for a paid mod, i suppose, when i get some time, i could attempt to work on something... i'd have to see how rick handles the captcha...

it'd likely be a ubbthreads.php/ubb/giz-guestbook page wink...

I really haven't dabbled in the cp at all in ubb.t7 so not sure where to start there...
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/19/2007 6:52 AM
did you read that i'm too lazy to 'view source' ? tipsy

sheeesh

help a brotha out here.
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/19/2007 9:05 AM
lol, it'd be the same form weather i emailed it to you or you viewed source; just the one is faster wink
Posted By: Mark_S Re: [7.2x] - Naked shoutbox - 08/19/2007 12:20 PM
Great work Naked Shout box.

I wonder if this could be the solution to my forums hanging
when shout box is enabled.

Personally i prefer that members are registered to shout in the box.

Those BASH comments were sooooo funny,
i hope that it becomes stock, i really do pmsl.
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/19/2007 6:37 PM
that's the main reason this puppy got written -- the forum 'hang'

and this only allows registered users to use the shout box, btw smile
Posted By: Mark_S Re: [7.2x] - Naked shoutbox - 08/20/2007 12:10 AM
Quality Stuff wink

This thread is now on my watch list for when i can find a little time to give it a go wink
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/21/2007 3:53 PM
Great! I was working on this one myself as a chatbox on the site.

I like copy/paste more then typing, so thanks smile
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/21/2007 6:36 PM
you're welcome,

i'm going to be adding shout-header, shout-footer, for those that want to do a little customising.

also will add time to the line, rather than in the hover.

also will be adding 'whos online in the shoutbox' -- basically a list of users who currently have the 'naked shoutbox' open.. (like IRC does)

and will be adding one click (two actually) theme switching for the shoutbox.. (if peeps likey, i'll port the theme switcher over to threads as a mod)

bleh, that's all for now.. oh and there are a couple bug fixes in the common shoutbox.js code too, that i'll post over here.
Posted By: Mark_S Re: [7.2x] - Naked shoutbox - 08/21/2007 7:26 PM
Give that man a cigar >> SD

Sounds like one of the most exciting addons we have had in ages.
Watching with baited intrest.

< Hate the way he makes it sound O so easy >

Great work mate.
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/21/2007 8:36 PM
Originally Posted by sirdude
i'm going to

A few suggestions from me wanting it as a chatbox:

  • Have the cursor in the input field after sending a shout and when you load the page.
  • Opening times. Open between time X and time Y, if you're in in that timeslot, you can stay.

    Somehow setting specific chat times helps getting it more busy and fun
  • Max people online, to keep serverload acceptable.
  • Ban from chat.
  • Shoutbox now wordwraps words bigger then 20 characters. For the naked shoutbox this is a bit short.
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/21/2007 8:48 PM
okies.. all easy, except opening times.. which is medium..

i'll see what i can do.. i have the code open on the operating table, so i might poke around a bit, before closing her up smile
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/22/2007 5:10 AM
:mumble: i did some groundwork on UBB.Guestbook; but my wife came home while I was working on the script lol... I have the wordlets file and the view/sign templates done, have to do one for the "sign complete" page then work on the script a bit... Wonder what'd be fair to charge :x...
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/22/2007 5:48 AM
make a guestbook thread, when you're done..

this one is for naked shoutbox stuff wink
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/22/2007 7:08 AM
haha, you and allen went off on a tangient, figured i'd mention that i've been giving it thought wink...

Though i plan to make my own thread, when i have something to show wink...
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/22/2007 7:41 AM
shoooo fly shooo tipsy

random musing mode....

idea! had to write it down before putting down for the nite..

the protocol should not only be JSON (leaner), but also only return changes, based upon either last shout id or time.. the way process control does it..

this cuts the xmlhttprequest traffic size down considerably. also, the ajax server(s) should be one file, so that it has a better chance of staying in the php cache as a unit. also easier to maintain one piece of ajaxshoutserver.php code..

drawback.. added branching in the server file.. minimal (imo)

weird idea.. add proxy capability for cross-site / multiple joined shouts in one..

ie site1 + site2 .... siten all serving up to same shout UI..

keep in mind: load!

convert fully to yui.. add effects for new shouts.. fade in.. etc.. not sure yet..

global / personalized wallop menus.. menus need to be ul, li and NOT table, tr, td!

longer history for shouts.. ie ability to search back further than just 30 or whatever..

urls, imgs..

admin cpanel for FULL setup and customization...

possible full page reload interval, so adverts get more hits..

colorized names, like in showflat.. admin, mod, whatever..

dynamic resizing with handles, using yui..

set mode -v laugh

bleh.. that's it.. brain dump over ..


Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/22/2007 7:53 AM
Go put your computer together, so you can send me your old one :x...
Posted By: Mark_S Re: [7.2x] - Naked shoutbox - 08/25/2007 2:33 PM
with all them idea's how can you sleep lol
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/26/2007 1:13 AM
You should see inside my head... I have once, and it's quite crazy wink
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/26/2007 1:27 AM
dude, no need to see INSIDE.. the outside speaks for itself wink
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/26/2007 2:27 AM
bad man!
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/26/2007 2:51 AM
hehe.. giz is EVERYWHERE today laugh
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/26/2007 4:13 AM
we is built into everything!
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/27/2007 1:33 AM
ok, i've complete overhauled it to use new javascript. this is essentially standalone and only shares with ubbthreads on the user DB side of things as well as to grab the styles.

sooo, you don't have to worry about upgrades trashing this.

the new javascript (ajax) is much more efficient by using JSON as the transport format. formerly it took 14K to fill a shoutbox and now it takes 4K.

i've pushed the load of ALL of the formatting to the client, using DOM instead of burdening the php server code. so this is less of a strain on the server itself.

i almost have it done, but will at least leave you with a typical screenie..

[Linked Image]

the lower right side is a space that you can put your own content into.. ads, logo, whatever..

i showed the ajax 'bashing..' 'sending..' reveals here, but they are normally hidden and come into play on an async call begin.

the 2 columns of buttons on the left allow a user to select rows (1st one) for subsequent 'Bash'.. the 2nd column is the same as the delete [x] is now..

selection gives feedback in a different highlight color, like phpmyadmin does for rows..

the upper right hand side is a current tally of who's online in the shoutbox.. configurable in the admin cpanel..

i will wrap it up soon, but it ain't ready for prime time yet..

til then... patience smile

ps: and thanks to Rick!! for the wonderful style from which to use as an excellent look/feel.
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/27/2007 3:02 AM
Lol, that's a great start man... Looks awesome...
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/27/2007 7:30 AM
Originally Posted by sirdude
til then... patience smile

I'm running out of smile
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/27/2007 7:57 AM
hehe.. well you want kick + ban, max online limit ? (i will leave out the start/stop times as you can figure a way to deal with that manually -- ie make the link not work or have a default screen -- for now)

also, i'm using a decay algorithm that offloads the server and it's kinda not right yet.

basically, if you are just idling in the chat window, your delay between async xmlHTTPRequests decays to a longer time (to a limit of course).. this offloads the server load..

when you start chatting or doing things in the chat window, the decay is restored to the 'fast' value (configurable)

i will get a prototype up tomorrow or next day for you to play with.

once caveat.. php 5, so i can use the zend built in json_encode routine (very fast).

if you MUST have php4, then there is a workaround, but i don't recommend. (slower and in php code vs compile c)
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/27/2007 8:20 AM
Originally Posted by sirdude
hehe.. well you want kick + ban, max online limit ? (i will leave out the start/stop times as you can figure a way to deal with that manually -- ie make the link not work or have a default screen -- for now)

The start/stop time in our previous chat worked a bit better then that. It was a time when you could get in, but it didn't close up after that time. If you were in, you stayed in. If somehow you had to reboot, you got 5 minutes to get back in. I'll get that in myselve again.

Our max online was combined also with an idle kick. If you were chatter limit+1, it would kick a passive user (no activity for x minutes).

Quote
once caveat.. php 5, so i can use the zend built in json_encode routine (very fast).

php 5 is fine, that's what running at our host.
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/27/2007 8:22 AM
well, excellent!

maybe i get it to a point and then you add those features in and post back here! laugh

ty blaaskaak
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/27/2007 8:32 AM
Originally Posted by sirdude
maybe i get it to a point and then you add those features in and post back here! laugh

That's what ubb haxxors are for right?
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/27/2007 10:05 AM
awee, so cute, SD made a new playmate! wink
Posted By: Ian_W Re: [7.2x] - Naked shoutbox - 08/27/2007 8:28 PM
Originally Posted by sirdude


once caveat.. php 5, so i can use the zend built in json_encode routine (very fast).


I was getting excited, until I read that frown
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/27/2007 9:01 PM
did you read the rest of the post ?

Quote
once caveat.. php 5, so i can use the zend built in json_encode routine (very fast).

if you MUST have php4, then there is a workaround, but i don't recommend. (slower and in php code vs compile c)
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 08/27/2007 10:15 PM
Originally Posted by sirdude
did you read the rest of the post ?

I didn't, I have php5 smile
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 08/28/2007 3:18 AM
Yeh, who isn't using PHP5 now :x
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 08/28/2007 3:41 AM
Ian
Posted By: Ian_W Re: [7.2x] - Naked shoutbox - 08/28/2007 12:35 PM
Me laugh

If only I could frown

Maybe one day smile
Posted By: Astronomie_de Re: [7.2x] - Naked shoutbox - 09/16/2007 7:06 PM
Hi Sirdude,

are there any updates on this mod?
I would like to integrate a testversion of it on Astronomie.de.

Regards,
Thorsten
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 09/16/2007 7:27 PM
well, i kinda got sidetracked into 7.3 development. so this puppy sat on the shelf for a bit.

the next time i take it off the shelf and dust it off should be where it get it to the point that it does most of what i've described in the wish list.

i know blaask has some more ideas, so i'm hoping that once i feed it out here, he will also add his magic to make it even better.

if you're looking for a timeframe, i'd say it's a couple of weeks away as i still have some 7.3 items to finish off.
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 09/17/2007 12:23 AM
Originally Posted by sirdude
i know blaask has some more ideas, so i'm hoping that once i feed it out here, he will also add his magic to make it even better.


We have a date smile
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 09/17/2007 12:37 AM
whoops i said blaask, when i meant Yarp™
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 09/17/2007 1:55 AM
Yarppy Yarperson?
Posted By: blaaskaak Re: [7.2x] - Naked shoutbox - 09/17/2007 8:33 AM
Funny thing is, our Hamster is called yarr, and we have for almost 2 years now smile

He has his own pirate boat next to his cage and stuff. (Yep, I'm not a 100% wink )
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 09/17/2007 11:10 AM
You make me feel normal...

When my son was 6 months, I bought him a piggy bank... Which is a pirate jumping out of a pirates chest... :flex:™
Posted By: Ian_W Re: [7.2x] - Naked shoutbox - 11/18/2007 7:43 PM
Originally Posted by sirdude
ok, i've complete overhauled it to use new javascript. this is essentially standalone and only shares with ubbthreads on the user DB side of things as well as to grab the styles.

i will wrap it up soon, but it ain't ready for prime time yet..

til then... patience smile


Any developments on these changes?
Posted By: Gary Dean Re: [7.2x] - Naked shoutbox - 11/19/2007 1:29 AM
is there any place where this mod is installed where it can be tried out?

from what i've seen so far in this thread, it looks very good, though perhaps far more sophisticated than i really require!
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 11/19/2007 10:30 AM
i have it running on 2 private boards (7.2.2) ... and haven't touched this puppy in a long time.

until 7.3 comes out, it's going to remain as is..

after that, i can revisit this smile
Posted By: Ian_W Re: [7.2x] - Naked shoutbox - 11/19/2007 8:43 PM
Originally Posted by Gary Dean
is there any place where this mod is installed where it can be tried out?

from what i've seen so far in this thread, it looks very good, though perhaps far more sophisticated than i really require!


We have it running at http://www.fansfocus.com smile
Posted By: mishter Re: [7.2x] - Naked shoutbox - 12/28/2007 5:04 PM


Posted By: Dslam Re: [7.2x] - Naked shoutbox - 03/04/2008 3:59 AM
hey this is what I was looking for
question here
how do I add the header/footer to the naked shout
then I would not have to open another page

edit
I looked over the simple.inc.php & compared to naked shout .
but still fail to see why it's not pulling the header & footer
can someone point me in the right direction
Posted By: DougMM Re: [7.2x] - Naked shoutbox - 05/04/2008 6:15 AM
I just installed this and I'm looking for a way to add code to the shout box, it would be nice for urls to be clickable and what not. [url ]???????? [/url ] Any ideas on this?
Posted By: Jaymo Re: [7.2x] - Naked shoutbox - 05/08/2008 10:01 PM
Hi everyone! I asked this over at Ubbcentral, but since it might be a coding issue that needs to be played with, I thought I'd ask it here, too.

Is there a way to periodically clear the messages in the ShoutBox? I don't use the shoutbox on the portal page, but want to experiment with the Naked Shoutbox. I have all of the other coding in place, however, the only problem is that when I opened the naked shoutbox, it had the last posts still listed (and the shoutbox has been turned off since like the beginning of March.)

I would like to empty the shoutbox from time to time, so that people aren't seeing months-old conversations. Since this may be a coding thing, I thought this would be the best place to ask. Thanks!
Posted By: Gizmo Re: [7.2x] - Naked shoutbox - 05/08/2008 11:16 PM
As posted at UBBCentral; items in the shoutbox should scroll off sith subsequent posts; believe the total number is 30. So on the 31st post, the first in the file will scroll off.
Posted By: Jaymo Re: [7.2x] - Naked shoutbox - 05/09/2008 1:48 AM
Thanks, Giz!
Posted By: MarkeeDragon Re: [7.2x] - Naked shoutbox - 07/11/2008 7:18 PM
Does this work in 7.3?
Posted By: sirdude Re: [7.2x] - Naked shoutbox - 07/11/2008 8:30 PM
i'll prolly have a new nakedshout after the weekend. one dude, who's been using it needs an upgrade..
Posted By: Gardener [7.3] - Naked shoutbox - 07/11/2008 11:07 PM
This seems to work for me (in 7.3):

templates/default/nakedshout.tpl
PHP Code

{* Script Version 7.3 *}
{*
SD - Mod: The naked shoutbox is born! *}
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang.XML_LANG}" lang="{$lang.XML_LANG}" dir="{$lang.READ_DIRECTION}">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset={$lang.CHARSET}" />
<
link rel="stylesheet" href="{$stylesheet}" type="text/css" />
<
script type="text/javascript" src="{$config.BASE_URL}/ubb_js/ubb_jslib.js?v=7.3"></script>
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/shoutbox.js?v=7.3"></script>
<script type="text/javascript" src="{$config.BASE_URL}/ubb_js/boxover.js?v=7.3"></script>
<script language="javascript" type="text/javascript">
var confirmText = "{$lang.CONFIRM}";
var notLogged = "{$lang.NO_SHOUT}";

var baseurl = "{$config.BASE_URL}";
var fullurl = "{$config.FULL_URL}";
var imagedir = "{$style_array.general}";
var script = "{ubb url="" full="true"}";
var myUid = '{$myid}'; // Don't get excited, you can't exploit this :D
var submitClicked = "{$lang.SUBMIT_CLICKED}";
var s_priv = '{$s_priv}';
</script>
<title>Naked Shout - {$lang.POWERED_BY} UBB.threads™</title>
</head>
<body>

<table width="810px" height="560px" cellpadding="0" cellspacing="0" border="0">
<tr><td>
{$tbopen}
<tr>
<td class="tdheader">{$lang.SHOUT_BOX}</td>
</tr>
<tr>
<td class="alt-1">
<div id="shout_box" style="height:550px; width: 800px; overflow:auto;">
<div id="shout_content" style="height: 530px;">
</div>
</div>
<form name="shoutbox" method="post" action = "" onsubmit="shoutit();return false;">
<div align="center">
<span id="shout_field">
<input type="text" name="shoutbody" size="80" class="form-input" maxlength="255" value="" onenter="shoutit()" />
</span>
<span id="sending_field" style="display:none">
Sending...
</span>
<br />
<input type="button" name="shoutbutton" value="{$lang.SHOUT_IT}" class="form-button" onclick="shoutit()" />
<input type="reset" value="{$lang.RESET_IT}" class="form-button" />
</div>
<div id="shout_uid" style="display:none;">
Delete this shout?
<input type="button" class="form-button" id="del_yes" value="Yes" /><input type="button" class="form-button" id="del_no" value="No" />
</div>
</form>
</td>
</tr>
{$tbclose}

</td></tr></table>
<script type="text/javascript">getShouts(0);</script>
</body>
</html>

scripts/nakedshout.inc.php

PHP Code


<?php

if(!defined("UBB_MAIN_PROGRAM")) exit;

function &
page_nakedshout_gpc () {
return array(
"input" => "",
"wordlets" => "" ,
"user_fields" => "",
"regonly" => 1,
"admin_only" => 0,
"admin_or_mod" => 0,
);
}
// end page_picupload_gpc

function &page_nakedshout_run () {
global
$style_array,$smarty,$user,$in,$ubbt_lang,$config,$forumvisit,$visit,$dbh,$var_start,$var_eq,$var_sep,$var_extra,$userob;
extract($in, EXTR_OVERWRITE | EXTR_REFS); // quick and dirty fix - extract hash values as vars

// -------------------
// Just the facts maam
$smarty_data = array();
define('NO_WRAPPER',1);
$stylesheet = "{$config['BASE_URL']}/styles/{$style_array['css']}";
$s_priv = $userob->check_access("site","CAN_SHOUT");

$smarty_data = array(
"stylesheet" => $stylesheet,
"myid" => $user['USER_ID'],
"s_priv" => $s_priv,
);


return array(
"header" => array (
"title" => "Naked shout",
"refresh" => 0,
"user" => $user,
"Board" => "",
"bypass" => 0,
"onload" => "",
"breadcrumb" => "",
),
"template" => "nakedshout",
"data" => & $smarty_data,
"footer" => false,
"location" => "",
);
}
?>


Posted By: sirdude Re: [7.3] - Naked shoutbox - 07/12/2008 7:56 AM
Good stuff, Gardener smile

I'll be adding a new version with more bells / whistles, since it's needed.. I might just leave your example as the final version of nakedshout v1.1

and then create a new thread with v2.0

ty smile

ps: the link to your 'Complete list of my mods' is busticated wink
Posted By: Gardener Re: [7.3] - Naked shoutbox - 07/12/2008 11:53 PM
Yeah, my server broke down completely a while ago and I haven't had time to set up the site again.
Posted By: Iann128 Re: [7.3] - Naked shoutbox - 08/23/2008 2:27 AM
Sirdude any update on v2 smile

Ian
Posted By: badfrog Re: [7.3] - Naked shoutbox - 03/27/2009 4:08 PM
did this project die?
Posted By: sirdude Re: [7.3] - Naked shoutbox - 03/28/2009 6:33 PM
i just had someone who 'needs' it.. so i will be resurrecting this in the next few weeks..

v2.1 i guess laugh

prolly with either MT or jQ for the javascript library, but that won't really matter to non-coders..
Posted By: webDosser Re: [7.3] - Naked shoutbox - 03/29/2009 8:40 AM
i just want to move the shout box to beneath the navbar without having to click it to open it..

Posted By: webDosser Re: [7.3] - Naked shoutbox - 03/31/2009 7:17 AM
now let me think.. what was the reason i went with VB?.
Posted By: Stephen G Re: [7.3] - Naked shoutbox - 03/31/2009 1:14 PM
Because you're insane?

laugh
Posted By: Gizmo Re: [7.3] - Naked shoutbox - 03/31/2009 4:19 PM
Not sure if it's as easy as creating template code out of the cache rebuilder routines; if i get some time before this weekend I'll take a look.
Posted By: Thomas_Denmark Re: [7.2.1] - Naked shoutbox - 12/28/2009 8:51 PM
Is this combatibme vith 7.5.4.2 ?? i cant get it to work ??

http://www.gramkofi.dk/logen/ubbthreads.php?ubb=nakedshout
Posted By: AllenAyres Re: [7.2.1] - Naked shoutbox - 12/31/2009 5:58 AM
It says I have to be logged in. What are you getting?
Posted By: lightningrod Re: [7.2.1] - Naked shoutbox - 02/09/2010 6:43 AM
This still works with 7.5.3 ?

Posted By: lightningrod Re: [7.2x] - Naked shoutbox - 02/09/2010 6:45 AM
Originally Posted by sirdude
ok, i've complete overhauled it to use new javascript. this is essentially standalone and only shares with ubbthreads on the user DB side of things as well as to grab the styles.

sooo, you don't have to worry about upgrades trashing this.

the new javascript (ajax) is much more efficient by using JSON as the transport format. formerly it took 14K to fill a shoutbox and now it takes 4K.

i've pushed the load of ALL of the formatting to the client, using DOM instead of burdening the php server code. so this is less of a strain on the server itself.

i almost have it done, but will at least leave you with a typical screenie..

[Linked Image]

the lower right side is a space that you can put your own content into.. ads, logo, whatever..

i showed the ajax 'bashing..' 'sending..' reveals here, but they are normally hidden and come into play on an async call begin.

the 2 columns of buttons on the left allow a user to select rows (1st one) for subsequent 'Bash'.. the 2nd column is the same as the delete [x] is now..

selection gives feedback in a different highlight color, like phpmyadmin does for rows..

the upper right hand side is a current tally of who's online in the shoutbox.. configurable in the admin cpanel..

i will wrap it up soon, but it ain't ready for prime time yet..

til then... patience smile

ps: and thanks to Rick!! for the wonderful style from which to use as an excellent look/feel.


What you posted here, it's the same Instructions as the first post on this thread?

Posted By: sirdude Re: [7.2x] - Naked shoutbox - 02/09/2010 7:19 PM
no.. i am redoing it for 7.5.5 on another forum.. won't be done until then
Posted By: Zarzal Re: [7.2x] - Naked shoutbox - 06/28/2010 9:53 AM
Originally Posted by sirdude
no.. i am redoing it for 7.5.5 on another forum.. won't be done until then
What is the status of it right now? I'm looking for a chat solution right now.
Posted By: MithofOT Re: [7.2x] - Naked shoutbox - 08/31/2010 8:58 PM
Was wondering to if this mod/plugin is dead. I have a forum that the community uses the heck out of the shoutbox. I have the IRC plugin but would like a little more control. Plus this just looks fun.
Posted By: NiMS Re: [7.2x] - Naked shoutbox - 02/16/2012 12:14 AM
Same question here. Any updates on the new version?
Posted By: bellaonline Re: [7.2x] - Naked shoutbox - 05/05/2012 11:42 PM
Is the new version available somewhere? I've been using FlashChat and it's just not healthy. I don't see any other real option for integrating a chat with the UBB logons except this one.
Posted By: bellaonline Re: [7.2x] - Naked shoutbox - 05/06/2012 12:00 AM
OK it turns out I had implemented this a while ago while waiting for the new version to come out, so it was already on my site. It will certainly work for now - it seems to run fine in the latest version of the code.

The only thing is my chats easily run over 30 lines and I need to save the content afterwards to post for the editors who couldn't attend. I tried to find where to alter the 30 line limit but couldn't see where it was. Where is that set, so I can change it to be 1000 lines?
© UBB.Developers