[pmwiki-users] Skins and Custom Edit Forms

Hans design at flutesong.fsnet.co.uk
Tue Jul 26 05:15:56 CDT 2005


Tuesday, July 26, 2005, 10:47:12 AM, Hans wrote:
>    global $XLLangs, $PageEditForm;
>    $PageEditForm = '$[Site.EditForm]';
>    XLPage('myskin', 'Site.myskin-XLPage');
>       array_splice($XLLangs, -1, 0, array_shift($XLLangs));

> But it has the side-effect to enable any user to create their own Edit
> Form, which some admins may not want, because it defines the
> $PageEditForm via the XL function.

> Is there a way to prevent this, or do we need to use $PageEditFmt?

thinking about it more:
The option of giving users the ability to create their own edit forms
should be left to the admin. So

$PageEditForm = '$[Site.EditForm]';

should be set by the admin, in config.php, if this option is wanted.
It should not be set by the skin if possible.

If the skin author wants a custom EditForm for his/her skin it would
be better to set in skin.php:

 $PageEditForm = 'Site.myskin-EditForm';

i.e. set it directly and not via the XLPage function.
This editForm will then be used for the skin. If the admin does not
like it, he can change the skin.php line ( comment it out).



Best, 
~Hans                           





More information about the pmwiki-users mailing list