Revision [17569]

This is an old revision of AddingImages made by AndreasHeintze on 2007-10-01 10:38:26.

 

WikkaDocumentation Wikka Documentation

Adding images


To place images on a Wikka page you can use the {{image}} action.
It accepts the following (optional) parameters:

Example
{{image class="center" alt="DVD logo" title="An Image Link" url="images/dvdvideo.gif" link="RecentChanges"}}
DVD logo


A suggestion:
If you want to be able to access uploaded images easier and use interwiki:
Example
{{image url="dvdvideo.gif"}}
{{image url="File:dvdvideo.gif"}}

Add this to image.php in the actions folder (after $url = $this->cleanUrl(trim($vars['url'])); ):
  1. // if no URL, only image name
  2. if (preg_match("/^[0-9A-Za-zÅÄÖÜßåäöü\-\_]+\.(jpg|jpeg|png|gif)$/i", $url))
  3. {
  4.     $url = '/wikka/uploads/' . $this->GetPageTag() . '/' . $url;
  5. }
  6. // is this an interwiki link?
  7. else if (preg_match("/^([A-ZÅÄÖÜ][A-Za-zÅÄÖÜßåäöü]+)[:](\S*)$/", $url, $matches))  # before the : should be a WikiName; anything after can be (nearly) anything that's allowed in a URL
  8. {
  9.     $url = $this->GetInterWikiUrl($matches[1], $matches[2]);
  10. }


Feel free to add this to the standard code base.
/AndreasHeintze

Inline images

Before version 1.1.6.2 it was possible to use inline images. This method has been disabled because of not being accessible.

 



CategoryDocumentation
There are 19 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki