Hello everyone !
I wrote some python scripts outputting images (svg format - I'm using matplotlib). My mediawiki is running on a closed intranet at this url : http://wiki/mediawiki/index.php I can show my image at this url : http://wiki/cgi-bin/my_script.py
So, I wonder how to show this image on a page of the wiki (assuming that I'm a random registered user of the site, that I'm editing some page and that I know the name of the script).
Obviously I can't upload the image -> [[Image:my_script.py]] won't work (as far as I know)
Using an external link works : [http://wiki/cgi-bin/my_script.py] but I don't like to use an hard-coded url as the website url is subject to change. (little question : I'm just seeing the link and not the image, does someone remember the option to set in order to see externally linked images ?)
Finally, Is there any other smarter way to do this ?
Thanks ! :)
Maxime
ps: I apologize for my english (I'm french), feel free to correct my text. pps : I'm using : MediaWiki 1.15.1 PHP 5.3.0 (apache2handler) MySQL 5.1.37-community-log Windows XP Pro
Hi,
2009/9/14 Max virtual.maxime@gmail.com:
Hello everyone !
I wrote some python scripts outputting images (svg format - I'm using matplotlib). My mediawiki is running on a closed intranet at this url : http://wiki/mediawiki/index.php I can show my image at this url : http://wiki/cgi-bin/my_script.py
So, I wonder how to show this image on a page of the wiki (assuming that I'm a random registered user of the site, that I'm editing some page and that I know the name of the script).
Obviously I can't upload the image -> [[Image:my_script.py]] won't work (as far as I know)
Using an external link works : [http://wiki/cgi-bin/my_script.py] but I don't like to use an hard-coded url as the website url is subject to change.
That can be solved by setting up support for inter-wiki links. You define a new interwiki name (like 'genimg') and add the appropriate URL and parameter setting (http://wiki/cgi-bin/$1) to the interwiki table. Links can then be entered like [[genimg:my_script.py]].
(little question : I'm just seeing the link and not the image, does someone remember the option to set in order to see externally linked images ?)
Not sure, but maybe this can then be achieved by enabling inter-wiki transclusion.
Finally, Is there any other smarter way to do this ?
Probably, but then the real experts need to answer you ;-)
Max wrote:
Hello everyone !
I wrote some python scripts outputting images (svg format - I'm using matplotlib). My mediawiki is running on a closed intranet at this url : http://wiki/mediawiki/index.php I can show my image at this url : http://wiki/cgi-bin/my_script.py
So, I wonder how to show this image on a page of the wiki (assuming that I'm a random registered user of the site, that I'm editing some page and that I know the name of the script).
Obviously I can't upload the image -> [[Image:my_script.py]] won't work (as far as I know)
Using an external link works : [http://wiki/cgi-bin/my_script.py] but I don't like to use an hard-coded url as the website url is subject to change. (little question : I'm just seeing the link and not the image, does someone remember the option to set in order to see externally linked images ?)
$wgAllowExternalImages
Finally, Is there any other smarter way to do this ?
Thanks ! :)
Create an extension which will include your script as an image.
Maxime
ps: I apologize for my english (I'm french), feel free to correct my text.
Don't worry. It's fine.
mediawiki-l@lists.wikimedia.org