How To Put A Book On The Web?

abrogard

New Member
I want to put a 500 page book on the web. But not a novel, it is a Tech Manual - so it must be accessible to any chosen chapter, even page, rather than just read through from beginning to end.

It is currently in the form of 500 .jpg files.

There's 22 chapters in the book.

How best to put these up on my site?

Do I have to create an html page for each .jpg file (each scanned page) ?

Or can I somehow have one page that displays the chosen page?

Whichever way it goes once the chosen page is displayed how do I have a 'Next' button or something that will find the next page for them?

I guess the 'Home' button is easy enough. And 'back' is covered by the browser 'back' arrow.
 

smoovo

New Member
The best way to do it is with PHP. You will make one page that will contain "img" element. This page will generate new image name (for the source) with getting new parameter.

It should look something like that... (it's just an example)

page.php
PHP:
<?php
    if (!isset($_GET['number'])) {
        $number = 1;
    } else {
        $number = $_GET['number'];
    }

    if (isset($_GET['next']) && $_GET['next'] == "Next") {
        $number = $_GET['number']+1;
    }

     if (isset($_GET['prev']) && $_GET['prev'] == "Previous") {
        $number = $_GET['number']-1;
    }
?>

<form action="page.php" method="get">
    <input type="hidden" name="number" value="<?= $number; ?>" />
    <input type="submit" name="prev" value="Previous" />
</form>

<form action="page.php" method="get">
    <input type="hidden" name="number" value="<?= $number; ?>" />
    <input type="submit" name="next" value="Next" />
</form>

<img src="book/page<?= $_GET['number']; ?>.jpg" alt="" />

Now, I'm assuming you are familiar with PHP and HTML, so build a menu with links that includes get variables in it, like this one ->
HTML:
<a href="http://www.yourDomain.com?number=1">Page 1</a>
<a href="http://www.yourDomain.com?number=2">Page 2</a>

- Enjoy. :)
 
Last edited:

LouTheDesigner

New Member
I would just look at some quick InDesign tutorials regarding how to place your images on spreads... Then you can export as an interactive SWF with left and right buttons. Very easy to do.

-Lou
 
Top