Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
Brianna user:pfctdayelise
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
Brianna
I think what s/he meant is that __NOGALLERY__ is something implemented by mediawiki. not your browser, so it'd have to be implemented server-side. (proablly in [[special:preferences]] I would assume).
-bawolff
On 11/18/06, Brianna Laugher brianna.laugher@gmail.com wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
Brianna _______________________________________________ Commons-l mailing list Commons-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/commons-l
bawolff wrote:
I think what s/he meant is that __NOGALLERY__ is something implemented by mediawiki. not your browser, so it'd have to be implemented server-side. (proablly in [[special:preferences]] I would assume).
Precisely.
Brianna Laugher wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
It's an RFE... ideally, you want the images in the gallery to not be loaded. If you don't care about actually loading the images (you just want them to disappear):
addOnloadHook( function () { if(wgCanonicalNamespace == "Category") // or wgNamespaceNumber == 14 { for(var id in document.getElementsByTagName("div")) { if(document.getElementsByTagName("div")[id].className == "thumb") { document.getElementsByTagName("div")[id].style.display = "none"; } } // refresh the footer document.getElementById("footer").style.display = "none"; document.getElementById("footer").style.display = ""; } }
Tested via a javascript console in Firefox 2.0, using Monobook. Should work if you put it in monobook.js but I haven't actually tested it.
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
It's an RFE... ideally, you want the images in the gallery to not be loaded. If you don't care about actually loading the images (you just want them to disappear):
addOnloadHook( function () { if(wgCanonicalNamespace == "Category") // or wgNamespaceNumber == 14 { for(var id in document.getElementsByTagName("div")) { if(document.getElementsByTagName("div")[id].className == "thumb") { document.getElementsByTagName("div")[id].style.display = "none"; } } // refresh the footer document.getElementById("footer").style.display = "none"; document.getElementById("footer").style.display = ""; } }
Tested via a javascript console in Firefox 2.0, using Monobook. Should work if you put it in monobook.js but I haven't actually tested it.
Needs another closing ")" .
It stops the images in categories from loading, but it doesn't actually display them as if you had put __NOGALLERY__ there. The difference being that with NOGALLERY you can see the full filename. Here they are still truncated: "20030702 2 July 2003..."
But anyway, nice. I put it here: http://commons.wikimedia.org/wiki/MediaWiki:Nocategoryimages.js
I also created a category:User scripts. If anyone else has some nifty Javscript for Commons feel free to add it to this category.
I must say I really like the method of creating extra MediaWiki pages and then getting users to 'include' them in their own Javascript files. It is possibly not the best-scaling solution ever, but it is so much neater than copying a trillion different versions of code around.
Brianna
Would #mw-category-media .thumb { display: none; } in monobook.css do the trick?
Bryan
On 11/19/06, Brianna Laugher brianna.laugher@gmail.com wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
On 19/11/06, Alphax (Wikipedia email) alphasigmax@gmail.com wrote:
Brianna Laugher wrote:
Hello,
I was wondering if anyone could either write user Javascript to do this, or tell me if it's possible.
Have it so that every Category: page inserts __NOGALLERY__ for that user, ie. they see text links instead of images, when they look at categories.
It would probably be a lot more useful if there was a way to turn it off again at specific times for specific categories, eg. if there was a link somewhere like 'view this category' (what everyone else is doing by default)
Any thoughts?
__NOGALLERY__ is server-side. File a bug.
File a bug?? How is it a MediaWiki bug? I'm pretty sure the reply will come back 'just set your browser preference to stop loading images'.
It's an RFE... ideally, you want the images in the gallery to not be loaded. If you don't care about actually loading the images (you just want them to disappear):
addOnloadHook( function () { if(wgCanonicalNamespace == "Category") // or wgNamespaceNumber == 14 { for(var id in document.getElementsByTagName("div")) { if(document.getElementsByTagName("div")[id].className == "thumb") { document.getElementsByTagName("div")[id].style.display = "none"; } } // refresh the footer document.getElementById("footer").style.display = "none"; document.getElementById("footer").style.display = ""; } }
Tested via a javascript console in Firefox 2.0, using Monobook. Should work if you put it in monobook.js but I haven't actually tested it.
Needs another closing ")" .
It stops the images in categories from loading, but it doesn't actually display them as if you had put __NOGALLERY__ there. The difference being that with NOGALLERY you can see the full filename. Here they are still truncated: "20030702 2 July 2003..."
But anyway, nice. I put it here: http://commons.wikimedia.org/wiki/MediaWiki:Nocategoryimages.js
I also created a category:User scripts. If anyone else has some nifty Javscript for Commons feel free to add it to this category.
I must say I really like the method of creating extra MediaWiki pages and then getting users to 'include' them in their own Javascript files. It is possibly not the best-scaling solution ever, but it is so much neater than copying a trillion different versions of code around.
Brianna _______________________________________________ Commons-l mailing list Commons-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/commons-l
Bryan Tong Minh wrote:
Would #mw-category-media .thumb { display: none; } in monobook.css do the trick?
Probably, but she asked for a JS solution, not a CSS one ;) However, it still doesn't fix the filenames problem; to /properly/ fix it would require either a server-side change (via preferences) or some sort of custom rendering pulling the raw data from query.php via AJAX and then parsing and displaying it.
Bryan Tong Minh wrote:
Would #mw-category-media .thumb { display: none; } in monobook.css do the trick?
Probably, but she asked for a JS solution, not a CSS one ;) However, it still doesn't fix the filenames problem; to /properly/ fix it would require either a server-side change (via preferences) or some sort of custom rendering pulling the raw data from query.php via AJAX and then parsing and displaying it.
What about using CatScan for this task?
http://tools.wikimedia.de/~daniel/WikiSense/CategoryIntersect.php?wikifam=co...
Best regards,
Flo
Couldn't you just use information in the title attribute of the link, to the image to find its name, then alphabetize it? (Note I can't really do anything beyond hello world in js, so anything I say may be impossible/etc)
-bawolff
On 11/19/06, Florian Straub flominator@gmx.net wrote:
Bryan Tong Minh wrote:
Would #mw-category-media .thumb { display: none; } in monobook.css do the trick?
Probably, but she asked for a JS solution, not a CSS one ;) However, it still doesn't fix the filenames problem; to /properly/ fix it would require either a server-side change (via preferences) or some sort of custom rendering pulling the raw data from query.php via AJAX and then parsing and displaying it.
What about using CatScan for this task?
http://tools.wikimedia.de/~daniel/WikiSense/CategoryIntersect.php?wikifam=co...
Best regards,
Flo
Commons-l mailing list Commons-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/commons-l
--