I thought after the deletion of template:scrollref that it was determined that it would be too difficult to block scrollboxes from rendering in the printable layout of pages, but it seems like it would be fairly simple now: [1]. Would someone mind implementing the change? Any time that a div tag has the overflow flag set and obscures content, print users will not be able to see any obscured content in the present form. Doing this via templates has been disabled in Main namespace on the en wiki, but is still in use in the it wiki, as I understand it. At present, a dozen or so user and talk pages are unprintable here, but several real pages are unprintable elsewhere do to Template:scrollbox, but lord only knows how many are using subst'd equivalents or directly put in the div tag. Is there any reason not to make with the fix in the diff linked above? Thanks, MrZaius talk 20:38, 19 July 2007 (UTC)
@media print
work?
Gracenotes
T § 22:59, 20 July 2007 (UTC)
@media print
). However, I doubt scrollboxes have any legitimate uses for the same reasons that {{
scrollref}} was deleted. Where are they still used? —
Ruud 22:32, 24 July 2007 (UTC)Common.css and Common.js are not used on the Printable version. Even if they were, this would be for Common.css, not Common.js. — Madman bum and angel ( talk – desk) 02:01, 25 July 2007 (UTC)
In the section for the "Main page is unavailable" image, I am proposing to add the following lines of code into Common.js just in case a vandal was smart enough to load the editform directly, without needing an edit tab.
var makeReadOnly = document.getElementById("wpTextbox1"); makeReadOnly.readOnly = true;
This code should, of course, by put inside the main function for "The Main Page is unavailable" tweaks. — « ANIMUM » 16:45, 11 August 2007 (UTC)
WikiMiniAtlas is a GoogleMaps-like draggable, zoomable, and clickable worldmap which displays geocoded Wikipedia articles. WikiMiniAtlas, unlike Google maps, is free content/software and written by one of our own, Dschwen. You can try Wikiminiatlas here.
When WikiMiniAtlas embedding is enabled it displays a little blue globe next to coordinates in articles. Clicking on the globe brings up the popup map. The embedding approach is the same as is used in our popup mediaplayer, because I stole the popup code from Dschwen. Nothing is loaded from the mapping server until the user clicks on the globe.
A commons specific version (which displays overlayed images) has been in the global configuration on commons for several months now. The Wikipedia version is in the global configurations for both pt wikipedia and it Wikipedia.
Does anyone have any objections to making this useful feature globally available on English Wikipedia? -- Gmaxwell 21:28, 13 August 2007 (UTC)
Sounds like an excellent alternative to Google Maps, which we should purge as soon as possible. -- Cyde Weys 01:36, 14 August 2007 (UTC)
Sounds good to me, please turn it on. ← BenB4 00:55, 15 August 2007 (UTC)
Hello, I recently tried to export the table collapse code to another wiki ( wiki.xentax.com), but I can't get it to work. I have the distinct feeling that I'm missing something obvious, but I don't have the knowledge necessary to figure out what. You can see what code I exported on MediaWiki:Common.js, what CSS I've copied on MediaWiki:Common.css, and my test page. I would greatly appreciate any help, and thanks in advance! -- Dinoguy1000 Talk 18:45, 4 August 2007 (UTC)
Is there any opposition to:
maxage
parameter to importScript()
and importStylesheet()
, applied as:
if (typeof maxage != 'undefined') {
url += "&smaxage=" + encodeURIComponent(maxage);
}
Replacing the current code used to pull in Mediawiki:Wikimediaplayer.js with:
importScript('Mediawiki:Wikimediaplayer.js', 86400);
Any potential problems I may have overlooked? — Ilmari Karonen ( talk) 14:37, 17 August 2007 (UTC)
For the collapsible table, it would look better and improve formatting if the square brackets were included in the show/hide link to uncollapse/collapse the table. This is the case for the Dynamic Navigation bars, but I would like to see it extended to the collapsible table also. One problem with not linking them is that when the text color of the header in a collapsible table is changed, the color of the square brackets changes, but not the color of the show/hide link. Thus, whenever the text color is changed, the table looks funny. Simply adding the brackets to the link would fix this problem and fix all of the instances where collapsible tables are used with different text colors in the title.
Unfortunately, I'm not very familiar with this code and am not able to post the fix myself, but hopefully someone else can help modify the code to do this (it seems like a simple change). Thanks, -- CapitalR 13:26, 21 August 2007 (UTC)
{{ editprotected}}
Specific request: Please change:
var collapseCaption = "hide"; var expandCaption = "show";
to:
var collapseCaption = "[hide]"; var expandCaption = "[show]";
and change:
Button.appendChild( document.createTextNode( "[" ) ); Button.appendChild( ButtonLink ); Button.appendChild( document.createTextNode( "]" ) );
to:
Button.appendChild( ButtonLink );
and change:
var NavigationBarHide = '[' + collapseCaption + ']'; var NavigationBarShow = '[' + expandCaption + ']';
to:
var NavigationBarHide = collapseCaption; var NavigationBarShow = expandCaption;
Thank you. ← BenB4 13:45, 21 August 2007 (UTC) (modified by -- CapitalR 14:01, 21 August 2007 (UTC))
I'm withdrawing this request for now -- it seems we should make things consistent, and the easiest way to do that would be to make the NavToggles uglier with the link inside the brackets. There's no way we can make the toggle the same color as the header text, they're separate elements and the text style is variable. ← BenB4 18:25, 21 August 2007 (UTC)
Yeah, I understand it might be a nifty little feature, but could we hold off adding it until it becomes stable and tested? The most recent made it unusable (pokes the error console on every page), as described here. Миша 13 20:59, 21 August 2007 (UTC)
A system admin of the French wiki
fr:Utilisateur:Pabix has created a template
fr:Modèle:Images that allows to create slideshows on wikipedia: i.e.
slideshow of maps about the 2nd Battle of El Alamein.
The template uses some java extensions and has (so far) also been adapted for the Italian wiki
it:Template:Galleria. Yesterday I tried to import it to the English
Template:Scroll gallery and German wiki
de:Vorlage:Scroll Gallery, but it would not work. Today I was informed by Italian wiki user
it:utente:Twice25 that the follwoing java script needs to be added to either MediaWiki:Common.js or MediaWiki:Monobook.js for the template to work. Would this be possible to do? Thanks, --
noclador 00:54, 20 August 2007 (UTC)
I copied the script that needs to be added below and it looks as it should, but it comes out all distored in the saved text- therefore here you can find the link as the script appears in the Italian
it:MediaWiki:Monobook.js (it is the last at the bottom of the page) and here is a link to the change that was made in the Italian wiki to insert the script:
[2]
/*** CODE FOR TEMPLATE:Scroll gallery ***/ function toggleImage(group, remindex, shwindex) { document.getElementById("ImageGroupsGr"+group+"Im"+remindex).style.display="none"; document.getElementById("ImageGroupsGr"+group+"Im"+shwindex).style.display="inline"; } function ImageGroup(){ if (document.URL.match(/printable/g)) return; var bc=document.getElementById("bodyContent"); var divs=bc.getElementsByTagName("div"); var i = 0, j = 0; var units, search; var currentimage; var UnitNode; for (i = 0; i < divs.length ; i++) { if (divs[i].className != "ImageGroup") continue; UnitNode=undefined; search=divs[i].getElementsByTagName("div"); for (j = 0; j < search.length ; j++) { if (search[j].className != "ImageGroupUnits") continue; UnitNode=search[j]; break; } if (UnitNode==undefined) continue; units=Array(); for (j = 0 ; j < UnitNode.childNodes.length ; j++ ) { var temp = UnitNode.childNodes[j]; if (temp.className=="center") units.push(temp); } for (j = 0 ; j < units.length ; j++) { currentimage=units[j]; currentimage.id="ImageGroupsGr"+i+"Im"+j; var imghead = document.createElement("div"); var leftlink; var rightlink; if (j != 0) { leftlink = document.createElement("a"); leftlink.href = "javascript:toggleImage("+i+","+j+","+(j-1)+");"; leftlink.innerHTML="◀"; } else { leftlink = document.createElement("span"); leftlink.innerHTML=" "; } if (j != units.length - 1) { rightlink = document.createElement("a"); rightlink.href = "javascript:toggleImage("+i+","+j+","+(j+1)+");"; rightlink.innerHTML="▶"; } else { rightlink = document.createElement("span"); rightlink.innerHTML=" "; } var comment = document.createElement("tt"); comment.innerHTML = "("+ (j+1) + "/" + units.length + ")"; with(imghead) { style.fontSize="110%"; style.fontweight="bold"; appendChild(leftlink); appendChild(comment); appendChild(rightlink); } currentimage.insertBefore(imghead,currentimage.childNodes[0]); if (j != 0) currentimage.style.display="none"; } } } addOnloadHook(ImageGroup);
Looks great, but I think there's a problem when you scroll to the last image. Try going to image 16 of 16 on it:Seconda battaglia di El Alamein#La battaglia. It doesn't display. — METS501 ( talk) 00:59, 20 August 2007 (UTC)
Aren't we not supposed to disrupt printing like that? I know there are specific instrtuctions against scrollbars on references, and this seems very similar. A nice idea, but ordinary gallery tags are better for our purposes. ← BenB4 01:47, 20 August 2007 (UTC)
Nesting collapsible tables while using the autocollapse feature has been giving me some problems. Note that in the example below (which should start out in a collapsed state), when you press the Show button, the child tables start out in uncollapsed mode, but the buttons display "show" instead of "hide". I think that the child tables should start out in collapsed mode when the parent table is uncollapsed. This occurs on Firefox for XP/Vista (and I think on IE also). Can someone either show me the correct way to nest tables, or tell me if there is a problem in the collapsible code? Thanks, -- CapitalR 14:00, 22 August 2007 (UTC)
<table class="navbox collapsible autocollapse"> <tr><th>Title1</th></tr> <tr><td><!--http://en.wikipedia.org/wiki/MediaWiki:Common.js Message --><table class="navbox collapsible collapsed"> <tr><th>Title1</th></tr> <tr><td>Text1</td></tr></table><!-- --><table class="navbox collapsible collapsed"> <tr><th>Title1</th></tr> <tr><td>Text1</td></tr></table><!-- --></td></tr></table>
Title1 | ||||
---|---|---|---|---|
|
I had brought up this same issue at WP:VPT a while ago. (ATM it's still the first discussion on the page.) It took me a while to come up with something, since I've never worked with JS or the DOM before, but in the end it seemed to me that a one-line change to the code would enable nesting to work as expected (albeit not necessarily as documented). I put this proposal up at VPT too, and it just scrolled off having received no comment.
The only thing that keeps nesting from working is that the line in collapseTable
var Rows = Table.getElementsByTagName( "tr" );
grabs all rows below Table
in all its descendants. However, if it was to grab only the rows that are direct children of Table
, nesting works just fine. So instead:
var Rows = Table.rows;
I've tested this out in my monobook.js in both Firefox 2.0 and IE6 and it appears to work.
In my case, the impetus for wanting to nest tables came from the vociferous arguments that flare up from time to time at Template:Books of the Old Testament, where issues of what version of what book is in whose canon, and which should be included in the template and which should not (inevitably, someone feels slighted) often take up the bulk of the talk page. Nesting the tables would enable a template that's all-inclusive, but which would not necessarily have to be so long in the display as to be unwieldy. It would also enable the elimination of every other Judaeo-Christian religion/denomination-specific template on the Biblical canon since in every case the main template can then be used with only the relevant portion expanded by default. (And also enable the inclusion of the Jewish canon as such, without POV language such as "Old Testament" in the title.) Ugly, but so are the arguments, so I'd hope this approach would render the arguments moot and encourage people to spend their energies more on, you know, writing an encyclopedia.
How generally useful this would be I can't say, but since it seems to be a relatively simple change is it doable anyway? TCC (talk) (contribs) 23:26, 24 August 2007 (UTC)
{{editprotected}} per the above. By the way, I didn't test this in the context of a navbox, but I don't see that there would be much difference. TCC (talk) (contribs) 00:46, 28 August 2007 (UTC)