Modificare Script de redenumirea satelor pe versiunea 8.2

Discuție în 'Arhiva' creată de CarlaDaimler, 21. Mar 2014.

Distribuie această pagină

  1. Buna seara.

    imi poate actualiza cineva acest script de redenumirea satelor?




    telul e ca satele sa fie redenumite astfel (marcat):


    [55:51:83] OricareNume 8,988 513|558 K55
    [55:87:18] OricareNume 9,761 578|581K55
    [55:87:44] OricareNume 6,655 574|584 K55
    [55:87:54] OricareNume 9,761 574|585 K55
    [55:87:77] OricareNume 9,761 577|587 K55

    multumesc
     
  2. ChineZeu

    ChineZeu member

    Înscris:
    24. Apr 2010
    Mesaje:
    523
    Incearca cu asta
    Cod:
    javascript: void($.getScript('https://dl.dropbox.com/u/100563986/rename/villages.js'))
    Pe privirea generala dai click pe script si in casuta aia pui numele dorit. In cazul tau [convert] OricareNume si apesi Renumire
     
  3. perfect!

    m-ai salvat!
     
  4. poate cineva sa actualizeze acest script de denumire a satelor pt. versiunea 8.2. multumesc.

    javascript:var array=['k0','k1','k2','k3','k4','k5','k6','k7','k8','k9','k10','k11','k12','k13','k14','k15','k16','k17','k18','k19','k20','k21','k22','k23','k24','k25','k26','k27','k28','k29','k30','k31','k32','k33','k34','k35','k36','k37','k38','k39','k40','k41','k42','k43','k44','k45','k46','k47','k48','k49','k50','k51','k52','k53','k54','k55','k56','k57','k58','k59','k60','k61','k62','k63','k64','k65','k66','k67','k68','k69','k70','k71','k72','k73','k74','k75','k76','k77','k78','k79','k80','k81','k82','k83','k84','k85','k86','k87','k88','k89','k90','k91','k92','k93','k94','k95','k96','k97','k98','k99'];function convert_coords(x,y){hr=Math.floor(y/100)+''+Math.floor(x/100);mn=(Math.floor(y/10)%2510)+''+(Math.floor(x/10)%2510);sc=(y%2510)+''+(x%2510);for(var i=0;i<100;i++){if(i==hr){a=array}}return a}var doc=document;if(window.frames.length>0)doc=window.main.document;var inputs=doc.getElementsByTagName('input');for(i=0;i<inputs.length;i++){id=inputs.id;index=id.indexOf('edit_input');if(index!=-1){id=id.substring(index+11);str=doc.getElementById('label_text_'+id).innerHTML;mid=str.lastIndexOf('|');x=str.substring(str.lastIndexOf('(')+1,mid);y=str.substring(mid+1,str.lastIndexOf(')'));inputs.value=convert_coords(x,y);inputs[i+1].click()}}end();
     
  5. ChineZeu

    ChineZeu member

    Înscris:
    24. Apr 2010
    Mesaje:
    523
    Cod:
    javascript: void($.getScript('https://dl.dropbox.com/u/100563986/rename/villages.js'))
    Pe privire generala dai clic pe script si in casuta aia scrii continent si apesi Renumire, iti va aparea K-ul. In cazul satelor cu continent 1-9 va aparea K01.
     
  6. in scriptul de mai sus daca inlocuiam k1-k2-...-k99 dintre ghilimele cu denumirea de sate pe care o vroiam eu pt. k-ul respectiv imi punea automat din privirea generala denumirea la sate diferit in functie de k chiar daca erau sate in grupa respectiva din k-uri diferite (in functie de k mi le denumea diferit pe toate).
     
  7. ChineZeu

    ChineZeu member

    Înscris:
    24. Apr 2010
    Mesaje:
    523
    PHP:
    javascript: (function (RenameVillagesByContinents) {
        var 
    k00 = ['k00''k01''k02''k03''k04''k05''k06''k07''k08''k09'];
        var 
    k10 = ['k10''k11''k12''k13''k14''k15''k16''k17''k18''k19'];
        var 
    k20 = ['k20''k21''k22''k23''k24''k25''k26''k27''k28''k29'];
        var 
    k30 = ['k30''k31''k32''k33''k34''k35''k36''k37''k38''k39'];
        var 
    k40 = ['k40''k41''k42''k43''k44''k45''k46''k47''k48''k49'];
        var 
    k50 = ['k50''k51''k52''k53''k54''k55''k56''k57''k58''k59'];
        var 
    k60 = ['k60''k61''k62''k63''k64''k65''k66''k67''k68''k69'];
        var 
    k70 = ['k70''k71''k72''k73''k74''k75''k76''k77''k78''k79'];
        var 
    k80 = ['k80''k81''k82''k83''k84''k85''k86''k87''k88''k89'];
        var 
    k90 = ['k90''k91''k92''k93''k94''k95''k96''k97''k98''k99'];
        $(
    ".rename-icon").each(function (ia) {
            var 
    = $(a).prev("a").find(".quickedit-label");
            
    = [].concat(k00k10k20k30k40k50k60k70k80k90);
            
    i[+n.html().trim().match(/\d+$/g)];
            if (
    && n.attr('data-text') != i) {
                $(
    a).click(), $(a).parent().next().find('input[type*="text"]').val(i);
                $(
    a).parent().next().find('input[type*="button"]').click()
            }
        })
    })(
    "chinez unikt")
    Incearca cu asta.
     
  8. multumesc frumos! merge. :)