Recent Changes - Search:

Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions

About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture

Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion

E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards

Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi

PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers

Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt

(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login

Drafts

(:Summary: PmWiki group header. Includes styles and trail.:) (:comment please leave the multiple style definitions concatenated as a single line. Linebreaks do appear in the output when the wiki is configured with linebreaks enabled -- thanks!:) (:comment included in PmWiki localisation headers and footers :)

(:nl:)(:Summary: Draft versions of pages:)

PmWiki has the capability to stage ''draft'' versions of a page prior to them becoming "official". All of the draft pages end in "-Draft" by default (this can be changed by setting $DraftSuffix). Multiple interim edits to a page can be temporarily saved in a "-Draft" copy of a page until the draft is ready to be published to the original.

Configuration and usage

When the site administrator sets $EnableDrafts in a local customization file, the "Save" button on the edit page is split into separate "Publish" and "Save draft" buttons.

The "Save draft" button causes any edits to be saved to a "-Draft" copy of the original page, leaving the original page intact. Subsequent requests to edit the page (either the original or -Draft) bring up the draft copy for further editing.

The "Publish" button saves back to the original non-Draft copy of the page, removing any -Draft page that may have been created.

By default, saving drafts and publishing are available to anyone with 'edit' permissions (see Passwords). However, the site administrator can also set the $EnablePublishAttr configuration variable, which provides a separate 'publish' permission that is required to publish to the original page.

When "publishing", how the page's history is handled depends on whether the administrator has set the $EnableDraftAtomicDiff variable. * When set to 1, "publishing" a draft version will clear the "draft" history, leaving a single "diff" between the latest and the previous "published" versions. Note that this will delete the author names, dates and contributions of the intermediate, unpublished versions, so the change "Summary" you enter should summarize the changes. * Otherwise, all of the "draft" history entries are kept -- this is the default. The final "publish" history entry will show changes since the most recent "draft" version.

Drafts and (All)RecentChanges

By default, using the "Save draft" or "Save draft and edit" button will be recorded to both Site.AllRecentChanges and Group.RecentChanges. Also after "publishing" a draft version an orphaned link to the "-Draft" page will remain.

To disable on both Site.AllRecentChanges and Group.RecentChanges:

->

$DraftRecentChangesFmt = array();

or alternatively:

->

if ( @$EnableDrafts && @$_POST['postedit']>'' || @$_POST['postdraft']>'' )
  unset($RecentChangesFmt);

To only disable one of these, unset it individually:

->

if ( @$EnableDrafts && @$_POST['postedit']>'' || @$_POST['postdraft']>'' ) {
  unset($RecentChangesFmt['$Group.RecentChanges']); # -and/or-
  unset($RecentChangesFmt['$SiteGroup.AllRecentChanges']);
}

If a $DraftRecentChangesFmt array is defined, it will be used instead of $RecentChangesFmt when saving a Draft version. For example, to have all draft versions only appear on a page Site.DraftRecentChanges, you could add to config.php:

->

$DraftRecentChangesFmt['Site.DraftRecentChanges'] 
  = '* [[{$Group}.{$Name}]]  . . . $CurrentTime $[by] $AuthorLink: [=$ChangeSummary=]';

See also $RecentChangesFmt and $DraftRecentChangesFmt.

Drafts with searches, pagelists, and RSS

The drafts module also sets pagelists and searches (and thus RSS feeds) to ignore "-Draft" pages by default; one has to do list=all or similar in order to have draft pages included in a pagelist or RSS feed.

>>faq<<

Q: How do I moderate all postings?

A: Start by enabling drafts to change the "Save" button into separate "Publish" and "Save draft" buttons. Then set $EnablePublishAttr. This adds a "publish" authorization level to distinguish editing of page drafts from publishing. (:nl:)(:Summary:Trail and talk page links:) (:comment included in PmWiki localisation headers and footers :) <<? >>bgcolor=#ffe border-top="1px solid black" font-size=.8em<< This page may have a more recent version on pmwiki.org: PmWiki:Drafts, and a talk page: PmWiki:Drafts-Talk. >><<

(:Summary: Website page footer:)

Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login

Page last modified on November 21, 2019, at 09:17 PM