From: <vb...@us...> - 2002-09-26 13:17:40
|
Update of /cvsroot/webnotes/webnotes/core In directory usw-pr-cvs1:/tmp/cvs-serv32555/core Modified Files: config_defaults_inc.php string_api.php Log Message: - 0000065: Emotion icons (added height and width of icons to improve speed) - 0000065: Added $g_enable_smileys. Index: config_defaults_inc.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/config_defaults_inc.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- config_defaults_inc.php 21 Sep 2002 02:44:33 -0000 1.6 +++ config_defaults_inc.php 26 Sep 2002 13:17:37 -0000 1.7 @@ -94,6 +94,9 @@ ### Customize this file for the add message page $g_note_add_include = 'note_add_msg_inc.php'; + + ### Replace :) with icons [ON] or leave as text [OFF] + $g_enable_smileys = ON; ### Colors $g_table_border_color = '#aaaaaa'; Index: string_api.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- string_api.php 26 Sep 2002 12:54:33 -0000 1.9 +++ string_api.php 26 Sep 2002 13:17:37 -0000 1.10 @@ -68,15 +68,19 @@ } ### -------------------- function string_emotions( $p_note ) { + if ( OFF == config_get( 'enable_smileys' ) ) { + return $p_note; + } + $images_dir = config_get( 'web_directory' ) . 'images/'; - $smile = '<img src="' . $images_dir . 'smile.gif" alt=":)" />'; - $sad = '<img src="' . $images_dir . 'sad.gif" alt=":(" />'; - $wink = '<img src="' . $images_dir . 'wink.gif" alt=";)" />'; - $big_smile = '<img src="' . $images_dir . 'bigsmile.gif" alt=":D" />'; - $cool = '<img src="' . $images_dir . 'cool.gif" alt="8-D" />'; - $mad = '<img src="' . $images_dir . 'mad.gif" alt=">-(" />'; - $shocked = '<img src="' . $images_dir . 'shocked.gif" alt=":-*" />'; + $smile = '<img src="' . $images_dir . 'smile.gif" width="15" height="15" alt=":)" />'; + $sad = '<img src="' . $images_dir . 'sad.gif" width="15" height="15" alt=":(" />'; + $wink = '<img src="' . $images_dir . 'wink.gif" width="15" height="15" alt=";)" />'; + $big_smile = '<img src="' . $images_dir . 'bigsmile.gif" width="15" height="15" alt=":D" />'; + $cool = '<img src="' . $images_dir . 'cool.gif" width="15" height="15" alt="8-D" />'; + $mad = '<img src="' . $images_dir . 'mad.gif" width="15" height="15" alt=">-(" />'; + $shocked = '<img src="' . $images_dir . 'shocked.gif" width="15" height="15" alt=":-*" />'; $p_note = str_replace( ':)', $smile, $p_note ); $p_note = str_replace( ':-)', $smile, $p_note ); |