Mailing List Archive

How do I set an image thumbnail for a non image file (e.g. excel spread sheet)?
All,

I run a corporate intranet Wiki. It's replacing an ageing Twiki install.
Currently I have set MediaWiki to accept file types of doc, xls, vsd, mdb
etc.

However when I refer to a non image file like:

[[image:plan.doc|Plan for making plans]]

The link appears as a broken link -- e.g. displays the Red "X" and the Alt
Text (although clicking the link actually does link to the correct file).

Right now I'm making pages like this:


== Project to save the world ==

[[image:process_flow.vsd|How to save the world - process flow]]

[[image:role.doc|How to define your role in saving the world]]

[[image:cost.xls|Current Budget for Saving the world]]



<b> Editors note, please go ahead and click the above links. They appear to
be broken but are not. </b>

Now I do have small .gif files for each file type (e.g. the little green X
for excel sheets) but cannot figure out how to get MediaWiki to display the
correct generic thumb nail.


Any help would be appreciated!!


Sam Stern
Baltimore, MD, USA
RE: How do I set an image thumbnail for a non image file(e.g. excel spread sheet)? [ In reply to ]
> -----Original Message-----
> From: mediawiki-l-bounces@Wikimedia.org
> [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Sam Stern
> Sent: Friday, November 05, 2004 03:46 AM
> To: mediawiki-l@Wikimedia.org
> Subject: [Mediawiki-l] How do I set an image thumbnail for a
> non image file(e.g. excel spread sheet)?
>
> All,
>
> I run a corporate intranet Wiki. It's replacing an ageing
> Twiki install.
> Currently I have set MediaWiki to accept file types of doc,
> xls, vsd, mdb
> etc.
>
> However when I refer to a non image file like:
>
> [[image:plan.doc|Plan for making plans]]
>

All,

I've figured a work around for this.

If one uses:

[[media:plan.doc|Plan for Making Plans]]


One gets a link to the document in question. While it lacks an icon it works
well enough.


Thanks for your time!

Sam S.
Re: How do I set an image thumbnail for a non image file (e.g. excel spread sheet)? [ In reply to ]
I believe that the Image namespace only works correctly with straight
web-image files (gif, png, jpg). You may want to use the Media
namespace insted. eg,

== Project to save the world ==

[Media:process_flow.vsd|How to save the world - process flow]]

[[Media:role.doc|How to define your role in saving the world]]

[[Media:cost.xls|Current Budget for Saving the world]]

This causes MediaWiki to treat them much differently.

On Fri, 5 Nov 2004 03:46:06 -0500, Sam Stern <samstern@samstern.net> wrote:
> All,
>
> I run a corporate intranet Wiki. It's replacing an ageing Twiki install.
> Currently I have set MediaWiki to accept file types of doc, xls, vsd, mdb
> etc.
>
> However when I refer to a non image file like:
>
> [[image:plan.doc|Plan for making plans]]
>
> The link appears as a broken link -- e.g. displays the Red "X" and the Alt
> Text (although clicking the link actually does link to the correct file).
>
> Right now I'm making pages like this:
>
> == Project to save the world ==
>
> [[image:process_flow.vsd|How to save the world - process flow]]
>
> [[image:role.doc|How to define your role in saving the world]]
>
> [[image:cost.xls|Current Budget for Saving the world]]
>
> <b> Editors note, please go ahead and click the above links. They appear to
> be broken but are not. </b>
>
> Now I do have small .gif files for each file type (e.g. the little green X
> for excel sheets) but cannot figure out how to get MediaWiki to display the
> correct generic thumb nail.
>
> Any help would be appreciated!!
>
> Sam Stern
> Baltimore, MD, USA
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>


-- Jamie
-------------------------------------------------------------------
http://endeavour.zapto.org/astro73/
Thank you to JosephM for inviting me to Gmail!
Re: How do I set an image thumbnail for a non image file (e.g. excel spread sheet)? [ In reply to ]
On Fri, 5 Nov 2004 15:38:06 -0500, Jamie Bliss <astronouth7303@gmail.com> wrote:
> I believe that the Image namespace only works correctly with straight
> web-image files (gif, png, jpg). You may want to use the Media
> namespace insted.

Yes, [[Image:Foo]] doesn't do anything with thumbnails, it just
generates the HTML to include that picture at that position. So if you
give it a .xls file or whatever, the user's browser will request that
file, and try to display it in the middle of the page (obviously, not
what you want).

Using [[Media:Foo]] instead will create a link directly to the file in
question; or, if you want to use the image description pages (which,
again, are only really designed to work with images, so may look a bit
odd), you can use [[:Image:Foo]] - the leading ":" turns it into a
textual link to the description, rather than including the image.

As for making a "thumbnail" that looks like the standard .xls icon,
there isn't currently a way to do this; but there is a planned feature
to let users specify a manually generated thumbnail, so you might with
the next version of the software be able to use something like
[[Image:Foo.xls|thumb=xlsicon.png|Spreadsheet showing really
fascinating stuff]]. Still rather hacky, and the "image description"
page will still look weird, but it would probably look how you're
expecting on the page.

Perhaps while we're thinking about better multimedia support (e.g.
sounds, videos) we should think about building a more generic
file-upload system? [see http://meta.wikimedia.org/Multimedia for the
current discussion]

--
Rowan Collins BSc
[IMSoP]
Re: How do I set an image thumbnail for a non image file (e.g. excel spread sheet)? [ In reply to ]
Hi there,

Can't templates help here?
"Still rather hacky" approach:
Using what was said, you could make a template for each of the file
types you want and then use them as above. For instance, to make a
thumbnail to openoffice sxc files, "Template:sxc" would be the single
line:
[[Image:sxc.jpg|left|thumb]] [Media:{{{1}}}|{{{2}}}]

Where 'sxcjpg' is the file at the wiki containing the thumbnail you
want for the sxc file.
Then you could just state (anywhere in another page):
{{sxc|filename.sxc|desciption of the file}}

Right? I think it would work. The only problem I see is that the
[[Image:]] thing would create a link to the sxc.jpg thumb file... but
maybe there is a way to override that, is there?

Roberto.

On Sat, 6 Nov 2004 13:47:42 +0000, Rowan Collins
<rowan.collins@gmail.com> wrote:
> On Fri, 5 Nov 2004 15:38:06 -0500, Jamie Bliss <astronouth7303@gmail.com> wrote:
> > I believe that the Image namespace only works correctly with straight
> > web-image files (gif, png, jpg). You may want to use the Media
> > namespace insted.
>
> Yes, [[Image:Foo]] doesn't do anything with thumbnails, it just
> generates the HTML to include that picture at that position. So if you
> give it a .xls file or whatever, the user's browser will request that
> file, and try to display it in the middle of the page (obviously, not
> what you want).
>
> Using [[Media:Foo]] instead will create a link directly to the file in
> question; or, if you want to use the image description pages (which,
> again, are only really designed to work with images, so may look a bit
> odd), you can use [[:Image:Foo]] - the leading ":" turns it into a
> textual link to the description, rather than including the image.
>
> As for making a "thumbnail" that looks like the standard .xls icon,
> there isn't currently a way to do this; but there is a planned feature
> to let users specify a manually generated thumbnail, so you might with
> the next version of the software be able to use something like
> [[Image:Foo.xls|thumb=xlsicon.png|Spreadsheet showing really
> fascinating stuff]]. Still rather hacky, and the "image description"
> page will still look weird, but it would probably look how you're
> expecting on the page.
>
> Perhaps while we're thinking about better multimedia support (e.g.
> sounds, videos) we should think about building a more generic
> file-upload system? [see http://meta.wikimedia.org/Multimedia for the
> current discussion]
>
> --
> Rowan Collins BSc
> [IMSoP]
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l@Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
Re: How do I set an image thumbnail for a non image file (e.g. excel spread sheet)? [ In reply to ]
On Sat, 6 Nov 2004 22:28:54 -0200, Roberto Winter <rhwinter@gmail.com> wrote:
> Right? I think it would work. The only problem I see is that the
> [[Image:]] thing would create a link to the sxc.jpg thumb file... but
> maybe there is a way to override that, is there?

Not yet. See http://bugzilla.wikimedia.org/539 - I must get round to
finishing off that patch...

--
Rowan Collins BSc
[IMSoP]