MediaWiki talk:Gadget-PrettyLog.js/Archive01

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

New gadget

Did you ever want to see on a log page the images listed as uploaded? MediaWiki by default just shows the (linked) filename...

Enter MediaWiki:Gadget-PrettyLog.js. Activating this gadget gives the log pages a layout similar to that of the search result pages, including small image thumbnails! If you also have MediaWiki:Gadget-GalleryDetails.js activated, you can then even get extended information on the images.

Tested so far only on Firefox 3 and IE 6. Please report any problems here, stating which browser and skin you're using, and on which page exactly the problem occurred. Lupo 15:42, 27 January 2009 (UTC)

IE 6 seems to have some troubles when loading this script initially. I had to force reloads several times and even clear the "temporary internet files" to get it to finally load and run this. I hope nobody but me still uses IE 6... even I only have it around for testing.) Lupo 15:42, 27 January 2009 (UTC)
Before I start playing around with it... how different is it from Special:NewFiles? Giggy (talk) 14:17, 28 January 2009 (UTC)
It works on log pages, not on Special:Newfiles. On all log pages, including user-specific logs. AFAIK, we have no easy way to view all uploads of a user, do we? (Except the external gallery tool...) For instance, it works on Special:Log/Gframesch. To preview it without activating the gadget, use e.g. this link. Lupo 14:26, 28 January 2009 (UTC)

GIF thumbnails

Unlike other file types GIF thumbnails are not displayed (example). --Leyo 15:06, 17 April 2010 (UTC)

Rewritten, testing needed

I have a new, mostly rewritten version of this script here. The new version uses the prop=imageinfo API query, and is based on my FFD/PUF/DR thumbnails script from enwiki. The new version correctly shows thumbnails for GIF images (see above) and for all other file types MediaWiki can thumbnail. It's also noticeably faster and uses less CPU, since it doesn't need to compute MD5 hashes in JavaScript. Finally, it should run correctly out of the box on pretty much any MediaWiki installation that has the API enabled, whereas the old version contained all sorts of Wikimedia- and Commons-specific tweaks.

Before deploying the new version globally, though, I'd like some help in testing it. To try it out, make sure you have (the current version of) the PrettyLog gadget turned off in your preferences, edit your vector.js page (or, if you use some other skin, your custom JS page for that skin) and add the following line to it:

importScript('User:Ilmari Karonen/prettylog.js');

After saving, clear your cache, go look at some logs and report the results here. If you find any major bugs, let me know on my talk page. In particular, I'd like help with cross-browser testing, especially on IE, Safari and Chrome. I've tested the script myself on Firefox, Opera and Konqueror and it seems to work on those. Also, testing with unusual skin / language / file type / etc. combinations would be appreciated.

(I already found one minor bug that I'll try to fix in a moment: padlock icons appear next to the images when using the secure server on Konqueror. Presumably that'll need a CSS tweak to fix.)

Ilmari Karonen (talk) 21:44, 24 April 2010 (UTC)

Actually, I managed to do some more testing myself, and I'm now fairly sure that the rewritten version indeed works on all (modern, graphical, JS-enabled) browsers, skins and languages. Thus, I've replaced the existing code with it. If you do manage to find some bugs in it, though, please let me know ASAP. —Ilmari Karonen (talk) 06:42, 25 April 2010 (UTC)

I updated the gadget in de-WP with the new version. MD5.js can be deleted now, can't it? --Leyo 22:05, 25 April 2010 (UTC)

If nothing else is using it on dewiki, yes. The version on Commons is used by quite a few scripts, perhaps the most notable being MediaWiki:QuickModify.js. —Ilmari Karonen (talk) 13:02, 26 April 2010 (UTC)

I suggested enabling PrettyLog as a Gadget in en.wikipedia. --Leyo 10:42, 9 November 2010 (UTC)

I have now added it as a gadget. --Leyo 17:21, 5 January 2011 (UTC)

Does to recent change need to be implemented in en.wikipedia and de.wikipedia, too? If yes, in the exactly same way? --Leyo 00:21, 19 January 2012 (UTC)

I just tried to make it RL and JSHint compatible and get rid of importScriptURI/jsonp. As long as it works on en/de you do not have to update. But if you do, please also update the according line at MediaWiki:Gadgets-definition. -- RE rillke questions? 21:58, 19 January 2012 (UTC)

IE5 is needed

Yes, web programs, scripts, and pages do need compatibility with IE5, because this is what is installed by default on some versions of Windows XP, and also seen non-obscurely in businesses, computer rooms at apartment complexes, etc.

Also, the version for Firefox 11+ or 20+ will be needed, because some people use that.                     ~Rayvn  21:15, 12 May 2015 (UTC)

Are you kidding? IE 5 was released in 1999! --Leyo 11:02, 13 May 2015 (UTC)
You are free to develop your own user script. In case an old revision was compatible, please feel free to copy that. -- Rillke(q?) 19:28, 13 May 2015 (UTC)