Index: text.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/text.html,v
retrieving revision 1.6
diff -c -c -r1.6 text.html
*** text.html	16 Aug 2007 10:26:11 -0000	1.6
--- text.html	29 Apr 2008 02:32:40 -0000
***************
*** 5,127 ****
  <h2>Smilies (emoticons)</h2>
  <div class="indent">
  <p>To embed these small icons in your text, just type the associated code.  These codes themselves are like little pictures if you turn your head to the left when looking at them.</p>
! 
!     <table border="1">
!       <tr valign="top">
!         <td>
!         <table border="0" align="center" cellpadding="10">
!           <tr>
!             <td><img alt="" src="pix/s/smiley.gif" class="icon" /></td>
!             <td>smile</td>
!             <td><code>:-)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/biggrin.gif" class="icon" /></td>
!             <td>big grin</td>
!             <td><code>:-D</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/wink.gif" class="icon" /></td>
!             <td>wink</td>
!             <td><code>;-)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/mixed.gif" class="icon" /></td>
!             <td>mixed</td>
!             <td><code>:-/</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/thoughtful.gif" class="icon" /></td>
!               <td>thoughtful</td>
!               <td><code>V-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/tongueout.gif" class="icon" /></td>
!             <td>tongue out</td>
!             <td><code>:-P</code></td>
!          </tr>
!           <tr>
!             <td><img alt="" src="pix/s/cool.gif" class="icon" /></td>
!             <td>cool</td>
!             <td><code>B-)</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/approve.gif" class="icon" /></td>
!               <td>approve</td>
!               <td><code>^-)</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/wideeyes.gif" class="icon" /></td>
!               <td>wide eyes</td>
!               <td><code>8-)</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/surprise.gif" class="icon" /></td>
!               <td>surprise</td>
!               <td><code>8-o</code></td>
!             </tr>
!         </table>
!         </td>
! 
!         <td>
!         <table border="0" align="center" cellpadding="10">
!             <tr>
!               <td><img alt="" src="pix/s/sad.gif" class="icon" /></td>
!               <td>sad</td>
!               <td><code>:-(</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/shy.gif" class="icon" /></td>
!               <td>shy</td>
!               <td><code>8-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/blush.gif" class="icon" /></td>
!             <td>blush</td>
!             <td><code>:-I</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/kiss.gif" class="icon" /></td>
!               <td>kisses</td>
!               <td><code>:-X</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/clown.gif" class="icon" /></td>
!             <td>clown</td>
!             <td><code>:o)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/blackeye.gif" class="icon" /></td>
!             <td>black eye</td>
!             <td><code>P-|</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/angry.gif" class="icon" /></td>
!               <td>angry</td>
!               <td><code>8-[</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/dead.gif" class="icon" /></td>
!               <td>dead</td>
!               <td><code>xx-P</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/sleepy.gif" class="icon" /></td>
!               <td>sleepy</td>
!               <td><code>|-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/evil.gif" class="icon" /></td>
!             <td>evil</td>
!             <td><code>}-]</code></td>
!           </tr>
!         </table>
!         </td>
!       </tr>
!     </table>
! 
  </div>
! 
  <h2>URLs</h2>
  <div class="indent">
  <p>Any "word" starting with <b>www.</b> or <b>http://</b> will automatically be turned into a clickable link.</p>
--- 5,13 ----
  <h2>Smilies (emoticons)</h2>
  <div class="indent">
  <p>To embed these small icons in your text, just type the associated code.  These codes themselves are like little pictures if you turn your head to the left when looking at them.</p>
! <div id="emoticons">##emoticons_html##</div>
  </div>
! <div style="clear:both"></div>
  <h2>URLs</h2>
  <div class="indent">
  <p>Any "word" starting with <b>www.</b> or <b>http://</b> will automatically be turned into a clickable link.</p>
Index: emoticons.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/emoticons.html,v
retrieving revision 1.6
diff -c -c -r1.6 emoticons.html
*** emoticons.html	23 Apr 2008 07:22:58 -0000	1.6
--- emoticons.html	29 Apr 2008 02:32:40 -0000
***************
*** 1,119 ****
  <html><head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>Using Smilies (emoticons)</h1>
! 
! <table align="center" border="1">
!   <tbody><tr valign="top">
!     <td>
!     <table align="center" border="0" cellpadding="5">
!     <tbody><tr>
!       <td><a href="javascript:inserttext(':-)')"><img src="emoticons_files/smiley.html" class="icon" alt=""></a></td>
!       <td>smile</td>
!       <td><code>:-)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':-D')"><img src="emoticons_files/biggrin.html" class="icon" alt=""></a></td>
!       <td>big grin</td>
!       <td><code>:-D</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(';-)')"><img src="emoticons_files/wink.html" class="icon" alt=""></a></td>
!       <td>wink</td>
!       <td><code>;-)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':-/')"><img src="emoticons_files/mixed.html" class="icon" alt=""></a></td>
!       <td>mixed</td>
!       <td><code>:-/</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('V-.')"><img src="emoticons_files/thoughtful.html" class="icon" alt=""></a></td>
!       <td>thoughtful</td>
!       <td><code>V-.</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':-P')"><img src="emoticons_files/tongueout.html" class="icon" alt=""></a></td>
!       <td>tongue out</td>
!       <td><code>:-P</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('B-)')"><img src="emoticons_files/cool.html" class="icon" alt=""></a></td>
!       <td>cool</td>
!       <td><code>B-)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('^-)')"><img src="emoticons_files/approve.html" class="icon" alt=""></a></td>
!       <td>approve</td>
!       <td><code>^-)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('8-)')"><img src="emoticons_files/wideeyes.html" class="icon" alt=""></a></td>
!       <td>wide eyes</td>
!       <td><code>8-)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('8-o')"><img src="emoticons_files/surprise.html" class="icon" alt=""></a></td>
!       <td>surprise</td>
!       <td><code>8-o</code></td>
!     </tr>
!     </tbody></table>
!   </td>
! 
!   <td>
!     <table align="center" border="0" cellpadding="5">
!     <tbody><tr>
!       <td><a href="javascript:inserttext(':-(')"><img src="emoticons_files/sad.html" class="icon" alt=""></a></td>
!       <td>sad</td>
!       <td><code>:-(</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('8-.')"><img src="emoticons_files/shy.html" class="icon" alt=""></a></td>
!       <td>shy</td>
!       <td><code>8-.</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':-I')"><img src="emoticons_files/blush.html" class="icon" alt=""></a></td>
!       <td>blush</td>
!       <td><code>:-I</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':-X')"><img src="emoticons_files/kiss.html" class="icon" alt=""></a></td>
!       <td>kisses</td>
!       <td><code>:-X</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext(':o)')"><img src="emoticons_files/clown.html" class="icon" alt=""></a></td>
!       <td>clown</td>
!       <td><code>:o)</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('P-|')"><img src="emoticons_files/blackeye.html" class="icon" alt=""></a></td>
!       <td>black eye</td>
!       <td><code>P-|</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('8-[')"><img src="emoticons_files/angry.html" class="icon" alt=""></a></td>
!       <td>angry</td>
!       <td><code>8-[</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('xx-P')"><img src="emoticons_files/dead.html" class="icon" alt=""></a></td>
!       <td>dead</td>
!       <td><code>xx-P</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('|-.')"><img src="emoticons_files/sleepy.html" class="icon" alt=""></a></td>
!       <td>sleepy</td>
!       <td><code>|-.</code></td>
!     </tr>
!     <tr>
!       <td><a href="javascript:inserttext('}-]')"><img src="emoticons_files/evil.html" class="icon" alt=""></a></td>
!       <td>evil</td>
!       <td><code>}-]</code></td>
!     </tr>
!     </tbody></table>
!     </td>
!   </tr>
! </tbody></table>
  
  <p>When writing online, it can sometimes difficult to express emotion with plain text.
     These little icons can help.  </p>
--- 1,7 ----
  <html><head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><h1>Using Smilies (emoticons)</h1>
! <div id="emoticons">##emoticons_html##</div>
! <div style="clear: both;"></div>
  
  <p>When writing online, it can sometimes difficult to express emotion with plain text.
     These little icons can help.  </p>
***************
*** 122,125 ****
  
  <p>Note that the codes themselves are like little pictures - just turn your head to the left when looking at them</p>
  
! </body></html>
\ No newline at end of file
--- 10,13 ----
  
  <p>Note that the codes themselves are like little pictures - just turn your head to the left when looking at them</p>
  
! </body></html>
Index: richtext.html
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/help/richtext.html,v
retrieving revision 1.6
diff -c -c -r1.6 richtext.html
*** richtext.html	16 Aug 2007 10:25:59 -0000	1.6
--- richtext.html	29 Apr 2008 02:32:40 -0000
***************
*** 43,162 ****
  <h2>Inserting smilies (emoticons) <img alt="" src="pix/s/smiley.gif" class="icon" /></h2>
  <div class="indent">
  <p>To embed these small icons in your text, click on the smiley icon in the toolbar.  A dialog will pop up that allows you to select from the following smiley icons. (Alternatively, you can just type the corresponding code straight into your text and it will be converted later when your text is displayed).</p>
! 
!     <table border="1">
!       <tr valign="top">
!         <td>
!         <table border="0" align="center" cellpadding="10">
!           <tr>
!             <td><img alt="" src="pix/s/smiley.gif" class="icon" /></td>
!             <td>smile</td>
!             <td nowrap="nowrap"><code>:-)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/biggrin.gif" class="icon" /></td>
!             <td>big grin</td>
!             <td nowrap="nowrap"><code>:-D</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/wink.gif" class="icon" /></td>
!             <td>wink</td>
!             <td nowrap="nowrap"><code>;-)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/mixed.gif" class="icon" /></td>
!             <td>mixed</td>
!             <td nowrap="nowrap"><code>:-/</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/thoughtful.gif" class="icon" /></td>
!               <td>thoughtful</td>
!               <td nowrap="nowrap"><code>V-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/tongueout.gif" class="icon" /></td>
!             <td>tongue out</td>
!             <td nowrap="nowrap"><code>:-P</code></td>
!          </tr>
!           <tr>
!             <td><img alt="" src="pix/s/cool.gif" class="icon" /></td>
!             <td>cool</td>
!             <td nowrap="nowrap"><code>B-)</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/approve.gif" class="icon" /></td>
!               <td>approve</td>
!               <td nowrap="nowrap"><code>^-)</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/wideeyes.gif" class="icon" /></td>
!               <td>wide eyes</td>
!               <td nowrap="nowrap"><code>8-)</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/surprise.gif" class="icon" /></td>
!               <td>surprise</td>
!               <td nowrap="nowrap"><code>8-o</code></td>
!             </tr>
!         </table>
!         </td>
!         <td>
!         <table border="0" align="center" cellpadding="10">
!             <tr>
!               <td><img alt="" src="pix/s/sad.gif" class="icon" /></td>
!               <td>sad</td>
!               <td nowrap="nowrap"><code>:-(</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/shy.gif" class="icon" /></td>
!               <td>shy</td>
!               <td nowrap="nowrap"><code>8-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/blush.gif" class="icon" /></td>
!             <td>blush</td>
!             <td nowrap="nowrap"><code>:-I</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/kiss.gif" class="icon" /></td>
!               <td>kisses</td>
!               <td nowrap="nowrap"><code>:-X</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/clown.gif" class="icon" /></td>
!             <td>clown</td>
!             <td nowrap="nowrap"><code>:o)</code></td>
!           </tr>
!           <tr>
!             <td><img alt="" src="pix/s/blackeye.gif" class="icon" /></td>
!             <td>black eye</td>
!             <td nowrap="nowrap"><code>P-|</code></td>
!           </tr>
!             <tr>
!               <td><img alt="" src="pix/s/angry.gif" class="icon" /></td>
!               <td>angry</td>
!               <td nowrap="nowrap"><code>8-[</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/dead.gif" class="icon" /></td>
!               <td>dead</td>
!               <td nowrap="nowrap"><code>xx-P</code></td>
!             </tr>
!             <tr>
!               <td><img alt="" src="pix/s/sleepy.gif" class="icon" /></td>
!               <td>sleepy</td>
!               <td nowrap="nowrap"><code>|-.</code></td>
!             </tr>
!           <tr>
!             <td><img alt="" src="pix/s/evil.gif" class="icon" /></td>
!             <td>evil</td>
!             <td nowrap="nowrap"><code>}-]</code></td>
!           </tr>
!         </table>
!         </td>
!       </tr>
!     </table>
! 
  </div>
! 
! 
--- 43,48 ----
  <h2>Inserting smilies (emoticons) <img alt="" src="pix/s/smiley.gif" class="icon" /></h2>
  <div class="indent">
  <p>To embed these small icons in your text, click on the smiley icon in the toolbar.  A dialog will pop up that allows you to select from the following smiley icons. (Alternatively, you can just type the corresponding code straight into your text and it will be converted later when your text is displayed).</p>
! <div id="emoticons">##emoticons_html##</div>
  </div>
! <div style="clear:both">&nbsp<div>
Index: ../../../theme/standard/styles_layout.css
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/standard/styles_layout.css,v
retrieving revision 1.575
diff -c -c -r1.575 styles_layout.css
*** ../../../theme/standard/styles_layout.css	22 Apr 2008 16:17:01 -0000	1.575
--- ../../../theme/standard/styles_layout.css	29 Apr 2008 02:32:43 -0000
***************
*** 4271,4273 ****
--- 4271,4286 ----
    border: 1px dashed #ddd;
    padding: 3px;
  }
+ #help #emoticons{
+     align: center;clear:both;width: 300px;margin-right: auto; margin-left:auto;
+ }
+ #help #emoticons ul{
+     list-style-type: none;
+ }
+ #help #emoticons li{
+     margin-bottom: 3px;
+     width: 120px;
+     border-left: 3px solid gray;
+     padding-left: 7px;
+     float: left;
+ }
Index: ../../../help.php
===================================================================
RCS file: /cvsroot/moodle/moodle/help.php,v
retrieving revision 1.46
diff -c -c -r1.46 help.php
*** ../../../help.php	10 Apr 2008 11:50:52 -0000	1.46
--- ../../../help.php	29 Apr 2008 02:32:43 -0000
***************
*** 140,145 ****
--- 140,150 ----
      $title=$title.' - '.$matches[2];
  }
  
+ // use ##emoticons_html## to replace the emoticons documentation
+ if(preg_match('~(##emoticons_html##)~', $output, $matches)) {
+     $output = preg_replace('~(##emoticons_html##)~', get_emoticons_html(), $output);
+ }
+ 
  // Do the main output.
  print_header($title);
  print_simple_box_start();
***************
*** 160,165 ****
--- 165,189 ----
  
  // Utility function =================================================================
  
+ function get_emoticons_html(){
+     global $CFG;
+     $output = '';
+     $emoticonstring = $CFG->emoticons;
+     $output .= '<ul>';
+     if ($emoticonstring) {
+         $items = explode('{;}', $CFG->emoticons);
+         foreach ($items as $item) {
+             $item = explode('{:}', $item);
+             $emoticons[$item[0]] = $item[1];
+             $output .= '<li><a href="###" onclick="inserttext(\''.$item[0].'\')"><img src="'.$CFG->pixpath.'/s/'.$item[1].'.gif" alt="'.$item[0].'" /></a>'.' <code>'.$item[0].'</code>';
+         }
+ 
+     }
+     $output .= '</ul>';
+     return $output;
+ 
+ }
+ 
  function file_exists_and_readable($filepath) {
      return file_exists($filepath) and is_file($filepath) and is_readable($filepath);
  }
