[pmwiki-users] Is it possible? Draft Page indication and crossreference

Crisp, Steve [UK] SCRISP at ngms.eu.com
Thu Jul 5 09:48:06 CDT 2007


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: pmwiki-users-bounces at pmichaud.com [mailto:pmwiki-users-
> bounces at pmichaud.com] On Behalf Of Crisp, Steve [UK]
> Sent: 05 July 2007 12:49
> To: H. Fox
> Cc: pmwiki-users at pmichaud.com
> 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: haganfox at gmail.com [mailto:haganfox at gmail.com] On Behalf Of H.
> Fox
> > Sent: 04 July 2007 21:02
> > To: Crisp, Steve [UK]
> > Cc: pmwiki-users at pmichaud.com
> > Subject: Re: [pmwiki-users] Is it possible? Draft Page indication
and
> > cross reference
> >
> > On 7/4/07, H. Fox <haganfox at users.sourceforge.net> 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
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list