[pmwiki-users] Edit Link, ?n=page?action=edit

Allister Jenks arj at zkarj.co.nz
Tue Mar 28 14:48:14 CST 2006


On 3/29/06, The Editor <editor at fast.st> wrote:
>
> Hi Firefly
>
> I put this script in my Site.Footer page and it shows up wherever a
> user has edit privileges.  Where I don't want the button to show, I
> use (:nofooter:) in the group footer (or in a page).  It works really
> nice, for me as an admin also.  I get the button just about anywhere I
> need it.
>
> [[<<]]
> (:if auth edit:)
> (:input form "index.php?n={$FullName}?action=edit":)
> (:input submit value="Edit Page":)
> (:input end:)
> (:if:)
>

Nice touch Caveman.  At this point I'll add in another technique I use on
some of my sites.

Here is the definition of my Site.PageFootMenu

->''$[Page last modified on] {$LastModified}''
[[<<]]
(:if auth edit:)
*[[{$Name}?action=edit | $[Edit] ]]
*[[{$Name}?action=diff | $[Page History] ]]
*%newwin%[[{$Name}?action=source | $[Source] ]]
*[[Site.Search?q={$Group}/ | $[List Group] ]]
(:ifend:)
(:if auth admin:)
* [[Site.Search?q=link={$FullName} | $[Backlinks] ]]
*[[{$Name}?action=upload | $[Attach File] ]]
*[[{$Name}?action=attr| $[Attributes] ]]
*[[{$Group}.GroupAttributes| $[Group Attributes] ]]
(:ifend:)

This means the standard row of buttons only appear if you already have
authority to use them.  I do this because I am primarily using PmWiki as a
website builder and not as a collaborative system.  Therefore nobody
(visitors to my site) generally realise it is a Wiki (except for the
'powered by'!)

When I want to edit a page, I just manually append ?action=login to the URL
and enter my admin password and then I can whisk around the site editing
anything and everything.  Also, when I am logged in as Admin I get a new
link on my SideBar which goes to my Site.Admin page which in turn contains
links to things such as skin configs, edit sidebar, sandbox, etc.

--
Allister
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060329/b6f18f59/attachment.html 


More information about the pmwiki-users mailing list