オープンソース・ソフトウェアの開発とダウンロード

CVS リポジトリの参照

Diff of /pukiwiki/pukiwiki/plugin/color.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.12 by henoheno, Sun Nov 21 11:38:57 2004 UTC revision 1.14 by henoheno, Sun Nov 21 13:32:30 2004 UTC
# Line 6  Line 6 
6  //  //
7  // Text color plugin  // Text color plugin
8    
9    // Allow CSS instead of font tag (XHTML 1.0 Transitional only)
10  define('PLUGIN_COLOR_ALLOW_CSS', TRUE); // TRUE, FALSE  define('PLUGIN_COLOR_ALLOW_CSS', TRUE); // TRUE, FALSE
11    
12  // ----  // ----
# Line 33  function plugin_color_inline() Line 34  function plugin_color_inline()
34                          return '&color():Invalid color: ' . htmlspecialchars($col) . ';';                          return '&color():Invalid color: ' . htmlspecialchars($col) . ';';
35          }          }
36    
37          if ($html_transitional === TRUE && PLUGIN_COLOR_ALLOW_CSS === TRUE) {          if (PLUGIN_COLOR_ALLOW_CSS === TRUE && $html_transitional === FALSE) {
38                  if ($bgcolor != '') $bgcolor = ';background-color:' . $bgcolor;                  if ($bgcolor != '') $bgcolor = ';background-color:' . $bgcolor;
39                  return '<span style="color:' . $color . $bgcolor . '">' . $text . '</span>';                  return '<span style="color:' . $color . $bgcolor . '">' . $text . '</span>';
40          } else {          } else {
41                  // Using <font> tag with:                  // NOTE: <font> tag become invalid from XHTML 1.1
                 //   NG: XHTML 1.1  
                 //   OK: XHTML 1.0 Transitional  
42                  if ($bgcolor != '') return '&color(): bgcolor (with CSS) not allowd;';                  if ($bgcolor != '') return '&color(): bgcolor (with CSS) not allowd;';
43                  return '<font color="' . $color . '">' . $text . '</font>';                  return '<font color="' . $color . '">' . $text . '</font>';
44          }          }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.14

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26