HTML and external images

Jump to: navigation, search

I have a problem when using the <html> within mediawiki after allowing it in the LocalSettings.php. When integrating this tag with templates, they don't seem to be working at all (as if they are bypassed by <nowiki></nowiki>). An example of this is:

<HTML>
{{extImage|src="external path"|width="width"}}
</HTML>

Is there a way to make such facility?

Almuhammedi17:04, 18 June 2011

I think I've got a temporary solution, using:

{{subst:extImage|src="external path"|width="width"}}

Thanks and if someone can find a better way, please let me know.

Almuhammedi23:56, 18 June 2011

You can do

{{#tag:html|{{extImage|src="external path"|width="width"}}}}


(This will transclude the template and maybe some magic words, but wikitext will still not be interpreted)

Bawolff06:12, 19 June 2011

Thanks a lot :). With the idea you've provided, I could now make the template directly by implementing the #tag: within the template itself.

Another question regarding $wgAllowExternalImages. Why can't I use it within the <IMG> tag so I can resize? The only chance is either to enable HTML (which is insecure) or make my own extension (Indeed I did the last with a new tag named <image>).

Almuhammedi09:02, 19 June 2011

yeah, the whole external image thing is kind of ugly (It also doesn't let you include images without an extension). More recent mediawiki has the manual:$wgAllowImageTag to allow <img>...</img>.

Bawolff21:53, 19 June 2011
 
 
 
 
Personal tools

Variants
Actions
Navigation
Support
Download
Development
Communication
Toolbox