Work Nets
AndriusKulikauskas February 9, 2009 21:59 CET I use ProWiki for our WorkNets wiki for a culture of independent thinkers. I document here some of the ways that we use ProWiki.
AndriusKulikauskas March 3, 2009 17:22 CET I'm also interested in understanding the Code of the ProWiki engine, wiki.pl
Maintaining Website Content
I sometimes use ProWiki as a backend for editing content which we then display by including it inside another web page. I first did this for My Food Story where I show an "article" on the left hand side of the page and some other function (such as a collection of stories) on the other side of the page. The article is maintained on the wiki page. See, for example:
I set this up for FredKayiwa for a site he is creating:
And I use three such inclusions for
There are several advantages. We are able to invest our work in our main wiki (worknets) and simply use other domains to display it. We are able to separate viewing and editing the pages. We are able to rapidly change content. People of a variety of levels of sophistication can help in changing the content, indeed, the general public can participate. We are able to make use of existing content in the wiki (which is already formatted so that it can be copied and pasted in the page in question) and automatic links are created that link to the wiki pages.
Here's the kind of PHP code that I include (and I make use of a ProWiki template "b" that I created).
| <?php
function get_include_contents($url) {
ob_start();
include $url;
$includetext = ob_get_contents();
ob_end_clean();
$includetext = str_replace("wiki.cgi?","http://www.worknets.org/wiki.cgi?",$includetext);
$includetext = str_replace("<img src='/image/icon_edit.gif' border='0'>","",$includetext);
$includetext = str_replace("<HTML>","",$includetext);
$includetext = str_replace("</HTML>","",$includetext);
$includetext = str_replace("<body >","",$includetext);
$includetext = str_replace("</body>","",$includetext);
$includetext = str_replace("<HEAD>","",$includetext);
$includetext = str_replace("</HEAD>","",$includetext);
$includetext = str_replace('<table width="200%">','<table width="100%">',$includetext);
return $includetext;
}
$includeurl = "http://www.worknets.org/wiki.cgi?browse=UgandaYouthFootball&template=b";
$includetext = get_include_contents($includeurl);
print $includetext;
?> |
|
|
SVG Map
AndriusKulikauskas February 11, 2009 20:55 CET Today I tried out the SVG technology. Very nice, thank you, Helmut! Here's an example, a map of Kenya with hot links to document our Pyramid of Peace. The map is maintained at: http://www.worknets.org/wiki.cgi?PyramidOfPeaceMap
| <?php
#For some reason, ProWiki keeps changing the name of the SVG file. So we get the filename from the relevant directory.
#I'm assuming there's only one SVG on the wiki page.
$svgfiles = glob("/yourdirectory/html/graf/PyramidOfPeaceMap/*");
$svgfile = basename($svgfiles[0]);
print '<object data="http://www.worknets.org/graf/PyramidOfPeaceMap/'.$svgfile.'"';
prnt 'type="image/svg+xml" width="1200" height="858" >';
print '<b>Error: SVG-Plugin missing - please install</b></object>';
?> |
|
|
Double Panes
AndriusKulikauskas February 22, 2009 11:32 CET I'm using the PHP shell for a two-paned interface that I'm developing for our WorkNets wiki, see: http://www.worknets.org/en/
I will set up a simple interface for reading and also an advanced interface with many options for viewing and editing.
I am also using a third template to handle the CSS for styling.
Custom Inserts into Templates
AndriusKulikauskas March 3, 2009 19:19 CET HelmutLeitner taught me how to make my own custom inserts in my templates. There are some standard inserts such as {PageText} which is replaced by the HTML for the page.
| $ret =~ s/{PageText}/$text/; |
|
|
But I needed the raw text so Helmut showed me how to create:
| $ret =~ s/{RawText}/PageRetText($id);/ge; |
|
|
where I'm using the function that calls the raw text.
Desired Features
- CdmlList - be able to set a variable to a value and so just get the relevant metadata
|