No description, website, or topics provided.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


BookiPublisherLite was developed for CiviCRM to enable us to have better handling and control over how and where our books are published online.

* we want to have them nicely templated and on a domain
* we were having trouble with links getting broken on when that site underwent upgrades, etc.  This was especially painful for us because we have lots of people deep linking into the book.  It seemed a bit unfair / impractical to put the burden on FM to keep these working for us (each project has different URL needs and if you multiply our needs by the number of projects on FM, it gets a little unmanageable)
* we want to show old versions of manuals.

I initially investigated installing bookipublisher to handle this, but Adam told me it was overkill and I agreed :).  He said, start with, look at the my_get_bookfunction, which was good advice.

I used that as the basis to write which is a simple template and script that produces html formatted books.  It is designed to handle CiviCRM's requirements for

* multiple books
* multiple versions

You basically configure a few variables at the top of the file and run:

$ php publish.php user (to publish the user guide)


$ php publish.php developer (to publish the developer guide).

You can see the preliminary results of the script here:

Which downloads the book ready to be displayed.

Behind the scenes we have a directory structure that looks like this

        /current - symbolic link to a source file
            # 4th edition - symbolic link to a source file
            # 3rd edition - symbolic link to a source file
            # 2nd edition - symbolic link to a source file
            # 1st edition - symbolic link to a source file
            # all the actual downloads, e.g. book-en-2011.12.14-10.45.21
        # same as above

So after you have downloaded, you ln -s to the source directory as appropriate and you are done.  There is some .htaccess magic that rewrites the book/chapter to book/current/chapter which means most people just need to bookmark but if you want to look at an old version you can go to  And super keen readers can look behind the scenes at

Things we'd like to add now are:

* ability to add comments to each page
* Link to LULU / download PDF / eBook
* add the civicrm header bar (iframe?) at the top of the page
* nice page not found that tells them that they should look in older versions ([book]/version)

Would be great to get feedback on this.  There is one problem that we need to solve before we can start sending people here and that is that it currently uses the ch005_the-codebase.html notation, but we need it to use the introduction/codebase.html notation - adam and co. - do you have any pointers on how I can fix that?