[LON-CAPA-cvs] cvs: loncom /xml lontexconvert.pm
faziophi
faziophi@source.lon-capa.org
Wed, 09 Dec 2009 23:02:44 -0000
faziophi Wed Dec 9 23:02:44 2009 EDT
Modified files:
/loncom/xml lontexconvert.pm
Log:
adding new smiley faces in png format, and replacing
existing ones with new path
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.98 loncom/xml/lontexconvert.pm:1.99
--- loncom/xml/lontexconvert.pm:1.98 Wed Aug 12 20:43:25 2009
+++ loncom/xml/lontexconvert.pm Wed Dec 9 23:02:43 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.98 2009/08/12 20:43:25 www Exp $
+# $Id: lontexconvert.pm,v 1.99 2009/12/09 23:02:43 faziophi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -335,23 +335,37 @@
sub smiley {
my $expression=shift;
if ($env{'browser.imagesuppress'} eq 'on') { return $expression; }
- my %smileys=('\:\-\)' => 'smiley',
- '8\-\)' => 'coolsmile',
- '8\-(I|\|)' => 'coolindiff',
- ':\-(I|\|)' => 'neutral',
- '\:\-(o|O|\(\))' => 'shocked',
- ':\-\(' => 'frowny',
- '\;\-\)' => 'wink',
- '\:\-P' => 'baeh',
- '\:\-(\\\|\\/)' => 'hrrm',
- '\:\-D' => 'bigsmile',
- '\:\-C' => 'angry',
- '\:(\'|\`)\-\(' => 'cry',
- '\:\-(X|\#)' => 'lipsrsealed',
- '\:\-S' => 'huh');
+ my %smileys=(
+ '\:\-*\)' => 'face-smile.png',
+ '8\-*\)' => 'face-cool.png',
+ '8\-*(I|\|)' => 'face-glasses.png',
+ ':\-*(I|\|)' => 'face-plain.png',
+ '\:\-(o|O|\(\))' => 'face-surprise.png',
+ ':\-*\(' => 'face-sad.png',
+ '\;\-*\)' => 'face-wink.png',
+ '\:\-*(P|p)' => 'face-raspberry.png',
+ '\:\-*(\\\|\\/)' => 'face-uncertain.png',
+ '\:\-*D' => 'face-smile-big.png',
+ '\:\-*(C|\@)' => 'face-angry.png',
+ '\:(\'|\`)\-*\(' => 'face-crying.png',
+ '\:\-*(X|x|\#)' => 'face-quiet.png',
+ '\:\-*(s|S)' => 'face-uncertain.png',
+ '\:\-*\$' => 'face-embarrassed.png',
+ '\:\-*\*' => 'face-kiss.png',
+ '\+O\(' => 'face-sick.png',
+ '(\<\;3|\(heart\))' => 'heart.png',
+ '\(rose\)' => 'rose.png',
+ '\(pizza\)' => 'food-pizza.png',
+ '\(cake\)' => 'food-cake.png',
+ '\(ninja\)' => 'face-ninja.png',
+ '\(pirate\)' => 'face-pirate.png',
+ '\((agree|yes)\)' => 'opinion-agree.png',
+ '\((disagree|nay)\)' => 'opinion-disagree.png',
+ '(o|O)\-*\)' => 'face-angel.png',
+ );
my $iconpath=$Apache::lonnet::perlvar{'lonIconsURL'};
foreach my $smiley (keys(%smileys)) {
- $expression=~s/$smiley/\<img src="$iconpath\/$smileys{$smiley}.gif" \/\>/gs;
+ $expression=~s/$smiley/\<img src="$iconpath\/$smileys{$smiley}" \/\>/gs;
}
return $expression;
}