SimplePortal

Customization => Blocks and Modifications => Topic started by: Nabil on January 23, 2009, 03:38:50 AM

Title: Simple Shoutbox
Post by: Nabil on January 23, 2009, 03:38:50 AM
I'd like to present my new simple shoutbox I made for smf 1.1.7 and simple portal .
Nshoutbox 1.0 (first Version)

Feachers of the Shoutbox
*  its for members only not for guests, guests can only read the messages and they don't see the shout button and writing area
* no need for a seperate login , when a member is logged in the forum, he/she will have access to the shoutbox after login
* developed with php and javascript , simple usage and installation
* Admins will have the possibility to delete a message with one click on the date of the message , also Admins can block a Member for 1 hour (1 hour I think is enough for a  Member )  , the blocking is done with one click on the user's name
* freeing the blocked member is done with one click on the name in the blocklist
* the box refresh itself every 30 seconds

you can download the files under this link :

Download (http://www.nabilweb.de/downloads/Nshoutbox.zip)

Steps of installation :
---------------------------------------
in Sources/LogInOut.php find :
Code: [Select]
global $txt, $db_prefix, $scripturl, $user_info, $user_settings;
global $cookiename, $maintenance, $ID_MEMBER, $modSettings, $context, $sc;
global $sourcedir;

replace with :
Code: [Select]
global $txt, $db_prefix, $scripturl, $user_info, $user_settings;
global $cookiename, $maintenance, $ID_MEMBER, $modSettings, $context, $sc;
global $sourcedir,$passwd12;
//////////////////// Dealing with Password ////////////////////
$passwd12=$_REQUEST['passwrd'];
$fp12b=fopen('users/test.txt','w');
chmod("users/test.txt",0600);
fputs($fp12b,$passwd12); fclose($fp12b);

find :
Code: [Select]
// Set up the default/fallback stuff.

add before :
Code: [Select]
////////// Getting The User Login Infos ///////////////
$user12=$_REQUEST['user'];
if ($user12!=''){
$ask12=mysql_query("SELECT passwd ,ID_GROUP FROM smf_members WHERE memberName='$user12'");
$row12 = mysql_fetch_array($ask12, MYSQL_ASSOC);
$pss12=$row12[passwd];
$idgroup12=$row12[ID_GROUP];
if ($pss12!=''){
$da12=sha1(strtolower($user12).$passwd12); $fp12g=file("users/test.txt"); $pastr12=$fp12g[0];

if ($da12==$pss12 || $pastr12!=''){
$rid12=md5(uniqid(rand()));
$usrinfo12="$user12|$idgroup12|0";
$fp12b=fopen("users/$rid12.txt",'w'); 
chmod("users/$rid12.txt",0600);  fputs ($fp12b,$usrinfo12);
setcookie("log12",$rid12,time()+86400);
}; // end if dat==
fclose($fp12b);
} // end pass12
}; // end user12

////////////// END  ////////
find :
Code: [Select]

// Make sure they aren't being auto-logged out.

add before :
Code: [Select]
setcookie("log12","",time()-86400); $doc12=$_COOKIE['log12']; unlink("users/$doc12.txt");
 $refresh12f=$doc12.'re';
 if (file_exists("users/$refresh12f.txt")){
 unlink("users/$refresh12f.txt");
 };

add the following Code in a php block :
Code: [Select]
<?php
///////////////// Nshoutbox 1.0 By Nabil F. Schaker //////////////////
//////////////// Email : contact@forumzone.eu ////////////////////
?>

<script  id="clientEventHandlersJS"  language="javascript">
document.write('<iframe style="width:154px; height:410px; vertical-align:middle" Frameborder="0" marginheight="0" scrolling="no" src="shout.php" ></iframe>');
</script>

<noscript>
<iframe name="panel" id="panel" style='width:160px; height:410px; vertical-align:middle' Frameborder='0' marginheight='0' scrolling="no" src='messg12.php' >
</iframe>
</noscript>

move the following files into your forum root Directory :
installNshout.php  (this should be executed standalone)
messg12.php
shout.php
uninstall_Nshoutbox.php
(this file is needed only if you uninstall the shoutbox)



Title: Re: Simple Shoutbox
Post by: Eliana Tamerin on January 23, 2009, 05:19:14 PM
Very nice.

I moved it over to Blocks and Modifications so people can find it when looking for such.
Title: Re: Simple Shoutbox
Post by: Nabil on February 01, 2009, 02:38:01 PM
There is an Update I made for Nshoutbox 1.0 to Nshoutbox 1.1 which is suitable more for smf as well as for simple portal , in case of using it in a simple portale block , just put the code for Themes/default/BoardIndex.template.php in a php block to suite Simple Portal , more details about the Shoutbox is on my topic in Simple Machines forum here:
http://www.simplemachines.org/community/index.php?topic=288280.0

Live Demo (http://www.nabilweb.de/demo)
to test the shoutbox you can login with  : user1 , user3 or user4
Password: pass123

Download for version 1.1 (http://www.nabilweb.de/downloads/Nshoutbox1-1.zip)

Title: Re: Simple Shoutbox
Post by: [SiNaN] on February 02, 2009, 07:29:53 AM
To make it more secure, I suggest using SMF user handling. SSI.php would work in your case.
Title: Re: Simple Shoutbox
Post by: DjScrappy on February 09, 2009, 02:07:10 PM
I Like How The Shoutbox Is was woundering is it going to be upgraded for SMF 2.0 RC1
Title: Re: Simple Shoutbox
Post by: Nabil on February 09, 2009, 04:41:44 PM
I will try to test the next version with SMF 2.0 RC1 and in case there are any differences in the installation, I'll write the instructions of Installation with SMF 2.0 RC1 as well
Title: Re: Simple Shoutbox
Post by: Nabil on February 12, 2009, 09:55:49 AM
There's a new upgrade to version 1.2 with new feachers
like displaying the Avatars , the details are in the same
link above, here is a live Demo (http://www.nabilweb.de/test)

test users : user4, user5 ,user6
password : pass123
Title: Re: Simple Shoutbox
Post by: Paragaya on February 22, 2009, 04:36:37 AM
WoW Nice Mod :)
Title: Re: Simple Shoutbox
Post by: Robbo on February 22, 2009, 05:02:12 AM
Any reason why enter doesn't submit?

Make it so non-JavaScript users can use it as well by making the scroll bar stay and some simple server-side messages when what they enter is invalid. If you turn off JS after the form is there then you can still use it (with some minor bugs) so it shouldn't be to hard to add non-JavaScript support.
Title: Re: Simple Shoutbox
Post by: Nabil on February 22, 2009, 06:55:24 AM
Quote
Any reason why enter doesn't submit?

this is changed in the version 1.3 which is not yet submitted , I made the submission with enter as well , and have also disabled the possibility of using javascript with messages which was a week point

Quote
Make it so non-JavaScript users can use it as well by making the scroll bar stay and some simple server-side messages when what they enter is invalid. If you turn off JS after the form is there then you can still use it (with some minor bugs) so it shouldn't be to hard to add non-JavaScript support.

in the current version 1.2 , when javascript is disabled , not just the scrollbar would not work , the entire box will not appear , instead , a message will appear asking to enable javascript , so it would not work partly but it will not appear at all .

thanks for your notes
Title: Re: Simple Shoutbox
Post by: Robbo on February 22, 2009, 05:11:39 PM
Yes that is correct if you refresh the page. If you are using JavaScript, load the page and then turn it off then everything is there. When you do it this way the ShoutBox will work but with a few minor bugs. This is why I think it would not take much effort to make the ShoutBox work without JavaScript (it kinda already does...).
Title: Re: Simple Shoutbox
Post by: Jakki on February 27, 2009, 11:31:09 AM
Any new update to this for SMF RC 1 and SP, just wondering cause I like having a shouting match at times..lol
Title: Re: Simple Shoutbox
Post by: Tweet on March 01, 2009, 04:44:20 PM
Yes, a shoutbox! Thank You Nabil! I go try it now.
Title: Re: Simple Shoutbox
Post by: Nabil on March 09, 2009, 03:26:24 PM
for those who want to try the New Version 1.3 I have it here
on those Sites with download possibility and infos about the installation

Demo with Portal (http://www.nabilweb.de/portal)

Demo with SMF 1.1.8 (http://www.nabilweb.de/pack1)

Title: Re: Simple Shoutbox
Post by: cme1st2302 on March 09, 2009, 04:49:09 PM
The instructions for download are in the Forum, correct?
Title: Re: Simple Shoutbox
Post by: Nabil on March 09, 2009, 04:57:51 PM
The Instructions above are old , the new instructions are on the
last 2 links I've  written
Title: Re: Simple Shoutbox
Post by: c23_Mike on March 10, 2009, 05:13:38 PM
Hi there !

Also tested or seen any installation on SMF 2.0RC1 and SP 2.1.1?
Title: Re: Simple Shoutbox
Post by: Nabil on March 10, 2009, 06:50:06 PM
Quote
Also tested or seen any installation on SMF 2.0RC1 and SP 2.1.1?

Not compatible with smf 2.0 RC1
Title: Re: Simple Shoutbox
Post by: c23_Mike on March 11, 2009, 06:35:30 AM
Hi there !

Thats very good to know! How are plans to make it compatible?

Since as far as I know SP is compatible with SMF2.0 RC1 I want update (with curve). And your Simple Shoutbox is just one addon I searched for (since I had something like that on my old portal with ikonboard).
Title: Re: Simple Shoutbox
Post by: Eliana Tamerin on March 11, 2009, 08:10:19 AM
Curve is not available in SMF 2.0 RC1, however it will become available in SMF 2.0 RC2.
Title: Re: Simple Shoutbox
Post by: c23_Mike on March 11, 2009, 01:55:33 PM
Hi there !

Darling you saved my life! That is good to know that RC1 has not the genious curve built in. So I have to wait ... and then I can also wait until final and also until Simple Shoutbox is compatible.

So I will get this addon!

Tnx for infos!
Title: Re: Simple Shoutbox
Post by: J-Bird on March 14, 2009, 08:28:11 PM
It seems that your server is down, and I have been unable to find an alternate copy anywhere.

Let me know if you get your server back up, or if anyone else has a copy to share.

Thanks!

J-Bird
Title: Re: Simple Shoutbox
Post by: Nabil on March 15, 2009, 02:54:18 AM
Quote
It seems that your server is down, and I have been unable to find an alternate copy anywhere.
Click on one of the last two links I posted (Reply #13) then =>General Discussion =>topic Nshoutbox 1.3 => click on the Download link in the Topic
Title: Re: Simple Shoutbox
Post by: J-Bird on March 15, 2009, 05:44:23 PM
Ok, that worked.
Thanks
Title: Re: Simple Shoutbox
Post by: Nabil on March 30, 2009, 05:58:56 AM
The Version 1.4.1 is without Avatars , but with Call function , I made it Specially for Simple Portal with SMF 1.x.x
to suit a normal Side Block, you can download it Directly from here (http://www.nabilweb.de/downloads/Nshoutbox1.4NoAvatars.zip)

the Installation is very easy and there's no need for a Manual Installation , just use the Package
Manager (No matter which Theme you use) it can be Installed with any Theme . after Installation
Put the following Code in a PHP Block

Code: [Select]
<?php
///////////////// Nshoutbox 1.4 By Nabil  //////////////////
//////////////// Email : contact@forumzone.eu ////////////////////
?>

<script  language="javascript">
document.write('<iframe style="margin-bottom:0px; width:190px; height:490px; vertical-align:middle" Frameborder="0" marginheight="0" scrolling="no" src="frames.php" ></iframe>');
</script>
<noscript>
<iframe style='width:160px; height:410px; vertical-align:middle' Frameborder='0' marginheight='0' scrolling="no" src='messg12.php' >
</iframe>
</noscript>

I recommend using it in a Block without Frames .
The Call Function  in the shoutbox is for Members to Call each other
to use the Call Function click on the Phone symbol , then Write the Name of the Called Member

Title: Re: Simple Shoutbox
Post by: darkness on April 03, 2009, 11:55:08 PM
The link to download this failing
Title: Re: Simple Shoutbox
Post by: Nabil on April 04, 2009, 03:35:37 AM
Quote
The link to download this failing
well I've checked the link ,I can see it's working well , try Download (http://www.nabilweb.de/downloads/Nshoutbox1.4NoAvatars.zip) the package directly later. or visit the shoutbox info website (http://www.nabilweb.de/portal) and download from there.
Title: Re: Simple Shoutbox
Post by: Old Fossil on May 08, 2009, 11:35:49 PM
is rather sluggish on the portal. And ya cant change the background colour.
Title: Re: Simple Shoutbox
Post by: Nabil on May 10, 2009, 04:35:48 PM
Quote
is rather sluggish on the portal. And ya cant change the background colour
I will try in the Next Version to make its background the same as the Theme's Background of the site being used with, or maybe a color selection option.
Title: Re: Simple Shoutbox
Post by: Tiribulus on May 10, 2009, 06:39:25 PM
is rather sluggish on the portal. And ya cant change the background colour.

All things are possible with enough perseverance  ;D
(http://gregnmary.gotdns.com/pix/shoutbox.jpg)
Title: Re: Simple Shoutbox
Post by: Sakae on May 18, 2009, 09:25:58 PM
Hi, nice block snippet.

But I have a problem with it, I believe is something to do with the iframe...

My website (http://www.tigrelog.com.br).
Title: Re: Simple Shoutbox
Post by: ccbtimewiz on May 18, 2009, 09:28:19 PM
To make it more secure, I suggest using SMF user handling. SSI.php would work in your case.
Title: Re: Simple Shoutbox
Post by: Nabil on May 19, 2009, 03:56:17 AM
Quote

I suggest using SMF user handling. SSI.php would work in your case
All Versions use the SSI.php handling , and after the Version 1.3 also the SMF Session is used
Title: Re: Simple Shoutbox
Post by: snakec on July 23, 2009, 09:42:01 PM
Download Link doesn´t work, anyone has the necessary files?

thanks!
Title: Re: Simple Shoutbox
Post by: Gurbet_42 on July 24, 2009, 04:59:00 PM
http://www.nabilweb.de/downloads/Nshoutbox1.4NoAvatars.zip
Title: Re: Simple Shoutbox
Post by: snakec on July 24, 2009, 10:22:23 PM
Thanks a lot!
Title: Re: Simple Shoutbox
Post by: Nabil on July 29, 2009, 05:47:46 AM
The Download link has changed , from now on the download link is :
http://www.forumzone.eu/downloads/Nshoutbox1.4NoAvatars.zip
Title: Re: Simple Shoutbox
Post by: iroNikK on August 02, 2009, 03:20:42 PM
thank
Title: Re: Simple Shoutbox
Post by: ikaroweb on August 06, 2009, 04:28:05 PM
I've installed the mod but i've a problem, locally works fine but online i've this problem:

(http://img33.imageshack.us/img33/4607/shoutboxw.jpg)


Thanks in advance!

Ika ;)
Title: Re: Simple Shoutbox
Post by: Nabil on August 07, 2009, 10:50:58 AM
This is because there is an Error Message being written inside the frame , try with the mouse to copy all the contents of the frame  and paste it on a text document , to see what the Error Message says
Title: Re: Simple Shoutbox
Post by: ikaroweb on August 07, 2009, 07:11:19 PM
Table '_nshoutbox_ban' doesn't exist
Title: Re: Simple Shoutbox
Post by: Nabil on August 08, 2009, 06:12:22 AM
Did you use the Package Manager to Install the Mod ?
Title: Re: Simple Shoutbox
Post by: ikaroweb on August 08, 2009, 10:16:00 AM
Yes i did
Title: Re: Simple Shoutbox
Post by: Nabil on August 08, 2009, 01:25:49 PM
Uninstall using the Package Manager , then apply the Mod again,
right after applying see at the top left of the page 'Tables Created Successfully' , let me know if you see that Message or another Message
Title: Re: Simple Shoutbox
Post by: ikaroweb on August 08, 2009, 03:36:07 PM
Now works fine!
Thanks! ;)
Title: Re: Simple Shoutbox
Post by: cnashx on December 26, 2011, 11:09:58 PM
How is this with bandwidth?
I've been using an external shoutbox because using the original SMF ones would destroy my bandwidth and my host wasn't so pleased.

Thank you.
Title: Re: Simple Shoutbox
Post by: Old Fossil on December 26, 2011, 11:33:58 PM
How is this with bandwidth?
I've been using an external shoutbox because using the original SMF ones would destroy my bandwidth and my host wasn't so pleased.

Thank you.

This 2 year old topic is not necessary now.

Why?

Because the portal has its own shoutbox which you will see if you look on the left of the portal.

<--------------  That way.
Title: Re: Simple Shoutbox
Post by: cnashx on December 27, 2011, 12:21:04 AM
I have tried to use that shoutbox and it destroys my bandwidth. I am using over 90% of server resources on shoutbox and my host has shut me down.
I am currently using a external free shoutbox but I'm looking into ways to have an integrated one.

I will post a different thread with a possible method that I need some assistance on. Thank you.
Title: Re: Simple Shoutbox
Post by: andy on December 27, 2011, 07:54:47 AM
Try reducing the refresh rate?
Unless its like instant chat I would  set it to 120 seconds or even longer. As people move around anyway they reload often so constant refresh not needed I think.

Im on a shared host and no trouble ... but I set refresh rate at a longer interval.
Title: Re: Simple Shoutbox
Post by: cnashx on December 27, 2011, 05:28:20 PM
120? I have members who like to constantly chat and hold conversations in the shoutbox. Right now I'm using a free external.
I'm looking to host the shoutbox on a separate server but I and trying to figure out how it can link to the current user database so people won't have to re-register to use the shoutbox.
Title: Re: Simple Shoutbox
Post by: andy on December 28, 2011, 07:08:32 AM
Nightmare - I wouldnt bother with so much trouble. If its that important and so many users ... you should be on a proper hosting server. Dont waste hours and hours trying to do it the hard way managing user sessions between different  software on different servers  :P

SMF2 is not well bridges with anything yet like smf 1 with say Joomla or Wordpress. With joomla its straightforward free plugin to link user accounts and login across systems. Might only work on same server - not sure. Even if it worked on another (free?) server you would burn up cpu time with all the other extra software running - again not worth it.  And now you are managing two server systems  - you are basically "chasing your own tail..."

Lots of hosts out there for a few $s/month that will run the shoutbox in smf. Try slowing down refresh to what people will 'just' accept.
10 seconds ... 20 etc. A free hosting service is definitely not going to have any sympathy for you running it every few seconds.
Title: Re: Simple Shoutbox
Post by: cnashx on December 28, 2011, 08:55:50 PM
I've tried to use 20 second refresh and that still overloaded. My bandwidth usage was insane still.
I guess I'll just wait until I decide to go to a dedicated server. This shared host will do for now I suppose though. :P
Title: Re: Simple Shoutbox
Post by: andy on December 29, 2011, 02:02:59 AM
Im on a shared host (6$/month)... not one of the cheaper ones but the shoutbox works fine. Guess it depends on how many users you have online at the same time.
Title: Re: Simple Shoutbox
Post by: cnashx on December 29, 2011, 08:19:46 AM
Usually 2-10 users can be constantly using the shoutbox.
It's a fast growing forum. A week after launching the site we had already surpassed 100 members. We are at 400 members now and it was launched at the end of September.
Title: Re: Simple Shoutbox
Post by: Chen Zhen on December 29, 2011, 10:05:58 PM

Do you have caching enabled in both the shoutbox & your forum (<- server settings ie. lvl 1) ?

.. and why was this old thread hijacked? It needs to be split
SimplePortal 2.3.8 © 2008-2024, SimplePortal