SimplePortal
Customization => Blocks and Modifications => Topic started 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 :
global $txt, $db_prefix, $scripturl, $user_info, $user_settings;
global $cookiename, $maintenance, $ID_MEMBER, $modSettings, $context, $sc;
global $sourcedir;
replace with :
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 :
// Set up the default/fallback stuff.
add before :
////////// 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 :
// Make sure they aren't being auto-logged out.
add before :
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 :
<?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)
-
Very nice.
I moved it over to Blocks and Modifications so people can find it when looking for such.
-
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)
-
To make it more secure, I suggest using SMF user handling. SSI.php would work in your case.
-
I Like How The Shoutbox Is was woundering is it going to be upgraded for SMF 2.0 RC1
-
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
-
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
-
WoW Nice Mod :)
-
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.
-
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
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
-
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...).
-
Any new update to this for SMF RC 1 and SP, just wondering cause I like having a shouting match at times..lol
-
Yes, a shoutbox! Thank You Nabil! I go try it now.
-
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)
-
The instructions for download are in the Forum, correct?
-
The Instructions above are old , the new instructions are on the
last 2 links I've written
-
Hi there !
Also tested or seen any installation on SMF 2.0RC1 and SP 2.1.1?
-
Also tested or seen any installation on SMF 2.0RC1 and SP 2.1.1?
Not compatible with smf 2.0 RC1
-
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).
-
Curve is not available in SMF 2.0 RC1, however it will become available in SMF 2.0 RC2.
-
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!
-
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
-
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
-
Ok, that worked.
Thanks
-
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
<?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
-
The link to download this failing
-
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.
-
is rather sluggish on the portal. And ya cant change the background colour.
-
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.
-
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)
-
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).
-
To make it more secure, I suggest using SMF user handling. SSI.php would work in your case.
-
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
-
Download Link doesn´t work, anyone has the necessary files?
thanks!
-
http://www.nabilweb.de/downloads/Nshoutbox1.4NoAvatars.zip
-
Thanks a lot!
-
The Download link has changed , from now on the download link is :
http://www.forumzone.eu/downloads/Nshoutbox1.4NoAvatars.zip
-
thank
-
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 ;)
-
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
-
Table '_nshoutbox_ban' doesn't exist
-
Did you use the Package Manager to Install the Mod ?
-
Yes i did
-
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
-
Now works fine!
Thanks! ;)
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
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.
-
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.
-
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