Forum:(Solved) Allowing external images globally

ShoutWiki — express yourself and be heard!
Jump to navigation Jump to search
Forums: Index > Community help

I would like to know, how to turn the following HTML code, into a working MediaWiki syntax, without uploading the images on my wiki.

<a href=""><img src="" width="192"><img src="" width="192"><img src="" width="192"></a>

Thanks in advance. --MYself (talk) 03:32, 14 November 2013 (UTC)

We won't be enabling this due to the potential for abuse. — LyntonShoutWiki Staff talkemail 03:53, 14 November 2013 (UTC)
So there isn't any workaround for this, that will be safe (except re-uploading the images). --MYself (talk) 04:07, 14 November 2013 (UTC)
You should be able to link to images on external URLs if you add the URL to the mw:MediaWiki:External image whitelist page on your site. You should then be able to link to them using the standard image syntax.--Cook879 ShoutWiki Staff talk 10:28, 14 November 2013 (UTC)
Wasn't this function deprecated in newer MediaWiki versions? In order to use this functionality, am I need to put the images link-by-link on the page, or can I use wildcards, or some sed-like syntax to make the list as short as possible (see my example below)? How can I resize externally linked images using the ? loophole? --MYself (talk) 20:45, 14 November 2013 (UTC)
and not:
The link you give says that the feature has been part of the core MediaWiki since version 1.14. I haven't personally tried, but from what I hear resizing images can't be done with this method (you'd have to upload locally) of course if you find a way I'd love to know. As for how to do it, you have to use regular expressions. There should be many sites online which can help you with this.--Cook879 ShoutWiki Staff talk 23:31, 14 November 2013 (UTC)
I looked for a RegEx pattern that will fit my needs, but was unable to find one. If you can give me some working example, or point me somewhere, I would be grateful. To have a more complete image as to what I would like to accomplish, you can take a look at this page (if all goes well, soon to be migrated to ShoutWiki). --MYself (talk) 00:45, 15 November 2013 (UTC)
Ok so I tested it out and your RegEx doesn't have to get complex at all. Your first example can become blog\.movingblocks\.net -cut out the protocol and image directory, add the backslash before the dots and you're done. Also, it's worth noting to get it displaying the image you just put the URL in without any formatting.--Cook879 ShoutWiki Staff talk 09:33, 15 November 2013 (UTC)
Hmm... maybe I doesn't asked my question the right way, but I wanted to know first, how to define the attached image size, when I add ? to the end of each link, which enables me to show external images on my page, but I doesn't know how to define image width to be 192 pixels.
Example: (this will only act as a link) (this will show a nice big picture)
Is there any hack for this? --MYself (talk) 12:31, 15 November 2013 (UTC)
Honestly, I'm afraid I have no idea - it's not a feature I've used until you asked about it.--Cook879 ShoutWiki Staff talk 21:06, 17 November 2013 (UTC)
Nevermind, I found a solution for this on StackOverflow. Also, I tried whitelisting the web domain names using mw:MediaWiki:External image whitelist, as you suggested. Both worked well, except that I wasn't able to place the images side-by-side, only line-by-line. Furthermore, there is no effective difference between appending the ? line to the end of each link, and whitelisting the webpage first on mw:MediaWiki:External image whitelist.
There is one more thing I would like to try before I abandon this effort (read here). Anyway, thank you for everything. --MYself (talk) 15:24, 18 November 2013 (UTC)