IncludeWithEdit-Talk

Summary: Talk page for IncludeWithEdit.
Maintainer: KAL
Users: (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

It worked out well for something I needed on one of my sites. Here's a link with the system implemented: http://www.pathstoknowledge.com/pmwiki/pmwiki.php?n=Perennis.SpiritWiki KeithCampbell


How about this (it implies changing border-top to border-bottom in the included style):

Markup('included','>if',"/\\(:included\\s+(.+?):\\)/e",
         "PRR().'[+$1+] [[$1?action=edit|[--EDIT--]]]<br>'".
         ".IncludeText(\$pagename,'include $1').".
         "'<p class=\\\'included\\\'>[[$1?action=edit|[--EDIT $1--]]]</p>".
         "<br/>'");

-Radu


Problem with #from anchor

When a page is included with #from#end like:

       (:included somepage#somepart#partend:) 

than the section edit link does not function and the URI looks like this:

       somepage#somepart%23partend?action=edit

(it opens the included page but not the edit version of the page)

-Paddelboot, 04-2006


The code for having the button below the included text didn't quite work correctly. This is how I solved the problem.

Markup('included','>if',"/\\(:included\\s+(.+?):\\)/e",
       "PRR().IncludeText(\$pagename,'include $1').".
       "'<br/><p class=\\\'included\\\'><span class=\\\'button\\\'>".
       "[[$1?action=edit|[-EDIT-]]]</span></p>'");

Bm


Suggestion

Why don't put together SectionEdit and the idea of direct include to perform sth like this.

In the Src.Page you have sth. like this

 [[#FirstAnchor]]
 !! Heading
 BlaBla

 [[#SecondAnchor]]
 !!Next Heading
 Blabla

If I look at it with (:autosection:) I get sth. like this

Src.Page edit

Heading

Blabla

edit

NextHeading

Blabla

Lets take a look at the links. The first edit points to

 Src.Page?action=edit&s=1&auto=y&from=Src.Page

But if I include, let's say Inc.Page

 (:include Src.Page#FirstAnchor:)

i get sth like this

Inc.Page

edit

Heading

Blabla

Lets take a look at the links. The edit points relatively to

 Inc.Page?action=edit&s=1&auto=y&from=Inc.Page

Wouldn't it be very very nice, to keep that edit links absolute, it would make more sense. But I think this depends to SectionEdit too.

Talk page for the IncludeWithEdit recipe (users).

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_COOKIE] => PHPSESSID=fkp100fp115jp33b34grgkgvl4; imstime=1777612731
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=Cookbook%2fIncludeWithEdit%2dTalk
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fIncludeWithEdit%2dTalk
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/IncludeWithEdit-Talk
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/IncludeWithEdit-Talk
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afQ3z-P4zmuaTmd7K7gRRwAAARU
            [REDIRECT_URL] => /wiki/Cookbook/IncludeWithEdit-Talk
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 51373
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/IncludeWithEdit-Talk
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/IncludeWithEdit-Talk
            [SCRIPT_URL] => /wiki/Cookbook/IncludeWithEdit-Talk
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afQ3z-P4zmuaTmd7K7gRRwAAARU
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777612751.2834
            [REQUEST_TIME] => 1777612751
            [argv] => Array
                (
                    [0] => n=Cookbook%2fIncludeWithEdit%2dTalk
                )

            [argc] => 1
        )

)