Disable "Backlinks" in pmwiki

90 Views Asked by At

Is there any way to disable "Backlinks" at all, so that non-admins cannot get access to backlinks?

enter image description here

2

There are 2 best solutions below

1
Dfaure On

These links are usually defined in the PageActions wiki subpages.

You should refer to the https://www.pmwiki.org/wiki/PmWiki/SitePageActions page to get further details on them and eventually delete or make them optionally available.

The backlink feature is relying on the PmWiki's internal page search engine, and there's no easy way to disable it without manually altering the search parameters themselves (with some code in the config.php file for example).

If the requirement is to prevent knowledge of some read-protected pages (but which could contain links to guessable targets), the $EnablePageListProtect flag is driving the wiki behavior for that. Being active by default, read-protected pages shouldn't be revealed by their contents nor their names.

The only real constraint is to alter the related page attributes to declare them as read-protected (refer to password-protection to do so).

0
Finar On

Yes, you can do it, see: https://www.pmwiki.org/wiki/PmWiki/SecurityVariables#HandleAuth

You will need to add the following code to config.php: $HandleAuth['search'] = 'admin';

Note, that this will also disable the whole search functional for not admin users. Note, that if you will want to remove the link, you also have to edit your Site/PageActions page.

If you want to keep whole search functional, but just disable backlinks, you have to code this in PHP. You can use $pagename variable and compare it to the link param from the GET.