Firefox PHP

Users can enter smileys by the click

Posted by Pavel Rùžièka 
This feature doesn't require active replace plugin, but without this the effect is not too great :-)

The attached file is a ZIP. Rename it to *.zip and unzip. Simply and copy (replace) unzipped files to your phorum folder.
The post form has a bar of smileys, users can add chosen smile to the post by clicking on the image.
The images are included, and settings of replace plugin included too.

Have a good fun :)
Attachments:
open | download - entersmile.txt (6.9 KB)
i guess you need support of zip and diff files?
Maybe, but renaming .zip to .txt is not too terrible :)
Enhanced editor
August 08, 2001 12:19PM
If you interested in this feature, try the DHTML editor too:
[hackers.phorum.org]
Hi!
Could it be possible that there is a little bug in your smileys script? I use it and have the problem that if you do not enter a topic, the error message is displayed correctly, but the text of the message disappears. I tried it without your script and it worked fine.

Bye
Ondrej

www.heiglhof.de
Yes there is a bug... As a matter of fact, the subject line goes blank because Phorum doesn't recognize that the reply post is a reply... so the post tree is all screwed too... I removed this hack for the time being. Hope someone can come up with a fix, my users were pretty happy with the cool smileys...
Simply add to the form.php this script (should be at the beginning):

<script LANGUAGE="JavaScript">
<!-----
function InsSm(sm)
{
document.form1.body.focus();
document.form1.body.value=document.form1.body.value+sm;
}
//---->
</script>


and below the table row with subject input place next table row:

<tr>
<td <?PHP echo bgcolor($ForumTableBodyColor1); ?> colspan=2 width="100%" nowrap align="left">&nbsp;&nbsp;
<a tabindex='-1' href="javascript:void InsSm(':-D ')"><img src="images/smileys/1.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-)) ')"><img src="images/smileys/2.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-)') "><img src="images/smileys/3.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(';-) ')"><img src="images/smileys/4.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-P ')"><img src="images/smileys/5.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-| ')"><img src="images/smileys/6.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-/ ')"><img src="images/smileys/7.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-( ')"><img src="images/smileys/8.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':´-( ')"><img src="images/smileys/9.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm(':-O ')"><img src="images/smileys/10.gif" width="15" height="15" border=0></a>&nbsp;<a tabindex='-1' href="javascript:void InsSm('B-] ')"><img src="images/smileys/11.gif" width="15" height="15" border=0></a>
</td>
</tr>


The replace plugin and smileys you can use from the file entersmile.txt which is for download in the first message.
mistake:

to the form tag you must add the name:

name="form1"
I hva already fixed the problem by just adding the smiley (with the link to the javascript-function), the javascript-function itself and by naming the form "form1", anything else can be left as it is.

if details needed just mail me

regards
Ondrej

www.chemiestudent.de
Re: Users can enter smileys by the click
November 19, 2001 07:00PM
I can´t see any attachment. Where is it. How can I get this file?
<HTML>attachmets are gone for a little while, ill get them back as soon as possible.</HTML>

RH
Re: Users can enter smileys by the click
November 30, 2001 12:20PM
I also used something like that in our forum, but with ALOT more smileys. It has a bar of about 30 smileys on the bottom of the form that users can click to add a smiley, or they can click on the "click for more smileys" button to get a pop-up window with 70+ more smileys. When users click on a smiley in the pop-up window, the smiley gets added to the post and the window automatically closes.

I did not do it as a plug in, but rather I went straight into the form.php code in the include directory. The additional smileys have their own directory to make site maintanence easier.

RH.

P.S. I am still working on the attach file feature so that it allows users to add the picture as a background to post, or as a picture in post, or just as a attachment. Also, I almost have the script ready that automatically deletes a attachment from file and post after 30 days so that the server does not get congested.
Thanks Pavel !

After a long struggle I found Your little file and used it.

IT WORKS, yahoo !

Greetings
nikster
I found a fix for your code, I couldnt get the images to popup in the messgae window after posting.


in read.php line 450

.......................Betwen..........................

<?php echo $lDate;?>:&nbsp;&nbsp;&nbsp;<?php echo $datestamp; ?><br>
<?php

>>>>>$$$$ IN HERE $$$$<<<<<<

// exec read_header plugins

.............................................................

add this

include("plugin/replace/settings.php");
Yup, that extra line to read.php was missing.. .works like a charm now!

where can i get more smiley gifs???

camilo@cancun.com
Need help!
January 21, 2002 09:25AM
I cant use the smileys on my forum! It is Phorum 3.3.1 and i have added that line and added the files. When you want to reply the smiley selection shows up but when the message is postet none og the smileys works ;( What should i do??????

[email-bogen.dk]

And look under

"Smileys kan nu bruges !!!" (in danish)

Theres all the text thingies but it still does not show the smileys list!
Re: Need help!
January 21, 2002 09:29AM
i tried to enable the replace text thingie version 0.1 then i get these errors:

Warning: Unable to access ./admin/settings/replace.php in /www/email-bogen.dk/web/saint/forum/plugin/replace/plugin.php on line 2

Warning: Failed opening './admin/settings/replace.php' for inclusion (include_path='') in /www/email-bogen.dk/web/saint/forum/plugin/replace/plugin.php on line 2

Warning: Cannot add header information - headers already sent by (output started at /www/email-bogen.dk/web/saint/forum/plugin/replace/plugin.php:2) in /www/email-bogen.dk/web/saint/forum/index.php on line 28

When i disable it again, everything works fine.

What is happening?
Re: Need help!
January 21, 2002 10:46AM
as soon as i enable the simple text replacer v 0.1 the smileys appear but these errors also comes:

Warning: Unable to access ./admin/settings/replace.php in /www/email-bogen.dk/web/saint/forum/plugin/replace/plugin.php on line 2

Warning: Failed opening './admin/settings/replace.php' for inclusion (include_path='') in /www/email-bogen.dk/web/saint/forum/plugin/replace/plugin.php on line 2

And i can't reply or post or even visit another page! What should i do????
This might help others!
January 21, 2002 11:15AM
If you can enable the simple text replacer v. 0.1 and the smileys shows but some errors also appear, then try to rplace just one word with another text.

I choose:

@!#$ = ****

And now everything works! :) But i think that the crack/hack whatever should be updated so these problems doesn't appear for others...
can some one post the updated file.... ??
Sorry, you do not have permission to post/reply in this forum.