Forum

Notifications
Clear all

[FD]: Table of contents

Ardath Rekha
(@ardath-rekha)
Active Member

Hi! I'm so excited to hear that eFiction is getting an upgrade. I have a lot of modifications that I used on the old version, and I was wondering if this is the right place to mention them and/or request that some of them be considered for the upgrade. A particular peeve I had was that Tammy had insisted that it was impossible to have single-chapter stories go straight to the story from their links if multiple-chapter stories went to the table of contents, something I was actually able to solve with about an hour of code-tinkering so that it worked. I have an exhaustive list of all of the mods I applied; would you be interested if I dug them out and posted information about them (either here or in a more appropriate place)?

I am so juiced that this is getting updated! I've been worrying a little about what might happen when PHP/SQL changed enough that the old system was no longer compatible, something that happened a few years ago with the oldest versions by Rebecca Smallwood, and I hadn't found a working alternative to switch to. Thank you for doing this!

Quote
Topic starter Posted : 17/05/2014 7:45 pm
Sheepcontrol
(@sheepcontrol)
Member Admin

Actually, the way it works right now with stories is, that it throws you right into the story. Since there is no real table of contents and often authors just label their chapters "#1", "#2" ... we thought that would be the more logical approach.

Regarding the other question: I was wondering, which add-ons people would want to see built in from day one, might be that there's gonna be a vote about it later in, so feel free to throw everything in that you consider necessary.

ReplyQuote
Posted : 17/05/2014 7:52 pm
Ardath Rekha
(@ardath-rekha)
Active Member

Yikes, actually, on my sites, the authors tend to use the table of contents, with specific chapter titles (and some wacky numbering systems; I have one author who refuses to have chapter 13s) and individual synopses. It's one of the things that I considered an essential component of eFiction. I hope it really won't be eliminated. 🙁

ReplyQuote
Topic starter Posted : 17/05/2014 8:22 pm
Sheepcontrol
(@sheepcontrol)
Member Admin

I split this thread to its own topic.

@Ardath Rekha: are you refering to the original eF3.x TOC or did you modify it? If so, could you provide a link so I can have a look.

@All: please let us know how you think about the TOC, how should it look, should it be there, ...

ReplyQuote
Posted : 17/05/2014 9:20 pm
Ardath Rekha
(@ardath-rekha)
Active Member

Both, kind of? The eFiction 3.x TOC, if you switched it on, forced itself on both multi-chapter stories and single-chapter stories, and when I had asked about disabling it for single-chapter stories only (which was the norm for eFiction 1.x) I was told it was impossible. In fact, I was able to fix it in 3.x with the following code so that it worked:

Open viewstory.php

FIND

$storyinfo = dbassoc($storyquery);

DIRECTLY BELOW IT, ADD:

$chapquery = dbquery("SELECT chapid, title, inorder, rating, reviews, validated, uid FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '$sid' ORDER BY inorder");
$indexable = dbnumrows($chapquery);

FIND

else if(($displayindex && empty($chapter)) || !empty($_GET['index'])) {

REPLACE WITH

else if(($displayindex && empty($chapter) && ($indexable > 1)) || !empty($_GET['index'])) {

SAVE AND CLOSE.

It worked beautifully for me, although I hadn't taken it live on any of my active sites yet because I was in the process of doing updates when I ran out of free time thanks to school/work. However, on the test-builds that were going to replace the current archives, it works perfectly. I can send you a link to the test-build if you want a look at it; it's on my "real name" webspace so I don't want to post it publicly. I just checked and it's fully functional. 🙂

ReplyQuote
Topic starter Posted : 17/05/2014 10:04 pm
Sheepcontrol
(@sheepcontrol)
Member Admin

I was thinking more of a "look at the page" than "look at the code", maybe make a screenshot, save and send to me?

I don't have a preview site ready yet, otherwise I'd let you have a look at how things are right now.

ReplyQuote
Posted : 17/05/2014 10:20 pm
Aliceinwonderbra
(@aliceinwonderbra)
Active Member

Sheepcontrol, I like and use the TOC (from the script, not modified) on my site, just for the purpose of avoiding being dumped into chapter one, which I find disconcerting and kind of contrary to what the reader usually wants when coming to view an updated fic. 😛 An alternative that I'd love to see is if we could have a link that directed to the latest chapter. So on the stories page, clicking the title could take you to chapter 1, but you'd also have the option to click 'latest chapter' (I'm sure you know what I mean, but an example is buffynfaith.net if you want to see it). When given the option, that's usually what I use, and I got similar feedback when I launched my site. Not sure how difficult something like that is--I couldn't figure out how to add it, but my skillset is minimal. 😀 I also use TOC because I set a disclaimer to appear on that page as part of the story details.

ReplyQuote
Posted : 18/05/2014 4:24 am
Sheepcontrol
(@sheepcontrol)
Member Admin

Sheepcontrol, I like and use the TOC (from the script, not modified) on my site, just for the purpose of avoiding being dumped into chapter one, which I find disconcerting and kind of contrary to what the reader usually wants when coming to view an updated fic. 😛 An alternative that I'd love to see is if we could have a link that directed to the latest chapter. So on the stories page, clicking the title could take you to chapter 1, but you'd also have the option to click 'latest chapter' (I'm sure you know what I mean, but an example is buffynfaith.net if you want to see it). When given the option, that's usually what I use, and I got similar feedback when I launched my site. Not sure how difficult something like that is--I couldn't figure out how to add it, but my skillset is minimal. 😀 I also use TOC because I set a disclaimer to appear on that page as part of the story details.

Using a friend's database backup I stumbled over a mod that tracks the date you last read a story, so it can tell you if the story was updated, same thing could work with chapter numbers, that's one additional query for each chapter read, should not hurt too bad.

But ok, TOC is back due to public request, thanks for my feet back, errr I mean the feedback.

Edith just tells me:
TOC is in, tracking also, so you could be either thrown into the last read chapter or to the TOC, not sure which way to go.

ReplyQuote
Posted : 18/05/2014 10:01 am
SJP
 SJP
(@sjp)
Trusted Member

Sheepcontrol, I like and use the TOC (from the script, not modified) on my site, just for the purpose of avoiding being dumped into chapter one, which I find disconcerting and kind of contrary to what the reader usually wants when coming to view an updated fic. 😛 An alternative that I'd love to see is if we could have a link that directed to the latest chapter. So on the stories page, clicking the title could take you to chapter 1, but you'd also have the option to click 'latest chapter' (I'm sure you know what I mean, but an example is buffynfaith.net if you want to see it). When given the option, that's usually what I use, and I got similar feedback when I launched my site. Not sure how difficult something like that is--I couldn't figure out how to add it, but my skillset is minimal. 😀 I also use TOC because I set a disclaimer to appear on that page as part of the story details.

I know this thread is for future developments, but since we're stuck with efiction 3 while 5 is being developed, we might as well make the best of what we've got. This is a really easy modification to add to your current site since the information you need is already being pulled up in existing queries. To add a link to the latest chapter of a story, go to includes/storyblock.php. Around line 100, you'll see:

$numchapsquery = dbquery("SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '".$stories['sid']."' AND validated > 0");
list($chapters) = dbrow($numchapsquery);
$tpl->assign("numchapters", $chapters );

Below that, add:

	$tpl->assign("latest", "<a href="""._BASEDIR."viewstory.php?sid=".$stories['sid'"]."&amp;chapter=".$chapters ."">Latest Chapter</a>");

Then go to listings.tpl and add

{latest}

wherever you want the latest chapter link to show up in the browse page listings.

ReplyQuote
Posted : 18/05/2014 6:55 pm
Aliceinwonderbra
(@aliceinwonderbra)
Active Member

Thank you, Sheepcontrol and SJP! I will add the code you provided this week. :upsidedown:

ReplyQuote
Posted : 18/05/2014 8:17 pm
Azurite
(@azurite)
Estimable Member

I, for one, am in the camp of "one shots = no TOC" and "multi-chapter = TOC." I'm one of those authors who gives each chapter a title, although I know not everyone does. TOC might also enable organization of chapters taking into account things like Prologues, Epilogues, Spin-offs, Sub-Stories, etc.

Archive: Dragonfayth
eFiction: 3.5.5
Latest Patch(es): Yes
bridged?: No
modified?: Yes
PHP: 5.3.27
MySQL: 5.5.42-cll

ReplyQuote
Posted : 02/06/2014 4:15 am
Sheepcontrol
(@sheepcontrol)
Member Admin

Late update:

TOC is now in for all stories with more than 1 chapter, although I made it rather dynamic, so this is not carved in stone, more like in clay 🙂

ReplyQuote
Posted : 08/08/2014 1:11 am
Share: