Revision history for ControledLinks


Revision [19424]

Last edited on 2008-01-28 00:15:45 by JavaWoman [Modified links pointing to docs server]

No Differences

Revision [17805]

Edited on 2007-12-12 10:11:07 by JavaWoman [prevent function references looking as page links]
Additions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->""LoadPage""($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->""HasAccess""("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->""HasAccess""("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->""LoadPage""($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----
Deletions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----


Revision [16879]

Edited on 2007-05-31 23:26:55 by NilsLindenberg [Reverted]
Additions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----
Deletions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----


Revision [16677]

Edited on 2007-05-31 10:35:02 by Nv3F3m [Reverted]
Additions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----
Deletions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----


Revision [1988]

Edited on 2004-10-25 18:38:45 by NilsLindenberg [header]
Additions:
=====Avoiding Errors with acls and link-handling=====
When building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. This is easy to avoid. We only have to tweak the $wakka->link function in wakka.php:

Lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

The $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. But then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".

----
Deletions:
when building wakkalinks, wakkawiki doesn't care about acls of the target page and shows up an error-message, when s/o clicks on a link on which he has no apropriate rights. this is easy to avoid. we only have to tweak the $wakka->link function in wakka.php:

lets have a look at the very last line in this function which looks similar to

return ($this->LoadPage($tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>");

replace it by these three lines:

$read = ($this->HasAccess("read", $tag) ? "<a href='".$this->href($method, $tag)."'>".$text."</a>" : $text);
$edit = ($this->HasAccess("write", $tag) ? "<a class='missingpage' href='".$this->href($missing, $tag)."'>$text</a>" : $text);
return ($this->LoadPage($tag) ? $read : $edit);

with this modification the hyperlink-stuff is dropped whereever the hasAccess-query failes and only the linking text is shown.

the $edit-variable is only useful, when the default write-access is restricted (configured in the index.php), because it always points to pages that don't exist. but then you can run a wakka-site with no "broken" links. dead links (i.e. those which normaly leads to an edit-form or to an error-page for those who have no write access) are only activated after an editor has createt the page, where that links points to, and thus your wakka-site won't look like to be "under construction".
----


Revision [712]

The oldest known version of this page was created on 2004-07-11 15:50:13 by DreckFehler [header]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki