Credits & License Information
Back to main Credits pageHelp for books version 0.76
// $Id: install.txt,v 1.1 2002/10/05 15:02:27 fredb86 Exp $
// ----------------------------------------------------------------------
// BOOKS module
// Copyright (C) 2002 by Michael Schatz
// Written by Michael Schatz, Jason Levitt, Olivier Guillet, Jean-Michel
// Védrine
// Get the newest version at http://sourceforge.net/projects/pn-mod-books
// ----------------------------------------------------------------------
// POSTNUKE Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com
// ----------------------------------------------------------------------
=======================================
INSTALLING THE BOOKS MODULE VERSION .76
by Jason Levitt, Olivier Guillet and
Jean-Michel Védrine
Last updated: March 29, 2006
=======================================
Support mailing list: http://groups.yahoo.com/group/pn-mod-books
Project files: http://sourceforge.net/projects/pn-mod-books
=======================================
TABLE OF CONTENTS
A. UPGRADING YOUR BOOKS MODULE
B. INSTALLING A NEW BOOKS SITE
C. MODIFYING Books Settings
D. HOW BOOK COVER IMAGES ARE HANDLED
E. AFFILIATE AND AMAZON.COM CONFIGURATION
F. SETTING PERMISSIONS FOR BOOKS
G. DELETING YOUR BOOKS DATABASE
======================================
A. UPGRADING YOUR BOOKS MODULE
======================================
1. It's probably a good idea to backup your Books directory. In any
case, you will want to save your affiliate info from the bk-config.php
file and your book cover images (if any) which are located in
modules/books/images/books, unless you chose a different directory..
3. After saving your affiliate info and book cover images in a
safe place, DELETE ALL THE FILES in your Books (or books) directory
including the directory named Books (or books). This is a very
important step.
4. Unpack the books module into your modules directory.
If you were running an old version of Books, please note that
the Books modules is now called "books" (lower-case "b").
5. Copy your book cover images to the new books module (same
location). Copy your info from the old bk-config.php file to the new
config.php file. Note that some ilines are no longer in that file.
The developper tooken is now at the begining of the pnadminapi.php
file but there is no need for you to change it as it is not used
to get any money from Amazon. [Note for books .72 users --
you will need to re-order the affiliates to match the order
you used in .72. Or, you can simply go in and modify
any books that use affiliates and regenerate the affiliate links]
7. Go to Administration->Modules and click on "regenerate"
to add the new books module to your site.
Click on "Initialise" for the books module.
Click on "Activate" for the books module.
9. Edit html/modules/books/config.php to configure your affiliate IDs,
logos and informations.
10. Add permissions to Adminstration->Permissions to allow users access
to books features (see permissions section below).
11. Modify all your links to the books module. The books module is now a
pnAPI compliant module so you access it throught
http://www.your_web_site/index.php?module=books$type=user&func=main (or
http://www.your_web_site/module-books.html if you have activated short urls).
In the menu block the URL is now {books} and no more [books] as it was before.
But note that [books] will still work because I included a redirection.
12 You will need to delete and re-create your books blocks because the code and
name of the blocks have changed. Except for the featured block all block share
the same interface and look. They can all be customized the same way (more on that later)
======================================
B. INSTALLING A NEW BOOKS SITE
======================================
1. Unpack the files in your html/modules directory. The books directory
will be created there.
Browse to your Postnuke site and click on Adminstration->Modules.
Then click on "regenerate" to add the books modules to your site.
Click on "Initialise" for the books module. This will create the
books database tables in your Postnuke database.
Clock on "Activate" for the books module.
2. Go to Adminstration->books and select "Add category". You can't
do anything until you create at least one books category.
3. You will probably want to add a books link to the Main Menu
for your users. Go to
Adminstration->Blocks->View Blocks
and click on the edit option for Main Menu.
Scroll down and a add a line with
Title="books", URL="{books}", and Description="whatever..."
4. Create a books block if you wish.
Go to Administration->Blocks.
Click on "New Block".
There are now four Books blocks to choose from.
In the menu they are prefixed with "books", for
example: "books/Random Book".
This books block randomly selects book covers to display, so
you need to have book cover images if you want it to look good.
5. Edit html/modules/books/bk-config.php to configure your affiliate IDs
and your Amazon.com developer token. To obtain an Amazon.com developers
token, go to www.amazon.com/webservices and click on "Apply for a Token".
6. Add permissions to Adminstration->Permissions to allow users access
to ratings and other books features (see permissions section below).
7. That's all!
======================================
C. MODIFYING Books Settings
======================================
You can now change most books settings on the new books
settings page, which can be found here:
Administration->books->Books settings
Here are the variables you can set, their default
values, and what they mean:
showlastbooks = yes tells whether or not to display the
last books added as the index page.
books_showed = 3 the number of last books to displayed
on the last books and popular books index page. Here,
it would display the last 3 books added
to the books module and the 3 most populars books in
the database.
booksdir =
modules/books/images/books the path to the directory containing
book cover images. This path can be
a URL, for example:
http://www.mysite.com/covers
Using a URL is useful if you want the
directory to be on another machine.
showsubcat = yes Display subcategories on the index page.
isbn_check = yes says whether to allow more than one book
with the same ISBN. Setting yes means
that only one book per ISBN is allowed.
booksperpage = 5 number of books per page. For most
routines, this is the number of books
displayed on each page.
booksresults = 10 number of books to display per page for search
results.
popular = 8 # of hits necessary for popular icon to
display.
books gain "hits" when users click on an
affiliate link.
Here, 8 means that the popular graphic icon
will display on any book that has at least
8 hits. Additionally, a book must have 8
hits to appear in the popular ratings section.
bookvotemin = 5 Min # of votes to be in top rated rankings.
A 'vote' is just another name for a rating.
======================================
D. HOW BOOK COVER IMAGES ARE HANDLED
======================================
The code that handles display and storage of book
cover images has been changed slightly from previous
versions of the books module. This change may cause
problems for folks who are using an old books databases.
You can only put two types of
strings into the "Cover" field when you select "Modify
Book".
If you put a filename, such as samplecover.jpg, into
the Cover field, then the variable $booksdir will be
used to complete the path.
So, if you put
Cover: samplecover.jpg
into the Cover field, and then you have
$booksdir="http://www.mysite.com/bookcoverdir";
Then the books module will try to retrieve
http://www.mysite.com/bookcoverdir/samplecover.jpg
-------------------
But, if you put
Cover: http://www.amazon.com/somebook/somebook.jpg
into the Cover field, then $booksdir will be
ignored and the books modules will try to retrieve
http://www.amazon.com/somebook/somebook.jpg
-------------------
======================================
E. AFFILIATE AND AMAZON.COM CONFIGURATION
======================================
The affiliate config file for the books modules is located at
html/modules/books/config.php. It contains
the affiliate IDs and affiliate settings, as well as
the settings for the amazon.com functions.
Entering Affiliate info. If you want to sell books from your site,
you need to set up an affiliate relationship with an online bookseller.
The books module lets you define up to three such affiliate
relationships. By default, I have included info for Half.com, Amazon.com,
and Barnes and Noble. You will need to go to their web sites and
register to become an affiliate in order to make money with these
links.
//These are the names of your affiliates
define("_ORDER1","Half.com");
define("_ORDER2","Barnes and Noble");
define("_ORDER3","Amazon");
define("_ORDER4","Alapage.com");
define("_ORDER5","Lehmanns");
define("_ORDER6","KeOpsOnline");
//These are the graphic logos for your affiliates
//Different logo sizes are available in the images directory
define("_BOOKLOGO1","88x31half.gif");
define("_BOOKLOGO2","105x32barn.gif");
define("_BOOKLOGO3","126x32amaz.gif");
define("_BOOKLOGO4","alapage.gif");
define("_BOOKLOGO5","lob2.jpg");
define("_BOOKLOGO6","keopsonline.gif");
//These are your affiliate IDs which you get when you successfully register
//as an affiliate
define("_AFFILID1","'1111111111111'");
define("_AFFILID2","'2222222222222'");
define("_AFFILID3","'3333333333333'");
define("_AFFILID4","'4444444444444'");
define("_AFFILID5","'5555555555555'");
define("_AFFILID6","'6666666666666'");
//These are your affiliate URLS. You won't need to change the first and
//third ones if you stay with half.com and amazon.com, but the Barnes and
//Noble link requires a special code called "bfmid" that you need to
//place in the url at the place indicated. I'm not sure of the
//affiliate format for Alapage, Lehmanns, and Keopsonline.
define("_ORDERURL1","'http://www.qksrv.net/click-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL2","'http://service.bfast.com/bfast/click?bfmid=2181&sourceid=_
AFID_&bfpid=_ISBN_&bfmtype=book'");
define("_ORDERURL3","'http://www.amazon.com/exec/obidos/ASIN/_ISBN_/_AFID_'");
define("_ORDERURL4","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL5","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL6","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
======================================
F. SETTING PERMISSIONS FOR BOOKS
======================================
PERMISSIONS
I've added some of the new Permissions system to the
books module. Certainly more could be added, but
I've got the basic stuff here. To enable certain menus
to display, you may need to add lines to your Permissions
table.
You need Read level permissions to see anything in the
books module. Since that's true of most modules, you
shouldn't have to add anything to see the basic book
info.
However, you need at least Comment level permission to see all the
menus, so to let registered users see all the menus,
add this line to your Permissions table:
GROUP COMPONENT INSTANCE PERM LEVEL
Users | books:: | :: | Comment
I've added book category level access which doesn't work all
that well yet. It does let you block access to top-level
categories on a per-category basis, but it doesn't clean up
all the other info like the count of the number of categories,
and it still lets users submit books to blocked categories (not
such a big deal).
Anyway, if you wanted to block unregistered user access to
the book category named X-RATED you could add this line
to your Permissions table:
GROUP COMPONENT INSTANCE PERM LEVEL
Unregistered | books::Category | X-RATED:: | None
============================================================
Permissions Details
The books module uses three levels of permissions. Here
are the levels and what is permitted at each level.
READ LEVEL PERMISSIONS
1) See all book data
2) Report broken book links
COMMENT LEVEL PERMISSIONS
1) Rate/Comment books
2) Request book modifications
3) Submit New books
ADMIN LEVEL PERMISSION
All administrative functions which
includes adding editorials, affiliate links, and
book covers, and approving/editing all submissions. Also
upgrading or deleting the books database.
======================================
G. DELETING YOUR BOOKS DATABASE
======================================
To delete the books datbase, go to Administration -> modules
Deactivate, then remove the books module.
WARNING ! This will delete all database informations, including
categories and books data !!
//END OF THE INSTALL.TXT FILE
// ----------------------------------------------------------------------
// BOOKS module
// Copyright (C) 2002 by Michael Schatz
// Written by Michael Schatz, Jason Levitt, Olivier Guillet, Jean-Michel
// Védrine
// Get the newest version at http://sourceforge.net/projects/pn-mod-books
// ----------------------------------------------------------------------
// POSTNUKE Content Management System
// Copyright (C) 2002 by the PostNuke Development Team.
// http://www.postnuke.com
// ----------------------------------------------------------------------
=======================================
INSTALLING THE BOOKS MODULE VERSION .76
by Jason Levitt, Olivier Guillet and
Jean-Michel Védrine
Last updated: March 29, 2006
=======================================
Support mailing list: http://groups.yahoo.com/group/pn-mod-books
Project files: http://sourceforge.net/projects/pn-mod-books
=======================================
TABLE OF CONTENTS
A. UPGRADING YOUR BOOKS MODULE
B. INSTALLING A NEW BOOKS SITE
C. MODIFYING Books Settings
D. HOW BOOK COVER IMAGES ARE HANDLED
E. AFFILIATE AND AMAZON.COM CONFIGURATION
F. SETTING PERMISSIONS FOR BOOKS
G. DELETING YOUR BOOKS DATABASE
======================================
A. UPGRADING YOUR BOOKS MODULE
======================================
1. It's probably a good idea to backup your Books directory. In any
case, you will want to save your affiliate info from the bk-config.php
file and your book cover images (if any) which are located in
modules/books/images/books, unless you chose a different directory..
3. After saving your affiliate info and book cover images in a
safe place, DELETE ALL THE FILES in your Books (or books) directory
including the directory named Books (or books). This is a very
important step.
4. Unpack the books module into your modules directory.
If you were running an old version of Books, please note that
the Books modules is now called "books" (lower-case "b").
5. Copy your book cover images to the new books module (same
location). Copy your info from the old bk-config.php file to the new
config.php file. Note that some ilines are no longer in that file.
The developper tooken is now at the begining of the pnadminapi.php
file but there is no need for you to change it as it is not used
to get any money from Amazon. [Note for books .72 users --
you will need to re-order the affiliates to match the order
you used in .72. Or, you can simply go in and modify
any books that use affiliates and regenerate the affiliate links]
7. Go to Administration->Modules and click on "regenerate"
to add the new books module to your site.
Click on "Initialise" for the books module.
Click on "Activate" for the books module.
9. Edit html/modules/books/config.php to configure your affiliate IDs,
logos and informations.
10. Add permissions to Adminstration->Permissions to allow users access
to books features (see permissions section below).
11. Modify all your links to the books module. The books module is now a
pnAPI compliant module so you access it throught
http://www.your_web_site/index.php?module=books$type=user&func=main (or
http://www.your_web_site/module-books.html if you have activated short urls).
In the menu block the URL is now {books} and no more [books] as it was before.
But note that [books] will still work because I included a redirection.
12 You will need to delete and re-create your books blocks because the code and
name of the blocks have changed. Except for the featured block all block share
the same interface and look. They can all be customized the same way (more on that later)
======================================
B. INSTALLING A NEW BOOKS SITE
======================================
1. Unpack the files in your html/modules directory. The books directory
will be created there.
Browse to your Postnuke site and click on Adminstration->Modules.
Then click on "regenerate" to add the books modules to your site.
Click on "Initialise" for the books module. This will create the
books database tables in your Postnuke database.
Clock on "Activate" for the books module.
2. Go to Adminstration->books and select "Add category". You can't
do anything until you create at least one books category.
3. You will probably want to add a books link to the Main Menu
for your users. Go to
Adminstration->Blocks->View Blocks
and click on the edit option for Main Menu.
Scroll down and a add a line with
Title="books", URL="{books}", and Description="whatever..."
4. Create a books block if you wish.
Go to Administration->Blocks.
Click on "New Block".
There are now four Books blocks to choose from.
In the menu they are prefixed with "books", for
example: "books/Random Book".
This books block randomly selects book covers to display, so
you need to have book cover images if you want it to look good.
5. Edit html/modules/books/bk-config.php to configure your affiliate IDs
and your Amazon.com developer token. To obtain an Amazon.com developers
token, go to www.amazon.com/webservices and click on "Apply for a Token".
6. Add permissions to Adminstration->Permissions to allow users access
to ratings and other books features (see permissions section below).
7. That's all!
======================================
C. MODIFYING Books Settings
======================================
You can now change most books settings on the new books
settings page, which can be found here:
Administration->books->Books settings
Here are the variables you can set, their default
values, and what they mean:
showlastbooks = yes tells whether or not to display the
last books added as the index page.
books_showed = 3 the number of last books to displayed
on the last books and popular books index page. Here,
it would display the last 3 books added
to the books module and the 3 most populars books in
the database.
booksdir =
modules/books/images/books the path to the directory containing
book cover images. This path can be
a URL, for example:
http://www.mysite.com/covers
Using a URL is useful if you want the
directory to be on another machine.
showsubcat = yes Display subcategories on the index page.
isbn_check = yes says whether to allow more than one book
with the same ISBN. Setting yes means
that only one book per ISBN is allowed.
booksperpage = 5 number of books per page. For most
routines, this is the number of books
displayed on each page.
booksresults = 10 number of books to display per page for search
results.
popular = 8 # of hits necessary for popular icon to
display.
books gain "hits" when users click on an
affiliate link.
Here, 8 means that the popular graphic icon
will display on any book that has at least
8 hits. Additionally, a book must have 8
hits to appear in the popular ratings section.
bookvotemin = 5 Min # of votes to be in top rated rankings.
A 'vote' is just another name for a rating.
======================================
D. HOW BOOK COVER IMAGES ARE HANDLED
======================================
The code that handles display and storage of book
cover images has been changed slightly from previous
versions of the books module. This change may cause
problems for folks who are using an old books databases.
You can only put two types of
strings into the "Cover" field when you select "Modify
Book".
If you put a filename, such as samplecover.jpg, into
the Cover field, then the variable $booksdir will be
used to complete the path.
So, if you put
Cover: samplecover.jpg
into the Cover field, and then you have
$booksdir="http://www.mysite.com/bookcoverdir";
Then the books module will try to retrieve
http://www.mysite.com/bookcoverdir/samplecover.jpg
-------------------
But, if you put
Cover: http://www.amazon.com/somebook/somebook.jpg
into the Cover field, then $booksdir will be
ignored and the books modules will try to retrieve
http://www.amazon.com/somebook/somebook.jpg
-------------------
======================================
E. AFFILIATE AND AMAZON.COM CONFIGURATION
======================================
The affiliate config file for the books modules is located at
html/modules/books/config.php. It contains
the affiliate IDs and affiliate settings, as well as
the settings for the amazon.com functions.
Entering Affiliate info. If you want to sell books from your site,
you need to set up an affiliate relationship with an online bookseller.
The books module lets you define up to three such affiliate
relationships. By default, I have included info for Half.com, Amazon.com,
and Barnes and Noble. You will need to go to their web sites and
register to become an affiliate in order to make money with these
links.
//These are the names of your affiliates
define("_ORDER1","Half.com");
define("_ORDER2","Barnes and Noble");
define("_ORDER3","Amazon");
define("_ORDER4","Alapage.com");
define("_ORDER5","Lehmanns");
define("_ORDER6","KeOpsOnline");
//These are the graphic logos for your affiliates
//Different logo sizes are available in the images directory
define("_BOOKLOGO1","88x31half.gif");
define("_BOOKLOGO2","105x32barn.gif");
define("_BOOKLOGO3","126x32amaz.gif");
define("_BOOKLOGO4","alapage.gif");
define("_BOOKLOGO5","lob2.jpg");
define("_BOOKLOGO6","keopsonline.gif");
//These are your affiliate IDs which you get when you successfully register
//as an affiliate
define("_AFFILID1","'1111111111111'");
define("_AFFILID2","'2222222222222'");
define("_AFFILID3","'3333333333333'");
define("_AFFILID4","'4444444444444'");
define("_AFFILID5","'5555555555555'");
define("_AFFILID6","'6666666666666'");
//These are your affiliate URLS. You won't need to change the first and
//third ones if you stay with half.com and amazon.com, but the Barnes and
//Noble link requires a special code called "bfmid" that you need to
//place in the url at the place indicated. I'm not sure of the
//affiliate format for Alapage, Lehmanns, and Keopsonline.
define("_ORDERURL1","'http://www.qksrv.net/click-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL2","'http://service.bfast.com/bfast/click?bfmid=2181&sourceid=_
AFID_&bfpid=_ISBN_&bfmtype=book'");
define("_ORDERURL3","'http://www.amazon.com/exec/obidos/ASIN/_ISBN_/_AFID_'");
define("_ORDERURL4","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL5","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
define("_ORDERURL6","'http://www.configure.me/thisisbogus-_AFID_?ISBN=_ISBN_'");
======================================
F. SETTING PERMISSIONS FOR BOOKS
======================================
PERMISSIONS
I've added some of the new Permissions system to the
books module. Certainly more could be added, but
I've got the basic stuff here. To enable certain menus
to display, you may need to add lines to your Permissions
table.
You need Read level permissions to see anything in the
books module. Since that's true of most modules, you
shouldn't have to add anything to see the basic book
info.
However, you need at least Comment level permission to see all the
menus, so to let registered users see all the menus,
add this line to your Permissions table:
GROUP COMPONENT INSTANCE PERM LEVEL
Users | books:: | :: | Comment
I've added book category level access which doesn't work all
that well yet. It does let you block access to top-level
categories on a per-category basis, but it doesn't clean up
all the other info like the count of the number of categories,
and it still lets users submit books to blocked categories (not
such a big deal).
Anyway, if you wanted to block unregistered user access to
the book category named X-RATED you could add this line
to your Permissions table:
GROUP COMPONENT INSTANCE PERM LEVEL
Unregistered | books::Category | X-RATED:: | None
============================================================
Permissions Details
The books module uses three levels of permissions. Here
are the levels and what is permitted at each level.
READ LEVEL PERMISSIONS
1) See all book data
2) Report broken book links
COMMENT LEVEL PERMISSIONS
1) Rate/Comment books
2) Request book modifications
3) Submit New books
ADMIN LEVEL PERMISSION
All administrative functions which
includes adding editorials, affiliate links, and
book covers, and approving/editing all submissions. Also
upgrading or deleting the books database.
======================================
G. DELETING YOUR BOOKS DATABASE
======================================
To delete the books datbase, go to Administration -> modules
Deactivate, then remove the books module.
WARNING ! This will delete all database informations, including
categories and books data !!
//END OF THE INSTALL.TXT FILE



