Wikidata:Administrators' noticeboard/Archive/2012/12
This page is an archive. Please do not modify it. Use the current page, even to continue an old discussion. |
Hello, could someone please prevent the "Consider logging in on our secure server" suggestion from showing up on Special:UserLogin when actually using the secure server? Thanks. Hazard-SJ ✈ 23:57, 4 December 2012 (UTC)
- The sysmessage is the same with both secure and unsecure connection, it can be changed via code or via javascript. --Vituzzu (talk) 00:07, 5 December 2012 (UTC)
- I can only say that I translated the message in Italian, but I can't help you. Restu20 00:25, 5 December 2012 (UTC)
- Wow, I just checked and saw that MediaWiki:loginend-https could be used to supersede on the secure server. I propose creating it with the same content, excluding the secure server consideration line. Hazard-SJ ✈ 00:59, 5 December 2012 (UTC)
- Done. --Yair rand (talk) 01:12, 5 December 2012 (UTC)
- Thanks. Hazard-SJ ✈ 01:20, 5 December 2012 (UTC)
- Done also for Italian and Spanish. Restu20 01:30, 5 December 2012 (UTC)
- Oh I didn't find the message since it is empty by default, my fault! --Vituzzu (talk) 01:32, 5 December 2012 (UTC)
- Done also for Italian and Spanish. Restu20 01:30, 5 December 2012 (UTC)
- Thanks. Hazard-SJ ✈ 01:20, 5 December 2012 (UTC)
- Done. --Yair rand (talk) 01:12, 5 December 2012 (UTC)
- Wow, I just checked and saw that MediaWiki:loginend-https could be used to supersede on the secure server. I propose creating it with the same content, excluding the secure server consideration line. Hazard-SJ ✈ 00:59, 5 December 2012 (UTC)
- I can only say that I translated the message in Italian, but I can't help you. Restu20 00:25, 5 December 2012 (UTC)
(I'm late!) Done for Korean :) --Sotiale (talk) 10:44, 7 December 2012 (UTC)
I don't understand the whole thread. As far as I know the secure server is obosolete and the URL of the former secure server redirects to native https connection. This kind of message should not appear anywhere. Bináris (talk) 08:49, 8 December 2012 (UTC)
- If a user is logging in from http://www.wikidata.org/wiki/Special:UserLogin the page recommends logging in through the secure server at https://www.wikidata.org/wiki/Special:UserLogin and links to it. --Yair rand (talk) 17:47, 9 December 2012 (UTC)
Importing a template from en.wiki
I don't think that I have the technical ability to import a template properly (transferring the page history over, rather than a simple cut and paste job). If I don't, please could someone import en:Template:Draft proposal for me. If I do, please could someone explain how to import, for future reference. Thanks in advance. —WFC— 09:54, 7 December 2012 (UTC)
- This is not the same template: Template:Proposed? And for your second question; you have be an administrator, that you can import pages. --Stryn (talk) 10:04, 7 December 2012 (UTC)
- Nope, it's a different template. I want to start a policy page, but because I don't know what the consensus is, I don't want to propose it yet. Instead, I want to mark it as an early draft of a future proposal. —WFC— 10:20, 7 December 2012 (UTC)
- Ok, it is now here: Template:Draft proposal. Btw, I will not use import tool anymore before I really understand it... --Stryn (talk) 10:40, 7 December 2012 (UTC)
- Thanks. —WFC— 10:59, 8 December 2012 (UTC)
- Ok, it is now here: Template:Draft proposal. Btw, I will not use import tool anymore before I really understand it... --Stryn (talk) 10:40, 7 December 2012 (UTC)
- Nope, it's a different template. I want to start a policy page, but because I don't know what the consensus is, I don't want to propose it yet. Instead, I want to mark it as an early draft of a future proposal. —WFC— 10:20, 7 December 2012 (UTC)
Collapsible list
Could w:en:Template:Collapsible list be imported? Also, the following code needs to be added to MediaWiki:Common.css:
Extended content |
---|
div.NavFrame { margin: 0; padding: 4px; border: 1px solid #aaa; text-align: center; border-collapse: collapse; font-size: 95%; } div.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; } div.NavPic { background-color: #fff; margin: 0; padding: 2px; /* @noflip */ float: left; } div.NavFrame div.NavHead { height: 1.6em; font-weight: bold; background-color: #ccf; position: relative; } div.NavFrame p, div.NavFrame div.NavContent, div.NavFrame div.NavContent p { font-size: 100%; } div.NavEnd { margin: 0; padding: 0; line-height: 1px; clear: both; } a.NavToggle { position: absolute; top: 0; /* @noflip */ right: 3px; font-weight: normal; font-size: 90%; } |
Thank you. -happy5214 15:30, 9 December 2012 (UTC)
- Done with caveat It doesn't appear to be working at the moment--are you sure that this was all that was needed? Is there perhaps some javascript we need too? —Theopolisme 17:09, 9 December 2012 (UTC)
- Try plugging in the following: -happy5214 17:19, 9 December 2012 (UTC)
Extended content |
---|
/** * Collapsible tables ********************************************************* * * Description: Allows tables to be collapsed, showing only the header. See * [[Wikipedia:NavFrame]]. * Maintainers: [[User:R. Koot]] */ var autoCollapse = 2; var collapseCaption = 'hide'; var expandCaption = 'show'; window.collapseTable = function ( tableIndex ) { var Button = document.getElementById( 'collapseButton' + tableIndex ); var Table = document.getElementById( 'collapsibleTable' + tableIndex ); if ( !Table || !Button ) { return false; } var Rows = Table.rows; if ( Button.firstChild.data == collapseCaption ) { for ( var i = 1; i < Rows.length; i++ ) { Rows[i].style.display = 'none'; } Button.firstChild.data = expandCaption; } else { for ( var i = 1; i < Rows.length; i++ ) { Rows[i].style.display = Rows[0].style.display; } Button.firstChild.data = collapseCaption; } } function createCollapseButtons() { var tableIndex = 0; var NavigationBoxes = new Object(); var Tables = document.getElementsByTagName( 'table' ); for ( var i = 0; i < Tables.length; i++ ) { if ( $( Tables[i] ).hasClass( 'collapsible' ) ) { /* only add button and increment count if there is a header row to work with */ var HeaderRow = Tables[i].getElementsByTagName( 'tr' )[0]; if ( !HeaderRow ) continue; var Header = HeaderRow.getElementsByTagName( 'th' )[0]; if ( !Header ) continue; NavigationBoxes[ tableIndex ] = Tables[i]; Tables[i].setAttribute( 'id', 'collapsibleTable' + tableIndex ); var Button = document.createElement( 'span' ); var ButtonLink = document.createElement( 'a' ); var ButtonText = document.createTextNode( collapseCaption ); Button.className = 'collapseButton'; /* Styles are declared in Common.css */ ButtonLink.style.color = Header.style.color; ButtonLink.setAttribute( 'id', 'collapseButton' + tableIndex ); ButtonLink.setAttribute( 'href', '#' ); addHandler( ButtonLink, 'click', new Function( 'evt', 'collapseTable(' + tableIndex + '); return killEvt( evt );' ) ); ButtonLink.appendChild( ButtonText ); Button.appendChild( document.createTextNode( '[' ) ); Button.appendChild( ButtonLink ); Button.appendChild( document.createTextNode( ']' ) ); Header.insertBefore( Button, Header.firstChild ); tableIndex++; } } for ( var i = 0; i < tableIndex; i++ ) { if ( $( NavigationBoxes[i] ).hasClass( 'collapsed' ) || ( tableIndex >= autoCollapse && $( NavigationBoxes[i] ).hasClass( 'autocollapse' ) ) ) { collapseTable( i ); } else if ( $( NavigationBoxes[i] ).hasClass ( 'innercollapse' ) ) { var element = NavigationBoxes[i]; while (element = element.parentNode) { if ( $( element ).hasClass( 'outercollapse' ) ) { collapseTable ( i ); break; } } } } } $( createCollapseButtons ); /** * Dynamic Navigation Bars (experimental) * * Description: See [[Wikipedia:NavFrame]]. * Maintainers: UNMAINTAINED */ /* set up the words in your language */ var NavigationBarHide = '[' + collapseCaption + ']'; var NavigationBarShow = '[' + expandCaption + ']'; /** * Shows and hides content and picture (if available) of navigation bars * Parameters: * indexNavigationBar: the index of navigation bar to be toggled **/ window.toggleNavigationBar = function ( indexNavigationBar ) { var NavToggle = document.getElementById( 'NavToggle' + indexNavigationBar ); var NavFrame = document.getElementById( 'NavFrame' + indexNavigationBar ); if ( !NavFrame || !NavToggle ) { return false; } /* if shown now */ if ( NavToggle.firstChild.data == NavigationBarHide ) { for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) { if ( $( NavChild ).hasClass( 'NavContent' ) || $( NavChild ).hasClass( 'NavPic' ) ) { NavChild.style.display = 'none'; } } NavToggle.firstChild.data = NavigationBarShow; /* if hidden now */ } else if ( NavToggle.firstChild.data == NavigationBarShow ) { for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) { if ( $( NavChild ).hasClass( 'NavContent' ) || $( NavChild ).hasClass( 'NavPic' ) ) { NavChild.style.display = 'block'; } } NavToggle.firstChild.data = NavigationBarHide; } } /* adds show/hide-button to navigation bars */ function createNavigationBarToggleButton() { var indexNavigationBar = 0; /* iterate over all < div >-elements */ var divs = document.getElementsByTagName( 'div' ); for ( var i = 0; NavFrame = divs[i]; i++ ) { /* if found a navigation bar */ if ( $( NavFrame ).hasClass( 'NavFrame' ) ) { indexNavigationBar++; var NavToggle = document.createElement( 'a' ); NavToggle.className = 'NavToggle'; NavToggle.setAttribute( 'id', 'NavToggle' + indexNavigationBar ); NavToggle.setAttribute( 'href', 'javascript:toggleNavigationBar(' + indexNavigationBar + ');' ); var isCollapsed = $( NavFrame ).hasClass( 'collapsed' ); /** * Check if any children are already hidden. This loop is here for backwards compatibility: * the old way of making NavFrames start out collapsed was to manually add style="display:none" * to all the NavPic/NavContent elements. Since this was bad for accessibility (no way to make * the content visible without JavaScript support), the new recommended way is to add the class * "collapsed" to the NavFrame itself, just like with collapsible tables. */ for ( var NavChild = NavFrame.firstChild; NavChild != null && !isCollapsed; NavChild = NavChild.nextSibling ) { if ( $( NavChild ).hasClass( 'NavPic' ) || $( NavChild ).hasClass( 'NavContent' ) ) { if ( NavChild.style.display == 'none' ) { isCollapsed = true; } } } if ( isCollapsed ) { for ( var NavChild = NavFrame.firstChild; NavChild != null; NavChild = NavChild.nextSibling ) { if ( $( NavChild ).hasClass( 'NavPic' ) || $( NavChild ).hasClass( 'NavContent' ) ) { NavChild.style.display = 'none'; } } } var NavToggleText = document.createTextNode( isCollapsed ? NavigationBarShow : NavigationBarHide ); NavToggle.appendChild( NavToggleText ); /* Find the NavHead and attach the toggle link (Must be this complicated because Moz's firstChild handling is borked) */ for( var j = 0; j < NavFrame.childNodes.length; j++ ) { if ( $( NavFrame.childNodes[j] ).hasClass( 'NavHead' ) ) { NavToggle.style.color = NavFrame.childNodes[j].style.color; NavFrame.childNodes[j].appendChild( NavToggle ); } } NavFrame.setAttribute( 'id', 'NavFrame' + indexNavigationBar ); } } } $( createNavigationBarToggleButton ); |
- Done can you check if everything is ok? Restu20 17:36, 9 December 2012 (UTC)
- And if I've made some mistakes rollback me. :-) Restu20 17:36, 9 December 2012 (UTC)
- I think the second part must be added too. -happy5214 19:00, 9 December 2012 (UTC)
- What is the second part? Sorry but I think I've added in MediaWiki:Common.css all the code you have pasted above. Restu20 20:16, 9 December 2012 (UTC)
- I think the second part must be added too. -happy5214 19:00, 9 December 2012 (UTC)
- And if I've made some mistakes rollback me. :-) Restu20 17:36, 9 December 2012 (UTC)
Restu, if I'm not mistaken, the last part was javascript and as such should have been added to Mediawiki:Common.js. I've moved it there, but the problem still stands: what is the 'second part'? —Theopolisme 12:11, 10 December 2012 (UTC)
- Thanks Theopolisme (as usual I've made a mistake). :-) Restu20 12:24, 10 December 2012 (UTC)
- Collapsible list were already available on Wikidata. Example:
display this text Raoli (talk) 23:31, 10 December 2012 (UTC)
- Thanks; everything's working fine now. —Theopolisme 11:56, 11 December 2012 (UTC)
- Folks can someone internationalize (or use an icon instead) the hide/show caption for the navframe.js, since it's in MediaWiki:Common.js the captions are always in English for all users. Also as Raoli said mw-collapsible is already available for us to use, and as part of MediaWiki core the system messages for collapse and uncollapse is already translated in many languages via translatewiki. Regards--Lam-ang (talk) 16:37, 11 December 2012 (UTC)
- Thanks; everything's working fine now. —Theopolisme 11:56, 11 December 2012 (UTC)
User:93.220.120.199
Can someone please unblock User:93.220.120.199, its the dev team! =D Jeblad (talk) 17:50, 11 December 2012 (UTC)
- Done. --Yair rand (talk) 17:55, 11 December 2012 (UTC)
- Thanks! =D Jeblad (talk) 17:57, 11 December 2012 (UTC)