Advertisement
Guest User

HTML5_CmsMs

a guest
Nov 8th, 2022
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 17.65 KB | Fixit | 0 0
  1. ++ Modifications pour conformité HTML5 // Changes for HTML5 compliance //  MAJ 08/11/22
  2.  
  3.  ----------------/lib/
  4. --- /lib/classes/internal/module_support/modform.inc.php.HTML4
  5. +++ /lib/classes/internal/module_support/modform.inc.php (HTML5)
  6. +## NOTA replace   /> by  > for HTML5
  7. @@ -59,18 +59,18 @@
  8.     $text .= ' class="cms_form"';
  9.     if ($enctype != '') $text .= ' enctype="'.$enctype.'"';
  10.     if ($extra != '') $text .= ' '.$extra;
  11. -   $text .= '>'."\n".'<div class="hidden">'."\n".'<input type="hidden" name="mact" value="'.$modinstance->GetName().','.$id.','.$action.','.($inline == true?1:0).'" />'."\n";
  12. +   $text .= '>'."\n".'<div class="hidden">'."\n".'<input type="hidden" name="mact" value="'.$modinstance->GetName().','.$id.','.$action.','.($inline == true?1:0).'">'."\n";
  13.     if ($returnid != '') {
  14. -       $text .= '<input type="hidden" name="'.$id.'returnid" value="'.$returnid.'" />'."\n";
  15. -       if ($inline) $text .= '<input type="hidden" name="'.$modinstance->cms->config['query_var'].'" value="'.$returnid.'" />'."\n";
  16. +       $text .= '<input type="hidden" name="'.$id.'returnid" value="'.$returnid.'">'."\n";
  17. +       if ($inline) $text .= '<input type="hidden" name="'.$modinstance->cms->config['query_var'].'" value="'.$returnid.'">'."\n";
  18.     }
  19.     else {
  20. -       $text .= '<input type="hidden" name="'.CMS_SECURE_PARAM_NAME.'" value="'.$_SESSION[CMS_USER_KEY].'" />'."\n";
  21. +       $text .= '<input type="hidden" name="'.CMS_SECURE_PARAM_NAME.'" value="'.$_SESSION[CMS_USER_KEY].'">'."\n";
  22.     }
  23.     foreach ($params as $key=>$value) {
  24.         $value = cms_htmlentities($value);
  25.         if ($key != 'module' && $key != 'action' && $key != 'id') {
  26. -           $text .= '<input type="hidden" name="'.$id.$key.'" value="'.$value.'" />'."\n";
  27. +           $text .= '<input type="hidden" name="'.$id.$key.'" value="'.$value.'">'."\n";
  28.         }
  29.     }
  30.     $text .= "</div>\n";
  31. @@ -104,7 +104,7 @@
  32.  
  33.    $text = '<input type="text" class="cms_textfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  34.    if ($addttext != '') $text .= ' ' . $addttext;
  35. -  $text .= " />\n";
  36. +  $text .= ">\n";
  37.    return $text;
  38.  }
  39.  
  40. @@ -138,7 +138,7 @@
  41.    $value = str_replace('"', '&quot;', $value);
  42.    $text = '<input type="color" class="cms_colorfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  43.    if ($addttext != '') $text .= ' ' . $addttext;
  44. -  $text .= " />\n";
  45. +  $text .= ">\n";
  46.    return $text;
  47.  }
  48.  
  49. @@ -154,7 +154,7 @@
  50.    $value = str_replace('"', '&quot;', $value);
  51.    $text = '<input type="date" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  52.    if ($addttext != '') $text .= ' ' . $addttext;
  53. -  $text .= " />\n";
  54. +  $text .= ">\n";
  55.    return $text;
  56.  }
  57.  
  58. @@ -170,7 +170,7 @@
  59.    $value = str_replace('"', '&quot;', $value);
  60.    $text = '<input type="datetime" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  61.    if ($addttext != '') $text .= ' ' . $addttext;
  62. -  $text .= " />\n";
  63. +  $text .= ">\n";
  64.    return $text;
  65.  }
  66.  
  67. @@ -186,7 +186,7 @@
  68.    $value = str_replace('"', '&quot;', $value);
  69.    $text = '<input type="datetime-local" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  70.    if ($addttext != '') $text .= ' ' . $addttext;
  71. -  $text .= " />\n";
  72. +  $text .= ">\n";
  73.    return $text;
  74.  }
  75.  
  76. @@ -202,7 +202,7 @@
  77.    $value = str_replace('"', '&quot;', $value);
  78.    $text = '<input type="month" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  79.    if ($addttext != '') $text .= ' ' . $addttext;
  80. -  $text .= " />\n";
  81. +  $text .= ">\n";
  82.    return $text;
  83.  }
  84.  
  85. @@ -218,7 +218,7 @@
  86.    $value = str_replace('"', '&quot;', $value);
  87.    $text = '<input type="week" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  88.    if ($addttext != '') $text .= ' ' . $addttext;
  89. -  $text .= " />\n";
  90. +  $text .= ">\n";
  91.    return $text;
  92.  }
  93.  
  94. @@ -234,7 +234,7 @@
  95.    $value = str_replace('"', '&quot;', $value);
  96.    $text = '<input type="time" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  97.    if ($addttext != '') $text .= ' ' . $addttext;
  98. -  $text .= " />\n";
  99. +  $text .= ">\n";
  100.    return $text;
  101.  }
  102.  
  103. @@ -250,7 +250,7 @@
  104.    $value = str_replace('"', '&quot;', $value);
  105.    $text = '<input type="number" class="cms_numberfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  106.    if ($addttext != '') $text .= ' ' . $addttext;
  107. -  $text .= " />\n";
  108. +  $text .= ">\n";
  109.    return $text;
  110.  }
  111.  
  112. @@ -266,7 +266,7 @@
  113.    $value = str_replace('"', '&quot;', $value);
  114.    $text = '<input type="range" class="cms_numberfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
  115.    if ($addttext != '') $text .= ' ' . $addttext;
  116. -  $text .= " />\n";
  117. +  $text .= ">\n";
  118.    return $text;
  119.  }
  120.  
  121. @@ -284,7 +284,7 @@
  122.    $value = str_replace('"', '&quot;', $value);
  123.    $text = '<input type="email" class="cms_emailfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  124.    if ($addttext != '') $text .= ' ' . $addttext;
  125. -  $text .= " />\n";
  126. +  $text .= ">\n";
  127.    return $text;
  128.  }
  129.  
  130. @@ -302,7 +302,7 @@
  131.    $value = str_replace('"', '&quot;', $value);
  132.    $text = '<input type="tel" class="cms_telfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  133.    if ($addttext != '') $text .= ' ' . $addttext;
  134. -  $text .= " />\n";
  135. +  $text .= ">\n";
  136.    return $text;
  137.  }
  138.  
  139. @@ -320,7 +320,7 @@
  140.    $value = str_replace('"', '&quot;', $value);
  141.    $text = '<input type="search" class="cms_searchfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  142.    if ($addttext != '') $text .= ' ' . $addttext;
  143. -  $text .= " />\n";
  144. +  $text .= ">\n";
  145.    return $text;
  146.  }
  147.  
  148. @@ -338,7 +338,7 @@
  149.    $value = str_replace('"', '&quot;', $value);
  150.    $text = '<input type="url" class="cms_urlfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  151.    if ($addttext != '') $text .= ' ' . $addttext;
  152. -  $text .= " />\n";
  153. +  $text .= ">\n";
  154.    return $text;
  155.  }
  156.  
  157. @@ -355,7 +355,7 @@
  158.    $text='<input type="file" class="cms_browse" name="'.$id.$name.'" size="'.$size.'"';
  159.    if ($accept != '') $text .= ' accept="' . $accept.'"';
  160.    if ($addttext != '') $text .= ' ' . $addttext;
  161. -  $text .= " />\n";
  162. +  $text .= ">\n";
  163.    return $text;
  164.  }
  165.  
  166. @@ -373,7 +373,7 @@
  167.    $value = str_replace('"', '&quot;', $value);
  168.    $text = '<input type="password" class="cms_password" id="'.$id.$name.'" name="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  169.    if ($addttext != '') $text .= ' ' . $addttext;
  170. -  $text .= " />\n";
  171. +  $text .= ">\n";
  172.    return $text;
  173.  }
  174.  
  175. @@ -389,7 +389,7 @@
  176.    $value = str_replace('"', '&quot;', $value);
  177.    $text = '<input type="hidden" id="'.$id.$name.'" name="'.$id.$name.'" value="'.$value.'"';
  178.    if ($addttext != '') $text .= ' '.$addttext;
  179. -  $text .= " />\n";
  180. +  $text .= ">\n";
  181.    return $text;
  182.  }
  183.  
  184. @@ -406,7 +406,7 @@
  185.    $text = '<input type="checkbox" class="cms_checkbox" name="'.$id.$name.'" value="'.$value.'"';
  186.    if ($selectedvalue == $value) $text .= ' ' . 'checked="checked"';
  187.    if ($addttext != '') $text .= ' '.$addttext;
  188. -  $text .= " />\n";
  189. +  $text .= ">\n";
  190.    return $text;
  191.  }
  192.  
  193. @@ -432,7 +432,7 @@
  194.    if ($confirmtext != '' ) $text .= ' onclick="return confirm(\''.$confirmtext.'\');"';
  195.    if ($addttext != '') $text .= ' '.$addttext;
  196.  
  197. -  $text .= ' />';
  198. +  $text .= '>';
  199.    return $text . "\n";
  200.  }
  201.  
  202. @@ -446,7 +446,7 @@
  203.  
  204.    $text = '<input type="reset" class="cms_reset" name="'.$id.$name.'" value="'.$value.'"';
  205.    if ($addttext != '') $text .= ' '.$addttext;
  206. -  $text .= ' />';
  207. +  $text .= '>';
  208.    return $text . "\n";
  209.  }
  210.  
  211. @@ -460,7 +460,7 @@
  212.  
  213.    $text = '<input type="file" class="cms_browse" name="'.$id.$name.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  214.    if ($addttext != '') $text .= ' '.$addttext;
  215. -  $text .= ' />';
  216. +  $text .= '>';
  217.    return $text . "\n";
  218.  }
  219.  
  220. @@ -507,7 +507,7 @@
  221.    $value = str_replace('"', '&quot;', $value);
  222.    $text = '<input type="text" class="cms_datalistfield" name="'.$id.$name.'" list="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
  223.    if ($addttext != '') $text .= ' ' . $addttext;
  224. -  $text .= " />\n";
  225. +  $text .= ">\n";
  226.  
  227.    $text .= '<datalist class="cms_datalist" id="'.$id.$name.'"';
  228.    if ($addttext != '') $text .= ' ' . $addttext;
  229. @@ -575,7 +575,7 @@
  230.       $text .= '<input class="cms_radio" type="radio" name="'.$id.$name.'" id="'.$id.$name.$counter.'" value="'.$value.'"';
  231.       if ($addttext != '') $text .= ' ' . $addttext;
  232.       if ($selectedvalue == $value) $text .= ' ' . 'checked="checked"';
  233. -     $text .= ' />';
  234. +     $text .= '>';
  235.       $text .= '<label class="cms_label" for="'.$id.$name.$counter.'">'.$key .'</label>' . $delimiter;
  236.    }
  237.  
  238.  
  239. --- /lib/misc.functions.php.HTML4
  240. +++ /lib/misc.functions.php (HTML5)
  241.  #$Id: misc.functions.php
  242. -
  243. +## NOTA line 98 and  1229  The type attribute (type="text/javascript") is unnecessary for JavaScript resources
  244.  /**
  245.   * Miscellaneous support functions
  246.   *
  247. @@ -93,9 +93,9 @@
  248.          $debug = $config['debug'];
  249.      }
  250.  
  251.          // use javascript instead
  252. -        echo '<script type="text/javascript">
  253. +        echo '<script">  
  254.            <!--location.replace("'.$to.'"); // -->
  255.            </script>
  256.  
  257.    // Output
  258.    $output = '';
  259. -  $fmt_js = '<script type="text/javascript" src="%s"></script>';
  260. +  $fmt_js = '<script src="%s"></script>';.
  261.    $fmt_css = '<link rel="stylesheet" type="text/css" href="%s">';
  262.  
  263.  
  264.  ----------------/lib/plugins/
  265.  
  266. --- /lib/plugins/function.cms_selflink.php.HTML4
  267. +++ /lib/plugins/function.cms_selflink.php (HTML5)
  268. + ## NOTA replace   /> by  > for HTML5
  269. @@ -251,7 +251,7 @@
  270.         }
  271.  
  272.         $result .= '" title="'.$title.'" ';
  273. -       $result .= 'href="'.$url.'" />';
  274. +       $result .= 'href="'.$url.'">';
  275.     }
  276.     else {
  277.         if( isset($params['label_side']) ) $label_side = strtolower(trim($params['label_side']));
  278. @@ -281,7 +281,7 @@
  279.             if( $width ) $result .= " width=\"$width\"";
  280.             if( $height ) $height = max(1,$height);
  281.             if( $height ) $result .= " height=\"$height\"";
  282. -           $result .= "/>";
  283. +           $result .= ">";
  284.             if (! (isset($params['imageonly']) && $params['imageonly'])) $result .= " $linktext";
  285.  
  286.  
  287. --- /lib/plugins/function.cms_stylesheet.php.HTML4
  288. +++ 2/lib/plugins/function.cms_stylesheet.php (HTML5)
  289. + ## NOTA replace   /> by  > for HTML5
  290. @@ -283,13 +283,13 @@
  291.     } else {
  292.  
  293.         if (!empty($media_query)) {
  294. -           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_query.'" />'."\n";
  295. +           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_query.'">'."\n";
  296.         } elseif (!empty($media_type)) {
  297.  
  298. -           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_type.'" />'."\n";
  299. +           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_type.'">'."\n";
  300.         } else {
  301.  
  302. -           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" />'."\n";
  303. +           $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'">'."\n";
  304.         }
  305.  
  306. +++ function.form_start.php corrigé en HTML5 Révision 12825  (02/10/22)
  307. http://viewsvn.cmsmadesimple.org/diff.php?repname=cmsmadesimple&path=%2Ftrunk%2Flib%2Fplugins%2Ffunction.form_start.php&rev=12825&peg=12825
  308.  
  309. --- /lib/plugins/function.metadata.php.HTML4
  310. +++ /lib/plugins/function.metadata.php (HTML5)
  311. + ## NOTA replace   /> by  > for HTML5
  312. @@ -39,7 +39,7 @@
  313.     if ($showbase)  {
  314.          $base = CMS_ROOT_URL;
  315.          if( $gCms->is_https_request() ) $base = $config['ssl_url'];
  316. -       $result .= "\n<base href=\"".$base."/\" />\n";
  317. +       $result .= "\n<base href=\"".$base."/\">\n";
  318.     }
  319.  
  320.  
  321.  
  322.    
  323.  ----------------/modules/
  324.  
  325. --- /modules/MicroTiny/templates/tinymce_config.js.HTML4
  326. +++ 2/modules/MicroTiny/templates/tinymce_config.js (HTML5)
  327. @@ -1,4 +1,4 @@
  328. -// define cmsms_tiny object // Modification pour HTML5
  329. +// define cmsms_tiny object
  330.  
  331. +  // pour HTML5
  332. +element_format : 'html',  //+ element_format 2 valeurs possibles : "xhtml"=<br /> ou "html"=<br>
  333. +schema: 'html5',   //+  schema 2 valeurs possibles : "html5", "html4"          
  334.      // smarty logic stuff
  335.  
  336. --- /modules/Search/Search.module.php.HTML4
  337. +++ /modules/Search/Search.module.php (HTML5)
  338. @@ -101,13 +101,9 @@
  339.      protected function GetSearchHtmlTemplate()
  340.      {
  341.          return '
  342. -{$startform}
  343. -<label for="{$search_actionid}searchinput">{$searchprompt}:&nbsp;</label><input type="text" class="search-input" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" placeholder="{$searchtext}"/>
  344. -{*
  345. -<br/>
  346. -<input type="checkbox" name="{$search_actionid}use_or" value="1"/>
  347. -*}
  348. -<input class="search-button" name="submit" value="{$submittext}" type="submit" />
  349. +{$startform} {* Gabarit de Search.module.php -  06/11/22 correction HTML5 - /> + > *}
  350. +<label for="{$search_actionid}searchinput">{$searchprompt}&nbsp;</label><input type="text" class="search-input" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" value="{$searchtext}">
  351. +<input class="search-button" name="submit" value="{$submittext}" type="submit">
  352.  {if isset($hidden)}{$hidden}{/if}
  353.  
  354.  
  355. ├── lib
  356. │   ├── classes
  357. │   │   └── internal
  358. │   │       └── module_support
  359. │   │           ├── modform.inc.php (HTML5)     >
  360. │   │           └── modform.inc.php.HTML4    />
  361. │   ├── misc.functions.php (HTML5)                 <script
  362. │   ├── misc.functions.php.HTML4   <script type="text/javascript"  // {cms_jquery exclude....
  363. │   └── plugins
  364. │       ├── function.cms_selflink.php (HTML5)    >
  365. │       ├── function.cms_selflink.php.HTML4    />
  366. │       ├── function.cms_stylesheet.php (HTML5)    >
  367. │       ├── function.cms_stylesheet.php.HTML4    />
  368. │       ├── + function.form_start.php                  NOTA  corrigé en HTML5 Révision 12825  (02/10/22)
  369. │       ├── function.metadata.php (HTML5)    >
  370. │       ├── function.metadata.php.HTML4    />
  371. │       └──  function.site_mapper.php   Voir -> Navigator/template/minimal_menu.tpl
  372. └── modules
  373.     ├── MicroTiny
  374.     │   └── templates
  375.     │       ├── tinymce_config.js (HTML5)
  376.     │       └── tinymce_config.js.HTML4
  377.     └── MenuManager (Gabarit - Obsolète - Deprecated)
  378.     │        └── templates
  379.     │          └── minimal_menu.tpl (HTML5)   - <hr class="separator" />  + <hr class="separator">
  380.     │          └── minimal_menu.tpl.HTML4     <hr class="separator" />
  381.     │          └── simple_navigation.tpl (HTML5)     <hr>  
  382.     │          └── simple_navigation.tpl.HTML4     <hr />    
  383.     └── Navigator
  384.         └── templates (Gabarit)
  385.               └── cssmenu.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  386.               └── cssmenu.tpl.HTML4   <hr class="separator" />        
  387.               └── cssmenu_ulshadow.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  388.               └── cssmenu_ulshadow.tpl.HTML4   <hr class="separator" />                                        
  389.               └── minimal_menu.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  390.               └── minimal_menu.tpl .HTML4   <hr class="separator" />                    
  391.               └── simple_navigation.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  392.               └── simple_navigation.tpl.HTML4   <hr class="separator" />    
  393.               └── Simplex_Footer_Navigation.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  394.               └── Simplex_Footer_Navigation.tpl.HTML4   <hr class="separator" />  
  395.                ── Simplex_Main_Navigation.tpl (HTML5)  - <hr class="separator" />  + <hr class="separator">
  396.               └── Simplex_Main_Navigation.tpl.HTML4   <hr class="separator" />                            
  397.  
  398.     └── News
  399.         └── templates (Gabarit)
  400.               └── Simplex_Detail_template.tpl (HTML5)  -  alt='' />  +  alt=''>
  401.               └── Simplex_Detail_template.tpl.HTML4   alt='' />
  402.               └──Summary_Simplex_template.tpl (HTML5)  - <article class='news-summary'>  + <div class='news-summary'> ...  - </article> + </div>
  403.               └── Summary_Simplex_template.tpl.HTML4   <article class='news-summary'>    ... </article>        
  404.               └── orig_detail_template.tpl (HTML5)   - /> + >
  405.               └── orig_form_template.tpl  (HTML5)   - /> + >  
  406.               └── orig_summary_template.tpl (HTML5)   - /> + >
  407.                              
  408.      └──Search
  409.         └── Search.module.php  GetSearchHtmlTemplate() {$startform}  
  410.             by  ./method.install.php:82  $tpl->set_name('Search Form Sample'); =  Gabarit Search Form Sample
  411.         └── Search.module.php  GetResultsHtmlTemplate() $text = <<<EOT
  412.             by  ./method.install.php:117  $tpl->set_name('Search Results Sample'); = Gabarit Search Results Sample
  413.         └── templates (Gabarit)
  414.               └── Simplex_Detail_template.tpl (HTML5)  - placeholder='{$searchtext}' />  + placeholder='{$searchtext}' >
  415.               └──Simplex_Detail_template.tpll.HTML4  placeholder='{$searchtext}' />    
  416.  
  417. -----------////////////////////////////////--------
Tags: CMSMS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement