X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/eb64d58726a65e51915f471181e734455dc19c28..651cdd4b2a85f4e5f9d298a7eea7d0e6d94442b1:/doc/todo/Default_text_for_new_pages.mdwn
diff --git a/doc/todo/Default_text_for_new_pages.mdwn b/doc/todo/Default_text_for_new_pages.mdwn
index 4dff22166..a904f8287 100644
--- a/doc/todo/Default_text_for_new_pages.mdwn
+++ b/doc/todo/Default_text_for_new_pages.mdwn
@@ -1,3 +1,104 @@
-((moti))Call @@@++ USA I8557O92847 EPSON p.r.i.n.t.e.r t.e.c.h s.u.p.p.o.r.t p.h.o.n.e n.u.m.b.e.r u.s.a. C.a.l.l EPSON h.e.l.p d.e.s.k n.u.m.b.e.r n.u.m.b.e.r C.a.n.a.d.a EPSON s.u.p.p.o.r.t p.h.o.n.e n.u.m.b.r usa USA 1 I8557O92847 EPSON p.r.i.n.t.e.r t.e.c.h s.u.p.p.o.r.t p.h.o.n.e n.u.m.b.e.r u.s.a. C.a.l.l EPSON h.e.l.p d.e.s.k n.u.m.b.e.r n.u.m.b.e.r C.a.n.a.d.a EPSON s.u.p.p.o.r.t p.h.o.n.e n.u.m.b.r usa canada 1-1855-709-2847 USA, EPSON printer Tech Support phone number,EPSON technical support phone number 1 I8557O92847 .EPSON Tech Support Number EPSON Tech EPSON tech support, EPSON tech support number, EPSON tech support phone number, EPSON technical support, EPSON technical support number, EPSON technical support phone number, EPSON tech support number, EPSON support number, EPSON Tech support phone number, EPSON support phone number, EPSON technical support phone number, EPSON technical support number,Support Phone Number for EPSON printer Phone Number for EPSON CustomerService Technical Support Telephone Number EPSON printer support number EPSON EPSON printer tech support number EPSON EPSON printer technical support number EPSON EPSON printer technical support phone number EPSON EPSON printer customer service number EPSON EPSON internet security technical support EPSON technical support phone number EPSON EPSON tech support phone number EPSON EPSON customer support phone number I-855-709-2847 EPSON EPSON printer support phone number EPSON EPSON support phone EPSON tech support EPSON customer support EPSON phone support EPSON support number EPSON EPSON technical support EPSON printer customer support phone number EPSON EPSON printer tech support phone number EPSON contact EPSON support EPSON printer technical support phone number ~!~I8557092847++ EPSON EPSON phone number EPSON tech support EPSON support ticket EPSON customer support number EPSON EPSON tech support number EPSON EPSON technical support number EPSON EPSON support center EPSON telephone support call EPSON support EPSON printer support support EPSON EPSON billing support EPSON printer technical support number EPSON support EPSON printer EPSON online support EPSON contact support EPSON printer support number EPSON EPSON printer customer support number EPSON EPSON printer tech support number EPSON support for EPSON EPSON phone number EPSON EPSON customer service phone number EPSON EPSON contact phone number EPSON EPSON printer phone number EPSON EPSON printer customer service phone number EPSON phone number EPSON for EPSON customer service EPSON software phone number EPSON phone number EPSON for EPSON EPSON customer service telephone number EPSON EPSON helpline phone number EPSON EPSON contact number EPSON EPSON customer service number EPSON EPSON customer service phone number ~!~I8557092847++ EPSON us EPSON customer service phone number EPSON usa EPSON telephone number EPSON EPSON phone number EPSON usa EPSON printer contact number EPSON EPSON number EPSON EPSON contact number EPSON usa EPSON printer helpline number EPSON EPSON helpline number EPSON EPSON customer number EPSON EPSON printer customer service number EPSON EPSON contact telephone number EPSON contact number EPSON for EPSON EPSON software contact number EPSON EPSON toll free number EPSON EPSON telephone number EPSON uk EPSON registration number EPSON EPSON toll free number EPSON usa EPSON customer service EPSON software customer service contact EPSON customer service EPSON customer service phone EPSON printer customer service EPSON service EPSON printer technical support EPSON printer customer support EPSON technical support reviews telephone EPSON printer EPSON tech support phone number EPSON EPSON printer tech support phone number EPSON EPSON printer customer service EPSON technical support phone number EPSON EPSON printer free printer support EPSON customer service billing EPSON customer service email address EPSON customer service reviews contact EPSON customer service EPSON tech support number EPSON usa EPSON printer support number EPSON EPSON printer contact number EPSON EPSON customer service phone number EPSON EPSON technical support usa EPSON technical support number EPSON EPSON tech support phone EPSON tech support number EPSON EPSON customer service telephone number EPSON EPSON printer customer support number EPSON EPSON printer phone number EPSON EPSON printer online support EPSON customer service number EPSON EPSON tech support center EPSON customer service EPSON software customer service EPSON customer care number EPSON usa EPSON customer number EPSON EPSON customer support number EPSON EPSON customer care number EPSON EPSON customer care toll free number EPSON EPSON tech support EPSON technical support EPSON printer support EPSON printer tech support EPSON support center EPSON.com customer service EPSON printer customer care number EPSON EPSON customer care EPSON phone number EPSON phone number EPSON for EPSON customer service EPSON phone support EPSON phone number EPSON tech support EPSON support phone number EPSON contact EPSON by phone EPSON contact phone number EPSON EPSON helpline phone number EPSON EPSON printer phone EPSON printer for phone EPSON contact number EPSON EPSON contact support contact EPSON printer EPSON contact number EPSON usa EPSON toll free number EPSON EPSON telephone number EPSON EPSON toll free number EPSON usa EPSON printer support services technical support for printer EPSON EPSON customer service phone number EPSON usa EPSON printer customer care number EPSON usa EPSON customer care number EPSON EPSON customer care center EPSON customer support EPSON customer support phone EPSON customer help EPSON customer & technical support EPSON customer portal EPSON customer care phone number EPSON usa EPSON customer care email EPSON helpline EPSON tech support contact EPSON customer care toll free EPSON printer customer service number EPSON EPSON printer protection norton printer customer service number EPSON EPSON software customer service number EPSON EPSON hotline customer service phone number EPSON EPSON customer service phone number EPSON us how to contact EPSON by email EPSON free phone support EPSON printer technical support number EPSON EPSON printer technical support help desk phone number EPSON EPSON technical support number EPSON toll free number EPSON EPSON printer customer support phone number EPSON EPSON printer customer
+The [[ikiwiki/directive/inline]] directive allows the creation of new pages.
+It would be nice if it was possible to specify default text for the new post.
+For example:
+ \[[!inline pages="blog/* and !*/Discussion" postform="yes" newposttemplate="blogtemplate.mdwn"]]
+This would allow you to create a new blog post. When you hit the `Edit` button, the system presents
+you with an edit form as normal, but rather than being empty, it has the text from `blogtemplate.mdwn`.
+
+Inline below is a [[patch]] that implements this:
+
+----
+
+ diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm
+ index bb21ed2..10c985c 100644
+ --- a/IkiWiki/Plugin/editpage.pm
+ +++ b/IkiWiki/Plugin/editpage.pm
+ @@ -60,7 +60,7 @@ sub cgi_editpage ($$) {
+
+ decode_cgi_utf8($q);
+
+ - my @fields=qw(do rcsinfo subpage from page type editcontent comments);
+ + my @fields=qw(do rcsinfo subpage from page type editcontent comments templatepage);
+ my @buttons=("Save Page", "Preview", "Cancel");
+ eval q{use CGI::FormBuilder};
+ error($@) if $@;
+ @@ -117,9 +117,20 @@ sub cgi_editpage ($$) {
+ }
+ else {
+ $type=$form->param('type');
+ +
+ + my $defaultContent = "";
+ + my $templatepage = $form->param('templatepage');
+ + if ($templatepage && $pagesources{$templatepage}) {
+ + $defaultContent = readfile(IkiWiki::srcfile($pagesources{$templatepage}));
+ + }
+ +
+ if (defined $type && length $type && $hooks{htmlize}{$type}) {
+ $type=possibly_foolish_untaint($type);
+ }
+ + elsif ($templatepage && $pagesources{$templatepage}) {
+ + # favor the type of the template page
+ + $type=pagetype($pagesources{$templatepage});
+ + }
+ elsif (defined $from && exists $pagesources{$from}) {
+ # favor the type of linking page
+ $type=pagetype($pagesources{$from});
+ @@ -129,7 +140,7 @@ sub cgi_editpage ($$) {
+ if (! $form->submitted) {
+ $form->field(name => "rcsinfo", value => "", force => 1);
+ }
+ - $form->field(name => "editcontent", validate => '/.+/');
+ + $form->field(name => "editcontent", value => $defaultContent, force => 0, validate => '/.+/');
+ }
+
+ $form->field(name => "do", type => 'hidden');
+ diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
+ index 8efef3f..075d7d8 100644
+ --- a/IkiWiki/Plugin/inline.pm
+ +++ b/IkiWiki/Plugin/inline.pm
+ @@ -271,6 +271,7 @@ sub preprocess_inline (@) {
+ $rootpage=$params{page};
+ }
+ $formtemplate->param(rootpage => $rootpage);
+ + $formtemplate->param(templatepage => $params{newposttemplate}) if $params{newposttemplate};
+ $formtemplate->param(rssurl => $rssurl) if $feeds && $rss;
+ $formtemplate->param(atomurl => $atomurl) if $feeds && $atom;
+ if (exists $params{postformtext}) {
+ diff --git a/templates/blogpost.tmpl b/templates/blogpost.tmpl
+ index 7eeede6..5c8b34c 100644
+ --- a/templates/blogpost.tmpl
+ +++ b/templates/blogpost.tmpl
+ @@ -8,6 +8,9 @@
+
+
+
+ +
+ +
+ +
+
+
+
+
+---
+
+Perhaps I'm misunderstanding something, but can't you use already existing
+in-house means instead of this patch; use a procedure as I do in the Hurd wiki?
+ with one template:
+.
+-- [[tschwinge]]
+
+> You are entirely correct. I thought I'd seen it somewhere, but then couldn't
+> find it when I came to use it. If the patch isn't applied (and I can see arguments
+> on both sides of that debate), then at least a pointer to
+> [[ikiwiki/directive/edittemplate]] should be added to [[ikiwiki/directive/inline]]
+> (and I'd make that change myself, but the edit needs to happen in the underlay,
+> not in the online docs). -- [[Will]]
+
+>> Go ahead and make the edit, ikiwiki's source is arranged such that edits
+>> on this wiki to files that form the underlay will affect the underlay.
+>> (Clearly I won't be adding duplicate functionality.)
+>> --[[Joey]]
+
+>>> Edit made. [[done]] -- [[Will]]