Astuces Forumactif
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Membres connectés récemment
Voir tous les membres

[PhpBB2] Indexation d'une section par auteur et par ordre alphabétique

Voir le sujet précédent Voir le sujet suivant Aller en bas

fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Sam 2 Nov 2019 - 16:24

Bonjour à tous,
sur mon forum, j'utilise deux scripts issus d'un tutoriel de Ea pour indexer les sections (par ordre alphabétique et par auteur).
Tout fonctionne bien au niveau de l'indexage si ce n'est que j'ai rencontré un soucis lié à l'intégration d'un autre js qui met en forme les liens du forum. j'ai résolu ce soucis en entourant les variables de l'indexage par une div.
A l'utilisation tout fonctionne à merveille sauf dans un cas précis : l'apposition de la fermeture de la div qui saute lorsque l'auteur est passé en invité.

Voici les deux js
indexation par auteur:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="min-width" xmlns="https://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
<head>
    <title>Page de listing</title>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <style type="text/css">
        body,textarea,input { color: #4499bb;  font-size: 12px; font-family: "trebuchet ms", serif; }
        body { text-align: center; background: #ddeeff; }
        textarea,input { border: 1px dotted #7CBA2C; border-radius: 5px; background: #f8fdff; }
        input[disabled] { color: #808080; border-color: #aaa; background-color: #eaeaef; }
        #note { color: #8CCA3C; font-size: 15px; text-align: center; padding: 5px; background: #9de; margin: 10px auto; width: 80%; border: 1px dotted #8cd; font-weight: bold; border-radius: 15px; }

    </style>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        
                function my_getcookie(name){cname=name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1){cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1){cend=document.cookie.length}return unescape(document.cookie.substring(cstart,cend))}return null}function my_setcookie(name,value,sticky,path){expires="";domain="";if(sticky){expires="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(!path){path="/"}document.cookie=name+"="+value+"; path="+path+expires+domain+';'}
                
        var case_insensitive= 2; var no_tag= 3; var no_special_chars= 5; var intelligent= 7;
        var current=''; var titles= new Array(); var idtitles= new Array();
        
        function treat(str) {            
            if(!(sort_titles_flag%no_tag)) {
                str= str.replace(/(\(.*?\)|\[.*?\])/g,'');
            }
            if(!(sort_titles_flag%case_insensitive)) {
                str= str.toLowerCase();
            }
            if(!(sort_titles_flag%no_special_chars)) {
                str= str.replace(/\W/g,'');
            }
            return str.replace(/^\s+/g,'').replace(/\s+$/g,'').replace(/\s+/g,' ');
        }
        
        function sort_titles(a,b) {
            if(a[3].toLowerCase() > b[3].toLowerCase()) return 1;
            else if(a[3].toLowerCase() < b[3].toLowerCase()) return -1;
 
            a= treat(a[1]);
            b= treat(b[1]);
            if(!(sort_titles_flag%intelligent)) {
                if((anums= a.match(/\d+/g)) && (bnums= b.match(/\d+/g))) {
                                    numsmax= 0;
                                    for(key in anums) if(anums[key].length>numsmax) numsmax= anums[key].length;
                                    for(key in bnums) if(bnums[key].length>numsmax) numsmax= bnums[key].length;
                                    toadd=''; for(var i=1;i<numsmax;i++) toadd+='0';
                                    a= a.replace(/(\d+)/g,toadd+'$1');
                                    b= b.replace(/(\d+)/g,toadd+'$1');
                                    var regex= new RegExp('\\d+(\\d{'+numsmax+'})','g')
                                    a= a.replace(regex,'$1');
                                    b= b.replace(regex,'$1');
                                }
            }
            if(a>b) return 1;
            else if(a.toLowerCase()==b.toLowerCase()) return 0;
            else return -1;
        }
        
        function getForum() {
            titles= new Array();
            current='';
            idtitles= new Array();
            $('#note').text('Index vide');
            $('#addb').attr('disabled','disabled');
            addForum();
        }
        
        function addTitle(){
            var idtitle= parseInt($(this).attr('href').replace(/^.*\/t([1-9][0-9]*)-.*$/,'$1'));
            for(val in idtitles)
                if(idtitles[val]==idtitle) return;
            idtitles.push(idtitle);
            var spec= '';
            if($(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong,strong.pagination')).length==1) spec= $(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong')).text();
            else spec= $(this).closest('dd.dterm').find('.topic-title-container')[0].previousSibling.data.replace(/^\s+/,'').replace(/\s+$/,'');
            /* (subject id,subject title,author id,author name) */
            titles.push(new Array(idtitle,$(this).text(),($(this).parent().parent().parent().find('span.span-tab strong a').length==1?$(this).parent().parent().parent().find('span.span-tab strong a').attr('href').replace(/^.*\/u([1-9][0-9]*)\?change_version=prosilver&change_theme=prosilver/,'$1'):0),$(this).parent().parent().parent().find('span.span-tab strong:first').text(), spec));
        };
        
        function addForum() {
            num_forum= parseInt($('#f').attr('value'));
            if(!(num_forum>0)) return;
            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page 1/? )');
            $('#f').attr('value',num_forum);
            if(current!='') current+=', ';
            $.get('/f'+num_forum+'-?change_theme=prosilver&change_version=prosilver',function(data){
                $(data).find('#main-content a.topictitle').each(addTitle);
                if(!parseInt($(data).find('.pagination:last a strong:last').text())) {
                    current+= 'f'+num_forum;
                    $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                    $('#addb').attr('disabled','');
                    display();
                    return;
                }
                totresult= parseInt($(data).find('.pagination:last a strong:last').text());
                result=totresult-1;
                $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');
                for(var i=1;i<parseInt($(data).find('.pagination:last a strong:last').text());i++)
                {
                    $.get('/f'+num_forum+'p'+(parseInt($(data).find('.pagination:last span a:first').attr('href').replace(/^\/f[1-9][0-9]*p([1-9][0-9]*)-.*$/,'$1'))*i)+'-?change_theme=prosilver&change_version=prosilver',function(data2){
                        $(data2).find('#main-content a.topictitle').each(addTitle);
                        if(--result==0) {
                            current+= 'f'+num_forum;
                            $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                            $('#addb').attr('disabled','');
                            display();
                        }
                        else {
                            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');                        
                        }
                    });
                }
            });
        }
        
        function display() {
                    if(idtitles.length==0) return;
                        sort_titles_flag= 1;
                        if($('#nt').attr('checked')) sort_titles_flag*=no_tag;
                        if($('#ci').attr('checked')) sort_titles_flag*=case_insensitive;
                        if($('#nsp').attr('checked')) sort_titles_flag*=no_special_chars;
                        if($('#in').attr('checked')) sort_titles_flag*=intelligent;
                        if($('#rev').attr('checked')) sort_titles_flag*=11;
                        if($('#html').attr('checked')) sort_titles_flag*=13;
                        if($('#spec').attr('checked')) sort_titles_flag*=17;
                        titles.sort(sort_titles);
                        if($('#rev').attr('checked')) titles.reverse();
                        stocking();
                        saveAll();
        }
        
        function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'<div class=\"index\">[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]<\/div>'));
            line= line.replace(/{TOPICID}/g,t[0]);
            line= line.replace(/{TOPICTITLE}/g,t[1]);
            line= line.replace(/{AUTHORID}/g,t[2]);
            line= line.replace(/{AUTHORNAME}/g,t[3]);
            var sitelink= 'http://'+($('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,'')==''?window.location.hostname:$('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,''));
            line= line.replace(/{SITELINK}/g,sitelink);
            line= line.replace(/{SPECIAL}/g,t[4]);
            line= line.replace(/{RETLINE}/g,'\n');
            return line;
        }
        
        function getFin() {
            var fin= $('#templateEnd').attr('value');
            var now =  new Date();
            fin= fin.replace(/{NOWYEAR}/g,now.getFullYear());
            fin= fin.replace(/{NOWMONTH}/g,now.getMonth()+1);
            fin= fin.replace(/{NOWDAY}/g,now.getDate());
            fin= fin.replace(/{NOWHOUR}/g,now.getHours());
            fin= fin.replace(/{NOWMIN}/g,now.getMinutes());
            fin= fin.replace(/{RETLINE}/g,'\n');
            return fin;
        }
        
        function getTitle(str) {
            var title= $('#templateTitle').attr('value');
            title= title.replace(/{MAJ}/g,str.toUpperCase());
            title= title.replace(/{MIN}/g,str.toLowerCase());
            title= title.replace(/{NORMAL}/g,str);
            title= title.replace(/{RETLINE}/g,'\n');
            return title;
        }
        
        function stocking() {
            $('#result').attr('value','');
          var last=0;
          for(key in titles) {
               if(titles[key][4]=='' || !$('#spec').attr('checked') || titles[key][4]==$('#spexcl').attr('value'))
               {
                  if(last!==treat(titles[key][1]).substr(0,1))
                  {
                         last= treat(titles[key][1]).substr(0,1);
                        $('#result').attr('value',$('#result').attr('value')+getTitle(last));
                  }
                  $('#result').attr('value',$('#result').attr('value')+getLine(titles[key])+'\n');
               }
            }
            $('#result').attr('value',$('#result').attr('value')+getFin());
        }
                
                function saveAll() {
                    my_setcookie('indexingtools',escape('{"line":"'+escape($('#templateLine').attr('value'))+'","end":"'+escape($('#templateEnd').attr('value'))+'","title":"'+escape($('#templateTitle').attr('value'))+'","www":"'+escape($('#www').attr('value'))+'","flags":'+sort_titles_flag+',"spexcl":"'+escape($('#spexcl').attr('value'))+'"}'),1,0);
                }
                
                function getAll() {
                    if(!(cook=my_getcookie('indexingtools'))) return;
                    cook= $.parseJSON(cook);
                    $('#templateLine').attr('value',unescape(cook.line));
                    $('#templateEnd').attr('value',unescape(cook.end));
                    $('#templateTitle').attr('value',unescape(cook.title));
                    $('#www').attr('value',unescape(cook.www));
                    $('#spexcl').attr('value',unescape(cook.spexcl));
                    sort_titles_flag= parseInt(unescape(cook.flags));                    
                    if(!(sort_titles_flag%no_tag)) $('#nt').attr('checked', true);
                    if(!(sort_titles_flag%case_insensitive)) $('#ci').attr('checked', true);
                    if(!(sort_titles_flag%no_special_chars)) $('#nsp').attr('checked', true);
                    if(!(sort_titles_flag%intelligent)) $('#in').attr('checked', true);
                    if(!(sort_titles_flag%11)) $('#rev').attr('checked', true);
                    if(!(sort_titles_flag%13)) { $('#html').attr('checked', true); $('#www').attr('disabled','disabled'); } else $('#www').attr('disabled','');
                    if(!(sort_titles_flag%17)) { $('#spexcl').attr('disabled',''); $('#spec').attr('checked', true); } else  $('#spexcl').attr('disabled','disabled');
                }
                
                $(function(){ getAll(); });
                
                function resetAll() {
                    document.yeah.reset();
                    titles= new Array();
                    current='';
                    idtitles= new Array();
                    $('#note').text('Index vide');
                    $('#sitelink').css('display','inline');
                    $('#addb').attr('disabled','disabled');                    
                }
        
        </script>
</head>
<body>
    <form name="yeah">Forum : <input type="text" id="f" /> <input type="button" value="Charger" onClick="getForum()" /> <input type="button" value="Ajouter" onClick="addForum()" id="addb" disabled="disabled" /> <input type="button" value="Reset" onClick="resetAll()" />    Tri : <input type="checkbox" id="rev" onChange="display()" /> Inversé <input type="checkbox" id="nt" onChange="display()" /> Sans tag <input type="checkbox" onChange="display()" id="ci" /> Insensible à la case <input type="checkbox" id="nsp" onChange="display()" /> Sans caractères spéciaux <input type="checkbox" onChange="display()" id="in" /> Intelligent<br />
    Affichage : <input type="text" style="width:200px;" onChange="display()" onChange="display()" id="templateLine" value="{TOPICLINK} par [i] [color=#7b9c40] {AUTHORLINK}[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color] " /> Ligne <input type="text" onChange="display()" style="width:200px;" id="templateEnd" value="{RETLINE} [left][color=#7b9c40]Mise à jour le {NOWDAY}/{NOWMONTH}/{NOWYEAR}[/color][/left]" /> Fin <input type="text" onChange="display()" style="width:200px;" id="templateTitle" value="{RETLINE} [center][b][size=16][color=#7b9c40]{MAJ}[/color][/size][/b][/center]{RETLINE}" /> Titre<br />Paramètres : <input onChange="display()" onClick="if($(this).attr('checked')) $('#www').attr('disabled','disabled'); else  $('#www').attr('disabled','');" type="checkbox" id="html" /> Html <input type="text" onChange="display()" id="www" value="" /> Raccourci site <input onChange="display()" onClick="if($(this).attr('checked')) $('#spexcl').attr('disabled',''); else  $('#spexcl').attr('disabled','disabled');" type="checkbox" id="spec" /> Sujets normaux avec <input type="text" onChange="display()" id="spexcl" value="[ Sondage ]" disabled="disabled" /><br />
    <textarea style="width:99%; height: 400px" id="result"></textarea></form>
    <div id="note">Index vide</div>
</body>
</html><br />


Dernière édition par fascicularia le Sam 2 Nov 2019 - 19:01, édité 2 fois
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Sam 2 Nov 2019 - 18:37

Bonjour Philippe,
je poste en deux fois car l'éditeur n'arrive pas à digérer les deux js. j'ai bien fait attention de mettre mes codes entre les balises codes mais, comme tu le vois cela n'empêche pas de créer un gros désordre visuel . j'ai recommencé 4 fois dans le doute d'une bonne apposition des balises mais, même résultat à chaque fois. Désolé pour binz au niveau de cette demande d'aide. transpir

2/indexation par ordre alphabétique
Code:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="min-width" xmlns="https://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
<head>
    <title>Page de listing</title>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <style type="text/css">
        body,textarea,input { color: #4499bb;  font-size: 12px; font-family: "trebuchet ms", serif; }
        body { text-align: center; background: #ddeeff; }
        textarea,input { border: 1px dotted #7CBA2C; border-radius: 5px; background: #f8fdff; }
        input[disabled] { color: #808080; border-color: #aaa; background-color: #eaeaef; }
        #note { color: #8CCA3C; font-size: 15px; text-align: center; padding: 5px; background: #9de; margin: 10px auto; width: 80%; border: 1px dotted #8cd; font-weight: bold; border-radius: 15px; }

    </style>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
       
                function my_getcookie(name){cname=name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1){cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1){cend=document.cookie.length}return unescape(document.cookie.substring(cstart,cend))}return null}function my_setcookie(name,value,sticky,path){expires="";domain="";if(sticky){expires="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(!path){path="/"}document.cookie=name+"="+value+"; path="+path+expires+domain+';'}
               
        var case_insensitive= 2; var no_tag= 3; var no_special_chars= 5; var intelligent= 7;
        var current=''; var titles= new Array(); var idtitles= new Array();
       
        function treat(str) {           
            if(!(sort_titles_flag%no_tag)) {
                str= str.replace(/(\(.*?\)|\[.*?\])/g,'');
            }
            if(!(sort_titles_flag%case_insensitive)) {
                str= str.toLowerCase();
            }
            if(!(sort_titles_flag%no_special_chars)) {
                str= str.replace(/\W/g,'');
            }
            return str.replace(/^\s+/g,'').replace(/\s+$/g,'').replace(/\s+/g,' ');
        }
       
        function sort_titles(a,b) {
            a= treat(a[1]);
            b= treat(b[1]);
            if(!(sort_titles_flag%intelligent)) {
                if((anums= a.match(/\d+/g)) && (bnums= b.match(/\d+/g))) {
                                    numsmax= 0;
                                    for(key in anums) if(anums[key].length>numsmax) numsmax= anums[key].length;
                                    for(key in bnums) if(bnums[key].length>numsmax) numsmax= bnums[key].length;
                                    toadd=''; for(var i=1;i<numsmax;i++) toadd+='0';
                                    a= a.replace(/(\d+)/g,toadd+'$1');
                                    b= b.replace(/(\d+)/g,toadd+'$1');
                                    var regex= new RegExp('\\d+(\\d{'+numsmax+'})','g')
                                    a= a.replace(regex,'$1');
                                    b= b.replace(regex,'$1');
                                }
            }
            if(a>b) return 1;
            else if(a.toLowerCase()==b.toLowerCase()) return 0;
            else return -1;
        }
       
        function getForum() {
            titles= new Array();
            current='';
            idtitles= new Array();
            $('#note').text('Index vide');
            $('#addb').attr('disabled','disabled');
            addForum();
        }
       
        function addTitle(){
            var idtitle= parseInt($(this).attr('href').replace(/^.*\/t([1-9][0-9]*)-.*$/,'$1'));
            for(val in idtitles)
                if(idtitles[val]==idtitle) return;
            idtitles.push(idtitle);
            var spec= '';
            if($(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong,strong.pagination')).length==1) spec= $(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong')).text();
            else spec= $(this).closest('dd.dterm').find('.topic-title-container')[0].previousSibling.data.replace(/^\s+/,'').replace(/\s+$/,'');
            /* (subject id,subject title,author id,author name) */
            titles.push(new Array(idtitle,$(this).text(),($(this).parent().parent().parent().find('span.span-tab strong a').length==1?$(this).parent().parent().parent().find('span.span-tab strong a').attr('href').replace(/^.*\/u([1-9][0-9]*)\?change_version=prosilver&change_theme=prosilver/,'$1'):0),$(this).parent().parent().parent().find('span.span-tab strong:first').text(), spec));
        };
       
        function addForum() {
            num_forum= parseInt($('#f').attr('value'));
            if(!(num_forum>0)) return;
            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page 1/? )');
            $('#f').attr('value',num_forum);
            if(current!='') current+=', ';
            $.get('/f'+num_forum+'-?change_theme=prosilver&change_version=prosilver',function(data){
                $(data).find('#main-content a.topictitle').each(addTitle);
                if(!parseInt($(data).find('.pagination:last a strong:last').text())) {
                    current+= 'f'+num_forum;
                    $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                    $('#addb').attr('disabled','');
                    display();
                    return;
                }
                totresult= parseInt($(data).find('.pagination:last a strong:last').text());
                result=totresult-1;
                $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');
                for(var i=1;i<parseInt($(data).find('.pagination:last a strong:last').text());i++)
                {
                    $.get('/f'+num_forum+'p'+(parseInt($(data).find('.pagination:last span a:first').attr('href').replace(/^\/f[1-9][0-9]*p([1-9][0-9]*)-.*$/,'$1'))*i)+'-?change_theme=prosilver&change_version=prosilver',function(data2){
                        $(data2).find('#main-content a.topictitle').each(addTitle);
                        if(--result==0) {
                            current+= 'f'+num_forum;
                            $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                            $('#addb').attr('disabled','');
                            display();
                        }
                        else {
                            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');                       
                        }
                    });
                }
            });
        }
       
        function display() {
                    if(idtitles.length==0) return;
                        sort_titles_flag= 1;
                        if($('#nt').attr('checked')) sort_titles_flag*=no_tag;
                        if($('#ci').attr('checked')) sort_titles_flag*=case_insensitive;
                        if($('#nsp').attr('checked')) sort_titles_flag*=no_special_chars;
                        if($('#in').attr('checked')) sort_titles_flag*=intelligent;
                        if($('#rev').attr('checked')) sort_titles_flag*=11;
                        if($('#html').attr('checked')) sort_titles_flag*=13;
                        if($('#spec').attr('checked')) sort_titles_flag*=17;
                        titles.sort(sort_titles);
                        if($('#rev').attr('checked')) titles.reverse();
                        stocking();
                        saveAll();
        }
       
        function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'<div class=\"index\">[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]<\/div>'));
            line= line.replace(/{TOPICID}/g,t[0]);
            line= line.replace(/{TOPICTITLE}/g,t[1]);
            line= line.replace(/{AUTHORID}/g,t[2]);
            line= line.replace(/{AUTHORNAME}/g,t[3]);
            var sitelink= 'http://'+($('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,'')==''?window.location.hostname:$('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,''));
            line= line.replace(/{SITELINK}/g,sitelink);
            line= line.replace(/{SPECIAL}/g,t[4]);
            line= line.replace(/{RETLINE}/g,'\n');
            return line;
        }
       
        function getFin() {
            var fin= $('#templateEnd').attr('value');
            var now =  new Date();
            fin= fin.replace(/{NOWYEAR}/g,now.getFullYear());
            fin= fin.replace(/{NOWMONTH}/g,now.getMonth()+1);
            fin= fin.replace(/{NOWDAY}/g,now.getDate());
            fin= fin.replace(/{NOWHOUR}/g,now.getHours());
            fin= fin.replace(/{NOWMIN}/g,now.getMinutes());
            fin= fin.replace(/{RETLINE}/g,'\n');
            return fin;
        }
       
        function getTitle(str) {
            var title= $('#templateTitle').attr('value');
            title= title.replace(/{MAJ}/g,str.toUpperCase());
            title= title.replace(/{MIN}/g,str.toLowerCase());
            title= title.replace(/{NORMAL}/g,str);
            title= title.replace(/{RETLINE}/g,'\n');
            return title;
        }
       
        function stocking() {
            $('#result').attr('value','');
          var last=0;
          for(key in titles) {
              if(titles[key][4]=='' || !$('#spec').attr('checked') || titles[key][4]==$('#spexcl').attr('value'))
              {
                  if(last!==treat(titles[key][1]).substr(0,1))
                  {
                        last= treat(titles[key][1]).substr(0,1);
                        $('#result').attr('value',$('#result').attr('value')+getTitle(last));
                  }
                  $('#result').attr('value',$('#result').attr('value')+getLine(titles[key])+'\n');
              }
            }
            $('#result').attr('value',$('#result').attr('value')+getFin());
        }
               
                function saveAll() {
                    my_setcookie('indexingtools',escape('{"line":"'+escape($('#templateLine').attr('value'))+'","end":"'+escape($('#templateEnd').attr('value'))+'","title":"'+escape($('#templateTitle').attr('value'))+'","www":"'+escape($('#www').attr('value'))+'","flags":'+sort_titles_flag+',"spexcl":"'+escape($('#spexcl').attr('value'))+'"}'),1,0);
                }
               
                function getAll() {
                    if(!(cook=my_getcookie('indexingtools'))) return;
                    cook= $.parseJSON(cook);
                    $('#templateLine').attr('value',unescape(cook.line));
                    $('#templateEnd').attr('value',unescape(cook.end));
                    $('#templateTitle').attr('value',unescape(cook.title));
                    $('#www').attr('value',unescape(cook.www));
                    $('#spexcl').attr('value',unescape(cook.spexcl));
                    sort_titles_flag= parseInt(unescape(cook.flags));                   
                    if(!(sort_titles_flag%no_tag)) $('#nt').attr('checked', true);
                    if(!(sort_titles_flag%case_insensitive)) $('#ci').attr('checked', true);
                    if(!(sort_titles_flag%no_special_chars)) $('#nsp').attr('checked', true);
                    if(!(sort_titles_flag%intelligent)) $('#in').attr('checked', true);
                    if(!(sort_titles_flag%11)) $('#rev').attr('checked', true);
                    if(!(sort_titles_flag%13)) { $('#html').attr('checked', true); $('#www').attr('disabled','disabled'); } else $('#www').attr('disabled','');
                    if(!(sort_titles_flag%17)) { $('#spexcl').attr('disabled',''); $('#spec').attr('checked', true); } else  $('#spexcl').attr('disabled','disabled');
                }
               
                $(function(){ getAll(); });
               
                function resetAll() {
                    document.yeah.reset();
                    titles= new Array();
                    current='';
                    idtitles= new Array();
                    $('#note').text('Index vide');
                    $('#sitelink').css('display','inline');
                    $('#addb').attr('disabled','disabled');                   
                }
       
        </script>
</head>
<body>
    <form name="yeah">Forum : <input type="text" id="f" /> <input type="button" value="Charger" onClick="getForum()" /> <input type="button" value="Ajouter" onClick="addForum()" id="addb" disabled="disabled" /> <input type="button" value="Reset" onClick="resetAll()" />    Tri : <input type="checkbox" id="rev" onChange="display()" /> Inversé <input type="checkbox" id="nt" onChange="display()" /> Sans tag <input type="checkbox" onChange="display()" id="ci" /> Insensible à la case <input type="checkbox" id="nsp" onChange="display()" /> Sans caractères spéciaux <input type="checkbox" onChange="display()" id="in" /> Intelligent<br />
    Affichage : <input type="text" style="width:200px;" onChange="display()" onChange="display()" id="templateLine" value="{TOPICLINK} par [i] [color=#7b9c40] {AUTHORLINK}[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color] " /> Ligne <input type="text" onChange="display()" style="width:200px;" id="templateEnd" value="{RETLINE} [left][color=#7b9c40]Mise à jour le {NOWDAY}/{NOWMONTH}/{NOWYEAR}[/color][/left]" /> Fin <input type="text" onChange="display()" style="width:200px;" id="templateTitle" value="{RETLINE} [center][b][size=16][color=#7b9c40]{MAJ}[/color][/size][/b][/center]{RETLINE}" /> Titre<br />Paramètres : <input onChange="display()" onClick="if($(this).attr('checked')) $('#www').attr('disabled','disabled'); else  $('#www').attr('disabled','');" type="checkbox" id="html" /> Html <input type="text" onChange="display()" id="www" value="" /> Raccourci site <input onChange="display()" onClick="if($(this).attr('checked')) $('#spexcl').attr('disabled',''); else  $('#spexcl').attr('disabled','disabled');" type="checkbox" id="spec" /> Sujets normaux avec <input type="text" onChange="display()" id="spexcl" value="[ Sondage ]" disabled="disabled" /><br />
    <textarea style="width:99%; height: 400px" id="result"></textarea></form>
    <div id="note">Index vide</div>
</body>
</html><br />



Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Sam 2 Nov 2019 - 18:37

bon, troisième partie. Bizarrement à l'édition du deuxième message, j'ai toute une partie qui a été supprimée automatiquement.
Décidément pleure
la partie modifiée

Code:


function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'<div class=\"index\">[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]<\/div>'));
            line= line.replace(/{TOPICID}/g,t[0]);


si vous voyez ce qui cloche pour  que la fermeture de la div ne soit pas apposée lorsqu'il s'agit d'un invité.


Dernière édition par Milouze14 le Sam 2 Nov 2019 - 18:46, édité 1 fois
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Sam 2 Nov 2019 - 18:44

Hello Stéphane,

je vois d’où vient le soucis concernant le bug de l'affichage.
En faite, le formulaire d'entraide va déposer le contenu du message dans une div et le nombre de caractères autorisés étant atteint la balise de fermeture a purement sautée.

Code:
<div class="M14EntraideContenu">

J'ai donc reprit les deux derniers messages en sauvegarde et publiés ensuite.

@no_way

Pour ta demande , je ne vois que notre ami Arnaud pour résoudre ton soucis.
Car j'en serais bien incapable de mon côté.


Tu peux nous dire ou on peut trouver cette partie sur ton fofo stp.



fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Sam 2 Nov 2019 - 18:56

Bonjour Philippe  coucou ,
ouf, je ne deviens pas sénile  clin oeil

Alors, l'indexation par auteur
https://altitudetropicale.forums-actifs.com/h45-indexation-par-auteur

l'indexation par ordre alphabétique
https://altitudetropicale.forums-actifs.com/h58-indexation-par-ordre-alphabetique

Merci pour cette aide Mercimill

ps :il n'y a rien qui presse

edit: je viens de refaire beuguer le premier message en éditant pleure sorry, promis je ne touche plus à rien parlà



Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Sam 2 Nov 2019 - 19:26

Re Stéphane,
je viens tout bonnement de supprimer la partie concernée, cela évitera d'avoir de nouveau le
même problème.
ouf, je ne deviens pas sénile clin oeil

ptderire quoi que.... mdr .

Ok merci pour les liens, Arnaud regardera dès qu'il le pourra par contre .




fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Sam 2 Nov 2019 - 23:04

J'ai un grain, je le sais mais, j'ai encore toute ma tête mdr

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Dim 3 Nov 2019 - 6:37

Hello Stéphane,

juste pour avoirr l'information, ou se trouve cette div théoriquement:
Code:
<div class=\"index\"></div>

En tant qu'invité et sur les deux pages on voit bien la fermeture de la div.



avatar
no_way
https://www.qwant.com

Messageno_way Dim 3 Nov 2019 - 9:24

Bonjour à vous deux ^^

Serait-il possible d'avoir un lien où je peux constater le souci rencontré ?

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Dim 3 Nov 2019 - 9:35

avatar
no_way
https://www.qwant.com

Messageno_way Dim 3 Nov 2019 - 10:43

oups je n'avais pas fait attention ^^

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Dim 3 Nov 2019 - 10:47

Rhoo, ce n'est pas important mon ami clin oeil .
Merci de prendre de ton temps hinhin .

fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Dim 3 Nov 2019 - 14:34

Milouze14 a écrit:
Hello Stéphane,

juste pour avoirr l'information, ou se trouve cette div théoriquement:
En tant qu'invité et sur les deux pages on voit bien la fermeture de la div.

Bonjour Philippe, bonjour Arnaud,

pour l'indexation par auteur, cette div se trouve dans cette partie
Code:
function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'<div class=\"index\">[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]<\/div>'));
            line= line.replace(/{TOPICID}/g,t[0]);

pour l'indexation par ordre alphabétique, dans cette partie
Code:
function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'<div class=\"index\">[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]<\/div>'));
            line= line.replace(/{TOPICID}/g,t[0])


En passant par l'indexage par auteur du forum 100, vous obtenez ceci :

Code:
[center][b][size=16][color=#7b9c40]B[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t3043-]boutures de drosera[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u530][color=#7b9c40]arios[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]M[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t3508-]Mes carnivores en photo![/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u785][color=#7b9c40]Carnibreizh[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]L[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t68-]Lomatia ferruginea[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u13][color=#7b9c40]ced33[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]E[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t3596-]Erables du japon[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u793][color=#7b9c40]dom32[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]H[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t3825-]Heliamphora[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u793][color=#7b9c40]dom32[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]C[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t3809-]Constitution d'une tourbière[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u1][color=#7b9c40]fascicularia[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]I[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t4428-]Indexation de la section par auteur : Autres plantes acidophiles[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u1][color=#7b9c40]fascicularia[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t4427-]Indexation de la section par ordre alphabétique : Autres plantes acidophiles[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u1][color=#7b9c40]fascicularia[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]S[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t2262-]Schizophragma hydrangeoides 'Moonlight'[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u1][color=#7b9c40]fascicularia[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]I[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t2388-]Isoplexis sceptrum[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u6][color=#7b9c40]foye[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]C[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t907-]Création d'une tourbière[/url] par [i] [color=#7b9c40] Invité[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]M[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t892-]Mes plantes carnivores[/url] par [i] [color=#7b9c40] Invité[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [center][b][size=16][color=#7b9c40]D[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t1747-]Drosophyllum lusitanicum : une carnivore d'andalousie[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u93][color=#7b9c40]jeff[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t192-]Dichroa febrifuga[/url] par [i] [color=#7b9c40] [url=http://altitudetropicale.forums-actifs.com/u18][color=#7b9c40]Oli[/color][/url]</div>[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

 [left][color=#7b9c40]Mise à jour le 3/11/2019[/color][/left]


Dernière édition par fascicularia le Dim 3 Nov 2019 - 14:37, édité 1 fois
fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Dim 3 Nov 2019 - 14:36

l'ouverture  et la fermeture de la div index sont bien appliqués sur l'ensemble de la trame sauf lorsqu'il s'agit d'un invité (la fermeture est absente)

Code:
[center][b][size=16][color=#7b9c40]M[/color][/size][/b][/center]
<div class="index">[url=http://altitudetropicale.forums-actifs.com/t892-]Mes plantes carnivores[/url] par [i] [color=#7b9c40] Invité[/i][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][color=#7b9c40][/color]

J'ai indexé les forums concernés hier et,j'ai apposé manuellement les fermetures dés qu'un invité se retrouvait dans l'indexage.

ps : il n'y a rien qui presse; le prochain indexage est pour dans 2 mois donc relax.

Merci en tout cas pour votre aide
Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Dim 3 Nov 2019 - 19:53

Re Stéphane,
en attendant la réponse d'Arnaud, cela me fait penser à un droit de regard pour les invités.
Il faudrait voir de ton côté si tout est ok pour les permissions....

avatar
no_way
https://www.qwant.com

Messageno_way Dim 3 Nov 2019 - 23:52

Ola pour le tri par auteur:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html id="min-width" xmlns="https://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
    <head>
        <title>Page de listing</title>
        <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
        <style type="text/css">
            body,textarea,input { color: #4499bb;  font-size: 12px; font-family: "trebuchet ms", serif; }
            body { text-align: center; background: #ddeeff; }
            textarea,input { border: 1px dotted #7CBA2C; border-radius: 5px; background: #f8fdff; }
            input[disabled] { color: #808080; border-color: #aaa; background-color: #eaeaef; }
            #note { color: #8CCA3C; font-size: 15px; text-align: center; padding: 5px; background: #9de; margin: 10px auto; width: 80%; border: 1px dotted #8cd; font-weight: bold; border-radius: 15px; }

        </style>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
        <script type="text/javascript">
           
                    function my_getcookie(name){cname=name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1){cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1){cend=document.cookie.length}return unescape(document.cookie.substring(cstart,cend))}return null}function my_setcookie(name,value,sticky,path){expires="";domain="";if(sticky){expires="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(!path){path="/"}document.cookie=name+"="+value+"; path="+path+expires+domain+';'}
                   
            var case_insensitive= 2; var no_tag= 3; var no_special_chars= 5; var intelligent= 7;
            var current=''; var titles= new Array(); var idtitles= new Array();
           
            function treat(str) {           
                if(!(sort_titles_flag%no_tag)) {
                    str= str.replace(/(\(.*?\)|\[.*?\])/g,'');
                }
                if(!(sort_titles_flag%case_insensitive)) {
                    str= str.toLowerCase();
                }
                if(!(sort_titles_flag%no_special_chars)) {
                    str= str.replace(/\W/g,'');
                }
                return str.replace(/^\s+/g,'').replace(/\s+$/g,'').replace(/\s+/g,' ');
            }
           
            function sort_titles(a,b) {
                if(a[3].toLowerCase() > b[3].toLowerCase()) return 1;
                else if(a[3].toLowerCase() < b[3].toLowerCase()) return -1;
   
                a= treat(a[1]);
                b= treat(b[1]);
                if(!(sort_titles_flag%intelligent)) {
                    if((anums= a.match(/\d+/g)) && (bnums= b.match(/\d+/g))) {
                                        numsmax= 0;
                                        for(key in anums) if(anums[key].length>numsmax) numsmax= anums[key].length;
                                        for(key in bnums) if(bnums[key].length>numsmax) numsmax= bnums[key].length;
                                        toadd=''; for(var i=1;i<numsmax;i++) toadd+='0';
                                        a= a.replace(/(\d+)/g,toadd+'$1');
                                        b= b.replace(/(\d+)/g,toadd+'$1');
                                        var regex= new RegExp('\\d+(\\d{'+numsmax+'})','g')
                                        a= a.replace(regex,'$1');
                                        b= b.replace(regex,'$1');
                                    }
                }
                if(a>b) return 1;
                else if(a.toLowerCase()==b.toLowerCase()) return 0;
                else return -1;
            }
           
            function getForum() {
                titles= new Array();
                current='';
                idtitles= new Array();
                $('#note').text('Index vide');
                $('#addb').attr('disabled','disabled');
                addForum();
            }
           
            function addTitle(){
                var idtitle= parseInt($(this).attr('href').replace(/^.*\/t([1-9][0-9]*)-.*$/,'$1'));
                for(val in idtitles)
                    if(idtitles[val]==idtitle) return;
                idtitles.push(idtitle);
                var spec= '';
                if($(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong,strong.pagination')).length==1) spec= $(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong')).text();
                else spec= $(this).closest('dd.dterm').find('.topic-title-container')[0].previousSibling.data.replace(/^\s+/,'').replace(/\s+$/,'');
                /* (subject id,subject title,author id,author name) */
                titles.push(new Array(idtitle,$(this).text(),($(this).parent().parent().parent().find('span.span-tab strong a').length==1?$(this).parent().parent().parent().find('span.span-tab strong a').attr('href').replace(/^.*\/u([1-9][0-9]*)\?change_version=prosilver&change_theme=prosilver/,'$1'):0),$(this).parent().parent().parent().find('span.span-tab strong:first').text(), spec));
            };
           
            function addForum() {
                num_forum= parseInt($('#f').attr('value'));
                if(!(num_forum>0)) return;
                $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page 1/? )');
                $('#f').attr('value',num_forum);
                if(current!='') current+=', ';
                $.get('/f'+num_forum+'-?change_theme=prosilver&change_version=prosilver',function(data){
                    $(data).find('#main-content a.topictitle').each(addTitle);
                    if(!parseInt($(data).find('.pagination:last a strong:last').text())) {
                        current+= 'f'+num_forum;
                        $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                        $('#addb').attr('disabled','');
                        display();
                        return;
                    }
                    totresult= parseInt($(data).find('.pagination:last a strong:last').text());
                    result=totresult-1;
                    $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');
                    for(var i=1;i<parseInt($(data).find('.pagination:last a strong:last').text());i++)
                    {
                        $.get('/f'+num_forum+'p'+(parseInt($(data).find('.pagination:last span a:first').attr('href').replace(/^\/f[1-9][0-9]*p([1-9][0-9]*)-.*$/,'$1'))*i)+'-?change_theme=prosilver&change_version=prosilver',function(data2){
                            $(data2).find('#main-content a.topictitle').each(addTitle);
                            if(--result==0) {
                                current+= 'f'+num_forum;
                                $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                                $('#addb').attr('disabled','');
                                display();
                            }
                            else {
                                $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');                       
                            }
                        });
                    }
                });
            }
           
            function display() {
                        if(idtitles.length==0) return;
                            sort_titles_flag= 1;
                            if($('#nt').attr('checked')) sort_titles_flag*=no_tag;
                            if($('#ci').attr('checked')) sort_titles_flag*=case_insensitive;
                            if($('#nsp').attr('checked')) sort_titles_flag*=no_special_chars;
                            if($('#in').attr('checked')) sort_titles_flag*=intelligent;
                            if($('#rev').attr('checked')) sort_titles_flag*=11;
                            if($('#html').attr('checked')) sort_titles_flag*=13;
                            if($('#spec').attr('checked')) sort_titles_flag*=17;
                            titles.sort(sort_titles);
                            if($('#rev').attr('checked')) titles.reverse();
                            stocking();
                            saveAll();
            }
           
            function getLine(t) {
                var line= $('#templateLine').attr('value');
                line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
                if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
                else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]'));
                line= line.replace(/{TOPICID}/g,t[0]);
                line= line.replace(/{TOPICTITLE}/g,t[1]);
                line= line.replace(/{AUTHORID}/g,t[2]);
                line= line.replace(/{AUTHORNAME}/g,t[3]);
                var sitelink= 'http://'+($('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,'')==''?window.location.hostname:$('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,''));
                line= line.replace(/{SITELINK}/g,sitelink);
                line= line.replace(/{SPECIAL}/g,t[4]);
                line= line.replace(/{RETLINE}/g,'\n');
                return '<div class="index">'+line+'</div>';
            }
           
            function getFin() {
                var fin= $('#templateEnd').attr('value');
                var now =  new Date();
                fin= fin.replace(/{NOWYEAR}/g,now.getFullYear());
                fin= fin.replace(/{NOWMONTH}/g,now.getMonth()+1);
                fin= fin.replace(/{NOWDAY}/g,now.getDate());
                fin= fin.replace(/{NOWHOUR}/g,now.getHours());
                fin= fin.replace(/{NOWMIN}/g,now.getMinutes());
                fin= fin.replace(/{RETLINE}/g,'\n');
                return fin;
            }
           
            function getTitle(str) {
                var title= $('#templateTitle').attr('value');
                title= title.replace(/{MAJ}/g,str.toUpperCase());
                title= title.replace(/{MIN}/g,str.toLowerCase());
                title= title.replace(/{NORMAL}/g,str);
                title= title.replace(/{RETLINE}/g,'\n');
                return title;
            }
           
            function stocking() {
                $('#result').attr('value','');
              var last=0;
              for(key in titles) {
                  if(titles[key][4]=='' || !$('#spec').attr('checked') || titles[key][4]==$('#spexcl').attr('value'))
                  {
                      if(last!==treat(titles[key][1]).substr(0,1))
                      {
                            last= treat(titles[key][1]).substr(0,1);
                            $('#result').attr('value',$('#result').attr('value')+getTitle(last));
                      }
                      $('#result').attr('value',$('#result').attr('value')+getLine(titles[key])+'\n');
                  }
                }
                $('#result').attr('value',$('#result').attr('value')+getFin());
            }
                   
                    function saveAll() {
                        my_setcookie('indexingtools',escape('{"line":"'+escape($('#templateLine').attr('value'))+'","end":"'+escape($('#templateEnd').attr('value'))+'","title":"'+escape($('#templateTitle').attr('value'))+'","www":"'+escape($('#www').attr('value'))+'","flags":'+sort_titles_flag+',"spexcl":"'+escape($('#spexcl').attr('value'))+'"}'),1,0);
                    }
                   
                    function getAll() {
                        if(!(cook=my_getcookie('indexingtools'))) return;
                        cook= $.parseJSON(cook);
                        $('#templateLine').attr('value',unescape(cook.line));
                        $('#templateEnd').attr('value',unescape(cook.end));
                        $('#templateTitle').attr('value',unescape(cook.title));
                        $('#www').attr('value',unescape(cook.www));
                        $('#spexcl').attr('value',unescape(cook.spexcl));
                        sort_titles_flag= parseInt(unescape(cook.flags));                   
                        if(!(sort_titles_flag%no_tag)) $('#nt').attr('checked', true);
                        if(!(sort_titles_flag%case_insensitive)) $('#ci').attr('checked', true);
                        if(!(sort_titles_flag%no_special_chars)) $('#nsp').attr('checked', true);
                        if(!(sort_titles_flag%intelligent)) $('#in').attr('checked', true);
                        if(!(sort_titles_flag%11)) $('#rev').attr('checked', true);
                        if(!(sort_titles_flag%13)) { $('#html').attr('checked', true); $('#www').attr('disabled','disabled'); } else $('#www').attr('disabled','');
                        if(!(sort_titles_flag%17)) { $('#spexcl').attr('disabled',''); $('#spec').attr('checked', true); } else  $('#spexcl').attr('disabled','disabled');
                    }
                   
                    $(function(){ getAll(); });
                   
                    function resetAll() {
                        document.yeah.reset();
                        titles= new Array();
                        current='';
                        idtitles= new Array();
                        $('#note').text('Index vide');
                        $('#sitelink').css('display','inline');
                        $('#addb').attr('disabled','disabled');                   
                    }
           
            </script>
    </head>
    <body>
        <form name="yeah">Forum : <input type="text" id="f" /> <input type="button" value="Charger" onClick="getForum()" /> <input type="button" value="Ajouter" onClick="addForum()" id="addb" disabled="disabled" /> <input type="button" value="Reset" onClick="resetAll()" />    Tri :
        <label><input type="checkbox" id="rev" onChange="display()" /> Inversé </label>
        <label><input type="checkbox" id="nt" onChange="display()" /> Sans tag </label>
        <label><input type="checkbox" onChange="display()" id="ci" /> Insensible à la casse </label>
        <label><input type="checkbox" id="nsp" onChange="display()" /> Sans caractères spéciaux <label>
        <label><input type="checkbox" onChange="display()" id="in" /> Intelligent</label>
        <br />
        Affichage : <input type="text" style="width:200px;" onChange="display()" onChange="display()" id="templateLine" value="{TOPICLINK} par [i] [color=#7b9c40] {AUTHORLINK}[/color][/i] " /> Ligne <input type="text" onChange="display()" style="width:200px;" id="templateEnd" value="{RETLINE} [left][color=#7b9c40]Mise à jour le {NOWDAY}/{NOWMONTH}/{NOWYEAR}[/color][/left]" /> Fin <input type="text" onChange="display()" style="width:200px;" id="templateTitle" value="{RETLINE} [center][b][size=16][color=#7b9c40]{MAJ}[/color][/size][/b][/center]{RETLINE}" /> Titre<br />Paramètres : <input onChange="display()" onClick="if($(this).attr('checked')) $('#www').attr('disabled','disabled'); else  $('#www').attr('disabled','');" type="checkbox" id="html" /> Html <input type="text" onChange="display()" id="www" value="" /> Raccourci site <input onChange="display()" onClick="if($(this).attr('checked')) $('#spexcl').attr('disabled',''); else  $('#spexcl').attr('disabled','disabled');" type="checkbox" id="spec" /> Sujets normaux avec <input type="text" onChange="display()" id="spexcl" value="[ Sondage ]" disabled="disabled" /><br />
        <textarea style="width:99%; height: 400px" id="result"></textarea></form>
        <div id="note">Index vide</div>
    </body>
    </html>
avatar
no_way
https://www.qwant.com

Messageno_way Dim 3 Nov 2019 - 23:57

Pour le tri par ordre alphabétique :
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="min-width" xmlns="https://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr" dir="ltr">
<head>
    <title>Page de listing</title>
    <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
    <style type="text/css">
        body,textarea,input { color: #4499bb;  font-size: 12px; font-family: "trebuchet ms", serif; }
        body { text-align: center; background: #ddeeff; }
        textarea,input { border: 1px dotted #7CBA2C; border-radius: 5px; background: #f8fdff; }
        input[disabled] { color: #808080; border-color: #aaa; background-color: #eaeaef; }
        #note { color: #8CCA3C; font-size: 15px; text-align: center; padding: 5px; background: #9de; margin: 10px auto; width: 80%; border: 1px dotted #8cd; font-weight: bold; border-radius: 15px; }

    </style>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
       
                function my_getcookie(name){cname=name+'=';cpos=document.cookie.indexOf(cname);if(cpos!=-1){cstart=cpos+cname.length;cend=document.cookie.indexOf(";",cstart);if(cend==-1){cend=document.cookie.length}return unescape(document.cookie.substring(cstart,cend))}return null}function my_setcookie(name,value,sticky,path){expires="";domain="";if(sticky){expires="; expires=Wed, 1 Jan 2020 00:00:00 GMT"}if(!path){path="/"}document.cookie=name+"="+value+"; path="+path+expires+domain+';'}
               
        var case_insensitive= 2; var no_tag= 3; var no_special_chars= 5; var intelligent= 7;
        var current=''; var titles= new Array(); var idtitles= new Array();
       
        function treat(str) {           
            if(!(sort_titles_flag%no_tag)) {
                str= str.replace(/(\(.*?\)|\[.*?\])/g,'');
            }
            if(!(sort_titles_flag%case_insensitive)) {
                str= str.toLowerCase();
            }
            if(!(sort_titles_flag%no_special_chars)) {
                str= str.replace(/\W/g,'');
            }
            return str.replace(/^\s+/g,'').replace(/\s+$/g,'').replace(/\s+/g,' ');
        }
       
        function sort_titles(a,b) {
            a= treat(a[1]);
            b= treat(b[1]);
            if(!(sort_titles_flag%intelligent)) {
                if((anums= a.match(/\d+/g)) && (bnums= b.match(/\d+/g))) {
                                    numsmax= 0;
                                    for(key in anums) if(anums[key].length>numsmax) numsmax= anums[key].length;
                                    for(key in bnums) if(bnums[key].length>numsmax) numsmax= bnums[key].length;
                                    toadd=''; for(var i=1;i<numsmax;i++) toadd+='0';
                                    a= a.replace(/(\d+)/g,toadd+'$1');
                                    b= b.replace(/(\d+)/g,toadd+'$1');
                                    var regex= new RegExp('\\d+(\\d{'+numsmax+'})','g')
                                    a= a.replace(regex,'$1');
                                    b= b.replace(regex,'$1');
                                }
            }
            if(a>b) return 1;
            else if(a.toLowerCase()==b.toLowerCase()) return 0;
            else return -1;
        }
       
        function getForum() {
            titles= new Array();
            current='';
            idtitles= new Array();
            $('#note').text('Index vide');
            $('#addb').attr('disabled','disabled');
            addForum();
        }
       
        function addTitle(){
            var idtitle= parseInt($(this).attr('href').replace(/^.*\/t([1-9][0-9]*)-.*$/,'$1'));
            for(val in idtitles)
                if(idtitles[val]==idtitle) return;
            idtitles.push(idtitle);
            var spec= '';
            if($(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong,strong.pagination')).length==1) spec= $(this).closest('dd.dterm').find('strong').not($(this).closest('dd.dterm').find('.span-tab strong')).text();
            else spec= $(this).closest('dd.dterm').find('.topic-title-container')[0].previousSibling.data.replace(/^\s+/,'').replace(/\s+$/,'');
            /* (subject id,subject title,author id,author name) */
            titles.push(new Array(idtitle,$(this).text(),($(this).parent().parent().parent().find('span.span-tab strong a').length==1?$(this).parent().parent().parent().find('span.span-tab strong a').attr('href').replace(/^.*\/u([1-9][0-9]*)\?change_version=prosilver&change_theme=prosilver/,'$1'):0),$(this).parent().parent().parent().find('span.span-tab strong:first').text(), spec));
        };
       
        function addForum() {
            num_forum= parseInt($('#f').attr('value'));
            if(!(num_forum>0)) return;
            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page 1/? )');
            $('#f').attr('value',num_forum);
            if(current!='') current+=', ';
            $.get('/f'+num_forum+'-?change_theme=prosilver&change_version=prosilver',function(data){
                $(data).find('#main-content a.topictitle').each(addTitle);
                if(!parseInt($(data).find('.pagination:last a strong:last').text())) {
                    current+= 'f'+num_forum;
                    $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                    $('#addb').attr('disabled','');
                    display();
                    return;
                }
                totresult= parseInt($(data).find('.pagination:last a strong:last').text());
                result=totresult-1;
                $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');
                for(var i=1;i<parseInt($(data).find('.pagination:last a strong:last').text());i++)
                {
                    $.get('/f'+num_forum+'p'+(parseInt($(data).find('.pagination:last span a:first').attr('href').replace(/^\/f[1-9][0-9]*p([1-9][0-9]*)-.*$/,'$1'))*i)+'-?change_theme=prosilver&change_version=prosilver',function(data2){
                        $(data2).find('#main-content a.topictitle').each(addTitle);
                        if(--result==0) {
                            current+= 'f'+num_forum;
                            $('#note').text('Affichage de l\'index '+(current.match(',')?'des forums':'du forum')+' '+current+' ( '+idtitles.length+' sujet'+(idtitles.length>1?'s':'')+' )');
                            $('#addb').attr('disabled','');
                            display();
                        }
                        else {
                            $('#note').text('Indexation du forum f'+num_forum+' en cours ( Page '+(totresult-result+1)+'/'+totresult+')');                       
                        }
                    });
                }
            });
        }
       
        function display() {
                    if(idtitles.length==0) return;
                        sort_titles_flag= 1;
                        if($('#nt').attr('checked')) sort_titles_flag*=no_tag;
                        if($('#ci').attr('checked')) sort_titles_flag*=case_insensitive;
                        if($('#nsp').attr('checked')) sort_titles_flag*=no_special_chars;
                        if($('#in').attr('checked')) sort_titles_flag*=intelligent;
                        if($('#rev').attr('checked')) sort_titles_flag*=11;
                        if($('#html').attr('checked')) sort_titles_flag*=13;
                        if($('#spec').attr('checked')) sort_titles_flag*=17;
                        titles.sort(sort_titles);
                        if($('#rev').attr('checked')) titles.reverse();
                        stocking();
                        saveAll();
        }
       
        function getLine(t) {
            var line= $('#templateLine').attr('value');
            line= line.replace(/{TOPICLINK}/g,($('#html').attr('checked')?'<a href=/t{TOPICID}->{TOPICTITLE}</a>':'[url={SITELINK}/t{TOPICID}-]{TOPICTITLE}[/url]'));
            if(t[2]==0)  line= line.replace(/{AUTHORLINK}/g,'{AUTHORNAME}');
            else line= line.replace(/{AUTHORLINK}/g,($('#html').attr('checked')?'<a href=/u{AUTHORID}>{AUTHORNAME}</a>':'[url={SITELINK}/u{AUTHORID}][color=#7b9c40]{AUTHORNAME}[/color][/url]'));
            line= line.replace(/{TOPICID}/g,t[0]);
            line= line.replace(/{TOPICTITLE}/g,t[1]);
            line= line.replace(/{AUTHORID}/g,t[2]);
            line= line.replace(/{AUTHORNAME}/g,t[3]);
            var sitelink= 'http://'+($('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,'')==''?window.location.hostname:$('#www').attr('value').replace('http://','').replace(/^\s+/,'').replace(/\s+$/,''));
            line= line.replace(/{SITELINK}/g,sitelink);
            line= line.replace(/{SPECIAL}/g,t[4]);
            line= line.replace(/{RETLINE}/g,'\n');
            return '<div class="index">'+line+'</div>';
        }
       
        function getFin() {
            var fin= $('#templateEnd').attr('value');
            var now =  new Date();
            fin= fin.replace(/{NOWYEAR}/g,now.getFullYear());
            fin= fin.replace(/{NOWMONTH}/g,now.getMonth()+1);
            fin= fin.replace(/{NOWDAY}/g,now.getDate());
            fin= fin.replace(/{NOWHOUR}/g,now.getHours());
            fin= fin.replace(/{NOWMIN}/g,now.getMinutes());
            fin= fin.replace(/{RETLINE}/g,'\n');
            return fin;
        }
       
        function getTitle(str) {
            var title= $('#templateTitle').attr('value');
            title= title.replace(/{MAJ}/g,str.toUpperCase());
            title= title.replace(/{MIN}/g,str.toLowerCase());
            title= title.replace(/{NORMAL}/g,str);
            title= title.replace(/{RETLINE}/g,'\n');
            return title;
        }
       
        function stocking() {
            $('#result').attr('value','');
          var last=0;
          for(key in titles) {
              if(titles[key][4]=='' || !$('#spec').attr('checked') || titles[key][4]==$('#spexcl').attr('value'))
              {
                  if(last!==treat(titles[key][1]).substr(0,1))
                  {
                        last= treat(titles[key][1]).substr(0,1);
                        $('#result').attr('value',$('#result').attr('value')+getTitle(last));
                  }
                  $('#result').attr('value',$('#result').attr('value')+getLine(titles[key])+'\n');
              }
            }
            $('#result').attr('value',$('#result').attr('value')+getFin());
        }
               
                function saveAll() {
                    my_setcookie('indexingtools',escape('{"line":"'+escape($('#templateLine').attr('value'))+'","end":"'+escape($('#templateEnd').attr('value'))+'","title":"'+escape($('#templateTitle').attr('value'))+'","www":"'+escape($('#www').attr('value'))+'","flags":'+sort_titles_flag+',"spexcl":"'+escape($('#spexcl').attr('value'))+'"}'),1,0);
                }
               
                function getAll() {
                    if(!(cook=my_getcookie('indexingtools'))) return;
                    cook= $.parseJSON(cook);
                    $('#templateLine').attr('value',unescape(cook.line));
                    $('#templateEnd').attr('value',unescape(cook.end));
                    $('#templateTitle').attr('value',unescape(cook.title));
                    $('#www').attr('value',unescape(cook.www));
                    $('#spexcl').attr('value',unescape(cook.spexcl));
                    sort_titles_flag= parseInt(unescape(cook.flags));                   
                    if(!(sort_titles_flag%no_tag)) $('#nt').attr('checked', true);
                    if(!(sort_titles_flag%case_insensitive)) $('#ci').attr('checked', true);
                    if(!(sort_titles_flag%no_special_chars)) $('#nsp').attr('checked', true);
                    if(!(sort_titles_flag%intelligent)) $('#in').attr('checked', true);
                    if(!(sort_titles_flag%11)) $('#rev').attr('checked', true);
                    if(!(sort_titles_flag%13)) { $('#html').attr('checked', true); $('#www').attr('disabled','disabled'); } else $('#www').attr('disabled','');
                    if(!(sort_titles_flag%17)) { $('#spexcl').attr('disabled',''); $('#spec').attr('checked', true); } else  $('#spexcl').attr('disabled','disabled');
                }
               
                $(function(){ getAll(); });
               
                function resetAll() {
                    document.yeah.reset();
                    titles= new Array();
                    current='';
                    idtitles= new Array();
                    $('#note').text('Index vide');
                    $('#sitelink').css('display','inline');
                    $('#addb').attr('disabled','disabled');                   
                }
       
        </script>
</head>
<body>
    <form name="yeah">Forum : <input type="text" id="f" /> <input type="button" value="Charger" onClick="getForum()" /> <input type="button" value="Ajouter" onClick="addForum()" id="addb" disabled="disabled" /> <input type="button" value="Reset" onClick="resetAll()" />    Tri : <input type="checkbox" id="rev" onChange="display()" /> Inversé <input type="checkbox" id="nt" onChange="display()" /> Sans tag <input type="checkbox" onChange="display()" id="ci" /> Insensible à la case <input type="checkbox" id="nsp" onChange="display()" /> Sans caractères spéciaux <input type="checkbox" onChange="display()" id="in" /> Intelligent<br />
    Affichage : <input type="text" style="width:200px;" onChange="display()" onChange="display()" id="templateLine" value="{TOPICLINK} par [i] [color=#7b9c40] {AUTHORLINK}[/i][/color] " /> Ligne <input type="text" onChange="display()" style="width:200px;" id="templateEnd" value="{RETLINE} [left][color=#7b9c40]Mise à jour le {NOWDAY}/{NOWMONTH}/{NOWYEAR}[/color][/left]" /> Fin <input type="text" onChange="display()" style="width:200px;" id="templateTitle" value="{RETLINE} [center][b][size=16][color=#7b9c40]{MAJ}[/color][/size][/b][/center]{RETLINE}" /> Titre<br />Paramètres : <input onChange="display()" onClick="if($(this).attr('checked')) $('#www').attr('disabled','disabled'); else  $('#www').attr('disabled','');" type="checkbox" id="html" /> Html <input type="text" onChange="display()" id="www" value="" /> Raccourci site <input onChange="display()" onClick="if($(this).attr('checked')) $('#spexcl').attr('disabled',''); else  $('#spexcl').attr('disabled','disabled');" type="checkbox" id="spec" /> Sujets normaux avec <input type="text" onChange="display()" id="spexcl" value="[ Sondage ]" disabled="disabled" /><br />
    <textarea style="width:99%; height: 400px" id="result"></textarea></form>
    <div id="note">Index vide</div>
</body>
</html>

A essayer donc.

fascicularia
fascicularia
https://altitudetropicale.forums-actifs.com/

Messagefascicularia Lun 4 Nov 2019 - 14:34

Bonjour Arnaud,
c'est tout bonnement parfait super super

Un grand merci pour cette aide Mercimill

Milouze14
Milouze14
Fondateur

https://www.milouze14.net/

MessageMilouze14 Lun 4 Nov 2019 - 14:54


Hello


Sujet résolu et déplacé dans le forum adéquate

A bientôt pour une prochaine demande clin oeil



Voir le sujet précédent Voir le sujet suivant Revenir en haut

Créer un compte ou se connecter pour répondre

Vous devez être membre pour répondre.

S'enregistrer

Rejoignez notre communauté ! C'est facile !


S'enregistrer

Connexion

Vous êtes déjà membre ? Aucun soucis, cliquez ici pour vous connecter.


Connexion

 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum