Bin Hu wrote:
Can anyone tell me how to include svg in mediawiki?
I wrote some hook function to process a special markup, which returns
something like this:
$svg = '<div><object data="images/test.svg" width=100%
In the page view this code brings me to the new page: Images/test.svg
test.svg does exist in images directory. I guess the path in PHP is
incorrect? Can anyone point me out the error I made? Thanks.
You probably are accessing it from /wiki/Article, so image/text.svg is
treated as relative, ie: /wiki/image/text.svg which is article
If your $wgScriptPath is "/w" you want to link to /w/images/test.svg
Not being absolute to the server root only causes headaches (think in