[pmwiki-users] making browser adding ?action=... to URL?

Steve Glover steve.glover at ed.ac.uk
Mon Feb 9 02:52:04 CST 2009


Oliver Betz wrote:
> Hans wrote:
> 
>>> besides adding a certain action to Site/PageActions, I could imagine
>>> to have the browser adding the ?action=somewhat to the URL.
>>> This would be useful for actions which shouldn't be visible to
>>> everyone.
>>> Has anyone such a solution ready for one of the popular browsers?
>> I don't quite understand. You add ?action=myaction to the url, by
>> either typing it into the address bar, or using a link markup like
> 
> I want to avoid typing it manually, my browser shall append it by a
> single keysteoke or mouse click. And I want to have it available for
> arbitrary pages, e.g. for maintenance purposes.
> 
> In the mean, I found it myself, it's really simple with a bookmarklet,
> for example:
> 
> javascript:location.href=location.href+'?action=source'

The other way to do something like this is to have the appropriate links 
available as nav menu items once someone with the appropriate privileges 
is logged in.

Here, for example, is my Site.SideBar:

(:if auth edit:)
* [[ Team.SiteTools | Admin]]
(:ifend:)
* [[ {*$FullName}?action=search&q=link={*$FullName} | BackLinks ]]
* [[ {*$FullName}?action=search | Search ]]
* [[ {*$FullName}?action=print | Print ]]
(:if auth attr:)
* [[ {*$Group}.GroupAttributes?action=attr | ACL ]]
(:if auth edit:)
* [[ {*$FullName}?action=edit | Edit Page ]]
* [[ {*$FullName}?action=diff | History ]]
* [[ {*$Group}.RecentChanges | Changes ]]
(:if auth upload:)
* [[ {*$FullName}?action=upload | Upload ]]
(:if auth edit:)
* [[ Main.HomePage?action=logout | logout ]]
(:ifend:)

(:if false:)do not add extra items or delete the logic mark-up!(:ifend:)

I then use CSS in the appropriate skin to convert the bulleted list into 
a row of navigation buttons.

Cheers

Steve


-- 
Steve Glover: SDSS, EDINA, Causewayside House, 160 Causewayside EH9 1PR
e:steve.glover at ed.ac.uk t:0131 650 2908 f:0131 650 3308 m:07961 446 902

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



More information about the pmwiki-users mailing list