the author of dokuwiki says it’s print optimized already… no need for a button.

i have got the problem, that if there are large pictures in dokuwiki, than the text size is minimal (not readable).

so i set all pictures to 400px

{{:projects:websites:screenshot.png?400|}}

then it was somewhat ok.

NO KIDDING! YOU WILL HAVE TO DO THIS MANUALLY! THERE IS NO EXTENSION 😀

Here is the code for an export_html button.

create a new file:

lib/tpl/dokuwiki/printview.php

with this content:

[cc lang=”php” escaped=”true” width=”600″]



BUTTON;
echo $button;
}
?>
[/cc]

Edit (can be nicely done online from filezilla: r-click -> edit -> should open some basic ascii text editing… just save and it will ask you to upload changes 😉 VERY GOOD :))

lib/tpl/dokuwiki/main.php

And insert those two lines:

[cc lang=”php” escaped=”true” width=”600″]


[/cc]

can you spot ’em?

[cc lang=”php” escaped=”true” width=”600″]
* @author Clarence Lee <clarencedglee@gmail.com>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/

if (!defined(‘DOKU_INC’)) die(); /* must be run from within DokuWiki */
header(‘X-UA-Compatible: IE=edge,chrome=1’);

$hasSidebar = page_findnearest($conf[‘sidebar’]);
$showSidebar = $hasSidebar && ($ACT==’show’);
?>





[/cc]

You can also adapt it for other exports using conditionals or a case statement.

What you will get is such:

print view button dokuwiki

Source: https://forum.dokuwiki.org/thread/8160

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin