Giter Site home page Giter Site logo

Comments (9)

Grandt avatar Grandt commented on August 15, 2024

How are you adding chapters?

Because, at a glance I don't see a way addChapter can do that, meaning you are obviously doing something I didn't anticipate (or overlooked). :P
I'm not saying you are wrong, as you obviously have the problem.

from phpepub.

tcitworld avatar tcitworld commented on August 15, 2024

The cover is added by this line :

$book->addChapter('Notices', 'Cover2.html', $content_start.$this->getExportInformation('PHPePub').$bookEnd);

and the chapters are added through a loop :

foreach ($this->entries as $entry) {
    foreach ($this->tags as $tag) {
        $book->setSubject($tag['value']);
     }
     $chapter = $content_start.$entry->getContent().$bookEnd;
     $book->addChapter($entry->getTitle(), htmlspecialchars($entry->getTitle()).'.html', $chapter, true, EPub::EXTERNAL_REF_ADD);
}

from phpepub.

Grandt avatar Grandt commented on August 15, 2024

Can I get you to send me an example of a defective book to [email protected]?

from phpepub.

Grandt avatar Grandt commented on August 15, 2024

Boy, does that bug make me look "stoopid"

In addChapter I increase chapterCount. That function calls a few others of course, in the course of which the code checks if the book has been initialized yet, if it haven't is does so. Initialize Sets up the zip file and adding the preliminary metadata depending on the setup of the book. For instance the ePub version.
And that initialization sets chapterCount to 0, AFTER I just increased it to 1...

I need more coffee.

from phpepub.

Grandt avatar Grandt commented on August 15, 2024

P.S.: For a minimum impact of your current code, at least until I'm ready to release 4.0.6, you can just uncomment the $this->chapterCount = 0; line in the initialize function.

from phpepub.

tcitworld avatar tcitworld commented on August 15, 2024

No worries. Thanks for your time.

For a minimum impact of your current code, at least until I'm ready to release 4.0.6

If we can get it through composer before end of March, it's perfectly fine. :)

from phpepub.

Grandt avatar Grandt commented on August 15, 2024

I need to test 4.0.6 a little more, it's on github master branch now,
but I expect to release it before the end of February.

On 21-02-2016 15:44, Thomas Citharel wrote:

No worries. Thanks for your time.

For a minimum impact of your current code, at least until I'm
ready to release 4.0.6

If we can get it through composer before end of March, it's perfectly
fine. :)


Reply to this email directly or view it on GitHub
#36 (comment).

from phpepub.

tcitworld avatar tcitworld commented on August 15, 2024

Perfect !

from phpepub.

nicosomb avatar nicosomb commented on August 15, 2024

Hello @Grandt!

Do you plan to release a new version in next days?

from phpepub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.