[Pmwiki-users] [Migration] Moving from Pmwiki 1.0 to 2.0

John Feezell JohnFeezell
Tue Aug 31 20:37:42 CDT 2004


On Tue, 31 Aug 2004 13:49:58 -0600, Patrick R. Michaud  
<pmichaud at pobox.com> wrote:

> On Tue, Aug 31, 2004 at 08:50:09AM -0500, John Feezell wrote:
>> These all relate to PmWiki-2.0.devel3 in no particular order.
>>
>> 1.  Will [[<<]] be available?
>
> Yes, unless someone comes up with a better alternative.  I just forgot
> to add it into the base markup (it's now in CVS, will be in devel4).
>
>> 2.  Will ThisPage, ThisGroup, etc. be available?
>
> I haven't decided where these will go yet, or if we'll really need them.
> Adding ?action= to other pages is pretty simple now, since one can
> do things like "OtherPage?action=edit" directly in the markup.  They'll
> probably reappear, but I'm trying to decide how/where they should go
> (in 1.0 they were bizarre InterMap links).
>
>> 3.  Is there a new variable for $WikiStylePattern?
>
> No, it's the same variable--it just has a slightly different value now,
> to be able to accommodate quoted attributes.
>
>> 4.  Will $InlineReplacements be available in 2.0?
>
> Yes, $InlineReplacements (and all other markup) are now entered
> via the Markup() function.  Thus, where one previously did
>
>    $InlineReplacements['/pattern/'] = "replacement";
>
> one now does:
>
>    Markup('name','inline','/pattern/',"replacement");
>
> where 'name'    is an identifier for the markup
>       'inline'  says where the markup should go relative to other markup
>                 patterns
>       'pattern' the thing to be replaced (via preg_match)
>       'replace' what to replace it with (via preg_match)
>
> More on this in another message (and documentation page).
>
>> 5.  How is the mkgiddir() function handled in 2.0?
>
> It's now mkdirp($dirname), and it creates entire directory paths instead
> of single directories.  It also takes a different approach to the
> permissions issues than previous versions did--instead of trying to
> get all of the permissions "just right" before creating the directory,
> it now creates the directory and fixes everything up afterwards (or  
> reports
> back if there are problems).
>
> mkgiddir() will probably reappear in a compatibility module somewhere
> to make it easier for people to migrate things to 2.0.
>
>
>> 6.  How is the StartHTML() function handled in 2.0?
>> 7.  How is the EndHTML() function handled in 2.0?
>
> They're gone (but will probably reappear in a compatibility module).
>
> The new way to do the equivalent of StartHTML()/EndHTML()
> is PrintFmt($HTMLStartFmt,$pagename) and PrintFmt($HTMLEndFmt,$pagename).
> This gets a basic HTML page going according to the user settings.
>
> However, if you want to get the user's defined layout (i.e., with
> headers, sidebars, etc.), the more common way to do this is to
> do something like:
>
>    $pagefmt = array(&$PageStartFmt,"output content",&$PageEndFmt);
>    PrintFmt($pagefmt,$pagename);
>
> and "output content" will be put in the output template at the
> position of the <!--PageText--> directive.  Of course, "output content"
> can be something like "function:MyOutputFunction" or  
> "wiki:Group.PageName",
> but PmWiki's built-in handlers don't make much use of these any longer.
>
> Pm
>
>

Thanks.  I'll be working on these during the next few days.  I made
need some clarification or examples to help me understand the new
structures.  I've applied some modifications based upon your input
that fix specific issues.

/JF



More information about the pmwiki-users mailing list