diff --git a/www/extras/htmlArea/editor.js b/www/extras/htmlArea/editor.js
index ee0a84ff1..ed76f80ef 100644
--- a/www/extras/htmlArea/editor.js
+++ b/www/extras/htmlArea/editor.js
@@ -49,6 +49,7 @@ this.toolbar = [
['forecolor','backcolor','separator'],
['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','separator'],
['Macros','separator'],
+ ['Smileys','separator'],
// ['custom1','custom2','custom3','separator'],
['popupeditor']]; //,'about']];
@@ -83,6 +84,7 @@ this.fontstyles = [ // make sure these exist in the header of page the conte
this.btnList = {
// buttonName: commandID, title, onclick, image,
+ "smileys": ['Smileys', 'Insert Smiley', 'editor_action(this.id)', 'ed_smiley.gif'],
"bold": ['Bold', 'Bold', 'editor_action(this.id)', 'ed_format_bold.gif'],
"italic": ['Italic', 'Italic', 'editor_action(this.id)', 'ed_format_italic.gif'],
"underline": ['Underline', 'Underline', 'editor_action(this.id)', 'ed_format_underline.gif'],
@@ -309,6 +311,14 @@ function editor_action(button_id) {
//
// CUSTOM BUTTONS START HERE
//
+ // Insert a smiley
+ else if (cmdID == 'Smileys') { // insert some text from a popup window
+ var myTitle = "Insert a Smiley";
+ var myText = showModalDialog(_editor_url + "popups/insert_smiley.pl",
+ myTitle, // str or obj specified here can be read from dialog as "window.dialogArguments"
+ "resizable: yes; help: no; status: no; scroll: yes; ");
+ if (myText) { editor_insertHTML(objname, myText); }
+ }
// Custom1
else if (cmdID == 'custom1') {
diff --git a/www/extras/htmlArea/images/ed_smiley.gif b/www/extras/htmlArea/images/ed_smiley.gif
new file mode 100644
index 000000000..2881b7e0b
Binary files /dev/null and b/www/extras/htmlArea/images/ed_smiley.gif differ
diff --git a/www/extras/htmlArea/popups/insert_smiley.pl b/www/extras/htmlArea/popups/insert_smiley.pl
new file mode 100755
index 000000000..658ff44ca
--- /dev/null
+++ b/www/extras/htmlArea/popups/insert_smiley.pl
@@ -0,0 +1,76 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+my ($httpSmileysPath, $fileSmileysPath, @smileys, $smile, $pos, $columns);
+
+# $fileSmileysPath = '/home/WebGUI/www/extras/smileys'; # Define this if you're having problems determinating
+ # the path to the smileys dir automaticcally.
+
+$httpSmileysPath = "/extras/smileys"; # Web path to the smileys dir
+$columns = 3; # Smileys column width
+
+# ------------------------------------------------------------------------------------------
+
+if(defined($ENV{SCRIPT_FILENAME}) && $fileSmileysPath eq '') {
+ $fileSmileysPath = $ENV{SCRIPT_FILENAME};
+ $fileSmileysPath =~ s#(/[^/]+){3}$##; # Two dirs up from this script level
+ $fileSmileysPath .= "/smileys";
+}
+
+print <
+
+
+
+ Insert Smileys
+
+
+
+
+
+
+
+
+
+
";
+
+
diff --git a/www/extras/smileys/smile01.gif b/www/extras/smileys/smile01.gif
new file mode 100644
index 000000000..03ca160eb
Binary files /dev/null and b/www/extras/smileys/smile01.gif differ
diff --git a/www/extras/smileys/smile02.gif b/www/extras/smileys/smile02.gif
new file mode 100644
index 000000000..49c495774
Binary files /dev/null and b/www/extras/smileys/smile02.gif differ
diff --git a/www/extras/smileys/smile03.gif b/www/extras/smileys/smile03.gif
new file mode 100644
index 000000000..29eec4ac9
Binary files /dev/null and b/www/extras/smileys/smile03.gif differ
diff --git a/www/extras/smileys/smile04.gif b/www/extras/smileys/smile04.gif
new file mode 100644
index 000000000..cab160e57
Binary files /dev/null and b/www/extras/smileys/smile04.gif differ
diff --git a/www/extras/smileys/smile05.gif b/www/extras/smileys/smile05.gif
new file mode 100644
index 000000000..32b73e09d
Binary files /dev/null and b/www/extras/smileys/smile05.gif differ
diff --git a/www/extras/smileys/smile06.gif b/www/extras/smileys/smile06.gif
new file mode 100644
index 000000000..109ce01a7
Binary files /dev/null and b/www/extras/smileys/smile06.gif differ
diff --git a/www/extras/smileys/smile07.gif b/www/extras/smileys/smile07.gif
new file mode 100644
index 000000000..307632c49
Binary files /dev/null and b/www/extras/smileys/smile07.gif differ
diff --git a/www/extras/smileys/smile08.gif b/www/extras/smileys/smile08.gif
new file mode 100644
index 000000000..34e321339
Binary files /dev/null and b/www/extras/smileys/smile08.gif differ
diff --git a/www/extras/smileys/smile09.gif b/www/extras/smileys/smile09.gif
new file mode 100644
index 000000000..f6f631bae
Binary files /dev/null and b/www/extras/smileys/smile09.gif differ
diff --git a/www/extras/smileys/smile10.gif b/www/extras/smileys/smile10.gif
new file mode 100644
index 000000000..5828d2af6
Binary files /dev/null and b/www/extras/smileys/smile10.gif differ
diff --git a/www/extras/smileys/smile11.gif b/www/extras/smileys/smile11.gif
new file mode 100644
index 000000000..4ba29bd29
Binary files /dev/null and b/www/extras/smileys/smile11.gif differ
diff --git a/www/extras/smileys/smile12.gif b/www/extras/smileys/smile12.gif
new file mode 100644
index 000000000..9db2cd9f6
Binary files /dev/null and b/www/extras/smileys/smile12.gif differ
diff --git a/www/extras/smileys/smile13.gif b/www/extras/smileys/smile13.gif
new file mode 100644
index 000000000..c216f4899
Binary files /dev/null and b/www/extras/smileys/smile13.gif differ
diff --git a/www/extras/smileys/smile14.gif b/www/extras/smileys/smile14.gif
new file mode 100644
index 000000000..112346caf
Binary files /dev/null and b/www/extras/smileys/smile14.gif differ
diff --git a/www/extras/smileys/smile15.gif b/www/extras/smileys/smile15.gif
new file mode 100644
index 000000000..f9edc8c91
Binary files /dev/null and b/www/extras/smileys/smile15.gif differ
diff --git a/www/extras/smileys/smile16.gif b/www/extras/smileys/smile16.gif
new file mode 100644
index 000000000..c34d4a50c
Binary files /dev/null and b/www/extras/smileys/smile16.gif differ
diff --git a/www/extras/smileys/smile17.gif b/www/extras/smileys/smile17.gif
new file mode 100644
index 000000000..2c637ed00
Binary files /dev/null and b/www/extras/smileys/smile17.gif differ
diff --git a/www/extras/smileys/smile18.gif b/www/extras/smileys/smile18.gif
new file mode 100644
index 000000000..101883c4b
Binary files /dev/null and b/www/extras/smileys/smile18.gif differ
diff --git a/www/extras/smileys/smile19.gif b/www/extras/smileys/smile19.gif
new file mode 100644
index 000000000..310d6f664
Binary files /dev/null and b/www/extras/smileys/smile19.gif differ
diff --git a/www/extras/smileys/smile20.gif b/www/extras/smileys/smile20.gif
new file mode 100644
index 000000000..7ba2db43c
Binary files /dev/null and b/www/extras/smileys/smile20.gif differ
diff --git a/www/extras/smileys/smile21.gif b/www/extras/smileys/smile21.gif
new file mode 100644
index 000000000..2f4ef2a0d
Binary files /dev/null and b/www/extras/smileys/smile21.gif differ
diff --git a/www/extras/smileys/smile22.gif b/www/extras/smileys/smile22.gif
new file mode 100644
index 000000000..7e9cd0133
Binary files /dev/null and b/www/extras/smileys/smile22.gif differ
diff --git a/www/extras/smileys/smile23.gif b/www/extras/smileys/smile23.gif
new file mode 100644
index 000000000..e9d115b5c
Binary files /dev/null and b/www/extras/smileys/smile23.gif differ
diff --git a/www/extras/smileys/smile24.gif b/www/extras/smileys/smile24.gif
new file mode 100644
index 000000000..a4d85078a
Binary files /dev/null and b/www/extras/smileys/smile24.gif differ
diff --git a/www/extras/smileys/smile25.gif b/www/extras/smileys/smile25.gif
new file mode 100644
index 000000000..597b70bd7
Binary files /dev/null and b/www/extras/smileys/smile25.gif differ
diff --git a/www/extras/smileys/smile26.gif b/www/extras/smileys/smile26.gif
new file mode 100644
index 000000000..9032b75bf
Binary files /dev/null and b/www/extras/smileys/smile26.gif differ
diff --git a/www/extras/smileys/smile27.gif b/www/extras/smileys/smile27.gif
new file mode 100644
index 000000000..33744c36d
Binary files /dev/null and b/www/extras/smileys/smile27.gif differ
diff --git a/www/extras/smileys/smile28.gif b/www/extras/smileys/smile28.gif
new file mode 100644
index 000000000..a88f69715
Binary files /dev/null and b/www/extras/smileys/smile28.gif differ
diff --git a/www/extras/smileys/smile29.gif b/www/extras/smileys/smile29.gif
new file mode 100644
index 000000000..4f8d1bee1
Binary files /dev/null and b/www/extras/smileys/smile29.gif differ
diff --git a/www/extras/smileys/smile30.gif b/www/extras/smileys/smile30.gif
new file mode 100644
index 000000000..b7cf7a83b
Binary files /dev/null and b/www/extras/smileys/smile30.gif differ
diff --git a/www/extras/smileys/smile31.gif b/www/extras/smileys/smile31.gif
new file mode 100644
index 000000000..e7d2ad6bc
Binary files /dev/null and b/www/extras/smileys/smile31.gif differ
diff --git a/www/extras/smileys/smile32.gif b/www/extras/smileys/smile32.gif
new file mode 100644
index 000000000..0ce01bfce
Binary files /dev/null and b/www/extras/smileys/smile32.gif differ
diff --git a/www/extras/smileys/smile33.gif b/www/extras/smileys/smile33.gif
new file mode 100644
index 000000000..a99192c79
Binary files /dev/null and b/www/extras/smileys/smile33.gif differ
diff --git a/www/extras/smileys/smile34.gif b/www/extras/smileys/smile34.gif
new file mode 100644
index 000000000..d41c748c6
Binary files /dev/null and b/www/extras/smileys/smile34.gif differ
diff --git a/www/extras/smileys/smile35.gif b/www/extras/smileys/smile35.gif
new file mode 100644
index 000000000..d8e3a099d
Binary files /dev/null and b/www/extras/smileys/smile35.gif differ
diff --git a/www/extras/smileys/smile36.gif b/www/extras/smileys/smile36.gif
new file mode 100644
index 000000000..c38e5813b
Binary files /dev/null and b/www/extras/smileys/smile36.gif differ
diff --git a/www/extras/smileys/smile37.gif b/www/extras/smileys/smile37.gif
new file mode 100644
index 000000000..bc81138d6
Binary files /dev/null and b/www/extras/smileys/smile37.gif differ
diff --git a/www/extras/smileys/smile38.gif b/www/extras/smileys/smile38.gif
new file mode 100644
index 000000000..7105469a8
Binary files /dev/null and b/www/extras/smileys/smile38.gif differ
diff --git a/www/extras/smileys/smile39.gif b/www/extras/smileys/smile39.gif
new file mode 100644
index 000000000..c5cf7b5f6
Binary files /dev/null and b/www/extras/smileys/smile39.gif differ
diff --git a/www/extras/smileys/smile40.gif b/www/extras/smileys/smile40.gif
new file mode 100644
index 000000000..7926bb97e
Binary files /dev/null and b/www/extras/smileys/smile40.gif differ
diff --git a/www/extras/smileys/smile41.gif b/www/extras/smileys/smile41.gif
new file mode 100644
index 000000000..72991ce6b
Binary files /dev/null and b/www/extras/smileys/smile41.gif differ
diff --git a/www/extras/smileys/smile42.gif b/www/extras/smileys/smile42.gif
new file mode 100644
index 000000000..2972aa4ff
Binary files /dev/null and b/www/extras/smileys/smile42.gif differ
diff --git a/www/extras/smileys/smile43.gif b/www/extras/smileys/smile43.gif
new file mode 100644
index 000000000..d20e13aff
Binary files /dev/null and b/www/extras/smileys/smile43.gif differ
diff --git a/www/extras/smileys/smile44.gif b/www/extras/smileys/smile44.gif
new file mode 100644
index 000000000..4c6afccc1
Binary files /dev/null and b/www/extras/smileys/smile44.gif differ
diff --git a/www/extras/smileys/smile45.gif b/www/extras/smileys/smile45.gif
new file mode 100644
index 000000000..2513d0859
Binary files /dev/null and b/www/extras/smileys/smile45.gif differ
diff --git a/www/extras/smileys/smile46.gif b/www/extras/smileys/smile46.gif
new file mode 100644
index 000000000..ba761468c
Binary files /dev/null and b/www/extras/smileys/smile46.gif differ
diff --git a/www/extras/smileys/smile47.gif b/www/extras/smileys/smile47.gif
new file mode 100644
index 000000000..085cab2b3
Binary files /dev/null and b/www/extras/smileys/smile47.gif differ
diff --git a/www/extras/smileys/smile48.gif b/www/extras/smileys/smile48.gif
new file mode 100644
index 000000000..07ee74241
Binary files /dev/null and b/www/extras/smileys/smile48.gif differ
diff --git a/www/extras/smileys/smile49.gif b/www/extras/smileys/smile49.gif
new file mode 100644
index 000000000..cd510ece3
Binary files /dev/null and b/www/extras/smileys/smile49.gif differ
diff --git a/www/extras/smileys/smile50.gif b/www/extras/smileys/smile50.gif
new file mode 100644
index 000000000..0c791d78d
Binary files /dev/null and b/www/extras/smileys/smile50.gif differ
diff --git a/www/extras/smileys/smile51.gif b/www/extras/smileys/smile51.gif
new file mode 100644
index 000000000..dac9b5898
Binary files /dev/null and b/www/extras/smileys/smile51.gif differ
diff --git a/www/extras/smileys/smile52.gif b/www/extras/smileys/smile52.gif
new file mode 100644
index 000000000..e27c3b3bc
Binary files /dev/null and b/www/extras/smileys/smile52.gif differ
diff --git a/www/extras/smileys/smile53.gif b/www/extras/smileys/smile53.gif
new file mode 100644
index 000000000..c07019c0d
Binary files /dev/null and b/www/extras/smileys/smile53.gif differ
diff --git a/www/extras/smileys/smile54.gif b/www/extras/smileys/smile54.gif
new file mode 100644
index 000000000..f71a59572
Binary files /dev/null and b/www/extras/smileys/smile54.gif differ
diff --git a/www/extras/smileys/smile55.gif b/www/extras/smileys/smile55.gif
new file mode 100644
index 000000000..9b12113f0
Binary files /dev/null and b/www/extras/smileys/smile55.gif differ
diff --git a/www/extras/smileys/smile56.gif b/www/extras/smileys/smile56.gif
new file mode 100644
index 000000000..c3c22c891
Binary files /dev/null and b/www/extras/smileys/smile56.gif differ
diff --git a/www/extras/smileys/smile57.gif b/www/extras/smileys/smile57.gif
new file mode 100644
index 000000000..1c33f2af6
Binary files /dev/null and b/www/extras/smileys/smile57.gif differ
diff --git a/www/extras/smileys/smile58.gif b/www/extras/smileys/smile58.gif
new file mode 100644
index 000000000..a91b90a2a
Binary files /dev/null and b/www/extras/smileys/smile58.gif differ
diff --git a/www/extras/smileys/smile59.gif b/www/extras/smileys/smile59.gif
new file mode 100644
index 000000000..dc7fe45f5
Binary files /dev/null and b/www/extras/smileys/smile59.gif differ
diff --git a/www/extras/smileys/smile60.gif b/www/extras/smileys/smile60.gif
new file mode 100644
index 000000000..018fd0dcf
Binary files /dev/null and b/www/extras/smileys/smile60.gif differ
diff --git a/www/extras/smileys/smile61.gif b/www/extras/smileys/smile61.gif
new file mode 100644
index 000000000..e963d44fb
Binary files /dev/null and b/www/extras/smileys/smile61.gif differ
diff --git a/www/extras/smileys/smile62.gif b/www/extras/smileys/smile62.gif
new file mode 100644
index 000000000..3270bd878
Binary files /dev/null and b/www/extras/smileys/smile62.gif differ
diff --git a/www/extras/smileys/smile63.gif b/www/extras/smileys/smile63.gif
new file mode 100644
index 000000000..1e00f0d3a
Binary files /dev/null and b/www/extras/smileys/smile63.gif differ
diff --git a/www/extras/smileys/smile64.gif b/www/extras/smileys/smile64.gif
new file mode 100644
index 000000000..15a41959e
Binary files /dev/null and b/www/extras/smileys/smile64.gif differ