Extension talk:ImageLink/Archive 1

quality (CLOSED)
if i use   and    for a 370px x 560px image, than is the quality with imagelink worse. -- a user 22:39, 4 August 2007 (UTC)
 * The extension does not modify the parameters; it just passes them to the HTML element. So, it is not the extension's fault. Jean-Lou Dupont 23:52, 4 August 2007 (UTC)
 * Is there a way to force the extension to scale down the image as usually done by MediaWiki? If I use thumb|200px MediaWiki creates a thumb-image so that the user doesn't have to download the whole image, but only the thumb. That doesn't work with the extension. Those small images cost less bandwidth & look nicer --217.233.218.140 18:13, 20 September 2007 (UTC)
 * No. Jean-Lou Dupont 19:14, 20 September 2007 (UTC)
 * Ok, thank you anyway :) -- same Person as previous IP 217.233.253.76 17:37, 21 September 2007 (UTC)

_imagelink_ tags left in final page (RESolved)
Maybe I'm doing something wrong, but I can't quite get this extension to work. I've grabbed both StubManager.php and this extension's files from SVN (r723); they're installed (MediaWiki 1.10.0) and show up properly in Special:Version, but the extension doesn't work. For example, the following



will lead to this in the output:



Curiously, specifying a non-existant image will cause a  to be rendered instead (not that that really matters).

So... um, help? c.c I have no idea what could be going wrong here or how I should go about fixing it. Thanks! -- Schneelocke 20:50, 30 August 2007 (UTC)
 * the second argument must be a valid wiki page e.g. Category:Extension. In the example you gave above, you specified a URI address; this will not work. Jean-Lou Dupont 22:48, 30 August 2007 (UTC)


 * Ah, yeah - I misunderstood the "distinguish between local and interwiki URI" part last night. Blame it on it being too late in my timezone. ^_~ Nevertheless, that being said, the same thing happens with a local page, too; and FWIW, http://www.example.com could be the name of a local page, anyway (e.g. ). -- Schneelocke 08:08, 31 August 2007 (UTC)

I have the same problem. First i updated to Stubmanager 1.0.2 and ImageLink extension 1.0 revision 545 but i get
 * . Thanks for your hints.
 * Could you upgrade to the latest versions of both, please, before we proceed further. Thanks. Jean-Lou Dupont 19:33, 12 October 2007 (UTC)
 * Thanks for you help Jean-Lou, but i have already the lastest version from yesterday. This my first try ;-).

Problem with MediaWiki 1.10.2 (RESOLVED)
Firstly, thanks for the extension. It's hard to use MW as a CMS without being able to link images in this way. Unfortunately I haven't been able to get it to work with my setup. The wikitext i'm using is:
 * MediaWiki 1.10.2.
 * ImageLink.php 642 2007-08-10 15:35:54Z jeanlou.dupont
 * StubManager.php 730 2007-09-07 19:39:06Z JeanLou.Dupont

But the page outputs this code in plain text with no image generated:

Special:Version tells me that the hooks are installed. --Rob 21:59, 2 October 2007 (UTC)
 * Could you try fetching the latest version of both extensions from the SVN before we proceed further? Jean-Lou Dupont 22:34, 2 October 2007 (UTC)
 * The latest svn fixed it. Thanks for your support. --Rob 00:25, 3 October 2007 (UTC)

SVG support
Looks like imagelink does not support svg images at this stage? --Rob 00:31, 8 October 2007 (UTC)
 * If you are referring to the capability to define an SVG image 'on-the-fly' (i.e. ellipse, rect etc. elements), then I am not planning to do so. Sorry. Jean-Lou Dupont 11:22, 8 October 2007 (UTC)

Getting an error (CLOSED)
Getting this at the top of every page: Notice: Undefined variable: aClass in C:\www\webapps\mediawiki\extensions\ImageLink\ImageLink.body.php on line 283
 * You downloaded the trunk version not an actual tag. I am in the process of adding some features in the trunk and a release is pending. Please use PEAR, that's all the best bet. Jean-Lou Dupont 12:36, 2 April 2008 (UTC)

Using Mediawiki 1.12.0 SubManager 1.2.0 ImageLink downloaded from SVN on April 2nd 2008


 * You should use the newer parser function too. Jean-Lou Dupont 12:38, 2 April 2008 (UTC)

Do you have to specify image dimensions?
 * ?Jean-Lou Dupont 12:38, 2 April 2008 (UTC)


 * All sorted now. Thanks for your fast response Jean-Lou.
 * Mitchelln 9:38, 3 April 2008 (UTC)

Getting no alternate title text (CLOSED)
I have the following:

I get the clickable image, but the alternate title text is not displayed. Any ideas? Thanks.


 * Mitchelln11:31, 3 April 2008 (UTC)
 * alt=xyz Jean-Lou Dupont 10:30, 3 April 2008 (UTC)


 * Hmm, still nothing. Perhaps I am expecting something it does not do. I want the image (in my case an icon) and
 * then text next to it. For example:


 * to give me a left arrow icon and the text "Previous Page" next to it.
 * Mitchelln11:51, 3 April 2008 (UTC)
 * Then you are definitely correct: you are looking for functionality that ImageLink does not provide... but standard wikitext does ;-) Just slap your text next to the #img. Jean-Lou Dupont 12:41, 3 April 2008 (UTC)
 * Yeah, but then clicking on the icon image takes you to the icon's Image: page and the text link takes you to the page you want. I'm merely using the icon image to make the page look cooler. Anyway, thanks for clarifying and your other help Jean-Lou.
 * Mitchelln 11:21, 4 April 2008 (UTC)
 * The new version addresses this issue with the content parameter. Jean-Lou Dupont 10:59, 4 April 2008 (UTC)
 * Wow. How helpful. Thanks very much Jean-Lou. That is fantastic. One tiny tweak, I suggest adding a space character on line 291 - $anchor_close = " $content"; Just looks a bit nicer with the text spaced slightly away from the image.
 * Mitchelln 13:03, 4 April 2008 (UTC)
 * Thanks! Added in trunk, will get released at some point ;-) Jean-Lou Dupont 12:53, 4 April 2008 (UTC)
 * My pleasure. I love the new #iconlink functionality by the way. That is very nice.
 * Mitchelln 13:57, 4 April 2008 (UTC)
 * Mitchelln 13:57, 4 April 2008 (UTC)

Support for external links (RESOLVED)
Would it be possible to have support for external links? To be safe you could have an option like ImageMap e.g. $wgImageLinkAllowExternalLinks = true;

I want to be able to link to another tool that is hosted on the server. Example:

Thanks! Mitchelln 14:44, 6 May 2008 (UTC)
 * Haven't you used the interwiki linking capability of the extension? Jean-Lou Dupont 14:28, 6 May 2008 (UTC)
 * Thanks for getting back so fast. Doesn't the interwiki functionality just allow me to link to an image on another site? I want the page= link to work with the non wiki site. In the above example I've got phpBB3 running on the same server. I want to be able to link to the phpBB3 instance from a mediawiki page. The image for the link is within mediawiki. Thanks!
 * Mitchelln 16:58, 6 May 2008 (UTC)
 * You can still define an interwiki link prefix for your server e.g. server:/phpBB3. Have you tried it? Jean-Lou Dupont 16:31, 6 May 2008 (UTC)
 * I just get an error - ImageLink: target page does not exist. I must be doing something wrong, but I can't see what it is. Mitchelln 11:14, 7 May 2008 (UTC)
 * You did define an interwiki link, didn't you? I just tried it on my site and it works. I defined the interwiki link server as jldupont.com/$1 and placed . Jean-Lou Dupont 10:43, 7 May 2008 (UTC)
 * Ah! That's got it. Many thanks Jean-Lou! Mitchelln 13:01, 7 May 2008 (UTC)

Open in new Tab (CLOSED)
Would it be possible to have the functionality to open a link in a new browser tab? Thanks! Mitchelln 12:00, 16 May 2008 (UTC)
 * See the additional details I have added to the base page. Jean-Lou Dupont 11:54, 16 May 2008 (UTC)
 * Thanks Jean-Lou! That's perfect. Mitchelln 14:29, 27 May 2008 (UTC)

Two imagelinks on the same line
I'm probably doing somethign stupid, but I cannot get two imagelinks on the same line. I have:

and the two imagelinks are on two lines, one above the other. I want them next to each other as they are performing a previous page, next page function. Also, I've noticed that I get a lot of whitespace above imagelinks. If they are the first item on a page, for example, you get a lot of empty space above the imagelink. Thanks! Mitchelln 14:02, 3rd June 2008 (UTC)
 * Hi - wrap the images in a table to get proper alignment. Unfortunately, the parser puts a  around the imagelink without my consent... Jean-Lou Dupont 13:10, 4 June 2008 (UTC)
 * Ah, Okay. Top tip. Thanks for the lightning fast response Jean-Lou. Mitchelln 14:13, 3rd June 2008 (UTC)
 * I have 4 screens in front of me + self-refreshing 'recentchanges' page in a corner... that helps a lot ;-) Jean-Lou Dupont 13:15, 4 June 2008 (UTC)
 * LOL Mitchelln 14:29, 3rd June 2008 (UTC)
 * Per Help:Newlines_and_spaces's description I somehow managed to use #if to get around the problem (which is part of the ParserFunctions) using a wrapper template containing . I don't understand what's going on there, but it works so whatever. 24.9.113.27 05:16, 5 July 2008 (UTC)

Extension:ImageLink requires Extension:StubManager version >= 1.2.0 [CLOSED]
Hi. I used imagelink v 1.6 and stubmanager v 1.2.0. In Special:Version the two extensions are ok but it's not working. I have this message in left upper corner of my website : Extension:ImageLink requires Extension:StubManager version >= 1.2.0. I have version 1.2.0 but it's not working. What can i do to make the extension to work ?.
 * Make sure you have StubManager required first in LocalSettings.php. Jean-Lou Dupont 14:48, 18 June 2008 (UTC)
 * Imagelink and StubManager are required in localsettings. I went on your website at Special:Version and you have StubManager v. 1.3.0 for imagelink v. 1.6 . I'll try now to see if is working.
 * Is not working :( please visit my website : aochell.com and see the problem. On wowwiki.com, at special:version page you can see they don't use the extension just the "Parser extension tags" and the "extension function" and it's working ... how do i do that ? i really need this extension to work. Please help me. Thx.
 * Strange: Try getting rid of the following lines in ImageLink.php:


 * Jean-Lou Dupont 22:41, 18 June 2008 (UTC)
 * Not working :(. I don't know what to do ... :(
 * Very mysterious... could you send me your LocalSettings.php ? Jean-Lou Dupont 23:58, 18 June 2008 (UTC)
 * I saw your site... need to remove the extra { and } braces too ! Jean-Lou Dupont 00:08, 19 June 2008 (UTC)
 * My LocalSettings.php is : http://www.filebox.ro/download.php?key=590433cb49043e065d9d494a9e9bb826 and i didn't have any { or } in my imagelink.php ... i removed the code you said and i have this error : Fatal error: Class 'StubManager' not found in /home/aochell/public_html/AOCHell/extensions/ImageLink/ImageLink.php on line 18 ...
 * I am looking at your LocalSettings.php ... and you did not follow what I told you right at the beginning: put StubManager require statement ***BEFORE*** the one for ImageLink !!!!!!! Jean-Lou Dupont 10:20, 19 June 2008 (UTC)
 * Ok i did what you said. It's working, no more errors. But practically is not working. If you look at this page : the parser extension tag is not working. In Special:Version i don't have the Parser extension tag   and i don't have wfImageLinkExtension in Extension functions. Maby i have to use other tag ... damn ... Thx a lot for response :) I made it. Thx a lot. Now i want to ask you i can add you on YM, to ask you some questions ... i'll do that only you want. Again, you'r the man.
 * no probs. have fun. Jean-Lou Dupont 12:42, 19 June 2008 (UTC)

Empty lines above imagelinks [RESOLVED]
Hi Jean-Lou.

I seem to be getting at least one empty line above imagelinks in pages. I have navigation imagelinks as the first item at the top of most of my pages and I get this wasted space above the link. Any idea why this is? Thanks Mitchelln 11:39, 2nd July 2008 (UTC)
 * The parser includes a element unconditionally. I can't change that easily i.e. without core code change OR a new HTML injection process in my extension which would require lots of time. In a word: no easy fix. Sorry. Jean-Lou Dupont 10:52, 2 July 2008 (UTC)
 * Okay, thanks for the info Jean-Lou. I have another question. I use the cool headertab extension. The author says I can jump to a specific tab on a page by using Homepage, for example. However, if I try this within an imagelink everything past the # gets dropped. Any idea how I can get round this? Thanks! Mitchelln 11:59, 2nd July 2008 (UTC)
 * This is a result of a limitation in my extension in the way I build the title object. Please add this issue to the project (i.e. googlecode). Thanks. Jean-Lou Dupont 11:12, 2 July 2008 (UTC)

External Links Again
Thank you for all the great extensions, we are using several of them and they are great. We are having trouble using ImageLink to link to outside pages. We went through you information above, but still nothing Using Mediawiki 1.12.0, Stubmanager 1.3 and LinkImage 1.6, we still get "target page does not exist" when trying to link to external pages (or sites). The interwiki links are working, in this case.

Main Page jcgray:index.html But when trying to link images to them using #img

we get the error. Do you think this could be a problem with 1.12? Is there a way to turn off the validation to keep testing?

Thanks, --Jeff.worldwide 17:57, 14 July 2008 (UTC)
 * Hi - Thanks for the praise. Are your interwiki links settings local ? The local bit must be 0. Please advise. Jean-Lou Dupont 18:33, 14 July 2008 (UTC)

imagelink in table
Great extension and it works fine when you just use it in the text! However, the extension will increase the row width of that specific row in a table as it adds  html stuff around the link. Is their a way to get rid of the   wrapper? Thanks, --Albert Ke 01:08, 14 August 2008 (UTC)
 * I browsed around a bit and found another extension that does the job: LinkedImage, so no need to spend any time on the above problem. Cheers, --Albert Ke 20:30, 23 August 2008 (UTC)

MediaWiki 1.13.2
Can't see parser extension tag and wfImageLinkExtension in Extension functions, but in LocalSettings.php:

What wrong? :( 77.222.124.28 22:40, 19 October 2008 (UTC)
 * Nothing is wrong; just have fun browsing through the PHP code behind the extension. Jean-Lou Dupont 00:50, 20 October 2008 (UTC)

Resizing doesnt resample in Internet Explorer (boxy image)
When I resize the image, it doesnt generate a new resampled image. It just uses the original image which in IE comes out as a boxy image. Firefox (the smarter browser) shows it correctly. Screenshot of the difference. At left, what the extension shows. At the right, what a manual resize of the image shows. For now, I will create new images of the size I want and link them resized. --Kenny5 17:00, 24 December 2008 (UTC)
 * Ok I see the issue has been addressed above already in the quality thread. It would have been nice though if resampling was possible. --Kenny5 17:09, 24 December 2008 (UTC)

Inline image links
Is it possible to get an inline image link? The extension automatically adds a newline, even though text and link are all on one line in the editor. (This only happens BEFORE, but not AFTER the link.) --wbeek 16 February 2009

Error when using the Media-namespace
When I use the Media-namespace, e.g., I get the following error: "ImageLink: target page does not exist" -- wbeek 16 February 2009

width,height,alt,title,border = ' ' problem
If you don't specify these attributes, you get a =' ' (NULL) written into the output. Works on most browser but IE will not display the image.. go into ImageLink.body.php and comment out line 180 - 185 // sanitize the input /*		$alt   = htmlspecialchars( $alt ); $width = htmlspecialchars( $width ); $height = htmlspecialchars( $height ); $border = htmlspecialchars( $border ); $title = htmlspecialchars( $title ); */

sanitizing Nulls will force the extension to insert attributes =' ' into the tag.

Install not working, Special Pages killed
I have copied the files I could find under 1.7.1 to extensions, altered the LoacalSettings.php in accordance with instructions but the extension doesn't work and the Special Pages of the wiki don't parse. I have installed StubManager and that seems to work. If I comment out the require_once for ImageLink then I get my Special Pages back. Not willing to install PEAR on the server the wiki resides on. Any suggestions?

Replaced by core functionality
The functionality of this extension has been replaced by core functionality in the MediaWiki software (which was added in version 1.14).

Now you can use the parameter.

e.g:

... gives

Look at: Help:Images

Remove leading line-break
I used this suggestion to remove the  tag around the tag. But I also want to remove the leading line-break as mentioned here, so that I can place the images directly next to each other inline. Is there any way to accomplish that?

Absolute link / external url
I find this extension very useful. I'd just like it to support external url (http:// link) as page parameter.

So in ImageLink.body.php I would add following lines ...

Cchantep 08:21, 6 August 2010 (UTC)

ImageLink broken on 1.19
Fatal error: Call to a member function addMessages on a non-object in /home/mwowiki/public_html/extensions/ImageLink/ImageLink.body.php on line 130

On line 130 - $wgMessageCache->addMessages( self::$msg[$key], $key );

$wgMessageCache is no longer support in any wiki 1.18 and up according to http://www.mediawiki.org/wiki/Manual:$wgMessageCache.