(redirected from Programming.PmWikiDevelopment)



General Notes



TODO: write-up notes on rename extension, and find back notes on source-block button



Dev “plans”

  • js-interface for image upload/thumbnails (w/ ajax), for attachment uploads (without leaving edit page).
  • better preview in skin
  • unit-testing
  • alternate history display (show at time/animate changes)
    • hah-hah. I’ll never get to this!







Restrict reading to specific groups

IE, make all other groups require some login

## Group Access
## restrict reading to the group 'Main'
## using newly defined var instead of global $Group
## since $Group is not available for default Group (in this case, 'Main)'
list($group, $name) = explode('.', ResolvePageName($pagename));
if ($group != 'Main') {
  # although the action is 'browse', this has to be 'read'
  $DefaultPasswords['read'] = '@admins';



conditional skins

based on group

if ($Group == 'Main') {
  $Skin = 'bootstrap';
} else {
  $Skin = 'pmwiki';


based on action

In this case, browse is one skin, all others is pmwiki
This was created for a site where the template had a lot of boilerplate that got it the way of editing, etc.
I could have changed the template for the admin user, but that would have made viewing the changes more difficult (requiring two browsers, f’r instance).

if ($action != 'browse') $Skin = 'pmwiki';



enable edit access-key without displaying edit button

If loging is required, but you don’t normally display unless logged in....
Make display conditional, but ALWAYS have a non-display with the accesskey

%item rel=nofollow class=rename accesskey='$[ak_edit]'%[[{*$FullName}?action=edit|]]



See Also


meta: theme is more html/css oriented, as opposed to php-building for other pmwiki-development


Category tags

Programming pmwiki php WebDevelopment wiki