News:

Join the Facebook Fan Page.

Main Menu

Nshoutbox 1.3

Started by Nabil1, January 25, 2009, 01:53:02 PM

Previous topic - Next topic

Nabil1

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 , guests can only read the messages .
* 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 , 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

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");
};


if you use simple portal , add the following Code in a php block  or otherwise  in the BoardIindex.template:

<?php
///////////////// Nshoutbox 1.0 By Nabil F. Schaker //////////////////
//////////////// Email : [email protected] ////////////////////
?>

<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)

The Gimp Pimp

This looks really good, I'm thinking of adding a shoutbox on my site so I'll have to think about where to put it :)

Robert F

This doesn't work on 1.1.7

ameo

Quote from: forbescreatives on January 30, 2009, 09:43:23 AM
This doesn't work on 1.1.7

You need more than just a forum to make this work. You need SimplePortal
He clearly said that.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Nabil1

a second version is on the way which I'll make it only for 1.1.7  ;D

alphacaveman

Quote from: Nabil1 on January 30, 2009, 04:27:17 PM
a second version is on the way which I'll make it only for 1.1.7  ;D

Can't wait!

Nabil1

#6
I have updated Nshoutbox 1.0 to 1.1  which is more suitable for SMF
many bugs have been fixed with this new Version .

Download

here are the 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']; if ($passwd12==''){
$passwd12=$_REQUEST['hash'];
};
$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");
};


in Themes/default/index.template.php
find

</select>
<input type="submit" value="', $txt[34], '"


add after

onclick="this.form.hash.value = passwrd.value"


find

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


in Themes/default/BoardIndex.template.php
find

// Show some statistics next to the link tree if SP1 info is off.


add after

///////////////// Nshoutbox 1.1 By Nabil F. Schaker //////////////////
//////////////// Email : [email protected] ////////////////////
?>
<script  id="clientEventHandlersJS"  language="javascript">
document.write('<iframe style="width:100%; height:315px; 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>
<?php


in Themes/default/Login.template.php
find

<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


find

</tr><tr>
<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

</table>

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


find

</tr><tr>
<td align="center" colspan="4"><input type="submit" value="', $txt[34], '" style="margin-top: 1ex; margin-bottom: 1ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

<b>', $txt[36], ':</b> <input type="password" name="admin_pass" size="24" /> <a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="middle" /></a><br />
<input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

echo $context['post_data'], '

<input type="hidden" name="admin_hash_pass" value="" />


add after

<input type="hidden" name="hash" value="" />


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)

Live Demo

you can login with user1 , user3 , user4  to test the shoutbox
password is 'pass123'
as an admin you have other functions as described in the previous version
to test the shoutbox as an admin you can try it on your own forum

any suggestions for improvements will be welcomed


Nabil1

I have updated Nshoutbox 1.1 to 1.2  with the following new feachers:

* Members Avatars will be displayed
* font type choice , up to 7 types .
* font color choice 12 colors
* font size choice (3 sizes)
* font styles italic, bold , underline , strike
* new Smileys
no flickering/blinking when refresh every 30 seconds , the main refresh take place only when someone writes a
new message

Some usage Instructions :
saving your settings is done by checking the save checkbox , when changing the settings later
simply uncheck the save checkbox , choose the new settings and check it again


Download

here are the 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']; if ($passwd12==''){
$passwd12=$_REQUEST['hash'];
};
$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); setcookie("now","",time()-86400); $doc12=$_COOKIE['log12']; unlink("users/$doc12.txt");
$refresh12f=$doc12.'re';
if (file_exists("users/$refresh12f.txt")){
unlink("users/$refresh12f.txt");
};


in Themes/default/index.template.php
find

</select>
<input type="submit" value="', $txt[34], '"


add after

onclick="this.form.hash.value = passwrd.value"


find

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


in Themes/default/BoardIndex.template.php
find

// Show some statistics next to the link tree if SP1 info is off.


add after

///////////////// Nshoutbox 1.2 By Nabil F. Schaker //////////////////
//////////////// Email : [email protected] ////////////////////
///////////// New Smileys Thanks to www.cybergifs.com //////////
?>
<script  language="javascript">
document.write('<iframe style="margin-bottom:0px; width:100%; height:340px; 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>
<?php


in Themes/default/Login.template.php
find

<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


find

</tr><tr>
<td align="center" colspan="2"><input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

</table>

<input type="hidden" name="hash_passwrd" value="" />


add after

<input type="hidden" name="hash" value="" />


find

</tr><tr>
<td align="center" colspan="4"><input type="submit" value="', $txt[34], '" style="margin-top: 1ex; margin-bottom: 1ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

<b>', $txt[36], ':</b> <input type="password" name="admin_pass" size="24" /> <a href="', $scripturl, '?action=helpadmin;help=securityDisable_why" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="', $txt[119], '" align="middle" /></a><br />
<input type="submit" value="', $txt[34], '" style="margin-top: 2ex;"


add after

onclick="this.form.hash.value = passwrd.value"


find

echo $context['post_data'], '

<input type="hidden" name="admin_hash_pass" value="" />


add after

<input type="hidden" name="hash" value="" />


move the following files into your forum root Directory :
installNshout.php  (this should be executed standalone)
messg12.php
shout.php
frames.php
style12.php
input.php
refresh.php
move thr folder 'extras' to the root directory
uninstall_Nshoutbox.php
(this file is needed only if you uninstall the shoutbox)

Live Demo

you can login with user1 , user3 or user3  to test the new version
password is : pass123


ameo

ummm...
here are some notes:

1) this seems like a lot of work for end user - therefore - your shoutbox won't be so popular
    replacing, moving....
    can't you do at least that files automatically move in root directory?

2) you didn't state clearly, but I guess - this is now made for 1.1.8. also, without any portal integration
3) why messages don't post on enter, but users must click shout button? - you must fix that ASAP
4) those smileys suck - they are to big, and to intrusive. can't it be made so shoutbox can import forum smileys?
5) you could make shoutbox show on the side of forum, [left/right] if you'd know how to - that would made it different than
    rest of other scripts, therefore unique.

If not unique, nneonneo's shoutbox is far better than yours, to tell you the truth.  At least easier to install.
Please try to make @ least installation less complicated.

Thanks for reading
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Nabil1

#9
Quote
this seems like a lot of work for end user - therefore - your shoutbox won't be so popular
    replacing, moving....

well I can give you (for example) a ready 'BoardIndex.template.php' to replace with your one , but I guess you don't want your Mods to be deleted do you? and thats
why a manuall installation is needed not just for this Software but for all Mods

Quote
can't you do at least that files automatically move in root directory?
Automatically??? , its not alot of work moving files into your web server , it can be done by a click on the Upload Button of  your FTP programme, Mark all files ... click on Upload , Finish

Quote
you didn't state clearly, but I guess - this is now made for 1.1.8. also, without any portal integration
you can use it with Portals, like Simple Portal , just take the Code for 'BoardIndex.template.php and put it in a Block  , write '<?php' at the beginning of the code when using a php block which is the right one for the Code.

Quote
why messages don't post on enter, but users must click shout button? - you must fix that ASAP
its not a bug at all in order to fix it , I made it so Intentially , disabled return button to let the text always be seen (you don't have a page to write ) just one line , so to keep it within one line

Quote
those smileys suck - they are to big, and to intrusive. can't it be made so shoutbox can import forum smileys?

well I thought they are cool , its not a problem its a matter of taste , maybe you don't like them , others may do , if you want to change Smileys , Insert your favourite Smileys inside the 'extras' folder , but give them the same name that's it

Quote
If not unique, nneonneo's shoutbox is far better than yours, to tell you the truth.  At least easier to install.

well , I will try to make the Installation more .... Automatically in the next versions sorry for that

Nabil1

#10
here is another link to download the software , this time with auto Installer
so you don't have to do anything manually , the file AutoInstall.php will do all the work , so the new Installation steps are reduced to the following steps only :
1. Download the Package
2.move the following files to the root Directory
messg12.php
shout.php
frames.php
style12.php
input.php
refresh.php
uninstall_Nshoutbox.php (this file is needed only if you uninstall the shoutbox)
move thr folder 'extras' also to the root directory
the AutoInstall.php   to the folder of your Theme , for example if you use default then move it to Themes/default directory etc.
then run the file  like this : www.yourdomain.com/forum/Themes/default/AutoInstall.php




Groundhog

#11
Hi Nabil1

Great to see this shoutbox mod. I'm looking forward to getting it working. Thanks for taking the time to put it all together for us.

Do you think that it should possibly work with SMF 2.0 RC1? I have managed to find what I believe are the relevant places to paste your code and everything almost looks as if it can work but I can't enter any shouts. The shoutbox part for entering text and posting is grayed out.

I'm just wondering if you might have any idea what I can do to get it working? or should I be waiting for an official version that will work with SMF 2.0 RC1?

I'm running from a portal block. I have the box at the bottom of my website. www.HopeCentreBurundi.com. Update: I have removed it just now but can put it back if you need to see. Thanks


Nabil1

Quote
I'm just wondering if you might have any idea what I can do to get it working? or should I be waiting for an official version that will work with SMF 2.0 RC1?

I consider version 1.2 as a beta version , I would recommend version 1.3 which
would be officialy submitted mod .




ameo

Sorry but no mod was found

Do they need to approve it first or link is wrong?
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Nabil1


Do they need to approve it first or link is wrong?


The Customization team want me to change something in it , so I'll do the change and hopefully it'll be released to the public soon, and the link should work by then.

J-Bird

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
Love, often

Nabil1

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

Here is a LINK where you can download the new Version 1.4 as well.

iroNikK


Nabil1

The Download link has changed , from now on the download link is :
http://www.forumzone.eu/downloads/Nshoutbox1.4NoAvatars.zip

Advertisement: