[FM Discuss] new shop - bookstore 2.0
adam hyde
adam at flossmanuals.net
Sat Oct 25 14:21:07 PDT 2008
hey
So, Aco has been hard at work and developed our second version of the
FLOSS Manuals shop. This one is much more configurable than the lulu.com
tools. Its pretty cool if you ask me :) Thanks thanks to Aco once again.
The shop can be seen on the front page of FM. If you refresh the page
you will see the list of the items re-orders in a random manner. It is
possible to easily do this and there are other features too including :
* choose how many items to display (will display "more" and "back"
links)
* choose the specific book(s) you wish to display
* choose a slideshow (including a configurable timeout)
* choose a random display of books
The bookstore uses the same css as the previous one. Actually the only
thing you have to change is the link to the .js file and you need to
show the config parameters.
As an example, the basic list we have on the front page shows 4 items
(we only have 4 books now) in a random order. The syntax is :
<div style="">
<img style="margin-bottom: 5px;"
src="http://en.flossmanuals.net/bookstore/bookstore.gif"/>
<style>
@import url("http://en.flossmanuals.net/bookstore/bookstore.css");
</style>
<script src="http://en.flossmanuals.net/bookstore/bookstore.js"
type="text/javascript"></script>
<script type="text/javascript">
FM.init({"show":"random","items": 4, "next_desc": "MORE >>",
"prev_desc": "<< BACK", "paging": true});
</script>
</div>
The FM.init is where you set up the config. It accepts:
'show': 'normal', // normal, random
'items': 2,
'slideshow': false,
'timeout': 5,
'preferred': null,
'paging': false,
If, for example I just wanted to display 2 items - the SUGAR manual and
the OPC manual I would use this :
FM.init({"items": 2, "next_desc": "MORE >>", "prev_desc":
"<< BACK", "paging": false, "preferred": ["SUGAR USERS GUIDE",
"OLPC LAPTOP USERS GUIDE"] });
So, now you can host the shop to the size (number of items) you wish,
and you can decide to display just your own books, or alternatively, to
show your own books at the top and the rest after the "more>>" is
clicked etc
I will write this up in the bookstore about page:
http://www.flossmanuals.net/bookstore
adam
--
Adam Hyde
Founder FLOSS Manuals
http://www.flossmanuals.net
More information about the Discuss
mailing list