Changeset 898
- Timestamp:
- 11/24/08 01:10:49 (3 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
BlackListPlugin/data/TWiki/BlackListPlugin.txt (modified) (7 diffs)
-
EditHiddenTablePlugin/data/TWiki/EditHiddenTablePlugin.txt (modified) (3 diffs)
-
NativeSearchContrib/data/TWiki/NativeSearchContrib.txt (modified) (4 diffs)
-
PublicCacheAddOn/twpc/PublicCacheAddOn.txt (modified) (20 diffs)
-
SeeSkin/data/TWiki/SeeSkin.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BlackListPlugin/data/TWiki/BlackListPlugin.txt
r878 r898 6 6 ---++ Description 7 7 8 This is a simple utility to keep black sheep away from a public TWiki site. The site can be protected against excessive page access (e.g. by bad robots), suspicious activities of users, such as multiple registrations or rapid topic updates indicating Wiki:WikiSpam, or saving text with wiki-spam.8 This is a simple utility to keep black sheep away from a public Foswiki site. The site can be protected against excessive page access (e.g. by bad robots), suspicious activities of users, such as multiple registrations or rapid topic updates indicating Wiki:WikiSpam, or saving text with wiki-spam. 9 9 10 The Plugin monitors activities by IP address and uses three IP address lists to protect the TWiki site:10 The Plugin monitors activities by IP address and uses three IP address lists to protect the Foswiki site: 11 11 * WHITELIST: Manually maintained list of users who should never get on the BANLIST 12 12 * BLACKLIST: Manually maintained list of malicious users … … 21 21 The registration form can also be protected from improper use. 22 22 23 To fight Wiki-spam, the Plugin can also add a =rel="nofollow"= parameter to external URLs. Search engines will not follow links that have this parameter, taking away the incentive to add spam to TWiki.23 To fight Wiki-spam, the Plugin can also add a =rel="nofollow"= parameter to external URLs. Search engines will not follow links that have this parameter, taking away the incentive to add spam to Foswiki. 24 24 25 25 ---++ Plugin Settings … … 29 29 ---+++ General settings 30 30 * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: 31 * Set SHORTDESCRIPTION = Utility to keep malicious users away from a public TWiki site31 * Set SHORTDESCRIPTION = Utility to keep malicious users away from a public Foswiki site 32 32 33 33 * Debug plugin: (See output in =data/debug.txt=) … … 104 104 * Protect registration: (number of minutes to expire, 15 minutes is recommended, 0 to disable) 105 105 * Set REGEXPIRE = 0 106 * If enabled, a magic number is protecting the registration process. TWiki expects a form field with a magic number. An error message is shown if not valid or if expired. This makes it harder to register a user by a script. A hidden field needs to be added to the registration form:%BR% =<input type="hidden" name="rx" value="%<nop>BLACKLISTPLUGIN{ action="magic" }%" />=106 * If enabled, a magic number is protecting the registration process. Foswiki expects a form field with a magic number. An error message is shown if not valid or if expired. This makes it harder to register a user by a script. A hidden field needs to be added to the registration form:%BR% =<input type="hidden" name="rx" value="%<nop>BLACKLISTPLUGIN{ action="magic" }%" />= 107 107 108 108 * Message shown when using registration form incorrectly: (this message is deliberately vague) … … 115 115 ---++ Plugin Installation Instructions 116 116 117 __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.117 __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where Foswiki is running. 118 118 119 119 * Download the ZIP file from the Plugin web (see below) 120 120 * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: 121 121 | *File:* | *Description:* | 122 | ==data/ TWiki/%TOPIC%.txt== | Plugin topic |123 | ==data/ TWiki/%TOPIC%.txt,v== | Plugin topic repository |124 | ==lib/ TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |125 | ==pub/ TWiki/%TOPIC%/.htaccess== | Apache access control to protect pub dir |122 | ==data/System/%TOPIC%.txt== | Plugin topic | 123 | ==data/System/%TOPIC%.txt,v== | Plugin topic repository | 124 | ==lib/Foswiki/Plugins/%TOPIC%.pm== | Plugin Perl module | 125 | ==pub/Foswiki/%TOPIC%/.htaccess== | Apache access control to protect pub dir | 126 126 | ==templates/oopsblacklist.tmpl== | Generic oops message | 127 * Make sure =pub/ TWiki/%TOPIC%/= is writable by the CGI user (typically =nobody=)128 * Add the hidden form field to the registration form as described in the "Registration protection settings" section (this is already in TWiki 4.0)129 * From TWiki 4.0 release on:Run the configure utility in your browser to enable the Plugin127 * Make sure =pub/Foswiki/%TOPIC%/= is writable by the CGI user (typically =nobody=) 128 * Add the hidden form field to the registration form as described in the "Registration protection settings" section 129 * Run the configure utility in your browser to enable the Plugin 130 130 * Make sure that non-administrators cannot edit this plugin topic. By default, this topic is write protected with an =ALLOWTOPICCHANGE = !AdminGroup= setting. 131 131 * Test if the installation was successful: 132 132 1 Using above form, add the IP address of one of your workstations to the BANLIST 133 1 Access TWiki from that workstation134 * if you look at a TWiki topic (with the view script) you should see the BLACKLISTMESSAGE (defined above) after a one minute timeout133 1 Access Foswiki from that workstation 134 * if you look at a Foswiki topic (with the view script) you should see the BLACKLISTMESSAGE (defined above) after a one minute timeout 135 135 * else, you should get an 500 Internal Server Error for other scripts 136 136 1 On a different workstation, remove the IP address of the test workstation from the BANLIST … … 138 138 ---++ Known Issues and Limitations 139 139 140 * Wiki-spam filtering for HTML attachments works in TWiki 01-Sep-2004 and later.141 * With TWiki 4.0.2 on some platforms, notably Solaris, attached files are uploaded with a zero file size. This is because there is a bug in how TWiki 4.0.2 handles the beforeAttachmentSaveHandler. If affected, upgrade TWiki or apply bug fix [[TWikibug:Item2390][Item2390]]142 140 * Scan for script eval() and escape() is currently hardcoded 143 141 … … 160 158 | 30 Oct 2005: | Dakar Release compatibility: Work around Dakar preferencs bug | 161 159 | 29 Oct 2005: | Added wiki-spam filtering to prevent topic save with wiki-spam | 162 | 27 Oct 2005: | For BANLIST, add/remove multiple IP addresses at once, contributed by TWiki:Main.MichaelDaum |160 | 27 Oct 2005: | For BANLIST, add/remove multiple IP addresses at once, contributed by Foswiki:Main.MichaelDaum | 163 161 | 22 Jan 2005: | Added NOFOLLOWAGE handling | 164 162 | 19 Jan 2005: | Added score for "view raw" to address e-mail harvester issue | -
trunk/EditHiddenTablePlugin/data/TWiki/EditHiddenTablePlugin.txt
r878 r898 78 78 <table border="1" cellspacing="1" cellpadding="0"> 79 79 <tr><th class="twikiFirstCol" bgcolor="#99CCCC"><a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview" title="Sort by this column"> Nr</a> </th><th bgcolor="#99CCCC"><a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview" title="Sort by this column"> Text field</a> </th><th bgcolor="#99CCCC"><a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview" title="Sort by this column"> Drop down</a> </th><th bgcolor="#99CCCC"><a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview" title="Sort by this column"> Mood</a> </th><th bgcolor="#99CCCC"><a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview" title="Sort by this column"> Timestamp</a> </th></tr> 80 <tr><td class="twikiFirstCol" bgcolor="#FFFFFF"> <a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview">1</a> </td><td bgcolor="#FFFFFF"> hello table </td><td bgcolor="#FFFFFF"> one </td><td bgcolor="#FFFFFF"> <img src="%PUBURLPATH%/ TWiki/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" /> </td><td bgcolor="#FFFFFF"> 19 Mar 2005 23:21 </td></tr>81 <tr><td class="twikiFirstCol" bgcolor="#FFFFCC"> <a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview">2</a> </td><td bgcolor="#FFFFCC"> </td><td bgcolor="#FFFFCC"> two </td><td bgcolor="#FFFFCC"> <img src="%PUBURLPATH%/ TWiki/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td><td bgcolor="#FFFFCC"> 19 Mar 2005 11:21 </td></tr>80 <tr><td class="twikiFirstCol" bgcolor="#FFFFFF"> <a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview">1</a> </td><td bgcolor="#FFFFFF"> hello table </td><td bgcolor="#FFFFFF"> one </td><td bgcolor="#FFFFFF"> <img src="%PUBURLPATH%/System/SmiliesPlugin/smile.gif" alt="smile" title="smile" border="0" /> </td><td bgcolor="#FFFFFF"> 19 Mar 2005 23:21 </td></tr> 81 <tr><td class="twikiFirstCol" bgcolor="#FFFFCC"> <a href="%SCRIPTURLPATH%/oops/Test/TableRowOne?template=oopspreview">2</a> </td><td bgcolor="#FFFFCC"> </td><td bgcolor="#FFFFCC"> two </td><td bgcolor="#FFFFCC"> <img src="%PUBURLPATH%/System/SmiliesPlugin/frown.gif" alt="frown" title="frown" border="0" /> </td><td bgcolor="#FFFFCC"> 19 Mar 2005 11:21 </td></tr> 82 82 </table> 83 83 <form action="%SCRIPTURLPATH%/oops/Test/TableRowOne"> 84 <input type="image" src="%PUBURLPATH%/ TWiki/EditTablePlugin/edittable.gif" alt="Edit this table" onclick="return(false);" /></form>84 <input type="image" src="%PUBURLPATH%/System/EditTablePlugin/edittable.gif" alt="Edit this table" onclick="return(false);" /></form> 85 85 86 86 If you click on one of the links in the first column, say for the second row, you will be able to edit that table row in a form: … … 94 94 95 95 * One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic: 96 * Set SHORTDESCRIPTION = Edit TWiki tables rows using a form96 * Set SHORTDESCRIPTION = Edit Foswiki tables rows using a form 97 97 98 98 * Set DEBUG to 1 to get debug messages in =data/debug.txt=. Default: =0= … … 104 104 * Default edit button: Specify =button text=, or specify =alternate text, image URL= 105 105 * Set EDITBUTTON = Edit table 106 * #Set EDITBUTTON = Edit this table, %PUBURL%/ TWiki/EditTablePlugin/edittable.gif106 * #Set EDITBUTTON = Edit this table, %PUBURL%/System/EditTablePlugin/edittable.gif 107 107 108 108 * Default edit link for row: Specify =button text=, or specify =alternate text, image URL=. If empty, create link from first field. 109 109 * #Set EDITLINK = Edit 110 * #Set EDITLINK = Edit, %PUBURL%/ TWiki/DocumentGraphics/edittopic.gif110 * #Set EDITLINK = Edit, %PUBURL%/System/DocumentGraphics/edittopic.gif 111 111 112 112 113 113 ---++ Limitations and Known Issues 114 114 115 * This Plugin does not (yet) support TWiki table formatting like Multi-span cells (e.g. =| ... ||=)115 * This Plugin does not (yet) support Foswiki table formatting like Multi-span cells (e.g. =| ... ||=) 116 116 * You cannot put two =%<nop>EDITTABLE{}%= statements on the same line in the source 117 117 118 118 ---++ Plugin Installation Instructions 119 119 120 __Note:__ You do not need to install anything on the browser to use this Plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.120 __Note:__ You do not need to install anything on the browser to use this Plugin. The following instructions are for the administrator who installs the plugin on the server where Foswiki is running. 121 121 122 122 * Download the ZIP file from the Plugin web (see below) 123 123 * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: 124 124 | *File:* | *Description:* | 125 | ==data/ TWiki/%TOPIC%.txt== | Plugin topic |126 | ==data/ TWiki/%TOPIC%.txt,v== | Plugin topic repository |127 | ==lib/ TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module |128 | ==pub/ TWiki/%TOPIC%/*.jpg== | Screenshots for plugin topic |125 | ==data/System/%TOPIC%.txt== | Plugin topic | 126 | ==data/System/%TOPIC%.txt,v== | Plugin topic repository | 127 | ==lib/Foswiki/Plugins/%TOPIC%.pm== | Plugin Perl module | 128 | ==pub/Foswiki/%TOPIC%/*.jpg== | Screenshots for plugin topic | 129 129 | ==bin/editTable== | | 130 130 | ==bin/uploadTable== | | -
trunk/NativeSearchContrib/data/TWiki/NativeSearchContrib.txt
r530 r898 7 7 %SHORTDESCRIPTION% 8 8 9 By default TWiki searches its database by [[http://en.wikipedia.org/wiki/Fork_%28operating_system%29][forking]] the standard [[http://en.wikipedia.org/wiki/Grep][grep]] program in a sub-process to search through the text files in the database cache. This is usually pretty fast, but unfortunately in some environments (specifically with [[http://perl.apache.org/][mod_perl]]) forking a sub-process is very expensive, and another approach is needed.9 By default Foswiki searches its database by [[http://en.wikipedia.org/wiki/Fork_%28operating_system%29][forking]] the standard [[http://en.wikipedia.org/wiki/Grep][grep]] program in a sub-process to search through the text files in the database cache. This is usually pretty fast, but unfortunately in some environments (specifically with [[http://perl.apache.org/][mod_perl]]) forking a sub-process is very expensive, and another approach is needed. 10 10 11 !NativeSearch is a c-code module that can be plugged into TWiki to replace the default searching algorithm. It publishes an [[http://en.wikipedia.org/wiki/XS_(Perl)][XS]] interface that allows it to be called from Perl, without having to fork a sub-process. It has comparable performance to the standard forking search in most environments, but is often significantly faster than forked search when TWiki is run under a CGI accelerator. The effect is most pronounced with mod_perl, but is also there for [[http://www.daemoninc.com/SpeedyCGI/][SpeedyCGI]].11 !NativeSearch is a c-code module that can be plugged into Foswiki to replace the default searching algorithm. It publishes an [[http://en.wikipedia.org/wiki/XS_(Perl)][XS]] interface that allows it to be called from Perl, without having to fork a sub-process. It has comparable performance to the standard forking search in most environments, but is often significantly faster than forked search when Foswiki is run under a CGI accelerator. The effect is most pronounced with mod_perl, but is also there for [[http://www.daemoninc.com/SpeedyCGI/][SpeedyCGI]]. 12 12 13 *You require shell access to the server to install this module*. Refer to TWiki:Codev.NativeSearch for a list of systems where the module has been successfully compiled and installed (and please update it if you find a new one).13 *You require shell access to the server to install this module*. 14 14 15 15 ---++ Installation Instructions … … 27 27 ---+++ Building the c-code 28 28 29 =cd= to the root directory in your TWiki installation. Now, _assuming you have administrator (root) access to the server:_29 =cd= to the root directory in your Foswiki installation. Now, _assuming you have administrator (root) access to the server:_ 30 30 <verbatim> 31 31 $ cd tools/native_search … … 43 43 install. Follow the steps above, but use =perl Makefile.PL INSTALLBASE=/your/dir= to install to a different directory. Exactly where you install depends on your system configuration. 44 44 45 Now, in [[%SCRIPTURL{configure}%][configure]], under "Store Settings", you should be able to select the search algorithm = TWiki::Store::SearchAlgorithms::Native= (click the <input type="button" style="background-color:#eef" value="Yes, I've read all the documentation"/> button first if you have TWiki 4.2 or later).45 Now, in [[%SCRIPTURL{configure}%][configure]], under "Store Settings", you should be able to select the search algorithm =Foswiki::Store::SearchAlgorithms::Native= (click the <input type="button" style="background-color:#eef" value="Yes, I've read all the documentation"/> button first if you have TWiki 4.2 or later or Foswiki). 46 46 47 Run a TWiki search, and watch the web server error log for any problems.47 Run a Foswiki search, and watch the web server error log for any problems. 48 48 49 49 Because performance can differ widely between two apparently similar webserver configurations, you are recommended to do your own benchmarking and select the search algorithm that performs best for you. … … 51 51 ---++ Contrib Info 52 52 53 Another great TWiki extension from the <a style="text-decoration:none" href="http://wikiring.com"><img src="%ATTACHURLPATH%/wikiringlogo20x20.png" alt="" /> *WikiRing* </a> - working together to improve your wiki experience!53 Another great Foswiki extension from the <a style="text-decoration:none" href="http://wikiring.com"><img src="%ATTACHURLPATH%/wikiringlogo20x20.png" alt="" /> *WikiRing* </a> - working together to improve your wiki experience! 54 54 55 55 Many thanks to the following sponsors for supporting this work: -
trunk/PublicCacheAddOn/twpc/PublicCacheAddOn.txt
r878 r898 1 1 ---+ Public Cache Add-On 2 2 <table align='right'><tr><td bgcolor='#eeeeee'>%TOC%</table> 3 Makes TWiki surviving being3 Makes Foswiki surviving being 4 4 [[http://en.wikipedia.org/wiki/Slashdot_effect][Slashdotted]] 5 5 - serves pages 100 times faster. 6 6 ---++ Goals 7 7 I made this addon for people (like me) wanting to have their personal (or 8 small group) *public web site* on a TWiki. The problems I want to address are8 small group) *public web site* on a Foswiki. The problems I want to address are 9 9 thus the ones important for this scenario: 10 10 * many *more reads* and readers than edits and authors 11 11 * extreme *performance*, serving a page in few 100th of a second. 12 12 * huge *spikes* of visitors, being able to survive a slashdot effect. It 13 should handle 10000 simultaneous requests on a TWiki topic on a 1Ghz13 should handle 10000 simultaneous requests on a Foswiki topic on a 1Ghz 14 14 machine. It does this by locking to ensure only one process tries to 15 15 build a page at a time, reducing tremendously the load on the server, even … … 30 30 cycle: you must not have to have to 31 31 refresh manually a page to see the edits you just did to it. 32 * *compatible* should work with all TWiki features, options and plugins32 * *compatible* should work with all Foswiki features, options and plugins 33 33 (or most of them: not the ones trying to show 34 34 different things to different people). Most important are features … … 43 43 just fast). 44 44 45 This caching system has thus different goals than TWiki:Codev/TWikiCache that45 This caching system has thus different goals than Foswiki:Development.FoswikiCache that 46 46 will accelerate even page builds, in an exact and optimal way, but will be 47 47 less slashdot-resistant, and the mod_perl, speedycgi, persistent perl perl … … 86 86 force refresh of pages or webs that change without human editing (for instance 87 87 blog pages showing "Edited N days ago"), you must position the 88 =PUBLIC_CACHE_EXPIRE= TWiki variableto the number of seconds after which the88 =PUBLIC_CACHE_EXPIRE= Foswiki macro to the number of seconds after which the 89 89 cache will be automatically cleared. Note that as this will be performed by the 90 90 next run of the crontab job =pccl=, normally each 3 minutes. … … 101 101 =%<nop>INCLUDE{http://some.site/external}%= automatically sets a 102 102 =PUBLIC_CACHE_EXPIRE= of the default value, if not already set by an 103 explicit declaration. This variable is a normal TWiki variable, so you can use103 explicit declaration. This variable is a normal Foswiki macro, so you can use 104 104 it in a web preferences to set a cache policy to a whole web. 105 105 … … 108 108 __Note:__ You do not need to install anything on the browser to use this 109 109 add-on. The following instructions are for the administrator who installs the 110 add-on on the server where TWiki is running.110 add-on on the server where Foswiki is running. 111 111 112 112 * Download the TGZ file from the Add-on Home (see below) … … 116 116 * if you are *upgrading from a version before 4.0*, 117 117 * first do a =./uninstall TWIKI_DIR/bin= 118 * in your TWiki site, search for all occurences of =PCACHEEXPTIME= vars,118 * in your Foswiki site, search for all occurences of =PCACHEEXPTIME= vars, 119 119 and replace them with declarations 120 120 <br> =* Set PUBLIC_CACHE_EXPIRE = 1= (1, or the previous value =NNN= of … … 130 130 clean duty every 3 minutes, as 131 131 <br> =*/3 * * * * test -x TWIKI_DIR/bin/pccl && TWIKI_DIR/bin/pccl= 132 * the install script will install small patches to the TWiki code, in133 =lib/ TWiki.pm=, =lib/TWiki/Func.pm=, and =lib/TWiki/UI/View.pm=. The132 * the install script will install small patches to the Foswiki code, in 133 =lib/Foswiki.pm=, =lib/Foswiki/Func.pm=, and =lib/Foswiki/UI/View.pm=. The 134 134 patches are clearly surrounded by =#TWikiPublicCacheAddOn_Patch...= 135 135 comments 136 * If you *update your TWiki* install, or install afterwards the137 Foswiki:Extensions/NewsPlugin or TWiki:TagMePlugin (or any future plugin138 calling the = TWiki::Func::saveFile= function,you must re-do an136 * If you *update your Foswiki* install, or install afterwards the 137 Foswiki:Extensions/NewsPlugin or System:TagMePlugin (or any future plugin 138 calling the =Foswiki::Func::saveFile= function,you must re-do an 139 139 =install -u= in order to apply the patches above. 140 140 * To be sure people notified of changes by email will actually see the … … 146 146 <br /> to check every hour for uncached pages and build them 147 147 148 Note that the argument can just be TWIKI_DIR if your TWiki perl scripts148 Note that the argument can just be TWIKI_DIR if your Foswiki perl scripts 149 149 dir is in the standard place (as a =bin/= subdirectory), otherwise you must 150 give the actual path of your TWiki perl scripts directory.150 give the actual path of your Foswiki perl scripts directory. 151 151 152 152 To update, or change options, just redo install. This will clear the cache. type =./install -h= to see options, i.e: … … 160 160 * =-eseconds= default value for %<nop>PUBLIC_CACHE_EXPIRE% (defaults to 3600) 161 161 * -wWebList= make pcad build menu and pcge default mode not rebuild 162 these webs. List is comma-separated. (defaults to -wMain, TWiki,Sandbox,Trash)162 these webs. List is comma-separated. (defaults to -wMain,System,Sandbox,Trash) 163 163 * =-v= verbose: logs a lot of things in data/twpc-debug.txt 164 164 … … 237 237 238 238 ---+++ Tips 239 * Use robots.txt on your site to prevent browsing the TWikiweb. e.g,240 <br> =Disallow: /bin/view/ TWiki=239 * Use robots.txt on your site to prevent browsing the System web. e.g, 240 <br> =Disallow: /bin/view/System= 241 241 <br> You may want to also disallow access to Main, Sandbox, and Trash. 242 Why? The TWikiweb represent often an important (more than 500 pages)243 part of a TWiki web site. This has the drawback of242 Why? The System web represent often an important (more than 500 pages) 243 part of a Foswiki web site. This has the drawback of 244 244 * Making search engines produce less relevant results for your site 245 (your personal contents will be diluted into the TWiki docs)245 (your personal contents will be diluted into the Foswiki docs) 246 246 * Google has a time limit for browsing a site. He may thus only crawl 247 part of your TWiki site on first run and not index your actual content248 * As the cache will be totally cleared on edits, it means that the TWiki247 part of your Foswiki site on first run and not index your actual content 248 * As the cache will be totally cleared on edits, it means that the Foswiki 249 249 cache will be re-computed over and over on crawling by search 250 250 engines, consuming needless CPU and bandwidth 251 * Use a perl accelerator: TWiki:Codev/ModPerl, TWiki:Codev/SpeedyCGI or 252 TWiki:Codev/PersistentPerl 251 * Use a perl accelerator: Mod-Perl, Speedy CGI or Persistent Perl 253 252 254 253 ---++ Implementation … … 268 267 without caching it. 269 268 * the "cache builder", *pcbd* (shell) calls the copy of the original 270 TWiki view script (named *vief*) to make it build the page, and save269 Foswiki view script (named *vief*) to make it build the page, and save 271 270 it in normal and gzipped versions. If it cannot get it (read-protected 272 271 page) it saves a marker to remember not trying to build it and 273 272 directly delegate to vief. 274 * an automatically installed TWiki plugin *PublicCachePlugin* (perl)273 * an automatically installed Foswiki plugin *PublicCachePlugin* (perl) 275 274 installs just an afterSaveHandler hook to track the changes in topics, 276 275 and save the IP Adress of the client browser that edited the page as a … … 305 304 * Cached pages have ETags so that the browser will not even re-download 306 305 them if they have not changed. 307 * TWiki code is slightly patched (some lines in TWiki.pm, to set306 * Foswiki code is slightly patched (some lines in Foswiki.pm, to set 308 307 =%<nop>PUBLIC_CACHE_EXPIRE%= on inclusion of external urls). 309 308 The patch consists of the lines between 310 309 =#TWikiPublicCacheAddOn_PatchInclude_START= and 311 310 =#TWikiPublicCacheAddOn_PatchInclude_END= . 312 After a TWiki update,311 After a Foswiki update, 313 312 just reinstall this addon. This patch work with 4.x versions, and 314 313 probably newer ones. But it is just for convenience to avoid putting 315 314 =Set PUBLIC_CACHE_EXPIRE= by hand on all topics using 316 315 =%<nop>INCLUDE{external-url}% 317 * If you use TWiki:Codev/ModPerl, TWiki:Codev/SpeedyCGI or TWiki:Codev/PersistentPerl, check that you enable316 * If you use mod-perl, Speedy CGI or Persistent Perl, check that you enable 318 317 it also for =bin/vief= for better performance, and *disable it for view*, as it 319 318 no more a perl file and will crash your server … … 335 334 * linux (or any unix with GNU utilities, but untested) 336 335 * TWiki Cairo, Dakar, Edinburgh, Freetown, ... (3.0 -> 4.2). Should work on 337 any version at it is very disconnected from TWiki perl code. Warning:336 any version at it is very disconnected from TWiki/Foswiki perl code. Warning: 338 337 Cairo(3.0) is only supported in the version 3.1 of this plugin 339 338 * Changes to pages not resulting from an edit will not be shown … … 366 365 ---++ Performance, benchmarks 367 366 Current performance: (celeron 1Ghz, 512M RAM, Apache 1.3, 150 max processes) 368 for 20 simultaneous requests for the same TWiki page:367 for 20 simultaneous requests for the same Foswiki page: 369 368 |*Configuration*|*First run, empty cache*|*2nd run, cache built*| 370 369 | Normal 4.2 | 143s load 20 | 143s load 20 | 371 | TWiki:Codev/TWikiCache | 66s load 12 | 65s load 11 |370 | Foswiki:Development.FoswikiCache | 66s load 12 | 65s load 11 | 372 371 | Cairo+mod_perl+koalaskin | 28s load 8 | 18s load 9 | 373 372 | Cairo+speedy+koalaskin | 20s load 6 | 17s load 8 | … … 394 393 <br> =i=1000;while let 'i-->0';do curl -s --compressed <nop>http://mytwiki/bin/view/System/Macros >/dev/null& done; time wait= 395 394 396 Note that it does *not* mean this cache is better that TWiki:Codev/TWikiCache395 Note that it does *not* mean this cache is better that Foswiki:Development.FoswikiCache 397 396 for all uses. If you just look at the time to load a single page: 398 397 |*Configuration*|*1rst time*|*2nd time*| … … 400 399 | Normal+speedy | 6s | 5.5s | 401 400 | publiccache | 6s | 0.06s | 402 | TWiki:Codev/TWikiCache | 4.3s | 3.3s |403 | TWiki:Codev/TWikiCache + speedy | 4.5s | 3s |404 You can see that ! TWikiCache will be better suited for intranet sites, and the401 | Foswiki:Development.FoswikiCache | 4.3s | 3.3s | 402 | Foswiki:Development.FoswikiCache + speedy | 4.5s | 3s | 403 You can see that !FoswikiCache will be better suited for intranet sites, and the 405 404 only option if you use access control or have personalized views anyways. And 406 405 my "benchmark" is really braindead and do not model typical use. And it only … … 412 411 * Set SHORTDESCRIPTION = Fast cache geared for public site usage 413 412 414 | Add-on Author: | TWiki:Main.ColasNahaboo |415 | Copyright: | © 2008, TWiki:Main.ColasNahaboo |413 | Add-on Author: | Foswiki:Main.ColasNahaboo | 414 | Copyright: | © 2008, Foswiki:Main.ColasNahaboo | 416 415 | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | 417 416 | Add-on Version: | 12 Apr 2008 (V4.006) | … … 438 437 | 29 Jan 2008: | algorithm v2, beta, autoconfig | 439 438 | 13 Jan 2008: | Initial version, v1, alpha | 440 | TWiki Dependency: | $TWiki::Plugins::VERSION 1.020 (TWiki 3.0) |439 | Foswiki Dependency: | $Foswiki::Plugins::VERSION 1.020 (TWiki 3.0) | 441 440 | CPAN Dependencies: | LWP::Simple File::Path | 442 441 | Other Dependencies: | bash, sed, wget, grep, crontab, cc (optional), ... | … … 448 447 __Related Topic:__ %SYSTEMWEB%.ContributedAddOns 449 448 450 -- TWiki:Main/ColasNahaboo449 -- Foswiki:Main/ColasNahaboo -
trunk/SeeSkin/data/TWiki/SeeSkin.txt
r498 r898 3 3 ---+!! SeeSkin 4 4 5 ...is a wholly Cascading Style Sheets -based skin for TWiki. It strives to find the right balance between simplicity, a pleasing appearance, and sound structural foundation -- a clean separation of content and display logic. It should look good in modern browsers while remaining completely accessible to older ones.5 ...is a wholly Cascading Style Sheets -based skin for Foswiki. It strives to find the right balance between simplicity, a pleasing appearance, and sound structural foundation -- a clean separation of content and display logic. It should look good in modern browsers while remaining completely accessible to older ones. 6 6 7 7 <div class="inset"> %TOC% </div> … … 10 10 11 11 1. unpack the archive from twiki-root. 12 1. if you use the TWiki web for your plugins, move =*/Plugins/*= to =*/TWiki/*=12 1. if you use the System web for your plugins, move =*/Plugins/*= to =*/System/*= 13 13 2. if you don't already have it, add the =savemulti= script to =$twiki/bin/.htaccess= 14 14 3. Edit %SYSTEMWEB%.DefaultPreferences, or %USERSWEB%.SitePreferences, or WebPreferences, or your <nop>UserName topic and add the following: … … 31 31 ---+++ Making %Webs% work 32 32 33 Edit WebPreferences in each of your webs and add INLINESTYLE to customise on a per-web basis. The following settings work out of the box for the TWiki, Plugins, and Sandbox webs.33 Edit WebPreferences in each of your webs and add INLINESTYLE to customise on a per-web basis. The following settings work out of the box for the System, Plugins, and Sandbox webs. 34 34 35 * TWiki:*35 *System:* 36 36 <verbatim> 37 37 %PLUGINWEB%.SeeSkin per-web preferences … … 62 62 ---+++ Going beyond 63 63 64 EXTernal STYLEsheet is where 90% of magic happens. It is advisable to make a copy and use that for tweaking. This way future upgrades won't clobber your hard work inadvertantly. [[http://www.bradsoft.com/topstyle/index.asp][TopStyle]] is an excellent CSS editor for Windows. See TWiki:Codev/CssResources for tools on other platforms, along with many other good learning resources.64 EXTernal STYLEsheet is where 90% of magic happens. It is advisable to make a copy and use that for tweaking. This way future upgrades won't clobber your hard work inadvertantly. [[http://www.bradsoft.com/topstyle/index.asp][TopStyle]] is an excellent CSS editor for Windows. See Foswiki:Development:CssResources for tools on other platforms, along with many other good learning resources. 65 65 66 66 For inspiration and a solid demonstration of how dramatically you can change a site "simply" by editing the stylesheet there is no better place to visit than the [[http://csszengarden.com/][CSS Zen Garden]].
Note: See TracChangeset
for help on using the changeset viewer.
