DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:offline

offline Plugin

Compatible with DokuWiki

2009-02-14

plugin Generates a static version of your wiki that will be browseable offline.

Last updated on
2009-02-09
Provides
Admin

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to dokukiwix, nsexport, siteexport

Tagged with export, html

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Discussion

Please share your comments and ideas with me on this page. — Graw 2009/02/09 10:12

Comments

I have it plugged in, now how do I get it to work?


Tried it out but: Safe mode restriction in effect - the script is not allowed to access '/home'. This comes from using an absolute path to the DokuWiki installation, appending the path to the ../../data/tmp dir. — .fredy 2009/02/22
Touché! All my test installations do not run in safe mode …
I'm using absolute paths because setting a working directory was not always possible. On some installations it worked well but on others it did not. Any ideas? — Carsten Graw 2009/03/10
The solution is to rewrite create_directory() to use the recursive option of mkdir(dir,mode,TRUE) — fredy 2010/03/18
function create_directory($dirStr, $mode = 0777) {
        global $offlineConf;   
        
        $msgStr = 'Creating directory "' . $dirStr . '" ... ' . "\n";
        log_msg(__LINE__, $msgStr);
                
        if (!is_dir($dirStr)) {
                if (mkdir($dirStr, $mode, true)) {
                        $msgStr .= 'ok.';
                        log_msg(__LINE__, compact('msgStr'));
                } else {
                        $msgStr .= 'ERROR: Could not create directory!' . "\n";
                        $msgStr .= 'Program aborted.' . "\n\n";
                        log_msg(__LINE__, compact('msgStr'));
                        die;
                }
        } else {
                $msgStr .= '  already exists.';
                log_msg(__LINE__, $msgStr);
        }
}       
in dry run, the existence check for wget failed. This is also due to the safe mode restriction. In safe mode you cannot access /opt/csw/bin/…. all allowed binaries are preconfigured via php.ini. — .fredy 2009/02/22
So, if you cannot access php.ini you will not be able to use wget, unless it was already preconfigured - right? — Carsten Graw 2009/03/10
In a huge wiki, it Would be nice to be able to give it a starting point from where to start recursion in the page and meta trees — .fredy 2009/02/22
You're right, I'll put on my list for future improvements. — Carsten Graw 2009/03/10
My DokuWiki is installed on Windows server. Function escapeshellcmd() in create.php removes backslashes from paths to wget and zip. So if I configured path as 'C:\usr\GnuWin32\bin\wget.exe' script converts it into 'C: usr GnuWin32 bin wget.exe'. So when we try to execute wget or zip via call to system() function it does nothing at all. Excluding calls to escapeshellcmd() solved the problem. — VitVlkv vitvlkv@gmail.com 2009/04/04
In a private wiki (anonymous users cannot even view any pages) how to supply user name and password to wget? Couldn't find any solution in Documentation for offline plugin. Will be trying to figure it out by myself… — VitVlkv vitvlkv@gmail.com 2009/04/04
I'm having trouble with this! The script runs, mirrors the structure, copies the media files but the HTML files are empty. What am I doing wrong? — asp 2009/04/06

Same thing happened for me, this fixed it … 'ln -s dokuwiki-2011-05-25a dokuwiki'

Please, read my previous post about php function escapeshellcmd(). The script works fine without it. — Neil desertsci@gmail.com 2011/09/15

I'm a newbee, please show me how til exclude calls to escapeshellcmd() — Jan Erik jek@fdf.dk 2009/04/27

It's very simple. You have to edit create.php file. Find all occurences of “escapeshellcmd” substring. Every time you see something like $a = escapeshellcmd(another_function()); replace it with $a = another_function(); — VitVlkv vitvlkv@gmail.com 2009/06/19
The Plugin runs, the log is OK, it says the Offline version are created and give me the link “http://www.”myserver.ch“/pilzwiki/lib/plugins/offline/offline.zip” but there is no file. i also search in the whole directory an there is also no offline version…
… what can go wrong? what i've to write in the Field “plugin»offline»dokuwikiRelativePath” z.b. localhost? thanks for helpEric eric dot steiner@bluewin.ch 2009/09/03
I have the same problem here if someone can help us giving informations about it.
I've adapted the plugin a bit to our needs (datadir not inside the webroot, no media files). See http://lendl.priv.at/blog/2011/01/03/offline-plugin-for-dokuwiki/ for my diffs. –Otmar Lendl, 2011/01/03

Smileys

Hi, I just tried this plugin (with dokuwiki-2009-12-25c). It works just fine, but I have the folowing two issues :

  1. The smileys images are not copied in the archive, which make them to always appear as alt text.
  2. It seems incompatible with the imagemap plugin, which makes the images also to appear as alt txt (even if the actual image files are copied in the archive)

Any ideas how I can solve those 2 issues ?

For information, other “classic” images work just fine –Cyrille GACHOT 2010-07-23

Your wiki requires authentication? You might be out of luck

Very promising plug-in, however, all my pages come out “Permission denied.” Your cryptic explanations surrounding this problem (something about .htaccess) are insufficient to permit me to figure out how to log in during the creation of offline pages. No idiot-proofing here. I'm guessing that the fact that I've set up a private wiki with numerous users who've populated it with many pages doesn't make me expert enough to be able to use this utility. Alas, if you're a potential user of this plug-in and your wiki requires authentication to access, you may be out of luck with this one. –Russell Bateman, 2011/07/29

I have it installed now what do I need to do to actually make it work??? –Bryson Hair, 2013/05/23

Great plugin. How can I customize it to obtain a a5paper size? – Celano, 2013/07/05

Namespace filtering?

Good work here! Is it possible to restrict the namespaces that will be zipped? – Eldad, 2014/02/10

CodePage

Site is configured to fncode = utf-8. How do the packing cp1251? – Vladimir Sirenko, 2014/04/04

plugin/offline.txt · Last modified: 2023-10-30 23:25 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki