In the 1.8.2 release on the Specialpage 'Gallery of new files', I have a nice icon for pdf files, but doc, ppt, ....are blank images.
The link to the files works just fine, but I would like to define an icon for those file types.
How would I set that value?
Andy
for PDF add this to MediaWiki:Commons.css in your wiki changing "FULL URL OF IMAGE" to the actually URL of the image file (not the image page) including the http:// part.
#bodyContent a[href$=".pdf"].external, #bodyContent a[href*=".pdf?"].external, #bodyContent a[href*=".pdf#"].external, #bodyContent a[href$=".PDF"].external, #bodyContent a[href*=".PDF?"].external, #bodyContent a[href*=".PDF#"].external { background: url(FULL URL OF IMAGE ) center right no-repeat;padding-right: 16px;}
for doc, simply change all occurrences of pdf to the extension of your choice (in exactly the same capitalisation used previously). Continue doing this for all of them.
After doing so you may need to purge the MediaWiki:Common.css by adding "?action=purge" to the end of the title.
Hope that helps.
On 18/10/06, Mr Scsi mrscsi@gmail.com wrote:
In the 1.8.2 release on the Specialpage 'Gallery of new files', I have a nice icon for pdf files, but doc, ppt, ....are blank images.
The link to the files works just fine, but I would like to define an icon for those file types.
How would I set that value?
Andy _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Robert Leverington wrote:
for PDF add this to MediaWiki:Commons.css in your wiki changing "FULL URL OF IMAGE" to the actually URL of the image file (not the image page) including the http:// part.
[snip]
These directions would be for changing the little icon that appears after inline URL links, should one want to do that.
-- brion vibber (brion @ pobox.com)
Mr Scsi wrote:
In the 1.8.2 release on the Specialpage 'Gallery of new files', I have a nice icon for pdf files, but doc, ppt, ....are blank images.
The link to the files works just fine, but I would like to define an icon for those file types.
You'll see some .PNG images in skins/common/images/icons; make up appropriately-sized pictures and drop them in there named fileicon-doc.png, etc.
You may have to purge the cache of existing pages to force them to re-render with the icons.
-- brion vibber (brion @ pobox.com)
Brion Vibber a écrit :
Mr Scsi wrote:
In the 1.8.2 release on the Specialpage 'Gallery of new files', I have a nice icon for pdf files, but doc, ppt, ....are blank images.
The link to the files works just fine, but I would like to define an icon for those file types.
You'll see some .PNG images in skins/common/images/icons; make up appropriately-sized pictures and drop them in there named fileicon-doc.png, etc.
You may have to purge the cache of existing pages to force them to re-render with the icons.
-- brion vibber (brion @ pobox.com)
I had to modify the $wgTrustedMediaFormats array in Localsettings.php because some icon seem not to display if the format is not "trusted" (I don't know why)
for instance, the icon appears for .pdf files, but not for .txt, so I added text/plain to the $wgTrustedMediaFormats array and it works.
but I'd like to know whether it's dangerous to change this list of trusted formats ? (I added "text/plain" (.txt files) and "application/vnd.ms-powerpoint" (.ppt files) in the list)
Alexis Moinet a écrit :
I had to modify the $wgTrustedMediaFormats array in Localsettings.php because some icon seem not to display if the format is not "trusted" (I don't know why)
One precision : the Special:Newimages page works perfectly (all the icons are displayed),
what I'm talking about are the small icons (+ hyperlink) displayed (or not displayed for "unsafe" files) on the page Image:nameofimage.
Is it possible to have an image without the hyperlink for untrusted files ?
mediawiki-l@lists.wikimedia.org