WackoWiki : Dev/PatchesHacks/CallEdit

Action: Edit

taken from footer.php, to made them also available inside bookmarks and wikipages

{{edit}}

/actions/edit.php
<?php 
// If User has rights to edit page, show Edit link
echo $this->HasAccess("write") ? "<a href=\"".$this->href("edit")."\" accesskey=\"E\" title=\"".$this->GetResourceValue("EditTip")."\">".$this->GetResourceValue("EditText")."</a>\n" "";
?>


{{edit [page="yourPage"] [text="your text"]}}

/actions/edit.php
<?php 
// If User has rights to edit page, show Edit link
if ($for$page=$for
$editpage $this->href(""$page."/edit");
if (!
$page
{
$editpage $this->href("edit");}
if (!
$text)
$text $this->GetResourceValue("EditText"); 
$output .= $this->HasAccess("write") ? "<a href=\"".$editpage."\" accesskey=\"E\" title=\"".$this->GetResourceValue("EditTip")."\">".$text."</a>\n" "";
echo (
$output);
?>



To Do