PDA

View Full Version : Shout Box module using BVShoutBox from vb.org


emtee
09-05-2004, 11:54 AM
I see this request here (http://www.vbadvanced.com/forum/showthread.php?p=13380&posted=1#post13380), so I post it here.

I use BVShoutbox FULL (http://www.vbulletin.org/forum/showthread.php?t=63562) for my 3.0.3 and it works great. I ported it to vba cmps only using template and think some of you could really use my codes. It's really easy, anybody could do it, but because I didn't see any shoutbox module here so I share my simple codes. I didn't use any hacks for my shoutbox module. I just add a template and make very minor modifications to it and put the shoutbox in center column and it just works great!

Here's my demo:

http://members.lycos.co.uk/martin7983/vbacmps-with-shoutbox.gif

Sorry I can't attach the file because it's too big (~183KB). Here they only allow a 20KB max.


Now let's get to work. Installation time: about 2 mins.

First step:
Add a new template called "adv_portal_shoutbox" (without the quotes) with the content shown below:


<!-- start shoutbox -->

<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Shout Box</strong></span></td>
</tr>
<tr>
<td class="alt1"><span class="smallfont">

<iframe src="http://www.yourforumurl.com/forum/shoutbox.php?$session[sessionurl]do=iframe" width="100%" height="120" scrolling="yes" frameborder="0" name="shoutbox" id="shoutbox"></iframe>

</td>
</tr>
</table>
</form>

<!-- end shoutbox -->



Optional: If you use the /ˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉ\ for the top and \_______________/ for the bottom to make the module looks nicer (like I do with my modules) then you can use this code for the "adv_portal_shoutbox" template instead of the one above:

<!-- Start optional -->

<!-- start shoutbox -->
<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">

<! -- the cute stuff -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td><img src="http://www.YourForumURL.com/forum/foreverblue/corner_left.gif" alt="" border="0"></td>
<td class="tcat" width="100%" style="text-align: center;">
<a href="http://www.YourForumURL.com/forum/shoutbox.php? target="_blank">Shout Box</a>

</td>
<td><img src="http://www.YourForumURL.com/forum/foreverblue/corner_right.gif" alt="" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
<! -- the cute stuff -->

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="alt1"><span class="smallfont">

<iframe src="http://www.YourForumURL.com/forum/shoutbox.php?$session[sessionurl]do=iframe" width="100%" height="120" scrolling="yes" frameborder="0" name="shoutbox" id="shoutbox"></iframe>

</td>
</tr>
</table>

<! -- the cute stuff -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td><img src="http://www.YourForumURL.com/forum/foreverblue/emtee_bottom_left.gif" alt="" border="0"></td>
<td width="100%" background="http://www.YourForumURL.com/forum/foreverblue/emtee_bottom_bg.gif" valign="middle" align="center"></td>
<td><img src="http://www.YourForumURL.com/forum/foreverblue/emtee_bottom_right.gif" alt="" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
<! -- the cute stuff -->

</form>
<!-- end shoutbox -->

Of course you change the name of the corner images that you use with your forum.

<!-- End optional -->


Next step (Optional) : Locate "shoutbox_newmessage" template (for those who don't know where it is!)
shoutbox_newmessage is under Shoutbox Templates, and Shoutbox Template is just above Show Groups Templates)


Next step: In "shoutbox_newmessage" template, find this:

<input type="text" name="message" value="" size="70" />

Change the value size="70" to size="60" or less so it won't push the Shout button to the next line in the portal page and display only half of the Shout button.
If you want to see what I meant, don't change the value size="70" yet and see it in the portal and you'll understand. Then change it, see it again and you'll see. Personally I use size="60" so it will look best on my site with 1024x768 resolution.

Final step: Add the module to the portal

Go to AdminCP, vBa CMPS -> Add module

Module Title: Shout Box
Module Identifier: leave blank unless you know what you have a use for it.
File to Include: don't touch this one
OR Template to Include: shoutbox
Active: click on "Yes"
Colum: Center (Note: Because this is design for center column only!)
Display Order: 3 (or whatever order you want to use)
Templates Used: adv_portal_shoutbox
Update All Pages? Yes (it's default)

Check box the usergroups you want them to see this module. I just check all of them and it's default so basically you just leave it alone.
Click Save

You're done!

I put every single piece of information here already. It's really easy! If you can't make it work then I'm here to help, but then you must read the book "Webmasters for dummies" !!! :D :D :D

martinh4
09-05-2004, 02:10 PM
Hi emtee,

Just what i needed, hats off to you. :)

Our Sponsors
 

Immortal
09-05-2004, 02:48 PM
Very nice, however it doesnt work for its give me only background (in shoutbox block) nothing more (look at attachment), and my

shoutbox_newmessage

Looks like this :


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

<title>$vboptions[bbtitle] - Shoutbox</title>
$headinclude
<script language="javascript">
<!--
function validate(theform)
{
if (theform.message == "")
{
alert("You must type a message/shout!");
return false;
}
else
{
return true;
}
}
function openarchive()
{
shoutwin = window.open("shoutbox.php?$session[sessionurl]do=archive", "Shoutbox", "width=700,height=500,scrollbars=yes,status=yes,directories=yes,toolbar=yes,locat ion=yes,resizable=yes,menubar=yes");
shoutwin.focus();
}
//-->
</script>
$refresh

</head>
<body class="alt1" style="margin: 0px">

<form action="shoutbox.php" method="post" name="vbform" onsubmit="return validate(this);">
<input type="hidden" name="do" value="doaddnew" />
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="70%" align="left">
<input type="text" name="message" value="" class="bginput" style="width:80%;" />
<input type="submit" value="Shout" class="button" />
</td>
<td width="30%" align="right" style="font-size:12px">
<a href="javascript:parent.location = parent.location;">Refresh</a> | <a href="javascript:openarchive();">Archive</a>
</td>
</tr>
</table>
</form>

</body>
</html>


There is no :


<input type="text" name="message" value="" size="70" />


Could you please help with this ? Coz i really need this badly.

ragintajin
09-05-2004, 03:58 PM
Does this require the use of iframes?

Our Sponsors
 

emtee
09-05-2004, 05:20 PM
Immortal, in your shoutbox_newmessage, try replace the code
<input type="text" name="message" value="" class="bginput" style="width:80%;" />

with this code
<input type="text" name="message" value="" class="bginput" size="60" />

I think that's it. Maybe someone changed that template before so you didn't find the code. If you view the default template for shoutbox_newmessage, you should find it.

Anyways here's my original shoutbox_newmessage template for BVShoutbox FULL:


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

<title></title>
$headinclude
<script language="javascript">
<!--
function validate(theform)
{
if (theform.message == "")
{
alert('$vbphrase[you_must_enter_a_shout]');
return false;
}
else
{
return true;
}
}
//-->
</script>
$refresh

</head>
<body class="alt1">

<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="insert" />

<table cellpadding="0" cellspacing="3" border="0" width="100%" align="center">
<tbody>
<tr>
<td width="100%">
<input type="text" name="message" value="" size="70" />
<input type="submit" value="$vbphrase[shout]" class="button" />
</td>
<td align="right" nowrap="nowrap">
<div class="smallfont">
<a href="javascript:parent.location = parent.location;">$vbphrase[refresh]</a> | <a href="shoutbox.php?$session[sessionurl]do=archive" target="_blank">$vbphrase[archive]</a>
</div>
</td>
</tr>
</tbody>
</table>

</form>

</body>
</html>

emtee
09-05-2004, 05:23 PM
ragintajin,

Yes it does use <iframe>...</iframe> if you take a look here


<iframe src="http://www.yourforumurl.com/forum/shoutbox.php?$session[sessionurl]do=iframe" width="100%" height="120" scrolling="yes" frameborder="0" name="shoutbox" id="shoutbox"></iframe>

Immortal
09-05-2004, 05:50 PM
Immortal, in your shoutbox_newmessage, try replace the code
<input type="text" name="message" value="" class="bginput" style="width:80%;" />

with this code
<input type="text" name="message" value="" class="bginput" size="60" />

I think that's it. Maybe someone changed that template before so you didn't find the code. If you view the default template for shoutbox_newmessage, you should find it.

Anyways here's my original shoutbox_newmessage template for BVShoutbox FULL:


$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

<title></title>
$headinclude
<script language="javascript">
<!--
function validate(theform)
{
if (theform.message == "")
{
alert('$vbphrase[you_must_enter_a_shout]');
return false;
}
else
{
return true;
}
}
//-->
</script>
$refresh

</head>
<body class="alt1">

<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="insert" />

<table cellpadding="0" cellspacing="3" border="0" width="100%" align="center">
<tbody>
<tr>
<td width="100%">
<input type="text" name="message" value="" size="70" />
<input type="submit" value="$vbphrase[shout]" class="button" />
</td>
<td align="right" nowrap="nowrap">
<div class="smallfont">
<a href="javascript:parent.location = parent.location;">$vbphrase[refresh]</a> | <a href="shoutbox.php?$session[sessionurl]do=archive" target="_blank">$vbphrase[archive]</a>
</div>
</td>
</tr>
</tbody>
</table>

</form>

</body>
</html>



I did replace my shoutbox_newmessage with youre orginal and changed 70 to 60, but still i got only background in shoutbox(see picture in post above). No idea why this isnt working :\

Nordinho
09-05-2004, 06:31 PM
Hey Emtee,

Thanx for this!! Anyway, if you want you can add the smilie button as well, right next to the shoutbutton...Copy the code in red from below. You'll have to change the 'messagesize' value to something below 60...(30 in my case)

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>

<title></title>
$headinclude
<script language="javascript">
<!--
function validate(theform)
{
if (theform.message == "")
{
alert('$vbphrase[you_must_enter_a_shout]');
return false;
}
else
{
return true;
}
}
//-->
</script>
$refresh

</head>
<body class="alt1">

<form action="shoutbox.php" method="post" onsubmit="return validate(this);" name="shoutform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="insert" />

<table cellpadding="0" cellspacing="3" border="0" width="100%" align="center">
<tbody>
<tr>
<td width="100%">
<input type="text" name="message" value="" size="30" />
<input type="submit" value="$vbphrase[shout]" class="button" />

<!-- clientscript -->
<script type="text/javascript" src="clientscript/vbulletin_editor.js"></script>
<script type="text/javascript" src="clientscript/vbulletin_stdedit.js"></script>
<script type="text/javascript">
<!--
function vbcode_init_small()
{
if (editor_loaded)
{
return;
}

theform = document.forms.vbform;
}
var smiliewindow_x = 240;
var smiliewindow_y = 280;
//-->
</script>
<!-- / end clientscript -->
<input type="button" value="$vbphrase[smilies]" class="button" onclick="open_smilie_window(smiliewindow_x, smiliewindow_y, 0, '0'); return false" />
<!-- initialization script -->
<script type="text/javascript">
<!--
vbcode_init_small();
//-->
</script>
<!-- / end initialization script -->
</td>
<td align="right" nowrap="nowrap">
<div class="smallfont">
<a href="javascript:parent.location = parent.location;">$vbphrase[refresh]</a> | <a href="shoutbox.php?$session[sessionurl]do=archive" target="_blank">$vbphrase[archive]</a>
</div>
</td>
</tr>
</tbody>
</table>

</form>

</body>
</html>

lieutan
09-06-2004, 01:37 AM
I did replace my shoutbox_newmessage with youre orginal and changed 70 to 60, but still i got only background in shoutbox(see picture in post above). No idea why this isnt working :\

I had the same problem but found the fix... Try this:

Goto admincp and find your permissions page.. Find the shout box permissions box and just click the save button... After I did this all started working..

Let me know if this works for you....

Immortal
09-06-2004, 06:21 AM
Exactly - that solved my problem - thanks very much !

Diver
09-08-2004, 08:55 AM
thank you so much for this :)

but i have a background problem:
the main background color is shown in the whole box. is it possible to completely change this to eg. alt1?
i tried it in the iframe templates but without success. there's always the main background color shown :(

emtee
09-08-2004, 07:18 PM
Diver,

Read lieutan's post (2 post above yours) see if it's the case you're experiencing.

Regards,
MT

Diver
09-09-2004, 07:09 AM
yeah tried it but without success. the main background is still shown

djnth
09-14-2004, 05:52 PM
Is there any way of using this in a side block rather than in the center?

KW802
09-14-2004, 11:06 PM
Is there any way of using this in a side block rather than in the center?
If you guys haven't already you may want to check out this thread....

http://www.vbadvanced.com/forum/showthread.php?t=1485

Diver
09-16-2004, 05:36 AM
Is there any way of using this in a side block rather than in the center?
sure just edit the width of the templates and use the box as a sidebox

should be just a couple of small template modifications

ragintajin
09-20-2004, 11:54 PM
Any ideas on how to make it without using iframes?

deb0
09-23-2004, 02:49 PM
ok, do we run the install, then make the changes you have specified? What is the order of configuration?

i tried editing the tamplates, but they weren't there. So i grabbed the install filess, followed the directions, and in the beginning of install i get this error

Invalid SQL: ALTER TABLE usergroup ADD shoutboxpermissions INT UNSIGNED NOT NULL DEFAULT '0' AFTER forumpermissions
mysql error: Duplicate column name 'shoutboxpermissions'

plz help

whitetigergrowl
12-30-2004, 03:06 PM
How do I change the template background for the shoutbox? On one skin it looks great, but on the next skin the template overpowers the font. Any help is appreciated! Heres a link to the problem background:

http://www.powerrangerempire.com/?styleid=108

Choose the 'Dark Empire' template.

PlayBoy69
01-22-2005, 03:24 AM
Were is the permissions you speak of so that I can se if that fixes my shoutbox

Ultimate-Gamers (http://www.ultimate-gamers.com)

thenewstlucian
01-23-2005, 04:58 PM
how do you add a new template?

PlayBoy69
01-27-2005, 02:05 PM
can anyone help me here on this I believe it is all done right but I can only see the shoutbox module I dont see anything else I need to know what will help for this to work.

carpefile
02-04-2005, 04:40 PM
Were is the permissions you speak of so that I can se if that fixes my shoutbox

Ultimate-Gamers (http://www.ultimate-gamers.com)

I need this too. Have gone over everything three times and I can't seem to find the area where I give Shoutbox permissions. Unless you mean in the vba edit modules area for shoutbox, in which case, that didn't work.

carpefile
02-05-2005, 11:47 AM
Is this no longer supported or what?
My members are clamoring for a shoutbox (which we had with vbindex) and I need to give them one.
Would be a real pain to have to uninstall this shoutbox when it is so close to working, so please, someone, clarify where these permissions are that need to be saved for messages to be visible in the shoutbox.

carpefile
02-06-2005, 12:19 PM
Bump please

carpefile
02-07-2005, 02:11 PM
I hate to be a pain, but..... I really need this simple bit of info that can make the shoutbox work. The way the installer for BVShoutbox works makes it a real pain to uninstall, and I hate to go thru all that work when it appears that there is a simple solution, I just need a little guidance to find it.
Help! Please!

PlayBoy69
02-08-2005, 04:34 PM
I hardly did anything at all. I went to the usergroups, ensured they the permissions were correct and saved each of them. At that point the shoutbox will LOOK blank because there aren't any shouts in them. I made a shout and voila!

this is what was posted to me on another site about the shoutbox. I had the problem you are having and since I couldnt get support here I looked elsewere and the guy was really great he helped me out and fixed it. Maybe do what he said go in the usergroups and ensure the permissions are set then shout in see if it works. Hope that helps if so drop a line over at my site Ultimate-Gamers the ultimate gaming community (http://www.ultimate-gamers.com) and let me know if you got it working. also if you are a gaming clan stop by and help build the community. this site is for all gamers to come and chat about any game you like we even have a chat so you can all get in and chat with other gaming groups as well.

carpefile
02-08-2005, 08:56 PM
So you have to go into "usergroup manager" and edit each group to set permissions.
Thanx, that did the trick! :D
Appreciate the help PlayBoy69!

Drago912
08-13-2005, 06:21 PM
I had the same problem but found the fix... Try this:

Goto admincp and find your permissions page.. Find the shout box permissions box and just click the save button... After I did this all started working..

Let me know if this works for you....

Same problem here but I dont understand where yer talking about.....where is the permission box for the shout box??

kwopper
08-13-2005, 10:05 PM
Same problem here but I dont understand where yer talking about.....where is the permission box for the shout box??

Hey D....your answer was one post above ya...LOL...I see you pay attention here just like on your site... :D :D

TRUCKER

Drago912
08-14-2005, 12:22 PM
haha!!

I swear that post wasnt there before......lmao!!

cheers Trucker

HeLL
08-20-2005, 06:42 AM
I get this error when i trying to install:

Database error in vBulletin 3.0.7:

Invalid SQL: ALTER TABLE vbf_usergroup ADD shoutboxpermissions INT UNSIGNED NOT NULL DEFAULT '0' AFTER forumpermissions
mysql error: Duplicate column name 'shoutboxpermissions'

mysql error number: 1060