Extension talk:EmbedImg

From MediaWiki.org
Jump to: navigation, search

[edit] mediawiki 1.15.1 error

Hi - I've tried this out on mediawiki 1.15.1 and it works, but it produces an error on the page that only says Error: bad URI in <img>!. Can you tell me how to fix this?

71.32.70.23 21:00, 14 September 2009 (UTC)

Getting the same error. The URI I am using is definately reachable. Does anyone have a suggestion?

Was having the same problem and figured out the solution. Where it currently has:
if (preg_match('/^http\:\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@\?\^\=\%\&:\/\~\+\#]*[\w\-\@\?\^\=\%\&\/\~\+\#])?\.(jpe?g|png|gif)$/', $input)) {
replace with:
if (preg_match('/^http\:\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@\?\^\=\%\&:\/\~\+\#]*[\w\-\@\?\^\=\%\&\/\~\+\#])?\.(jpe?g|png|gif|JPE?G|PNG|GIF|jpg|JPG)$/', $input)) {
This makes it work as intended, which is much better than any other external embed image function I've tried so far!
Mrmerlot 14:12, 8 July 2011 (UTC)
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox