• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5679: it looks to me like GenPDFAddOn does not actually use the skin parameter

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension GenPDFAddOn Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

despite what the docco suggests.

I've added a bunch of the TWiki::UI::View::view template code in to make it work,but it sure looks like more work is going to be needed.

-- TWiki:Main/SvenDowideit - 03 Jun 2008

unfinished patch:

Index: lib/TWiki/Contrib/GenPDF.pm
===================================================================
--- lib/TWiki/Contrib/GenPDF.pm   (revision 364)
+++ lib/TWiki/Contrib/GenPDF.pm   (working copy)
@@ -110,8 +110,43 @@
          if $prefs{'recursive'}; # no point spoiling _everything_
       TWiki::Func::redirectCgiQuery($query, $text);
    }
+   
+   my $session = $TWiki::Plugins::SESSION;
+   my $tmpl = $session->templates->readTemplate( 'view', $prefs{'skin'} ) || $prefs{'skin'}.'%TEXT%';
+    my( $start, $end );
+    if( $tmpl =~ m/^(.*)%TEXT%(.*)$/s ) {
+        my @starts = split( /%STARTTEXT%/, $1 );
+        if ( $#starts > 0 ) {
+            # we know that there is something before %STARTTEXT%
+            $start = $starts[0];
+            $text = $starts[1] . $text;
+        } else {
+            $start = $1;
+        }
+        my @ends = split( /%ENDTEXT%/, $2 );
+        if ( $#ends > 0 ) {
+            # we know that there is something after %ENDTEXT%
+            $text .= $ends[0];
+            $end = $ends[1];
+        } else {
+            $end = $2;
+        }
+    } else {
+        my @starts = split( /%STARTTEXT%/, $tmpl );
+        if ( $#starts > 0 ) {
+            # we know that there is something before %STARTTEXT%
+            $start = $starts[0];
+            $text = $starts[1];
+        } else {
+            $start = $tmpl;
+            $text = '';
+        }
+        $end = '';
+    }
+
+   
    $text =~ s/\%TOC({.*?})?\%//g; # remove TWiki TOC
-   $text = TWiki::Func::expandCommonVariables($text, $topic, $webName);
+   $text = TWiki::Func::expandCommonVariables($start.$text.$end, $topic, $webName);
    $text = TWiki::Func::renderText($text);
 
    return $text;

-- TWiki:Main.SvenDowideit - 03 Jun 2008

ItemTemplate
Summary it looks to me like GenPDFAddOn does not actually use the skin parameter
ReportedBy TWiki:Main.SvenDowideit
Codebase

SVN Range TWiki-5.0.0, Sun, 01 Jun 2008, build 16865
AppliesTo Extension
Component GenPDFAddOn
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:16940
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-06-25 - SvenDowideit
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback