Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternate URL for wikipedia commons page? Looks like an image file - breaks lightbox

Is there an alternate way to link to wikipedia commons pages with more traditional URLs?

When I set the href link on a lightbox image to be an external site page it's happy, unless the URL of that external page looks like an image (ends in '.jpg') - in which case the lightbox tries to load the image and breaks.

Wikipedia commons image pages act as pages, not images. I want to link to the page but the page URL ends with ".jpg" so lightbox is trying to load the page as an image.

Eg: http://commons.wikimedia.org/wiki/File:Giant_Haasts_eagle_attacking_New_Zealand_moa.jpg

I have searched but can't find any help on this.

like image 289
user1527738 Avatar asked Nov 13 '22 02:11

user1527738


1 Answers

I fooled around a little with the links on that page to see what they linked to...

Clicking on the "Discussion" tab at the top took me to this URL...

http://commons.wikimedia.org/w/index.php?title=File_talk:Giant_Haasts_eagle_attacking_New_Zealand_moa.jpg&action=edit&redlink=1

I tryed to play around with this URL a little...

  • I changes the "File_talk" string to "File"
  • I removed the "action" and "redlink" parameters

And Voila! An alternate URL that seems to work for the page you desire...

http://commons.wikimedia.org/w/index.php?title=File:Giant_Haasts_eagle_attacking_New_Zealand_moa.jpg

like image 121
Jesse Webb Avatar answered Dec 15 '22 15:12

Jesse Webb