Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ++ Modifications pour conformité HTML5 // Changes for HTML5 compliance // MAJ 08/11/22
- ----------------/lib/
- --- /lib/classes/internal/module_support/modform.inc.php.HTML4
- +++ /lib/classes/internal/module_support/modform.inc.php (HTML5)
- +## NOTA replace /> by > for HTML5
- @@ -59,18 +59,18 @@
- $text .= ' class="cms_form"';
- if ($enctype != '') $text .= ' enctype="'.$enctype.'"';
- if ($extra != '') $text .= ' '.$extra;
- - $text .= '>'."\n".'<div class="hidden">'."\n".'<input type="hidden" name="mact" value="'.$modinstance->GetName().','.$id.','.$action.','.($inline == true?1:0).'" />'."\n";
- + $text .= '>'."\n".'<div class="hidden">'."\n".'<input type="hidden" name="mact" value="'.$modinstance->GetName().','.$id.','.$action.','.($inline == true?1:0).'">'."\n";
- if ($returnid != '') {
- - $text .= '<input type="hidden" name="'.$id.'returnid" value="'.$returnid.'" />'."\n";
- - if ($inline) $text .= '<input type="hidden" name="'.$modinstance->cms->config['query_var'].'" value="'.$returnid.'" />'."\n";
- + $text .= '<input type="hidden" name="'.$id.'returnid" value="'.$returnid.'">'."\n";
- + if ($inline) $text .= '<input type="hidden" name="'.$modinstance->cms->config['query_var'].'" value="'.$returnid.'">'."\n";
- }
- else {
- - $text .= '<input type="hidden" name="'.CMS_SECURE_PARAM_NAME.'" value="'.$_SESSION[CMS_USER_KEY].'" />'."\n";
- + $text .= '<input type="hidden" name="'.CMS_SECURE_PARAM_NAME.'" value="'.$_SESSION[CMS_USER_KEY].'">'."\n";
- }
- foreach ($params as $key=>$value) {
- $value = cms_htmlentities($value);
- if ($key != 'module' && $key != 'action' && $key != 'id') {
- - $text .= '<input type="hidden" name="'.$id.$key.'" value="'.$value.'" />'."\n";
- + $text .= '<input type="hidden" name="'.$id.$key.'" value="'.$value.'">'."\n";
- }
- }
- $text .= "</div>\n";
- @@ -104,7 +104,7 @@
- $text = '<input type="text" class="cms_textfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -138,7 +138,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="color" class="cms_colorfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -154,7 +154,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="date" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -170,7 +170,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="datetime" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -186,7 +186,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="datetime-local" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -202,7 +202,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="month" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -218,7 +218,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="week" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -234,7 +234,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="time" class="cms_datefield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -250,7 +250,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="number" class="cms_numberfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -266,7 +266,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="range" class="cms_numberfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -284,7 +284,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="email" class="cms_emailfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -302,7 +302,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="tel" class="cms_telfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -320,7 +320,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="search" class="cms_searchfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -338,7 +338,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="url" class="cms_urlfield" name="'.$id.$name.'" id="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -355,7 +355,7 @@
- $text='<input type="file" class="cms_browse" name="'.$id.$name.'" size="'.$size.'"';
- if ($accept != '') $text .= ' accept="' . $accept.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -373,7 +373,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="password" class="cms_password" id="'.$id.$name.'" name="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -389,7 +389,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="hidden" id="'.$id.$name.'" name="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' '.$addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -406,7 +406,7 @@
- $text = '<input type="checkbox" class="cms_checkbox" name="'.$id.$name.'" value="'.$value.'"';
- if ($selectedvalue == $value) $text .= ' ' . 'checked="checked"';
- if ($addttext != '') $text .= ' '.$addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- return $text;
- }
- @@ -432,7 +432,7 @@
- if ($confirmtext != '' ) $text .= ' onclick="return confirm(\''.$confirmtext.'\');"';
- if ($addttext != '') $text .= ' '.$addttext;
- - $text .= ' />';
- + $text .= '>';
- return $text . "\n";
- }
- @@ -446,7 +446,7 @@
- $text = '<input type="reset" class="cms_reset" name="'.$id.$name.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' '.$addttext;
- - $text .= ' />';
- + $text .= '>';
- return $text . "\n";
- }
- @@ -460,7 +460,7 @@
- $text = '<input type="file" class="cms_browse" name="'.$id.$name.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' '.$addttext;
- - $text .= ' />';
- + $text .= '>';
- return $text . "\n";
- }
- @@ -507,7 +507,7 @@
- $value = str_replace('"', '"', $value);
- $text = '<input type="text" class="cms_datalistfield" name="'.$id.$name.'" list="'.$id.$name.'" value="'.$value.'" size="'.$size.'" maxlength="'.$maxlength.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- - $text .= " />\n";
- + $text .= ">\n";
- $text .= '<datalist class="cms_datalist" id="'.$id.$name.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- @@ -575,7 +575,7 @@
- $text .= '<input class="cms_radio" type="radio" name="'.$id.$name.'" id="'.$id.$name.$counter.'" value="'.$value.'"';
- if ($addttext != '') $text .= ' ' . $addttext;
- if ($selectedvalue == $value) $text .= ' ' . 'checked="checked"';
- - $text .= ' />';
- + $text .= '>';
- $text .= '<label class="cms_label" for="'.$id.$name.$counter.'">'.$key .'</label>' . $delimiter;
- }
- --- /lib/misc.functions.php.HTML4
- +++ /lib/misc.functions.php (HTML5)
- #$Id: misc.functions.php
- -
- +## NOTA line 98 and 1229 The type attribute (type="text/javascript") is unnecessary for JavaScript resources
- /**
- * Miscellaneous support functions
- *
- @@ -93,9 +93,9 @@
- $debug = $config['debug'];
- }
- // use javascript instead
- - echo '<script type="text/javascript">
- + echo '<script">
- <!--location.replace("'.$to.'"); // -->
- </script>
- // Output
- $output = '';
- - $fmt_js = '<script type="text/javascript" src="%s"></script>';
- + $fmt_js = '<script src="%s"></script>';.
- $fmt_css = '<link rel="stylesheet" type="text/css" href="%s">';
- ----------------/lib/plugins/
- --- /lib/plugins/function.cms_selflink.php.HTML4
- +++ /lib/plugins/function.cms_selflink.php (HTML5)
- + ## NOTA replace /> by > for HTML5
- @@ -251,7 +251,7 @@
- }
- $result .= '" title="'.$title.'" ';
- - $result .= 'href="'.$url.'" />';
- + $result .= 'href="'.$url.'">';
- }
- else {
- if( isset($params['label_side']) ) $label_side = strtolower(trim($params['label_side']));
- @@ -281,7 +281,7 @@
- if( $width ) $result .= " width=\"$width\"";
- if( $height ) $height = max(1,$height);
- if( $height ) $result .= " height=\"$height\"";
- - $result .= "/>";
- + $result .= ">";
- if (! (isset($params['imageonly']) && $params['imageonly'])) $result .= " $linktext";
- --- /lib/plugins/function.cms_stylesheet.php.HTML4
- +++ 2/lib/plugins/function.cms_stylesheet.php (HTML5)
- + ## NOTA replace /> by > for HTML5
- @@ -283,13 +283,13 @@
- } else {
- if (!empty($media_query)) {
- - $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_query.'" />'."\n";
- + $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_query.'">'."\n";
- } elseif (!empty($media_type)) {
- - $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_type.'" />'."\n";
- + $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" media="'.$media_type.'">'."\n";
- } else {
- - $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'" />'."\n";
- + $stylesheet .= '<link rel="stylesheet" type="text/css" href="'.$root_url.$filename.'">'."\n";
- }
- +++ function.form_start.php corrigé en HTML5 Révision 12825 (02/10/22)
- http://viewsvn.cmsmadesimple.org/diff.php?repname=cmsmadesimple&path=%2Ftrunk%2Flib%2Fplugins%2Ffunction.form_start.php&rev=12825&peg=12825
- --- /lib/plugins/function.metadata.php.HTML4
- +++ /lib/plugins/function.metadata.php (HTML5)
- + ## NOTA replace /> by > for HTML5
- @@ -39,7 +39,7 @@
- if ($showbase) {
- $base = CMS_ROOT_URL;
- if( $gCms->is_https_request() ) $base = $config['ssl_url'];
- - $result .= "\n<base href=\"".$base."/\" />\n";
- + $result .= "\n<base href=\"".$base."/\">\n";
- }
- ----------------/modules/
- --- /modules/MicroTiny/templates/tinymce_config.js.HTML4
- +++ 2/modules/MicroTiny/templates/tinymce_config.js (HTML5)
- @@ -1,4 +1,4 @@
- -// define cmsms_tiny object // Modification pour HTML5
- +// define cmsms_tiny object
- + // pour HTML5
- +element_format : 'html', //+ element_format 2 valeurs possibles : "xhtml"=<br /> ou "html"=<br>
- +schema: 'html5', //+ schema 2 valeurs possibles : "html5", "html4"
- // smarty logic stuff
- --- /modules/Search/Search.module.php.HTML4
- +++ /modules/Search/Search.module.php (HTML5)
- @@ -101,13 +101,9 @@
- protected function GetSearchHtmlTemplate()
- {
- return '
- -{$startform}
- -<label for="{$search_actionid}searchinput">{$searchprompt}: </label><input type="text" class="search-input" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" placeholder="{$searchtext}"/>
- -{*
- -<br/>
- -<input type="checkbox" name="{$search_actionid}use_or" value="1"/>
- -*}
- -<input class="search-button" name="submit" value="{$submittext}" type="submit" />
- +{$startform} {* Gabarit de Search.module.php - 06/11/22 correction HTML5 - /> + > *}
- +<label for="{$search_actionid}searchinput">{$searchprompt} </label><input type="text" class="search-input" id="{$search_actionid}searchinput" name="{$search_actionid}searchinput" size="20" maxlength="50" value="{$searchtext}">
- +<input class="search-button" name="submit" value="{$submittext}" type="submit">
- {if isset($hidden)}{$hidden}{/if}
- ├── lib
- │ ├── classes
- │ │ └── internal
- │ │ └── module_support
- │ │ ├── modform.inc.php (HTML5) >
- │ │ └── modform.inc.php.HTML4 />
- │ ├── misc.functions.php (HTML5) <script
- │ ├── misc.functions.php.HTML4 <script type="text/javascript" // {cms_jquery exclude....
- │ └── plugins
- │ ├── function.cms_selflink.php (HTML5) >
- │ ├── function.cms_selflink.php.HTML4 />
- │ ├── function.cms_stylesheet.php (HTML5) >
- │ ├── function.cms_stylesheet.php.HTML4 />
- │ ├── + function.form_start.php NOTA corrigé en HTML5 Révision 12825 (02/10/22)
- │ ├── function.metadata.php (HTML5) >
- │ ├── function.metadata.php.HTML4 />
- │ └── function.site_mapper.php Voir -> Navigator/template/minimal_menu.tpl
- │
- └── modules
- ├── MicroTiny
- │ └── templates
- │ ├── tinymce_config.js (HTML5)
- │ └── tinymce_config.js.HTML4
- └── MenuManager (Gabarit - Obsolète - Deprecated)
- │ └── templates
- │ └── minimal_menu.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- │ └── minimal_menu.tpl.HTML4 <hr class="separator" />
- │ └── simple_navigation.tpl (HTML5) <hr>
- │ └── simple_navigation.tpl.HTML4 <hr />
- └── Navigator
- └── templates (Gabarit)
- └── cssmenu.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── cssmenu.tpl.HTML4 <hr class="separator" />
- └── cssmenu_ulshadow.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── cssmenu_ulshadow.tpl.HTML4 <hr class="separator" />
- └── minimal_menu.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── minimal_menu.tpl .HTML4 <hr class="separator" />
- └── simple_navigation.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── simple_navigation.tpl.HTML4 <hr class="separator" />
- └── Simplex_Footer_Navigation.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── Simplex_Footer_Navigation.tpl.HTML4 <hr class="separator" />
- ── Simplex_Main_Navigation.tpl (HTML5) - <hr class="separator" /> + <hr class="separator">
- └── Simplex_Main_Navigation.tpl.HTML4 <hr class="separator" />
- └── News
- └── templates (Gabarit)
- └── Simplex_Detail_template.tpl (HTML5) - alt='' /> + alt=''>
- └── Simplex_Detail_template.tpl.HTML4 alt='' />
- └──Summary_Simplex_template.tpl (HTML5) - <article class='news-summary'> + <div class='news-summary'> ... - </article> + </div>
- └── Summary_Simplex_template.tpl.HTML4 <article class='news-summary'> ... </article>
- └── orig_detail_template.tpl (HTML5) - /> + >
- └── orig_form_template.tpl (HTML5) - /> + >
- └── orig_summary_template.tpl (HTML5) - /> + >
- └──Search
- └── Search.module.php GetSearchHtmlTemplate() {$startform}
- by ./method.install.php:82 $tpl->set_name('Search Form Sample'); = Gabarit Search Form Sample
- └── Search.module.php GetResultsHtmlTemplate() $text = <<<EOT
- by ./method.install.php:117 $tpl->set_name('Search Results Sample'); = Gabarit Search Results Sample
- └── templates (Gabarit)
- └── Simplex_Detail_template.tpl (HTML5) - placeholder='{$searchtext}' /> + placeholder='{$searchtext}' >
- └──Simplex_Detail_template.tpll.HTML4 placeholder='{$searchtext}' />
- -----------////////////////////////////////--------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement