[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_files/bbcode/ -> list.bb (source)

   1  /* Tag: unordered list [list]*line 1*line2*line 3*line 4*line5 etc[/list] */
   2  /* Tag: ordered list [list=<list type>]*line 1*line2*line 3*line 4*line5 etc[/list] */
   3  /* valid list types: 
   4                  disc
   5                  circle
   6                  square
   7                  decimal        1, 2, 3    (default)
   8                  lower-roman    i, ii, iii
   9                  upper-roman    I, II, III
  10                  lower-alpha    a, b, c
  11                  upper-alpha    A, B, C
  12  */
  13  
  14  
  15  $listitems = explode("*", $code_text);
  16  
  17  if ($parm == '')
  18  {    /* unordered list */
  19    $listtext = "<ul>";
  20    $trailer = "</ul>";
  21  }
  22  else
  23  {
  24    $type = $tp -> toAttribute($parm);
  25    $listtext = "\n<ol style='list-style-type: $type'>";
  26    $trailer = "</ol>";
  27  }
  28  foreach($listitems as $item)
  29  {
  30    if($item && $item != E_NL)
  31    {
  32      $listtext .= "<li>$item</li>";
  33    }
  34  }
  35  return $listtext.$trailer;


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7