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