=====ShowRecentChangesMindMapAction=====
This is the development page for the ""ShowRecentChangesMindMap"" action
Please feel free to make changes or leave comments!
%%(php)
GetUser();
if ($user)
{
$filename = "recent_changes_for_".$this->GetUserName().".mm";
}
// If this is the 1st pass over the page then create the mindmap XML and store it in a file
if (!$_SESSION["mnprinted"] || $_SESSION["mnprinted"] == "")
{
$xml = "\n";
// If this user is a logged in user (thus a defined filename from above)
if ($filename != "")
{
$fp = @fopen($filename, "w");
fwrite($fp, $xml);
fclose($fp);
}
// Set the flag to say we've already done the map generation work
$_SESSION["mnprinted"] = "printed";
// and reload this page
$this->Redirect($this->Href());
}
else
{
// This must then be the 2nd pass, so lets zap the flag.
$_SESSION["mnprinted"] = null;
// Set up a URL for the mindmap
// NOTE!!! WAKKA_HOST is a *new* config variable!
echo "
This page will show the ".$max." most recent changes to this Wikki
";
// Extract host info from base_url. It is assumed that wikka.php will always be the starting php file...
$baseurl = $this->config["base_url"];
$pos = strpos($baseurl, "wikka.php");
if ($pos > 1)
{
$host = substr($baseurl, 0, $pos - 1);
}
else
{
// Force the error msg below to be shown
$host = null;
}
if (!$host || $host == "")
{
echo "Could not derive hostname. Is the base_url variable in wikka.config.php defined?";
}
else
{
$mindmap_url = $host."/".$filename;
$mindmap_url = $this->cleanUrl(trim($mindmap_url));
if (is_array($vars))
{
foreach ($vars as $param => $value)
{
if ($param == 'height') {$height = $this->htmlspecialchars_ent($vars['height']);}
}
}
if (!$height)
{
$height = "500";
}
$mindmap_url_fullscreen = "3rdparty/plugins/freemind/fullscreen.php?url=$mindmap_url";
$output =
"\n".
"\n".
"
\n".
"Download this mind map :: Use Freemind to edit it :: Open fullscreen