php forum
php mysql forum
php mysql smarty
 
Page 1 of 4 1 2 3 4 >
Topic Options
#315254 - 08/17/07 10:36 PM [7.2.1] - Naked shoutbox
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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&trade;</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 !):


and

and


upload all files and *poof* done!

enjoy,
SD
_________________________

Top
#315255 - 08/17/07 10:42 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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
_________________________

Top
#315258 - 08/18/07 07:15 AM Re: [7.2x] - Naked shoutbox [Re: sirdude]
Ian_W Global Moderator Offline
Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
Thanks smile

Looking forward to the other features smile

BTW - what is/are bash, Wallops etc.?
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#315263 - 08/18/07 09:14 AM Re: [7.2x] - Naked shoutbox [Re: Ian_W]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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:


and

and

and

and

and

and


The idea came from the website, http://bash.org, where IRC and IM conversation snippets are saved to be rated and read for future..
_________________________

Top
#315265 - 08/18/07 01:05 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
hmm.. will this work as a guestbook? May need to allow guest posting and a way to add their name to it.
_________________________
- Allen wavey
- What Drives You?

Top
#315268 - 08/18/07 01:54 PM Re: [7.2x] - Naked shoutbox [Re: AllenAyres]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
you mean the shoutbox would be a seperate page, where the shouts get logged to some DB table ?

or am i missing your idea ?
_________________________

Top
#315273 - 08/18/07 09:20 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
I think so smile

Someone was asking for a guestbook on their site. I've never used one so... smile
_________________________
- Allen wavey
- What Drives You?

Top
#315274 - 08/18/07 09:22 PM Re: [7.2x] - Naked shoutbox [Re: AllenAyres]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
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)
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315275 - 08/18/07 10:35 PM Re: [7.2x] - Naked shoutbox [Re: Gizmo]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
That looks good gizzy smile
_________________________
- Allen wavey
- What Drives You?

Top
#315276 - 08/18/07 11:02 PM Re: [7.2x] - Naked shoutbox [Re: AllenAyres]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
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...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315277 - 08/18/07 11:10 PM Re: [7.2x] - Naked shoutbox [Re: Gizmo]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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
_________________________

Top
#315278 - 08/18/07 11:21 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
'eh, doesn't motivate me... Feel free to gank my forms though lol..
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315279 - 08/18/07 11:23 PM Re: [7.2x] - Naked shoutbox [Re: Gizmo]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
..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
_________________________

Top
#315280 - 08/18/07 11:32 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25452
Loc: Texas
oui, free giz-guestbook!

or make it a paid mod, let us play with it smile
_________________________
- Allen wavey
- What Drives You?

Top
#315281 - 08/18/07 11:38 PM Re: [7.2x] - Naked shoutbox [Re: AllenAyres]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
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...
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315282 - 08/18/07 11:52 PM Re: [7.2x] - Naked shoutbox [Re: Gizmo]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
did you read that i'm too lazy to 'view source' ? tipsy

sheeesh

help a brotha out here.
_________________________

Top
#315283 - 08/19/07 02:05 AM Re: [7.2x] - Naked shoutbox [Re: sirdude]
Gizmo Administrator Online   shocked
Wizard

Registered: 01/10/00
Posts: 5134
Loc: Portland, OR, USA
lol, it'd be the same form weather i emailed it to you or you viewed source; just the one is faster wink
_________________________
UBB.Dev - Where you too can render your UBB install completely useless...
UGN Security, Elite Web Gamers & VNC Web Design Owner

Top
#315288 - 08/19/07 05:20 AM Re: [7.2x] - Naked shoutbox [Re: Gizmo]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 85
Loc: UK
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.

Top
#315293 - 08/19/07 11:37 AM Re: [7.2x] - Naked shoutbox [Re: Mark_S]
sirdude Moderator Offline
Enthusiast

Registered: 11/08/03
Posts: 442
Loc: SoCal
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
_________________________

Top
#315295 - 08/19/07 05:10 PM Re: [7.2x] - Naked shoutbox [Re: sirdude]
Mark_S Offline
Power User

Registered: 11/15/03
Posts: 85
Loc: UK
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

Top
Page 1 of 4 1 2 3 4 >


Moderator:  sirdude 
Who's Online
0 registered (), 22 Guests and 11 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Yesterday at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
12/03/08 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users