Browse Source

insertion plus robuste dans le formulaire forum

v2
Cerdic 1 year ago
parent
commit
fdcc8ff557
  1. 6
      mailsubscribers_pipelines.php

6
mailsubscribers_pipelines.php

@ -288,8 +288,10 @@ function mailsubscribers_formulaire_fond($flux) {
if (strrpos($flux['data'], '</textarea>') < $pform) {
$pform = 0;
}
if (preg_match(",</(div|ul)>\s*</fieldset>,Uims", substr($flux['data'], $pform), $m)){
$p = strpos($flux['data'], $m[0], $pform);
if ($p = strripos($flux['data'], "</fieldset>")
and $pfieldset = strripos($flux['data'], "<fieldset", strlen($flux['data'])- $p)
and preg_match(",</(div|ul)>\s*</fieldset>,Uims", substr($flux['data'], $pfieldset), $m)){
$p = strpos($flux['data'], $m[0], $pfieldset);
$c = array_merge($flux['args']['contexte'], array('tag' => ($m[1]=='ul' ? 'li' : 'div')));
$input = recuperer_fond("formulaires/inc-optin-subscribe", $c);
$flux['data'] = substr_replace($flux['data'], $input, $p, 0);

Loading…
Cancel
Save