Kullanıcı:Srhat/common.js: Revizyonlar arasındaki fark

Vikikaynak, özgür kütüphane
İçerik silindi İçerik eklendi
Srhat (Mesaj | katkılar)
kDeğişiklik özeti yok
Srhat (Mesaj | katkılar)
kDeğişiklik özeti yok
19. satır: 19. satır:
// but there is a set of simplified tools documented at
// but there is a set of simplified tools documented at
// http://meta.wikimedia.org/wiki/User:Pathoschild/Script:Regex_menu_framework .
// http://meta.wikimedia.org/wiki/User:Pathoschild/Script:Regex_menu_framework .
function sikayetformu() {
/*Şikayet formu başlangıç genel kutu*/
var formsikayet = document.createElement('div');
formsikayet.setAttribute('id', 'f-sikayet'); //şikayet formunun id'si f-sikayet
editbox.parentNode.insertBefore(formsikayet,editbox.parentNode.firstChild);
//başlık
baslik = document.createElement('h3');
baslik.createTextNode('Şikayet formu');
formsikayet.appendChild(baslik);
//Şimdi açıklamanın bulunduğu bölümü yazalım
var aciklama = document.createElement('p')
aciklama.appendChild(document.createTextNode('Bu form size kolayca şikayetinizi eklemenize yardımcı olur. Aşağıdaki boşlukları doldurarak şikayetinizi ekleyebilirsiniz.');
formsikayet.appendChild(aciklama);
/*Şimdi girişi kutularının altındaki linkler*/
//giriş forumunu tanıt
var girisformu = document.createElement('form');
girisformu.setAttribute('id', 'girisformu');
formsikayet.appendChild(girisformu);
//linkler bölümü
var formlinkleri = document.createElement('ul');
girisformu.appendChild(formlinkleri);
//link formu kaydet
var yenimadde = document.createElement('li');
var yenilink = document.createElement('a');
yenilink.setAttribute('href', 'javascript:formTamam();');
yenilink.setAttribute('title', 'Formu kaydet');
yenilink.appendChild(document.createTextNode('Formu kaydet'));
yenimadde.appendChild(yenilink);
formlinkleri.appendChild(yenimadde);
}


function formuekle() {

/* Bir onraki işlem için artırma*/
if("patterncount" in window) {
patterncount++;
}
else {
patterncount = 0;
}

/* Liste */
var formkutusu = document.createElement('li');
formlinkleri.appendChild(formkutusu);

/* Formları ekle*/
//form-isim
var yenigiris = createElement('textarea');
yenigiris.setAttribute('class', 'form-isim');
yenigiris.setAttribute('tabindex',patterncount+100);
yenigiris.setAttribute('for','form-isim');
yenigiris.appendChild(document.createTextNode('Şikayet etmek istediğiniz kullanıcı:'+(patterncount+1)));

formkutusu.appendchild(yenigiris);
formkutusu.appendChild(yenietiket);

/*********Daha bitmedi*******************/
}

/*Verilen linkleri tanıt*/


// <pre>
// <pre>
/*
/*

17.16, 24 Temmuz 2008 tarihindeki hâli

/*************
*** Regex menu framework 1.2
*** by [[m:user:Pathoschild]] <http://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/Regex_menu_framework>
*************/
/* script'i yükle */
document.write('<script type="text/javascript" src="'
  + 'http://meta.wikimedia.org/w/index.php?title=User:Pathoschild/Scripts/Regex_menu_framework.js' 
  + '&action=raw&ctype=text/javascript"></script>');
 
/* menü linkleri */
// Bu fonksiyonla menüye linkleri şöyle ekle: "regexTool('link text','function_name()')" 
// The function name is the function defined in rfmscripts() below.
function rmflinks() {
        regexTool('Custom regex','custom()'); // a default tool which performs regex input in a dynamic form
        regexTool('Deneme','sikayetformu()');
}
/* scriptler */
// Below, define the functions linked to from rmflinks() above. These functions can use any JavaScript,
// but there is a set of simplified tools documented at
// http://meta.wikimedia.org/wiki/User:Pathoschild/Script:Regex_menu_framework .

// <pre>
/*
#########
### TemplateScript
###  by [[user:Pathoschild]] <http://meta.wikimedia.org/wiki/User:Pathoschild/Scripts/TemplateScript>
###    * adds a menu of user-defined, form-specific templates
#########
*/
document.write('<script type="text/javascript" src="'
  + 'http://tr.wikisource.org/w/index.php?title=Kullanıcı:Srhat/TemplateScript.js' 
  + '&action=raw&ctype=text/javascript"></script>');
 
/* define templates */
function define_templates() {
        /* syntax: new_template('type','name','text','optional 1','optional 2','optional 3');
             see documentation
        */
 
        /* ### edit templates below ### */
        new_template('edit','eser1','{{eser1\n | önceki      =\n | sonraki     =\n | başlık      =\n | bölüm       =\n | eser sahibi =\n | notlar      =\n}}');
        new_template('edit','kişi','{{Kişi\n |ismi        =\n |soyismi başharfi=\n |yaşadığı tarih  =\n |açıklamalar   =\n |resim  =\n |vikipedi_bağlantısı     =\n |vikisöz_bağlantısı     =\n |commons_bağlantısı      =\n}}');
        new_template('edit','başlık','{{başlık\n | başlık   =\n | bölüm    =\n | önceki   =\n | sonraki  =\n | kısa yol =\n | notlar   =\n}}');
        new_template('edit','hoşgeldin','{{subst:Hoşgeldin}}\n','VikiKaynak\'a hoş geldin!');
        new_template('edit','düzenle','{{Düzenle}}\n','Düzenle');
        new_template('edit','telif','{{telif}}\n','muhtemel telif ihlali!');
        new_template('edit','çevirmensiz','{{çevirmensiz}}\n','çevirmeni belli değil!');

        /* ### edit templates above ### */
        }
 
/* Load script */
addOnloadHook(function() {templatescript(define_templates())});
 
// </pre>


  mwCustomEditButtons[mwCustomEditButtons.length] = {
    "imageFile": "http://upload.wikimedia.org/wikipedia/commons/4/41/Button_ho%C5%9Fgeldin.png",
    "speedTip": "Hoşgeldin şablonu",
    "tagOpen": "{{",
    "tagClose": "}}",
    "sampleText": "subst:Hoşgeldin"};
if (mwCustomEditButtons) {

 mwCustomEditButtons[mwCustomEditButtons.length] = {
     "imageFile": "http://upload.wikimedia.org/wikipedia/commons/8/8f/Button_poeme.png",
     "speedTip": "Şiir",
     "tagOpen": '<poem>',
     "tagClose": '</poem>',
     "sampleText": "Şiiri ekle"};
};