Forum

Notifications
Clear all

[MODULE] ePubVersion

Page 2 / 9
calash
(@calash)
Estimable Member

Looks great, thank you for sharing.

I still have to get this loaded on my test site and play around with it.  Do you have any plans for user options, such as marking a story as downloadable via ePub?

The World of Necrotania - Story Writing Community

ReplyQuote
Posted : 24/01/2011 6:56 pm
Piper
(@piper)
Trusted Member

in the 1.0 release I'm planing for a user panel where an author can choose to have all their books available to the epub module or not. I hadn't really thought about making it a per story option, but I can look into it.(In case an author wants their free stories avail in all formats, but certain formats  they want to sell thru lulu and whatnot).

I'm also looking into making the epub versions a configurable option to allow ePubs for Logged In Users only or for everyone.

Any other feature requests/ideas are very much welcome!

I just wrote a screen-scraper version of the script for a friends Drupal site that uses the book module, and it creates a fully chapterized ebook too! πŸ™‚

-P/KAF/PT

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 25/01/2011 3:09 am
calash
(@calash)
Estimable Member

That sounds great and exactly what I was looking for.  I was playing with ePub exporting a bit but could not find a good guide for making the PHP code.

Most of my users seem very receptive to having this option, so I will likely add it in a few weeks.  Got some other updates I need to get done first.

Thank you πŸ™‚

The World of Necrotania - Story Writing Community

ReplyQuote
Posted : 25/01/2011 7:20 pm
Piper
(@piper)
Trusted Member

Just thought I'd tease y'all with a few images...


Notice "Manage ePub Stories" in the Account Info page...


This is the page to enable/dissable ePubVersion for each of your stories.


Notice the new "Options" link next to ePubVersion's uninstall link


This is the admin "Options" page for the module.

The new installer is written and working, and all the various options/configuration pages work as intended. I've yet to actually write the limiting code into the module. I also still need to write the uninstall script to properly remove the added database info.

The  the ability to change the "tidy" option is only there if you ahve the tidy module loaded. The dom/xml/regexp option for formatting isn't ready and won't be in the 1.0 release.

Right now, the database defaults to 0 or "no" for ePub enabled for each book. Should this be enabled by default instead of disabled by default? Should I leave it as disabled by default, but give you, the site admins, the ability to switch all stories to enabled one time? (say just after install, and then all new stories default to off).

As of right now, this option does not show on the story submit page, and I don't know if I can even make it show up there, but I will be looking into this.

Does anyone have any other options I should consider?

-HuGgLeS-
-P/KAF/PT

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 27/01/2011 8:11 am
Michelle
(@michelle)
Estimable Member

Ohhh, this looks promising. A really cool module!

@Your question: Personally, I'd prefer the default to be "no", but I think it would be useful to a lot of admins to have the option to change the settings for the whole site with one click.

And because you asked for feature suggestions... when looking at the screen where you can choose to ePub by story, I think it would be cool if you could search the archive by file format. Say, if I have a user who goes on vacation and wants to take some fanfic along. It would be great to see at one glance which stories are available in ePub. Maybe through the "Browse" function. Though, I must admit, even while describing it it sounds difficult to implement.

ReplyQuote
Posted : 27/01/2011 10:00 pm
Piper
(@piper)
Trusted Member

Ohhh, this looks promising. A really cool module!

Thank you! I'm glad people are interested in it. I started this project a long time back in another form, then moved to trying to do ePubs nearly a year ago, but it just lingered there after some initial issues never going any further. These last couple weeks I've been having great luck staying on track, and actually having the time to work on it. The only problem is now my editors are upset as it's been taking time away from my writing, and they are waiting on the conclusion to a cliffhanger -giggles-.

@Your question: Personally, I'd prefer the default to be "no", but I think it would be useful to a lot of admins to have the option to change the settings for the whole site with one click.

I think I'm going to try and find a way to set the default to be either or at install, plus add the link to switch. I think I'm also going to write in the ability for the uninstaller to leave the "epub" column on the stories table when uninstall happens if the admin wishes that way if they choose to re-install later, they will retain each authors preferences!

And because you asked for feature suggestions... when looking at the screen where you can choose to ePub by story, I think it would be cool if you could search the archive by file format. Say, if I have a user who goes on vacation and wants to take some fanfic along. It would be great to see at one glance which stories are available in ePub. Maybe through the "Browse" function. Though, I must admit, even while describing it it sounds difficult to implement.

Suggestion acknowledged, liked, and implemented. Once I figured out how Tammy did it for Recommendations, and I heavily borrowed from her code (read as, changed it slightly only to fit my needs), it wasn't all that hard to actually implement. You can see the browse page by clicking here: http://www.tgfiction.net/eFiction30Beta/browse.php?type=epubversion

I added a bit "extra" to listings... At the bottom next to the "report this" link, if you are a logged in member, you will get an "Download ePub" link that downloads the entire story as an ePub. This link only shows to logged in members as a courtesy.Unfortunately, if the user does not open the story, it doesn't show as a "view" or "read". I'm thinking the next version will track ePub Downloads to the database.

Are there any more suggestions/complaints/comments before I button up the code and ship the "1.0" release?

-P/KAF/PT

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 28/01/2011 11:35 am
Amalthia
(@amalthia)
Trusted Member

Right now, the database defaults to 0 or "no" for ePub enabled for each book. Should this be enabled by default instead of disabled by default? Should I leave it as disabled by default, but give you, the site admins, the ability to switch all stories to enabled one time? (say just after install, and then all new stories default to off).

As of right now, this option does not show on the story submit page, and I don't know if I can even make it show up there, but I will be looking into this.

Does anyone have any other options I should consider?

First wanted to say thank you so much for making this!

I know for myself I'd rather all the stories default to on for epubs or have a way for the site admins to determine the defaults. I upload everything myself mostly for the archives I run and I'd prefer all stories to have the export to epub option enabled.

That's just my two cents. πŸ™‚

ReplyQuote
Posted : 30/01/2011 9:16 am
Sue
 Sue
(@sue)
Estimable Member

I have tested the eBooks using Adobe Digital Editions, my Nook, Calibre's eBook Reader, and the most picky eReader I could find, Aldiko for Android.

The eBooks that ePubVersion is outputting are not quite perfect, and still don't validate properly using ePub Validators, but they seem to read fine now (without errors) in every eReader I can find to try them out in.

Hi Piper, again thanks for this brilliant module. My readers are thrilled.

I use an iPhone (using Stanza) to read my epubs, and each document that I've tried crashes Stanza and closes the app (on the iphone 3G). They're fine on the Stanza mac desktop though.

I've looked at the validation and I can't really see anything there that would cause it to crash (but it does on every document I try).

Edit: Actually, it's just occurred to me that I may not have the latest version. I'll install that and report back. Sorry about that...

ReplyQuote
Posted : 30/01/2011 10:13 pm
Piper
(@piper)
Trusted Member

the 0.9 version is the latest version release... I've not released the 1.0 yet... I will install stanza on my iPhone and see if I get the same. Can you email me a sample ebook so that I can see if it's a problem with the zip archive?

-P/KAF/PT

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 31/01/2011 2:31 am
Sue
 Sue
(@sue)
Estimable Member

I checked - I've got 0.9 according to version.php. Drat. Sent you an email with attachment.

ReplyQuote
Posted : 31/01/2011 8:55 am
Piper
(@piper)
Trusted Member

Mod History:

  • v0.7 initial release. Broken Installer, No Image Support, Hardcoded formatting.
  • v0.8 Added small configuration section at the top of epubversion.php that can be used to configure $sitename, $siteurl, and $sitetagline which are used for the OPF File’s publisher line, and the β€œBrought to you by” line on the cover-page.
  • v0.8 Added β€˜exit();’ right after the epub is sent to the user inorder to stop erroneous/extra data being sent and causing some ebook readers to detect a bad ebpu/zip container.
  • v0.9 – copied formatstory() and nblr2() functions from corefunctions.php to epubversion.php to remove errors caused by stories with content warnings.
  • v0.9 – Removed includes for TemplatePower, corefunctions.php. pagesetup.php
  • v0.9 – more general code cleanup.
  • v1.0 – Added Image Support
  • v1.0 – Added Admin Configure/Options PaneL
  • v1.0 – Added Author Configure/Manage Panel
  • v1.0 – Added ePub Browse Panel
  • v1.0 – Added Update script
  • v1.0 – Added Tidy support
  • v1.0 – Added ability to turn off ePub Creations for non logged in users
  • v1.0 – Fixed double header error on Cover page (caused crash in Stanza)
  • v1.0 – Added Title Sanitation (Caused crash in Stanza)
  • v1.0 – Cleaned up code where needed. Compacted some bits

Download: http://storyportal.net/software/epub/

Current Issues:

  • Does not install properly (can manually install it fine. If you fix my install.php file, please send me the fixes).
  • Does not include images, nor does it filter images out of the story text (images support will hopefully be in the next release).

  • Since the install.php file doesn’t work, the uninstall.php file probably won’t either… (Same request as above).
  • All Formatting is currently hardcoded into ePubVersion (I will work on putting the Template.Power template support back in in a later release, but I was having issues mixing the EPub class and the Template.Power class).

Just a note.... I've updated the OP and the WordPress site. v1.0 has been released and I consider this project mostly feature complete. There are a few more things at this point that I have planned, including cleaning up some of the functions, and layouts, and completing the regex/domxml output option (for those that don't have TIDY). I will of course continue with bugfixes as I get them, but other than those things I've listed, I have no plans for further improvements unless I get more feedback.

Installation should be as easy as follows...

  • BACK UP YOUR eFiction Installation!
  • Upload the epubversion folder to your modules directory, overwriting previous versions if they exist.
  • visit: http://www.your-site.here/path/to/eFiction/admin.php?action=modules
  • Click on "modules", then either "Install" if you are doing a fresh install, or Update if you are updating an existing install
  • IF you run into any errors with the Update script, just re-upload the v0.9 version of the module, run the uninstall script, then re-upload the 1.0 version and do a FRESH install.

I do plan to code a couple more eFiction modules, and have posted the ideas to this same forum. I'm also working on finishing my aKismet MOD (it works for stopping spam, but needs better execution), and will probably release a pluggable PDF Version module that reuses much of my ePubVersion code.

I hope you all enjoy and make use of this module!
-HuGgLeS-
-P/KAF/PT

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 01/02/2011 4:03 am
Amalthia
(@amalthia)
Trusted Member

I got this error message when I ran an update on 1.0 from .9

A fatal MySQL error was encountered.
Query: ALTER TABLE `fanfiction_settings` ADD `epubanon` TINYINT( 1 ) NOT NULL default '1'
Error: (1060) Duplicate column name 'epubanon'

ReplyQuote
Posted : 01/02/2011 6:03 am
Piper
(@piper)
Trusted Member

-sighs- I was hoping for a perfect release too!

Below, find links for the updated update.php script. I don't think I'm going to repackage the whole script for this update. (was a problem with array variables for $CurrentVersion -sighs-

-P/KAF/PT

update.php (ePubVersion v1.0 update) (Zip)

update.php (ePubVersion v1.0 update) (Gz)

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 01/02/2011 7:12 am
Amalthia
(@amalthia)
Trusted Member

I'll give this a go. πŸ™‚

Thanks for responding so quickly!

-sighs- I was hoping for a perfect release too!

Below, find links for the updated update.php script. I don't think I'm going to repackage the whole script for this update. (was a problem with array variables for $CurrentVersion -sighs-

-P/KAF/PT

update.php (ePubVersion v1.0 update) (Zip)

update.php (ePubVersion v1.0 update) (Gz)

ReplyQuote
Posted : 01/02/2011 7:14 am
Piper
(@piper)
Trusted Member

Actually, if the error happened where I think it happened, you have a complete install of 1.0 now, it just errored out as it tried to run a 2nd install of the new settings. Unless you backed out the changes it made, you shouldn't need to run again.

As for responding quickly, I stalk this forum like a hawk looking for mice after I make a release... That's why small version updates were coming out so fast previously. πŸ˜›

-HuGgLeS-
-P/KAF/PT

I'll give this a go. πŸ™‚

Thanks for responding so quickly!

-sighs- I was hoping for a perfect release too!

Below, find links for the updated update.php script. I don't think I'm going to repackage the whole script for this update. (was a problem with array variables for $CurrentVersion -sighs-

-P/KAF/PT

update.php (ePubVersion v1.0 update) (Zip)

update.php (ePubVersion v1.0 update) (Gz)

StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

ReplyQuote
Topic starter Posted : 01/02/2011 7:37 am
Page 2 / 9
Share: