[pmwiki-users] TableOfContents script

John Rankin john.rankin at affinity.co.nz
Mon Dec 12 16:53:59 CST 2005


On Tuesday, 13 December 2005 11:24 AM, John McGinnis <john.mcginnis at comcast.net> wrote:
>
>Another newbie question:
> 
>Downloaded the pagetoc.php file and loaded it to /cookbook.
>Also added the61; @include70;57; appropriately to the bottom of the config.php file.
> 
>If I attempt to invoke the script with the (:toc:) tag no
>results are parsed. I assume that the script is being invoked
>as the (:toc:) is not displayed.
> 
>I presume I am missing something in the invocation. Reading the
>cookbook, I appear to be doing it right. I am not using MarkupExtensions or PublishPDF.
> 
>Clues?
> 
>John McGinnis
> 
Some questions to help sort this out...

Can you provide a link to a page where this is happening?

Do you at least see "On this page..."?

Does (:toc-back:) generate a link back to the (non-existent) toc?


Then can you add the following to your local/config.php:

    $EnableDiag = 1;

If you add ?action=diag to the address, does the displayed text include the following:

            [toc] => Array
                (
                    [cmd] => >nl1
                    [pat] => /\(:([#\*])?toc(?:-(f)loat)?(?:\s+anchors=(v)isible)?(?:\s+(.*?))?(?:\s+(Q))?:\)(.*)$/se
                    [rep] => TableOfContents($pagename,'$1','$2',PSS('$4'),'$5',PSS('$6')).
    TocEntryAnchors('$3',PSS('$6'))
                    [seq] => B>><>>
                )

            [tocback] => Array
                (
                    [cmd] => directives
                    [seq] => B>>>=
                    [pat] => /\(:toc-back(?:\s+(.*?))?:\)/e
                    [rep] => '[[#toc | '.TocLinkText(PSS('$1')).']]'
                )

            [tocpage] => Array
                (
                    [cmd] => directives
                    [seq] => B>>>=
                    [pat] => /\(:toc-page\s+(.*?):\)/e
                    [rep] => RemoteTableOfContents($pagename,'$1')
                )




-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list