Hagan, One slight problem...
If you are using the publish draft support i.e.: $EnableDrafts = 1; $EnablePublishAttr = 1; ...then the recipe below seems to conflict by always greying out the 'Publish' button in the Edit Form. The symptoms are as if you have set a 'publish' password on the page or group (obviously I have not). I didn't notice it first of all as I'd previously edited a site protected page and entered the admin password. Only when I restarted my browser to edit the sandbox I saw the Publish button greyed out. Commenting out this recipe and refreshing the page brought back the Publish button. I've tried to debug this one and can not see what could be causing it. Perhaps it's the names of your variables conflict with scripts/draft.php. I'm wondering if you see the same thing. Any ideas / pointers welcome? Best regards, -Steve. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:pmwiki-users- > [EMAIL PROTECTED] On Behalf Of Crisp, Steve [UK] > Sent: 05 July 2007 12:49 > To: H. Fox > Cc: [email protected] > Subject: Re: [pmwiki-users] Is it possible? Draft Page indication and > crossreference > > Hagan, > > You are a star! I've implement that IAW your recipe and it works well. > Instead of adding to the sidebar I thought it best to add to the > 'Site.PageActions' file. On mine I colour code 'View Draft' to red and > 'View Published' in green. > > Thanks for your support on this one - great enhancement. > -Steve. > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of H. > Fox > > Sent: 04 July 2007 21:02 > > To: Crisp, Steve [UK] > > Cc: [email protected] > > Subject: Re: [pmwiki-users] Is it possible? Draft Page indication and > > cross reference > > > > On 7/4/07, H. Fox <[EMAIL PROTECTED]> wrote: > > > Or you can put this in config.php > > > > > > $pagename = ResolvePageName($pagename); > > > if (CondAuth($pagename, 'edit') > > > && PageExists($pagename.'-Draft')) { $EditDraft = TRUE; } > > > > > > and use this in your SideBar > > > > > > (:if enabled EditDraft:) > > > [-([[{*$FullName}-Draft | View draft ]])-] > > > (:if:) > > > > Better still, switch in both directions. > > > > http://www.pmwiki.org/wiki/Cookbook/SwitchToAndFromDraft > > > > Hagan > > _______________________________________________ > pmwiki-users mailing list > [email protected] > http://www.pmichaud.com/mailman/listinfo/pmwiki-users _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
