Hey again,<br><br>A couple of very useful pointers from Adam helped me rip off some more code from bookipublisher so it now rewrites the directory structure, and adds CSS for current page, previous next links, and so on. The PHP Simple HTML DOM Parser that bookipublisher uses was really useful here.<br>
<br>We also improved the formatting (added our standard header) added some home pages, page not founds, etc.<br><br>You can see the code at <a href="https://github.com/michaelmcandrew/bookipublisherlite" target="_blank">https://github.com/michaelmcandrew/bookipublisherlite</a> and the results here: <a href="http://book.civicrm.org">http://book.civicrm.org</a>.<br>
<br>In case you are really interested, we have finally worked out the relationship between our unruly wiki and our (ruly?) book and are working on a book review and a transfer of useful info from the wiki to the book: <a href="http://wiki.civicrm.org/confluence/display/CRM/2011+CiviCRM+user+and+administrator+guide+review">http://wiki.civicrm.org/confluence/display/CRM/2011+CiviCRM+user+and+administrator+guide+review</a>. <br>
<br>One question that we have now is whether to go comment free a la <a href="https://help.ubuntu.com/11.10/serverguide/C/index.html">https://help.ubuntu.com/11.10/serverguide/C/index.html</a> or with comments a la <a href="http://php.net/manual/en/function.preg-replace.php">http://php.net/manual/en/function.preg-replace.php</a>, or something else?<br>
<br>Michael<br><br><div class="gmail_quote">On 15 December 2011 15:35, Anne Gentle <span dir="ltr"><<a href="mailto:annegentle@gmail.com">annegentle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Wow, really impressive work here, nicely done! Thanks for sharing your<br>
solution.<br>
<span class="HOEnZb"><font color="#888888"><br>
Anne<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, Dec 14, 2011 at 7:07 AM, Michael McAndrew<br>
<<a href="mailto:michaelmcandrew@thirdsectordesign.org">michaelmcandrew@thirdsectordesign.org</a>> wrote:<br>
> Hey there,<br>
><br>
> At CiviCRM, we have been wanting to take more control over how our<br>
> Flossmanuals are published for a few reasons:<br>
><br>
> we want to have them nicely templated and on a <a href="http://civicrm.org" target="_blank">civicrm.org</a> domain<br>
> we were having trouble with links getting broken on<br>
> <a href="http://en.flossmanuals.net/civicrm" target="_blank">en.flossmanuals.net/civicrm</a> when that site underwent upgrades, etc. This<br>
> was especially painful for us because we have lots of people deep linking<br>
> into the book. It seemed a bit unfair / impractical to put the burden on FM<br>
> to keep these working for us (each project has different URL needs and if<br>
> you multiply our needs by the number of projects on FM, it gets a little<br>
> unmanageable)<br>
> we want to show archived / old versions of manuals.<br>
><br>
> I initially investigated installing bookipublisher to handle this, but Adam<br>
> told me it was overkill and I agreed :). He said, start with<br>
> <a href="https://github.com/eseter/BookiPublisher/blob/master/plugins/getbookgears/worker.php" target="_blank">https://github.com/eseter/BookiPublisher/blob/master/plugins/getbookgears/worker.php</a>,<br>
> look at the my_get_bookfunction, which was good advice.<br>
><br>
> I used that as the basis to write<br>
> <a href="https://github.com/michaelmcandrew/bookipublisherlite" target="_blank">https://github.com/michaelmcandrew/bookipublisherlite</a> which is a simple<br>
> template and script that produces html formatted books. It is designed to<br>
> handle CiviCRM's requirements for<br>
><br>
> multiple books<br>
> multiple versions<br>
><br>
> You basically configure a few variables at the top of the file and run:<br>
><br>
> $ php publish.php user (to publish the user guide)<br>
><br>
> or<br>
><br>
> $ php publish.php developer (to publish the developer guide).<br>
><br>
> You can see the preliminary results of the script here:<br>
><br>
> <a href="http://book.civicrm.org/user/" target="_blank">http://book.civicrm.org/user/</a><br>
><br>
> <a href="http://book.civicrm.org/developer/" target="_blank">http://book.civicrm.org/developer/</a><br>
><br>
> Which downloads the book ready to be displayed.<br>
><br>
> Behind the scenes we have a directory structure that looks like this<br>
><br>
> book<br>
><br>
> current - symbolic link to a source file<br>
> archive<br>
><br>
> 4th edition - symbolic link to a source file<br>
> 3rd edition - symbolic link to a source file<br>
> 2nd edition - symbolic link to a source file<br>
> 1st edition - symbolic link to a source file<br>
><br>
> source<br>
><br>
> all the actual downloads, e.g. book-en-2011.12.14-10.45.21<br>
><br>
> another book<br>
><br>
> same as above<br>
><br>
> So after you have downloaded, you ln -s to the source directory as<br>
> appropriate and you are done. There is some .htaccess magic that rewrites<br>
> the book/chapter to book/current/chapter which means most people just need<br>
> to bookmark <a href="http://book.civicrm.org/user" target="_blank">book.civicrm.org/user</a> but if you want to look at an old version<br>
> you can go to <a href="http://book.civicrm.org/user/archive/4th-edition-4.1/" target="_blank">http://book.civicrm.org/user/archive/4th-edition-4.1/</a>. And<br>
> super keen readers can look behind the scenes at<br>
> <a href="http://book.civicrm.org/user/source" target="_blank">http://book.civicrm.org/user/source</a>.<br>
><br>
> Things we'd like to add now are:<br>
><br>
> ability to add comments to each page<br>
> Link to LULU / download PDF / eBook<br>
> add the civicrm header bar (iframe?) at the top of the page<br>
> nice page not found that tells them that they should look in the archives<br>
><br>
> Would be great to get feedback on this. There is one problem that we need<br>
> to solve before we can start sending people here and that is that it<br>
> currently uses the ch005_the-codebase.html notation, but we need it to use<br>
> the introduction/codebase.html notation - adam and co. - do you have any<br>
> pointers on how I can fix that?<br>
><br>
> Michael<br>
><br>
> --<br>
> Michael McAndrew<br>
><br>
> tel: 020 7183 5828<br>
> mob: 07817 802299<br>
><br>
> Third Sector Design Ltd.<br>
> <a href="http://thirdsectordesign.org" target="_blank">http://thirdsectordesign.org</a><br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Discuss mailing list<br>
> <a href="mailto:Discuss@lists.flossmanuals.net">Discuss@lists.flossmanuals.net</a><br>
> <a href="http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net" target="_blank">http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net</a><br>
><br>
_______________________________________________<br>
Discuss mailing list<br>
<a href="mailto:Discuss@lists.flossmanuals.net">Discuss@lists.flossmanuals.net</a><br>
<a href="http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net" target="_blank">http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael McAndrew<br><br>tel: 020 7183 5828<br>mob: 07817 802299<br><br>Third Sector Design Ltd.<br><a href="http://thirdsectordesign.org" target="_blank">http://thirdsectordesign.org</a><br>
<br>