[pmwiki-users] bookmarklet on wiki page solution!

JB jbit at ev1.net
Wed Aug 16 22:27:24 CDT 2006

I chatted with PM today on irc and he provided a great solution.

First, PM said it is not wise to allow "javascript:blahblahblah" 
inside of a PMWiki page source because that would be a security risk.  
Currently PMWiki just appends it to the end of the current page url.  
I thought maybe it might behave like an external URL and not be 
modified at all. I could not find any way to do this and that is 
why I chatted with PM.

The solution:
Put this in you local config.php

# allow action bookmarklet links
$LinkFunctions['action:'] = 'LinkIMap';
$IMap['action:'] = '$1';
$IMapLinkFmt['action:'] = "<a

Then your pmwiki page source code can look like this:


And now you have bookmarklets!  You can drag the link
from your browser window to your bookmarks or to you
bookmarks toolbar.  I prefer the bookmarks toolbar
because it makes it into a button for you.

So whenever you are in a pmwiki you are just 1 click 
away from actions.  This is useful if you have a 
wiki that you want to look like a web page without the 
"View Edit History Print" in the upper right.  To 
edit you can click the browser bookmark toolbar button
(bookmarklet).  This will save you from having to click
in the URL box and typing ?action=edit to the end of the 
url and then pressing enter.  A big ergonomic improvement.

Thanks PM!   :)


More information about the pmwiki-users mailing list