Index: trunk/extensions/RandomImage/RandomImage |
— | — | @@ -1,74 +1,74 @@ |
2 | | -RANDOM IMAGE EXTENSION
|
3 | | -
|
4 | | - Version 1.0
|
5 | | - © 2006 Rob Church
|
6 | | -
|
7 | | -This is free software licenced under the GNU General Public Licence. Please
|
8 | | -see http://www.gnu.org/copyleft/gpl.html for further details, including the
|
9 | | -full text and terms of the licence.
|
10 | | -
|
11 | | -== Overview ==
|
12 | | -
|
13 | | - 1. Introduction
|
14 | | - 2. Requirements
|
15 | | - 3. Installing the extension
|
16 | | - 4. Inserting a random image
|
17 | | - 5. Change log
|
18 | | - 6. Feedback
|
19 | | -
|
20 | | -== 1. Introduction ==
|
21 | | -
|
22 | | -The Random Image extension adds a <randomimage> tag to the MediaWiki parser
|
23 | | -which allows for randomisation of multimedia content on a page.
|
24 | | -
|
25 | | -When the tag is rendered, a random image is selected from those uploaded and
|
26 | | -inserted at the location of the tag. Users can select a custom size, float
|
27 | | -and provide a caption for the resulting image.
|
28 | | -
|
29 | | -At present, the output is cached in the parser cache alongside other parsed
|
30 | | -content. This is advantageous in some cases, since it will prevent the database
|
31 | | -from being crippled through repeated requests; however, it does mean that
|
32 | | -the content is not 100% dynamic. The image will change when the parser cache is
|
33 | | -expired, either automatically or by purging the page, allowing for rotation
|
34 | | -of content.
|
35 | | -
|
36 | | -== 2. Requirements ==
|
37 | | -
|
38 | | -The Random Image extension has been tested against MediaWiki 1.7alpha and 1.6 and
|
39 | | -should work with MediaWiki 1.5.
|
40 | | -
|
41 | | -== 3. Installing the extension ==
|
42 | | -
|
43 | | -To install the Random Image extension, first upload/copy the extension file
|
44 | | -RandomImage.php into your MediaWiki extensions directory. Then edit your
|
45 | | -LocalSettings.php file and add the following line:
|
46 | | -
|
47 | | - require_once( 'extensions/RandomImage.php' );
|
48 | | -
|
49 | | -Save the file (uploading if applicable) to complete the installation.
|
50 | | -
|
51 | | -== 4. Inserting a random image ==
|
52 | | -
|
53 | | -The tag supports two basic forms:
|
54 | | -
|
55 | | -* Single, i.e. <randomimage />, which produces an image without a caption
|
56 | | -* Container, i.e. <randomimage></randomimage>, where text inside the tags
|
57 | | - is used as a caption
|
58 | | -
|
59 | | -In addition, both tags support two additional attributes; size and float.
|
60 | | -The default size is the user's thumbnail size. Provide a numerical value
|
61 | | -to override the size, e.g.
|
62 | | -
|
63 | | - <randomimage size="300" />
|
64 | | -
|
65 | | -Float allows overriding the float direction. You can combine attributes as
|
66 | | -with most normal HTML-style tags.
|
67 | | -
|
68 | | -== 5. Change log ==
|
69 | | -
|
70 | | -1.0
|
71 | | - Initial release
|
72 | | -
|
73 | | -== 6. Feedback ==
|
74 | | -
|
| 2 | +RANDOM IMAGE EXTENSION |
| 3 | + |
| 4 | + Version 1.0 |
| 5 | + © 2006 Rob Church |
| 6 | + |
| 7 | +This is free software licenced under the GNU General Public Licence. Please |
| 8 | +see http://www.gnu.org/copyleft/gpl.html for further details, including the |
| 9 | +full text and terms of the licence. |
| 10 | + |
| 11 | +== Overview == |
| 12 | + |
| 13 | + 1. Introduction |
| 14 | + 2. Requirements |
| 15 | + 3. Installing the extension |
| 16 | + 4. Inserting a random image |
| 17 | + 5. Change log |
| 18 | + 6. Feedback |
| 19 | + |
| 20 | +== 1. Introduction == |
| 21 | + |
| 22 | +The Random Image extension adds a <randomimage> tag to the MediaWiki parser |
| 23 | +which allows for randomisation of multimedia content on a page. |
| 24 | + |
| 25 | +When the tag is rendered, a random image is selected from those uploaded and |
| 26 | +inserted at the location of the tag. Users can select a custom size, float |
| 27 | +and provide a caption for the resulting image. |
| 28 | + |
| 29 | +At present, the output is cached in the parser cache alongside other parsed |
| 30 | +content. This is advantageous in some cases, since it will prevent the database |
| 31 | +from being crippled through repeated requests; however, it does mean that |
| 32 | +the content is not 100% dynamic. The image will change when the parser cache is |
| 33 | +expired, either automatically or by purging the page, allowing for rotation |
| 34 | +of content. |
| 35 | + |
| 36 | +== 2. Requirements == |
| 37 | + |
| 38 | +The Random Image extension has been tested against MediaWiki 1.7alpha and 1.6 and |
| 39 | +should work with MediaWiki 1.5. |
| 40 | + |
| 41 | +== 3. Installing the extension == |
| 42 | + |
| 43 | +To install the Random Image extension, first upload/copy the extension file |
| 44 | +RandomImage.php into your MediaWiki extensions directory. Then edit your |
| 45 | +LocalSettings.php file and add the following line: |
| 46 | + |
| 47 | + require_once( 'extensions/RandomImage.php' ); |
| 48 | + |
| 49 | +Save the file (uploading if applicable) to complete the installation. |
| 50 | + |
| 51 | +== 4. Inserting a random image == |
| 52 | + |
| 53 | +The tag supports two basic forms: |
| 54 | + |
| 55 | +* Single, i.e. <randomimage />, which produces an image without a caption |
| 56 | +* Container, i.e. <randomimage></randomimage>, where text inside the tags |
| 57 | + is used as a caption |
| 58 | + |
| 59 | +In addition, both tags support two additional attributes; size and float. |
| 60 | +The default size is the user's thumbnail size. Provide a numerical value |
| 61 | +to override the size, e.g. |
| 62 | + |
| 63 | + <randomimage size="300" /> |
| 64 | + |
| 65 | +Float allows overriding the float direction. You can combine attributes as |
| 66 | +with most normal HTML-style tags. |
| 67 | + |
| 68 | +== 5. Change log == |
| 69 | + |
| 70 | +1.0 |
| 71 | + Initial release |
| 72 | + |
| 73 | +== 6. Feedback == |
| 74 | + |
75 | 75 | All feedback, bug reports, etc. welcome via <robchur@gmail.com>. |
\ No newline at end of file |
Property changes on: trunk/extensions/RandomImage/RandomImage |
___________________________________________________________________ |
Added: svn:eol-style |
76 | 76 | + native |