Forum

Notifications
Clear all

[MODULE] ePubVersion

Page 7 / 9
Amalthia
(@amalthia)
Trusted Member

Where would I need to add these tables?

p.s. thanks for responding, at least now I know what the solution is.

I'm also seeing the error message:

A fatal MySQL error was encountered.
Query: select `epubimg` from `fanfiction_settings` limit 0
Error: (1054) Unknown column 'epubimg' in 'field list'

I was never able to install as directed with this mod. I finally just manually added the necessary tables that are listed in the install.php file into my database. Once I did that, I was able to install.

ReplyQuote
Posted : 01/01/2014 5:07 am
SJP
 SJP
(@sjp)
Trusted Member

Where would I need to add these tables?

p.s. thanks for responding, at least now I know what the solution is.

Are you comfortable going into your database with phpmyadmin? That's where you need to add the tables. If you're not used to modifying the database that way, you should probably set up a test database to practice on.

ReplyQuote
Posted : 10/01/2014 4:48 pm
Amalthia
(@amalthia)
Trusted Member

Where would I need to add these tables?

p.s. thanks for responding, at least now I know what the solution is.

Are you comfortable going into your database with phpmyadmin? That's where you need to add the tables. If you're not used to modifying the database that way, you should probably set up a test database to practice on.

I'm relatively comfortable with phpmyadmin, I've never set up tables through it before so I may just take your advice and practice on another database first. 🙂

ReplyQuote
Posted : 11/01/2014 7:23 am
Piper
(@piper)
Trusted Member

Hi Everyone! Sorry for the delay, but I've updated my installer.php and update.php files to hopefully fix the errors mentioned above when installing or updating. The new version is named 1.3u1 or Update 1, but it won't actually add u1 or Update 1 to your module version, it will still say 1.3 but takes in account 1.3 to 1.3u1 upgrades and will upgrade from version 1.0 and higher.

I'm currently working on code for basic .mobi/azw support for Kindle devices and also PDF options. I know there are multiple new versions and forks of eFiction on the horizon, and was wondering if anyone wants me to keep updating this code with new features or just wait for the new eFiction code base?

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/05/2014 7:47 am
kali
 kali
(@kali)
Reputable Member

I would definitely like to see an update for 3.0. Our sites are heavily modded so it will take awhile for us to move to the new version, even after it is released.

Skins made by Kali are no longer supported!

ReplyQuote
Posted : 29/05/2014 3:40 am
Nadia
(@nadia)
Member Admin

Hi Piper, I'm glad you fixed a few bugs. I just tried to install the module to my demo archive, but I've got another error.  :help:


A fatal MySQL error was encountered.
Query: select `epubimg` from `fanfiction_settings` limit 0
Error: ()

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Posted : 29/05/2014 10:09 am
Sheepcontrol
(@sheepcontrol)
Member Admin

I would definitely like to see an update for 3.0. Our sites are heavily modded so it will take awhile for us to move to the new version, even after it is released.

Topic hijack: did you take the survey for eFi5 and the modifications you would want to see as built-in features yet?

ReplyQuote
Posted : 29/05/2014 10:27 am
Piper
(@piper)
Trusted Member

Hi Piper, I'm glad you fixed a few bugs. I just tried to install the module to my demo archive, but I've got another error.  :help:


A fatal MySQL error was encountered.
Query: select `epubimg` from `fanfiction_settings` limit 0
Error: ()

This error was durring the install? Was it a fresh install or an upgrade?

Also can you tell me what version of PHP and what version of MySQL you have installed on your server?

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 : 08/06/2014 6:48 pm
Piper
(@piper)
Trusted Member

Actually I can see where the error is, I'm going to re-write the install script today, and see if that works.

-Piper

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 : 08/06/2014 7:12 pm
Nadia
(@nadia)
Member Admin

Thanks, Piper. 🙂

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Posted : 08/06/2014 8:13 pm
Grimmbart
(@grimmbart)
Active Member

Hi Piper,

can you tell me where the filename of the downloaded epub is generated?

I want to change it to author - title.epub for single storys and author - series - title.epub for series.

Also i only like to add the [Chapter] part it only one chapter is downloaded.

Greets,

Grimmbart.

ReplyQuote
Posted : 09/06/2014 12:06 am
Nadia
(@nadia)
Member Admin

Is the installer fixed now? Just wondering ...  😕

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Posted : 30/06/2014 10:42 am
SJP
 SJP
(@sjp)
Trusted Member

Is the installer fixed now? Just wondering ...  😕

Nadia,
if you want to get this module installed, and don't want to enter the necessary tables, here's a quick and dirty fix for the install.php file that should help you. I had the same issue as you are having. The issue is when the installer checks if the module tables are already there. I didn't re-write the install file, but I removed the steps where it checks if the tables are there before it adds them. This fix will not work if you're upgrading or have any epubversion tables already added to your database. This way at least you'll be able to get the module up on your site.

Just remove the current code from the install.php file and paste this code in to replace it.

<?php
$current = "epubversion";
include ("../../header.php");

//make a new TemplatePower object
if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );
else $tpl = new TemplatePower(_BASEDIR."default_tpls/default.tpl");
$tpl->assignInclude( "header", "$skindir/header.tpl" );
$tpl->assignInclude( "footer", "$skindir/footer.tpl" );
include(_BASEDIR."includes/pagesetup.php");
include_once(_BASEDIR."languages/".$language."_admin.php");
if(!isADMIN) accessDenied( );
$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false;
if($confirm == "yesoff"||$confirm == "yeson") {
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubimg` TINYINT( 1 ) default '0'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubanon` TINYINT( 1 ) NOT NULL default '1'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubtidy` TINYINT( 1 ) NOT NULL default '0'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubrw` TINYINT( 1 ) NOT NULL default '0'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubsitename` varchar(200) NOT NULL default 'Your SiteName Here!'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubtagline` varchar(200) NOT NULL default 'Catchy Tag-Line Here!'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epuburl` varchar(200) NOT NULL default ' http://your-stie.url'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubsitelogo` varchar(200) NOT NULL default 'modules/epubversion/banners/DEFAULT-Banner.png'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubicon` varchar(200) NOT NULL default 'modules/epubversion/images/3-default-epub.png'");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epubcover` varchar(200) NULL default NULL");
    dbquery("ALTER TABLE `".$settingsprefix."fanfiction_settings` ADD `epublang` varchar(2) NULL default NULL");
    dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` ADD `epubcover` varchar(200) NULL default NULL");
    dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` ADD `epubread` TINYINT( 1 ) NOT NULL default '0'");
    dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` ADD `epublang` VARCHAR( 2 ) NULL DEFAULT NULL");
    dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR."modules/epubversion/otherresults.php");', 'otherresults', 'epubversion');");
    dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ('include(_BASEDIR."modules/epubversion/recentblock.php");', 'storyblock', 'epubversion');"); 
if($confirm == "yeson") {
    dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` ADD `epub` TINYINT( 0 ) NOT NULL default '1'");
}
if($confirm == "yesoff") {
    dbquery("ALTER TABLE `".TABLEPREFIX."fanfiction_stories` ADD `epub` TINYINT( 0 ) NOT NULL default '0'");
}
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR."modules/epubversion/storyblock.php");', 'viewstory', 'epubversion');");
$subsquery1 = dbquery("SELECT panel_id FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'S' AND panel_hidden = '0'");
$subs1 = mysql_num_rows($subsquery1);
$subs++;
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels`(`panel_name`, `panel_title`, `panel_url`, `panel_level`, `panel_order`, `panel_hidden`, `panel_type` ) VALUES ('epubmanage', 'Manage ePub Stories', 'modules/epubversion/manage.php', '1', '$subs', '0', 'S');");
$subsquery2 = dbquery("SELECT panel_id FROM `".TABLEPREFIX."fanfiction_panels` WHERE panel_type = 'B' AND panel_hidden = '0'");
$subs2 = mysql_num_rows($subsquery2);
$subs++;
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_panels` (`panel_name` ,`panel_title` ,`panel_url` ,`panel_level` ,`panel_order` ,`panel_hidden` ,`panel_type` ) VALUES ('epubbrowse', 'ePub eBooks', 'modules/epubversion/browse.php', '0', '$subs2', 0, 'B');");
include("version.php");
dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_modules`(`version`, `name`) VALUES('$moduleVersion', '$moduleName')");
$output = write_message(_ACTIONSUCCESSFUL);
}
elseif($confirm == "no") {
$output = write_message(_ACTIONCANCELLED);
}
else {
$output = write_message("<IMG SRC="" http://storyportal.net/wp-content/uploads/ePubVersion-Logo-L-300x225.png "><H1>"._CONFIRMINSTALL."</H1><H2><a" href="'install.php?confirm=yesoff'>"._YES."" (ePub Default OFF)</a></H2><H2><a href="'install.php?confirm=yeson'>"._YES."" (ePub Default ON)</a></H2><H2><a href="'install.php?confirm=no'>"._NO."</a></H2>");"
}
$tpl->assign("output", $output);
$tpl->printToScreen( );
?>
ReplyQuote
Posted : 30/06/2014 9:12 pm
Nadia
(@nadia)
Member Admin

Thanks a lot! I'll give it a try.  :hug3:

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Posted : 01/07/2014 10:05 am
Nadia
(@nadia)
Member Admin

YAY, it's working!

Now I have another question: how can I remove the ePub icon and use a text link instead?

My Hub TrekNation | World of X | Capeside Diaries

ReplyQuote
Posted : 01/07/2014 12:40 pm
Page 7 / 9
Share: