[pmwiki-users] How to exclude Draft pages from RecentChanges?
romat2 at gmail.com
Mon Jun 26 10:45:52 CDT 2006
In April I asked how to exclude Draft pages from RecentChanges (see
details bellow). Patrick, is there a chance you could take a look at
"special-purpose $EditFunction" you were talking about or, at least,
give me any clue?
Here are reasons why I think it is useful
* authors most probably don't want to catch attention to unfinished
changes (this is the reason why they use Drafts).
* for sites that use titles instead of page names (including
RecentChanges entries) - SomePage and SomePage-Draft have same titles,
so it's easy to overlook it in RecentChanges
Thanks in advance
On 4/18/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Apr 18, 2006 at 06:18:52PM +0200, Roman wrote:
> > To eliminate possible dependencies I tried fresh installation of
> > version 2.1.5 with following (and the only) lines in config.php
> > $EnableDrafts = 1;
> > if (substr($pagename, -6) == '-Draft')
> > $RecentChangesFmt = array();
> > and draft pages are still being logged.
> Oh, yeah. The problem is that when a draft is first created,
> the pagename doesn't have "-Draft" in it (it's the page the
> draft is being created from).
> I'll have to see if I can come up with a different/better solution.
> It's probably possible to do it with a special-purpose $EditFunction.
> > On 4/18/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > On Tue, Apr 18, 2006 at 04:45:12PM +0200, Roman wrote:
> > > > If we want to exclude page of a known name from RecentChanges we can
> > > > use local configuration files for that. But how to exclude all Draft
> > > > pages? I put following lines to config.php but it does not work.
> > > >
> > > > if (substr($pagename, -6) == '-Draft')
> > > > $RecentChangesFmt = array();
> > >
> > > Seems like that ought to work. Keep in mind that this change
> > > won't remove any existing -Draft pages listed in RecentChanges,
> > > it just prevents new ones (or updates) from appearing.
> > >
> > > Pm
> > >
> > _______________________________________________
> > pmwiki-users mailing list
> > pmwiki-users at pmichaud.com
> > http://host.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users