|
|
| (40 גרסאות ביניים של 6 משתמשים אינן מוצגות) |
| שורה 1: |
שורה 1: |
| /* | | /* adds to the toolbox a list of templates to add in talkpages. */ |
| ==Automatic user messages == | | $(function() { |
| Installing this script as described on the talk page will give you links in the toolbox
| | var user = findUser(), |
| for all pages in the User talk: namespace, that say 'Please tag', 'Please name', and
| | userAnon = mw.util.isIPAddress( user ), |
| 'Please link'. Clicking any of the buttons will add one of the following templates to | | tlist = userAnon |
| the user's talk page, signed by you:
| | ? [ |
| *{{tl|attackimage}}*
| | {title: 'אזהרות', templates: ['אזהרה', 'לך', 'הבל', 'העתקה', 'נחסמת', 'תלונה', 'שגיאה']}, |
| *{{tl|attackpage}}*
| | {title: 'הודעות', templates: ['ניסויים', 'נמחק ניסויים', 'נמחק', 'בוטל', 'חזרה על עריכה', 'קישור מבוטל']}, |
| *{{tl|be civil final}}
| | {title: 'הסברים', templates: ['טעות', 'הסבר', 'לא כאן', 'נייטרליות', 'סגנון', 'שימוש בדף השיחה', 'כבר קיים', 'התנחלות', 'ויקיזציה', 'מילון']}, |
| *{{tl|be civil}}
| | {title: 'תודות', templates: ['תודה', 'הזמנה']} |
| *{{tl|blocked user}}
| | ] |
| *{{tl|copyvionote}}*
| | : [ |
| *{{tl|derivativenote}}*
| | {title: 'אזהרות', templates: ['אזהרה', 'הבל', 'העתקה', 'שם פוגעני', 'נחסמת', 'לך', 'שגיאה']}, |
| *{{tl|dont overwrite}}*
| | {title: 'הודעות', templates: ['פרסומת', 'ניסויים', 'נמחק ניסויים', 'נמחק', 'בוטל', 'חזרה על עריכה', 'קישור מבוטל']}, |
| *{{tl|dont recreate}}*
| | {title: 'תמונות', templates: ['אזהרת תמונות2', 'תמונה מוגנת', 'מחיקת תמונה', 'מקור תמונה', 'הנחיות תמונה']}, |
| *{{tl|dont remove delete}}
| | {title: 'הסברים', templates: ['אוטוביוגרפיה', 'טעות', 'הסבר', 'נייטרליות', 'לא כאן', 'סגנון', 'שימוש בדף השיחה', 'כבר קיים', 'התנחלות', 'ויקיזציה', 'זכות הצבעה', 'מילון']}, |
| *{{tl|dont remove nsd or nld}}
| | {title: 'תודות', templates: ['תודה לרשום', 'בדוק עריכות אוטומטית']} |
| *{{tl|dont remove speedy}}
| | ], |
| *{{tl|dont remove warnings}}
| | tooltips = { |
| *{{tl|end of copyvios}}
| | 'תמונה מוגנת': 'הסבר למשתמש שהעלה תמונה מוגנת', |
| *{{tl|imposter}}*
| | 'תלונה': 'הודעה למשתמש שהוגשה תלונה נגדו לספק האינטרנט שלו', |
| *{{tl|inappropriate username}}
| | 'תודה': 'תודה לאלמוני על תרומתו, והזמנה להרשם', |
| *{{tl|off topic}}
| | 'תודה לרשום': 'תודה אישית למשתמש רשום - יש להוסיף לתבנית את הערך בגינו את מודה לו', |
| *{{tl|please describe images}}
| | 'שם פוגעני': 'הודעה למשתמש רשום שהשם שבחר פוגעני, ובקשה להרשם בשם אחר', |
| *{{tl|please link images}}
| | 'שימוש בדף השיחה': 'הודעה למשתמש שכתב דברים שמתאימים לדף שיחה בערך עצמו', |
| *{{tl|please name images}}
| | 'שגיאה': 'אזהרת משתמש שעריכתו הכילה מידע שגוי, מידע שאין מקומו בערך או לא אנציקלופדי', |
| *{{tl|please tag images}}
| | 'קישור מבוטל': 'הודעה למשתמש אחרי שהסרת קישור שהוסיף', |
| *{{tl|project scope}}
| | 'פרסומת': 'הודעה למשתמש אחרי שהסרת פרסומת שהוסיף', |
| *{{tl|Provide better quality}}*
| | 'סגנון': 'אחרי שמחקת עריכה בגלל סגנון או תוכן לא מתאים לערך', |
| *{{tl|sockpuppet}}*
| | 'נמחק': 'הודעה למשתמש אחרי מחיקת ערך חדש שכתב', |
| *{{tl|test}}
| | 'נמחק ניסויים': 'הודעה למשתמש אחרי מחיקת ערך הבל שכתב', |
| *{{tl|test2}}
| | 'ניסויים': 'הודעה למשתמש אחרי שחזור עריכת הבל קטנה', |
| *{{tl|test3}}
| | 'נייטרליות': 'הודעה למשתמש אחרי שחזור עריכה לא נייטרלית', |
| *{{tl|test4}}
| | 'נחסמת': 'אזהרת משתמש שנחסם בגלל השחתות, עם איום לפנות לספק האינטרנט ולרשויות', |
| *{{tl|unfree}}*
| | 'מקור תמונה': 'יש להכליל תבנית זו בדף שיחת המשתמש של משתמש שהעלה תמונה שלא ידוע מה מקורה. (פרמטרים)', |
| *{{tl|welcome}}
| | 'מילון': 'הזמנה להרשם, והערה לגבי ערכים מילוניים, הפניה לויקימילון', |
| *{{tl|No re-uploading}}
| | 'מחיקת תמונה': 'הודעה למשתמש שתמונה שהעלה נמחקה', |
| *{{tl|Speedywhat}}
| | 'לך': 'אזהרה אחרונה לפני חסימה למשחית', |
| *{{tl|No fair use}}*
| | 'לא כאן': 'תבנית פרמטרית למשתמש שכתב דברים בדף לא מתאים, והם נמחקו או הועברו', |
| *{{tl|Inappropriate imagenotes}}*
| | 'כבר קיים': 'תבנית פרמטרית למשתמש שיצר ערך חדש שכבר קיים (בשם אחר), אחרי שהדף שיצר שונה להפניה', |
| | 'טעות': '"אם לדעתך יש טעות בערך כלשהו, יש לציין זאת בדף השיחה של הערך"', |
| | 'חזרה על עריכה':'אזהרה: "חזרה על עריכות ששוחזרו ללא דיון בדף שיחה אינה מקובלת בוויקיפדיה"', |
| | 'זכות הצבעה': 'אחרי הסרת הצבעה בגלל ז"ה, פרמטר: דף ההצבעה', |
| | 'ויקיזציה': 'הפניה למדריכי עריכה שונים', |
| | 'התנחלות': 'הסבר על החלטה שהתקבלה בפרלמנט על קווים ירוקים ואחרים', |
| | 'העתקה': 'במקביל להחלפת תוכן הדף בתבנית הז"י', |
| | 'הסבר': 'בקשה להסבר על עריכה. כשמציבים תבנית זו יש לעקוב אחרי דף השיחה כדי לקבל את ההסבר', |
| | 'הנחיות תמונה': 'פרמטרים: תמונה=(התמונה או "הכל"), ועוד אחד עד שלושה פרמטרים מהרשימה הבאה: מקור,ערך,הוגן,חשבון,קישור,זרה,OTRS', |
| | 'הזמנה': 'הזמנת אלמוני להרשם', |
| | 'הבל': 'אזהרה עדינה', |
| | 'בוטל': 'הסבר לביטול עריכה. פרמטר ראשון:שם הערך, פרמטר שני (אופציונלי): סיבת הביטול', |
| | 'אזהרת תמונות2':'הסבר על העלאת תמונות', |
| | 'אזהרה': 'אזהרת אנונימיים וחדשים (עד 4 ימים) לפני החסימה', |
| | 'אוטוביוגרפיה': 'לאדם שהעלה ערך לא ראוי על עצמו', |
| | 'בדוק עריכות אוטומטית':'למשתמש שקיבל הרשאת בדוק עריכות' |
| | }, |
| | templates_requiring_params = ['כבר קיים', 'בוטל', 'לא כאן', 'הסבר', 'מקור תמונה', 'זכות הצבעה', 'הנחיות תמונה']; |
|
| |
|
| Alternatively you can place some templates in a user's language. Templates marked
| | function findUser() { |
| with an asterisk (*) use a parameter and can be translated, but cannot be localised
| | var diffName = $('#mw-diff-ntitle2 a:first').text(); |
| on the user page with the script. Click the link 'lang' and fill in a language code
| | if (diffName ) return diffName; |
| to have a localised version of the template put on the talk page.
| | if ( mw.config.get('wgNamespaceNumber') !== 3 ) return; |
| | return new mw.Title( mw.config.get('wgPageName') ).getMainText(); |
| | } |
| | |
| | function openDialog() { |
| | var dialog, template, selector, needParam, paramfield, paramrow; |
| | |
| | selector = $('<select>') |
| | .append($('<option>', {text: 'אנא בחרו תבנית מהרשימה', value: ''})) |
| | .change(setValues); |
|
| |
|
| Main code by [[User:Siebrand]], derived from [[MediaWiki:Quick-delete.js]] by
| | for (var i in tlist) { |
| [[:en:User:Jietse Niesen|Jietse Niesen]], [[User:pfctdayelise|pfctdayelise]] and
| | var t = tlist[i]; |
| [[User:Alphax|Alphax]]
| | selector.append($('<option>', {text: '==== ' + t.title + ' ====' , value: '', disabled: 1})); |
| | for (var j in t.templates) { |
| | var templ = t.templates[j]; |
| | selector.append($('<option>', {text: '\t' + templ, label: '\t' + templ, value: templ, title:tooltips[templ]})); |
| | } |
| | } |
|
| |
|
| ===TODO=== | | mw.loader.using( 'jquery.ui' ).done( function() { |
| * Add remaining templates from [[Commons:Message templates]]:
| | dialog = $('<div>').dialog({ |
| **{{tl|speedywhat}} | | title: 'הוספת תבנית אזהרה לדף השיחה של ' + user, |
| * Do not add a trailing /<langcode> at the end of the subst'ed template, as they now (almost) all use the autotranslation mechanism (see [[Commons:Template_i18n/User_templates]])
| | width: 'auto', |
| */
| | height: 'auto', |
| // <source lang="javascript">
| | overflow: 'auto', |
| // Configuration
| | closeTest: '', |
| | position: [$('body').width() * 0.4, $('body').height() * 0.4], |
| | buttons: { |
| | 'ביטול': function() {dialog.dialog('close');}, |
| | 'בצע': doIt |
| | }}); |
| | dialog.append(selector); |
| | paramfield = $('<input>').on('paste cut drop input change', setValues); |
| | paramrow = $('<span>', {text: 'פרמטר לתבנית: '}).append(paramfield).toggle(false); |
| | dialog.append($('<p>')).append(paramrow); |
| | $(".ui-dialog-buttonpane button:contains('בצע')").button('disable'); |
| | $('.ui-dialog-buttonpane').children().css({float: 'right'}); |
| | } ); |
|
| |
|
| // Should the edits be saved automatically? | | function doIt() { |
| if(window.template_autosave == false){}else{ template_autosave = true; } | | var fromDiff = $('#mw-diff-ntitle2 a:first').length, |
| | title = fromDiff |
| | ? '[[' + mw.config.get('wgPageName').replace(/_/g, ' ') + ']]' |
| | : template, |
| | summary = 'תבנית ' + template, |
| | message = '\n== ' + title + ' ==\n' + |
| | '{{ס:' + template + (needParam ? '|' + paramfield.val() : '') + "}} ~~" + "~~"; |
| | dialog.css({cursor: 'wait'}); |
| | $.ajax({ |
| | url: mw.util.wikiScript('api'), |
| | aync: false, |
| | type: 'post', |
| | data: {action: 'edit', title: 'שיחת משתמש:' + user, summary: summary, token: mw.user.tokens.get('csrfToken'), appendtext: message, format:'json'}, |
| | success: function(data){ |
| | if (data && data.edit && data.edit.result === "Success") { |
| | dialog.css({cursor: ''}); |
| | dialog.dialog('close'); |
| | if (fromDiff) |
| | mw.util.jsMessage('נוספה תבנית {{' + template + '}} לדף [[שיחת משתמש:' + user + ']]'); |
| | else |
| | location.reload(true); |
| | } else |
| | dialog.append($('<p>').css({color: 'red'}).text('כנראה אירעה תקלה. אנא בידקו ב"תרומות המשתמש" שלכם מה בדיוק קרה')); |
| | }, |
| | error: function(data) { |
| | dialog.append($('<p>').css({color: 'red'}).text('תקלה. התבנית לא נשמרה בדף השיחה של המשתמש')); |
| | } |
| | }); |
| | } |
| | |
| | function setValues() { |
| | template = selector.val(); |
| | needParam = $.inArray(template, templates_requiring_params) + 1; |
| | paramrow.toggle(!!needParam); |
| | var canOK = (template.length && (! needParam || $.trim(paramfield.val()).length)) ? 'enable' : 'disable'; |
| | $(".ui-dialog-buttonpane button:contains('בצע')").button(canOK); |
| | } |
| | } |
|
| |
|
| // String constants
| | if (user) |
| var uTemplate = new Array(33)
| | mw.util.addPortletLink('p-tb', '#null', 'תבנית אזהרה בדף השיחה', 'warnUser', 'הוספת תבנית אזהרה לדף השיחה של ' + user) |
| uTemplate[0] = 'Please describe images'
| | .onclick = openDialog; |
| uTemplate[1] = 'Dont remove nsd or nld'
| | }); |
| uTemplate[2] = 'End of copyvios'
| |
| uTemplate[3] = 'Please link images'
| |
| uTemplate[4] = 'Please name images'
| |
| uTemplate[5] = 'Please tag images'
| |
| uTemplate[6] = 'Test'
| |
| uTemplate[7] = 'Test2'
| |
| uTemplate[8] = 'Test3'
| |
| uTemplate[9] = 'Test4'
| |
| uTemplate[10] = 'Welcome'
| |
| uTemplate[11] = 'Dont remove speedy'
| |
| uTemplate[12] = 'Dont remove warnings'
| |
| uTemplate[13] = 'Be civil'
| |
| uTemplate[14] = 'Be civil final'
| |
| uTemplate[15] = 'Project scope'
| |
| uTemplate[16] = 'Inappropriate username'
| |
| uTemplate[17] = 'Copyvionote'
| |
| uTemplate[18] = 'Attackpage'
| |
| uTemplate[19] = 'Attackimage'
| |
| uTemplate[20] = 'Dont remove delete'
| |
| uTemplate[21] = 'Provide better quality'
| |
| uTemplate[22] = 'Dont recreate'
| |
| uTemplate[23] = 'Blocked User'
| |
| uTemplate[24] = 'Sockpuppet'
| |
| uTemplate[25] = 'Unfree'
| |
| uTemplate[26] = 'Imposter'
| |
| uTemplate[27] = 'Dont overwrite'
| |
| uTemplate[28] = 'Off topic'
| |
| uTemplate[29] = 'No re-uploading'
| |
| uTemplate[30] = 'Speedywhat'
| |
| uTemplate[31] = 'Derivativenote'
| |
| uTemplate[32] = 'No fair use'
| |
| uTemplate[33] = 'No comments'
| |
| uTemplate[34] = 'Inappropriate imagenotes'
| |
| | |
| var uText = new Array(33)
| |
| uText[0] = "Please describe"
| |
| uText[1] = "Rem.n(slp)d"
| |
| uText[2] = "End copyvio"
| |
| uText[3] = "Please link"
| |
| uText[4] = "Please name"
| |
| uText[5] = "Please tag"
| |
| uText[6] = "Sandboxing"
| |
| uText[7] = "Vandalism"
| |
| uText[8] = "Vandalism 2"
| |
| uText[9] = "Vandalism 3"
| |
| uText[10] = "Welcome"
| |
| uText[11] = "Rem.speedy"
| |
| uText[12] = "Rem.warning"
| |
| uText[13] = "Be civil"
| |
| uText[14] = "Be civil final"
| |
| uText[15] = "Project scope"
| |
| uText[16] = "Inapp.username"
| |
| uText[17] = "Copyvionote"
| |
| uText[18] = "Attackpage"
| |
| uText[19] = "Attackimage"
| |
| uText[20] = "Rem.Delete"
| |
| uText[21] = "Better quality"
| |
| uText[22] = "Dont recreate"
| |
| uText[23] = "Blocked"
| |
| uText[24] = "Sockpuppet"
| |
| uText[25] = "Unfree"
| |
| uText[26] = "Imposter"
| |
| uText[27] = "Dont overwrite"
| |
| uText[28] = "Off topic"
| |
| uText[29] = "No re-uploading"
| |
| uText[30] = "Speedy warn"
| |
| uText[31] = "Derivativenote"
| |
| uText[32] = "No fair use"
| |
| uText[33] = "Use talk pages"
| |
| uText[34] = "Imagenotes"
| |
| | |
| var uHelp = new Array(33)
| |
| uHelp[0] = "Request user to please describe his images"
| |
| uHelp[1] = "Reminder to not remove deletion templates unless all information is complete. Notifying user has reverted removal somewhere"
| |
| uHelp[2] = "Give user a final warning because of previous copyright violations"
| |
| uHelp[3] = "Request user to please link his images through categories or galleries"
| |
| uHelp[4] = "Request user to please name his images correctly"
| |
| uHelp[5] = "Request user to please tag his images"
| |
| uHelp[6] = "Referral to sandbox for conducting experiments"
| |
| uHelp[7] = "Warning or vandalism and request to cease"
| |
| uHelp[8] = "Second warning for vandalism and announcement of block if it continues"
| |
| uHelp[9] = "Last warning for vandalism and announcement of block on next violation"
| |
| uHelp[10] = "Welcome a new user or a user who has not yet received a welcome message"
| |
| uHelp[11] = "Warn a user about having removed a speedy tag from an image and inform him about proper process"
| |
| uHelp[12] = "Warn a user about removing valid warning templates from his talk page and inform him about proper process"
| |
| uHelp[13] = "Ask a user to remain civil, even if he or his contributions are being attacked"
| |
| uHelp[14] = "Last request to user to remain civil. Will be blocked next time"
| |
| uHelp[15] = "Inform user on project scope after deleting out of scope contributions"
| |
| uHelp[16] = "Inform user about his inappropriate username and block"
| |
| uHelp[17] = "Inform user about speedy deletion of uploaded media"
| |
| uHelp[18] = "Please do not create attack pages"
| |
| uHelp[19] = "Please do not upload attack images"
| |
| uHelp[20] = "Please do not remove deletion requests"
| |
| uHelp[21] = "Do you have a better version of media"
| |
| uHelp[22] = "Please do not recreate deleted images"
| |
| uHelp[23] = "This user has been blocked - without parameters - use manual version for more paras"
| |
| uHelp[24] = "It is suspected that this user may be a sock puppet or impersonator"
| |
| uHelp[25] = "Image deletion notification"
| |
| uHelp[26] = "This account has been blocked indefinitely, because it exists solely to impersonate or attack"
| |
| uHelp[27] = "Please do not overwrite images"
| |
| uHelp[28] = "Please stay on topic in Commons"
| |
| uHelp[29] = "Please do not re-upload"
| |
| uHelp[30] = "Inform user that one of his uploads has been speedy-deleted"
| |
| uHelp[31] = "Inform user about speedy deletion of uploaded derivative media"
| |
| uHelp[32] = "Inform user that Commons do not accept fair use"
| |
| uHelp[33] = "Inform user to use talk pages"
| |
| uHelp[34] = "Tell user not to add inappropriate imagenotes"
| |
| | |
| template_langquery = "In which language should the message be given? " +
| |
| "Example: en for English, de for German, es for Spanish, etc. " +
| |
| "If the language does not exist for the template, a red link will be inserted. ";
| |
| template_mediaquery = "Which media is this message about? " +
| |
| "Example: \\'Image Name.ext\\' - omit namespace.";
| |
| template_mediaquery2 = "Which media is this message about? " +
| |
| "Example: \\'Image Name.ext\\' - omit namespace. Leave empty to not specify";
| |
| template_pagequery = "Which page is this message about? " +
| |
| "Example: \\'Page_Name\\'.";
| |
| template_usernamequery = "Which user should the message refer to?";
| |
| | |
| | |
| // Add the template
| |
| function template_mark(talkpage_fakeaction, message_lang) {
| |
| //if (!message_lang) return; //User pressed cancel
| |
|
| |
| //Now we assume message templates to be properly autotranslated
| |
| if (message_lang) langparam='&template_lang=' + message_lang;
| |
| else langparam='';
| |
| | |
| var pagename = encodeURIComponent(wgPageName);
| |
| var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
| |
| document.location = editlk + '&fakeaction=' + talkpage_fakeaction + langparam + '&template_type=1';
| |
| }
| |
| | |
| // Add template to user talk page
| |
| function template_addTemplate(template) {
| |
| if (getParamValue('template_lang')) {
| |
| template = template + '/' + getParamValue('template_lang');
| |
| }
| |
| | |
| var txt = '{{subst:' + template + '}}';
| |
| document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\n' + txt + ' ~~~~';
| |
| // the edit summary for when you mark the image. You can change it if you want.
| |
| document.editform.wpSummary.value = 'Adding template \"' + template + '\" to inform user.';
| |
| if (template_autosave) document.editform.wpSave.click();
| |
| }
| |
| | |
| // Add the template
| |
| function template_mark2(talkpage_fakeaction, media_name, can_handle_empty_parameter, add_namespace) {
| |
| if (media_name == null) return; // User pressed cancel
| |
| if (media_name == '' && can_handle_empty_parameter != 1) return; // User did not supply parameter and template cannot handle that
| |
| // Parameter handling for special cases
| |
| if (add_namespace && media_name.length > 0) media_name = 'File:' + media_name;
| |
| | |
| var pagename = encodeURIComponent(wgPageName);
| |
| var editlk = document.getElementById('ca-edit').getElementsByTagName('a')[0].href;
| |
| document.location = editlk + '&fakeaction=' + talkpage_fakeaction + '&media_name=' + encodeURIComponent (media_name) + '&template_type=2';
| |
| }
| |
| | |
| // Add template to user talk page
| |
| function template_addTemplate2(template) {
| |
| if (getParamValue('media_name')) {
| |
| template = template + '|' + getParamValue('media_name');
| |
| }
| |
| | |
| var txt = '{{subst:' + template + '}}';
| |
| document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '\n' + txt + ' ~~~~';
| |
| // the edit summary for when you mark the image. You can change it if you want.
| |
| document.editform.wpSummary.value = 'Adding template \"' + template + '\" to inform user.';
| |
| if (template_autosave) document.editform.wpSave.click();
| |
| }
| |
| | |
| function template_onload() {
| |
| if (wgNamespaceNumber == 3) { //NS_USERTALK
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'3\')', uText[3], 'mark-please', uHelp[3], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'17\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[17], 'mark-warn', uHelp[17]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'31\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[31], 'mark-warn', uHelp[31]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'32\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[32], 'mark-warn', uHelp[32]);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'4\')', uText[4], 'mark-please', uHelp[4], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'5\')', uText[5], 'mark-please', uHelp[5], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'0\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[0], 'mark-warn', uHelp[0]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'15\', prompt(\'' + template_mediaquery2 + '\', \'\'), 1, false)', uText[15], 'mark-warn', uHelp[15]);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'33\')', uText[33], 'mark-please', uHelp[33], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'10\')', uText[10], 'mark-welcome', uHelp[10], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'2\')', uText[2], 'mark-warn', uHelp[2], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'28\')', uText[28], 'mark-warn', uHelp[28], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'29\')', uText[29], 'mark-warn', uHelp[29], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'6\')', uText[6], 'mark-warn', uHelp[6], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'7\')', uText[7], 'mark-warn', uHelp[7], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'8\')', uText[8], 'mark-warn', uHelp[8], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'9\')', uText[9], 'mark-warn', uHelp[9], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'34\')', uText[34], 'mark-please', uHelp[34], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'20\')', uText[20], 'mark-warn', uHelp[20], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'1\')', uText[1], 'mark-warn', uHelp[1], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'11\')', uText[11], 'mark-warn', uHelp[11], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'12\')', uText[12], 'mark-warn', uHelp[12], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'13\')', uText[13], 'mark-warn', uHelp[13], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'14\')', uText[14], 'mark-warn', uHelp[14], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'23\')', uText[23], 'mark-warn', uHelp[23], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark(\'16\')', uText[16], 'mark-warn', uHelp[16], null, null);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'21\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[21], 'mark-warn', uHelp[21]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'25\', prompt(\'' + template_mediaquery2 + '\', \'\'), 1, true)', uText[25], 'mark-warn', uHelp[25]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'19\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[19], 'mark-warn', uHelp[19]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'18\', prompt(\'' + template_langquery + '\', \'\'), 0, false)', uText[18], 'mark-warn', uHelp[18]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'27\', prompt(\'' + template_mediaquery2 + '\', \'\'), 1, true)', uText[27], 'mark-warn', uHelp[27]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'22\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[22], 'mark-warn', uHelp[22]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'26\', prompt(\'' + template_usernamequery + '\', \'\'), 0, false)', uText[26], 'mark-warn', uHelp[26]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'24\', prompt(\'' + template_usernamequery + '\', \'\'), 0, false)', uText[24], 'mark-warn', uHelp[24]);
| |
| addPortletLink('p-tb', 'javascript:template_mark2(\'30\', prompt(\'' + template_mediaquery + '\', \'\'), 0, true)', uText[30], 'mark-warn', uHelp[30]);
| |
| }
| |
| | |
| var fakeaction = getParamValue('fakeaction');
| |
| var template_type = getParamValue('template_type'); // Fetch what template to add
| |
|
| |
| var action_idx = -1;
| |
| try {
| |
| action_idx = parseInt (fakeaction, 10);
| |
| } catch (some_error) {
| |
| action_idx = -1;
| |
| }
| |
| var add_idx = -1;
| |
| try {
| |
| add_idx = parseInt (template_type, 10);
| |
| } catch (some_error) {
| |
| add_idx = -1;
| |
| }
| |
| if (add_idx >= 1 && add_idx <= 2 && action_idx >= 0 && action_idx < uTemplate.length) {
| |
| if (add_idx == 1)
| |
| template_addTemplate (uTemplate[action_idx]);
| |
| else
| |
| template_addTemplate2 (uTemplate[action_idx]);
| |
| }
| |
| } | |
| | |
| addOnloadHook(template_onload);
| |
| // </source>
| |