(c) 2005 by Fredi Bach

Features | Installation | User Guide | Options | Definitions | Customization | HQ
About WikiCache:
WikiCache is a WordPress plugin to cache and browse wiki articles, for example from Wikipedia, inside your own blog. The idea is to cache articles you've worked on, but not limited to that.
Basically the plugin consists of three parts, the admin panel, the cache engine and the article browser. The admin panel is there to add new articles, to manage the articles already added and to set the WikiCache options. The cache engine is called from the admin panel and lets you cache wiki articles you've added. The article browser is there for your visitors to browse and view the cached articles inside your blog. This are the features of each part:
- Admin Panel:
- Add article
- Edit article
- View article
- Browse articles
- Switch article ON/OFF
- Delete article
- Re-cache article
- Re-cache all articles
- Edit options
- View article suggestions
- Cache Engine
- Cache everything inside a specific “div”
- Remove other specific “divs”
- Convert short links into full links
- Cache images
- Resize large images
- Re-link links to already cached articles
- Article Browser
- List view
- Article view with custom CSS per wiki
- Browse list by tag
- Group by tags
- Search with and or or logic
- Sort by article date
- Sort by popularity (views)
- Sort by article size
- Sort by name
- Suggest new article
- Latest article sidebar list
A few relatively simple steps to install WikiCache
1. Download WikiCache ... surprising, isn't it ;-)
2. Copy "wc_fileuploader.php" and "wc_loaderbg.gif" into your wp-admin folder
3. Copy "wikicache.php" and the "wikicache" folder with all its content into your plugins folder "wp-content/plugins/
4. The folder "wikicache" you've just uploaded needs write access from the plugin, so change the permissions of this folder to 777
5. Now go to your WordPress admin panel and activate the WikiCache plugin. The plugin should now setup the database and some options
WikiCache is now basicaly installed, but before you start to cache articles, without a WordPress page to list and display the articles, the plugin wouldn't make much sense, so let us setup a template page for this:
1. Go to your active template folder, for example "wp-content/themes/default/" and dublicate one of your page templates, for example "archives.php" and rename it to something like "articles.php"
2. Remove the content of that page you've duplicated and add the following line to it, this will call the WikiCache plugin on this page:
<?php wikicache_articlelist(); ?>
Without any style elements, like a page title, page description ... the page should now look similar to this one:
<?php get_header(); ?>
<div id="content" class="widecolumn">
<?php wikicache_articlelist(); ?>
</div>
<?php get_footer(); ?>
3. To let WordPress know about the new page, go to the admin panel, click Manage --> Pages --> Create New Page. Give the page a name, for example Articles (this is the default name, if you chose an other one you have to change an option on the WikiCache admin page), scroll to the bottom, select "_wp_page_template" from the custom field Key pull-down menu (if you don't have that menu, just put "_wp_page_template" into the key field) and enter "articles.php" into the Value field. Click Add Custom Field
The page is now ready and as soon as you add articles they will show up on the page you've just created.
Additionaly to the article list, you can install a list of cached articles into the sidebar of your blog. To do this, use the following function:
<?php wikicache_sidebar(); ?>
This will output a list of the ten latest articles. The function can take arguments to change it's behavior, this is the above default with arguments:
<?php wikicache_sidebar(10,'<ul>','</ul>','<li>','','</li>','date'); ?>
This are the meenings of each argument (from left to right):
Article count, list start, list end, article start, inbetween, article end and orderby. Orderby can be: 'date', 'popularity', 'articlesize' and 'articlename'.
This is an example of how to add a Wikipedia article.
1. Go to the WikiCache admin page (Options --> WikiCache)
2. Enter the name of the article into the "Article" field of the Add new article form, for example "Apple Macintosh"
3. If you don't want to display the article with a different name, leave the "Display Name" field empty
4. Add some tags, a description and chose "Wikipedia English" from the Wiki definition pull-down menu
5. Click Add article and the article will be added to WikiCache. The Live caching iFrame will now start the caching engine, if Wikipedia can be reached, you should see your WikiCache stats after a while, this meens that the cache process is finished and that the article is now on your own server. However, the article isn't active, so click the toggle link on the right of the new article, this will activate the article. (You can click View first to check if everything is ok with the article)
There are a few options you can set on the WikiCache admin page:
Pagename: This is the name of the page where you display the article list. Never leave this empty or WikiCache will not know how to change links on articles that point to already cached articles when displayed.
Articles per page: This is the number of articles shown per page of the article list.
Default tags: This are the default tags that are displayed and linked above the article list.
Cache Directory: This is the directory (folder) on your web server where WikiCache stores the cached articles, images included.
Definition File Directory: This is the directory (folder) on your web server where WikiCache searches for .wcd (WikiCache Defiinition) files.
Max image width: All images on a cached article that are wider than the amount of pixels you set here will be automaticaly resized by WikiCache. If you don't want anything resized, just enter a huge number, for example "999999".
User Agent: If you don't want to use the default WikiCache user agent string "Mozilla/4.0 (compatible; WPWC 1.0; Web Server)", then just enter it here. This can be useful if you want to cache a site that only allows IE (shame on them!) with an UA string like this: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
Hide from HQ: WikiCache contacts the WikiCache HQ server whenever the cache process is finished to tell you if your version of WikiCache is the latest. Additionaly WikiCache saves your site to a list of WikiCache users. If you don't want to be shown on that list, just set "N" in this option."
You can make WikiCache compatible with almost any wiki / webpage that uses "div" CSS formating. You can do this with .wcd files (WikiCache Definition Files) and a custom CSS file with the same name as the .wcd file. Just put these files into the WCD folder and they become selectable when you add a new article. Now how does such a file look like? Here's one example (Wikipedia English):
name : Wikipedia English
short : Wikipedia
startdiv : content
fulllink : http://en.wikipedia.org/wiki/
baselink : http://en.wikipedia.org/
removediv : editsection,jump-to-nav
recachedelay : 604800
The first two lines are easy to understand, the third line "startdiv" contains the name of the div where the content starts. WikiCache ignores all the content on a page till a div with this id or class is found. The next one "fulllink is the full link without the name of the articles and one below is the link that gets added to incomplete links, for example "/wiki/some_article" so that they can be accessed from within your blog. The next line "removediv" contains all the divs that should be removed, normaly the edit sections. You can't remove divs that contain other divs (maybe something for the next version). The last one "recachedelay" defines the time in Seconds between recaches of an article. Here's an other example of such a file:
name : MacminiCenter.com
short : MacminiCenter
startdiv : content
fulllink : http://www.macminicenter.com/wiki/index.php?title=
baselink : http://www.macminicenter.com/
removediv : editsection
recachedelay : 604800
The main difference in this example is that the wiki isn't using mod rewrite for nice looking links, so the fulllink becomes a bit longer as usual. It's not important on which line you define something and you can add comments like this:
// Some comment
However, you always have to write "name : Something" and not "name:Something" or "name: Something", the two spaces have to be there.
You can not only customize the look of cached articles, you can customize the look of WikiCache as well. All main elements are inside a different div with accosiated class atributes, so you can add a CSS style for it. If you embedd the WikiCache article list like this
<?php wikicache_articlelist(); ?>
then WikiCache will use following style atributes (the default uses some classes WP uses to make WikiCache look acceptable from the beginning):
Default tags (aka Tagfilter): tagfilter
Sort by links: sortby
Articlecount/pages: articlecount
Search form: searchform
Article name: articlename
Article description: storycontent
Article meta (containst tags and info): meta
Article info (inside meta div): author
Suggest form: suggestform
Back to list link (on article view): backtolist
In other words, the above argument-less function-call has the same effect as
<?php wikicache_articlelist('tagfilter','sortby','articlecount','searchform',
'articlename','storycontent','meta','author','suggestform','backtolist'); ?>
coming soon ...










