[pmwiki-users] user-customisation of edit form

H. Fox haganfox at gmail.com
Mon Jul 25 01:01:18 CDT 2005


On 7/23/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Ah yes, I forgot the semicolon and that the last argument to
> array_splice has to be an array.  Thus:
> 
>     global $WikiLibDirs, $SkinDir;
>     $where = count($WikiLibDirs);
>     if ($where>1) $where--;
>     array_splice($WikiLibDirs, $where, 0,
>       array(new PageStore("$SkinDir/wiki.d/\$FullName")));

This works well.  I was able to use it to define a custom Edit Form
for the Light skin.  The rest of the code is

    global $PageEditForm, $XLLangs;
    $PageEditForm = '$[Site.EditForm]';
    XLPage('light', 'Site.LightXLPage');
    array_splice($XLLangs, -1, 0, array_shift($XLLangs));

The skin's custom pages only appear if you're using the skin, which is
good.  To reduce ambiguity I prefixed "Light" to the names of the
pages included with the skin, (only LightEditForm and LightXLPage).

Pm, will you kindly install the new version on pmwiki.org so it can be
tested there?

Hagan




More information about the pmwiki-users mailing list