]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - doc/README.phpwiki-cache
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / doc / README.phpwiki-cache
1 InstallWikiPluginCached       
2
3 !!!Requirements
4
5 I don't know, tested it with the followings: 
6 * WikiPluginCached needs
7 ** PhpWiki >= 1.3.3
8 ** Pear Cache >= 1.0
9 ** GD >= 1.6
10 * TexToPng needs
11 ** TeX 3.14159
12 ** GNU Ghostscript 6.51 
13 ** LaTex2HTML Version 99.2beta8 (1.43)
14 ** Perl >= 5.6.1 built for i586-linux
15 * VisualWiki needs
16 ** graphviz 1.8.x (http://www.graphviz.org/)
17
18 !!!Installation
19 phpwiki comes with its own copy of PEAR::Cache. 
20 You have to configure the PLUGINCACHED Pear/Cache Settings in config/config.ini
21
22 *  set PLUGIN_CACHED_CACHE_DIR to a directory accessible by your apache user.
23  
24 !!!Example Calls from Wiki
25 !! TexToPng
26 This produces a little help screen:
27  < ?plugin TexToPng ?> 
28  
29 A simple formula:
30  < ?plugin TexToPng tex="$x^2$" ?> 
31  
32 Let's show off 
33  < ?plugin TexToPng tex="$$/int^/infty_{-/infty} dx {1 /over /sqrt {x^2+1}}$$" subslash="on" ?> 
34
35 ----
36
37 The available options for TexToPng are:
38 ;tex:TeX Commands (default: text mode), use $...$ for inline math formula style and $$...$$ for large formula style
39 ;img:          image type (png, jpeg or gif), if chosen image type is not available use the first possible from png, gif, jpeg (in that order)
40 ;magstep:      magnify image by (1.2 to the magstep)
41 ;subslash:     substitute slashes by backslashes (to avoid the backslash bug of the database pear interface)
42 ;antialias:    render ps to img with antialias option. This produces higher quality output but is slower and needs more disk space.
43 ;transparent:  produce transparent background instead of white background. Seems to be buggy (in pstoimg - not my fault)
44
45 !!VisualWiki
46 Standard call:
47  < ?plugin VisualWiki ?>
48 Help:
49  < ?plugin VisualWiki help="1" ?>
50
51 !!!Known Bugs
52
53 WikiPluginCached 0.8
54 * VisualWiki and TexToPng use png image type for communication with
55   the image creating scripts (dot and pstoimg), so they rely on
56   CreateImageFronPNG(...)
57 * RecentChangesCached produces a strange RSS-link for the RSS-image
58   when it has to store a new html snippet in the cache immediately 
59   after an edit/save cycle.
60
61
62
63
64
65
66
67
68
69
70 !!!Examples
71
72 This extension of WikiPlugin replaces my old WikiPluginImageCache and allows to cache the following kinds of output:
73
74 * html
75 ** example: [RecentChangesCached - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/RecentChangesCached_php] (RecentChanges with a 15 minutes caching interval)
76 * images
77 ** example: [TexToPng - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/TexToPng_php] (TeX to image converter)
78 ** and  [CacheTest - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/CacheTest_php] (simple example)
79 * image maps
80 ** example: [VisualWiki - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/VisualWiki_php] (VisualWiki draws a graph of some [WikiPage]s showing their mutual linkage using [graphviz|http://www.graphviz.org]).
81
82 !!!Requirements
83 I used the following versions
84 * PhpWiki 1.3.3
85 * PEAR Cache 1.1 (needed files are included in the tar ball below)
86 * GD >= 1.8
87 * For TexToPng
88 ** Tex 3.14159
89 ** Perl 5.6.1 built for i586-linux
90 ** GNU Ghostscript 6.51
91 ** LaTex2HTML Version 99.2beta8 (1.43)
92 * For VisualWiki
93 ** graphviz 1.8.? (http://www.graphviz.org)
94
95
96 !!!Source
97
98 These files actually belong to WikiPluginCached
99
100 * [imagecache - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/imagecache_php] (fetches images from the cache)
101 * [WikiPluginCached - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/WikiPluginCached_php] (abstract class for cached [WikiPlugin]s)
102 * [plugincache-config - source|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/plugincache-config_php] (config file for the PEAR Cache)
103
104 !!!Tar
105
106 [WikiPluginCached, Examples, and needed Pear Cache as tar.gz|http://amor.rz.hu-berlin.de/~h0444nmx/wiki/wikiplugincached.tar.gz]
107
108 !!!Installation
109 * EITHER copy the tarball into your phpwiki directory and use
110       tar -xvzf wikiplugincached-0.8.tar.gz
111 * OR copy the following files manually:
112 **      imagecache.php            ''into''  lib/imagecache.php
113 **      !WikiPluginCached.php     ''into''  lib/!WikiPluginCached.php
114 **      plugincache-config.php    ''into''  lib/plugincache-config.php
115 **      !TexToPng.php             ''into''  lib/plugin/!TexToPng.php
116 **      !CacheTest.php            ''into''  lib/plugin/!CacheText.php
117 **      !VisualWiki.php           ''into''  lib/plugin/!VisualWiki.php
118 **      !RecentChangesCached.php  ''into''  lib/plugin/!RecentChangesCached.php
119 **      Cache.php                 ''into''  lib/pear/Cache.php
120 **      Error.php                 ''into''  lib/pear/Cache/Error.php
121 **      Container.php             ''into''  lib/pear/Cache/Container.php
122 **      file.php                  ''into''  lib/pear/Cache/Container/file.php
123 **      imgfile.php               ''into''  lib/pear/Cache/Container/imgfile.php
124 * copy your own index.php config file into getimg.php and substitute the wiki start up instruction (to be found at the end of the file)
125     include "lib/main.php";
126   by
127       include "lib/imagecache.php";
128 * modify configuration file plugincache-config.php according to your wishes, %%%especially:
129 **  set 'cache_dir' to a directory accessible by your apache user.
130 **  set database to 'file'
131 ;;:''There is a hack which allows to let apache determine whether the image needs to be recreated. You have to include a symbolic link from your wiki dir to your cache dir and make the getimg.php file the 404 ErrorDocument. So whenever Apache tries to load an image not present in this dir, Apache will call the 404 (=file not found) ErrorDocument which creates the image on the fly. You have to use 'imgfile' as database entry in plugincache-config.php, though. Furthermore you have to replace the old value of 'cache_url' which should be '../getimg.php?' by '../path/to/cache'. Remember: This really is a hack because it needs my modified cache-filesystem-interface which is not part of the official pear distribution.''
132
133 !!!Documentation
134 At the moment, the source documentation is incomplete, but the example files should help a lot
135
136 !!!To Do
137 * complete doc
138 * There is a bug in RecentChangesCached which scrambles the rss link during the first run.
139 * VisualWiki and TexToPng use png image type for communication with the image creating scripts (dot and pstoimg), so they rely on CreateImageFromPNG(...) which is not necessary.
140
141 --JohannesGroße
142
143 ----
144 WikiPlugin TexToPng VisualWiki