Level: Moderate. Modification consists of editing a php file, based on individual site layout.
In 3.3.1, the preview text section uses different formatting than the view chapter pages. This mod will help you make them look more similar, so that your authors will get a better idea of how their chapter text will look. You are only able to have one order of items on the preview page, so if you have skins that order things differently than each other, you will have to pick one order and stick with it.
*This mod is based on the formatting on my skins, which should be very similar to the defaults that come with the eFiction download. Yours may be different.
How to make your preview story formatting match your chapter formatting.
-------
Step 1. View a chapter on your archive (or look at viewstory.tpl with your file editor) and note what you have showing up, and where. We are concerned mostly with the chapter titles, author's notes, and story text. Look at the chapter with different skins, and note if any order changes occur from skin to skin. If they do (such as one skin having author's notes before the chapter title, and one skin having it after) you must pick which one you want for all previews.
Step 2. Open stories.php with your file editor and find lines 517-521
if(isset($failed)) $output .= write_message($failed);
$output .= "<span class='label'>"._TITLE.":</span> $chaptertitle<br />
<span class='label'>"._AUTHORSNOTES.":</span> $notes<br />
<hr><br />".format_story($storytext)."<hr>
<span class='label'>"._ENDNOTES.":</span> $endnotes<br />";
Right now it looks like this on the preview page:
Title: Chapter Title
Author Notes: Enjoy the story!
--------------------------------------------------
story text story text story text story text
story text story text story text story text
story text story text story text story text
--------------------------------------------------
Author Notes: You Better Review!
Step 3. Pick which style you want, and replace lines 517-521.
Chapter title, author's notes, story text stylized, same order as default:
if(isset($failed)) $output .= write_message($failed);
$output .= "
<div id='chaptertitle' style='font-weight:bold; padding:4px;'> $chaptertitle</div>
<div class='notes'><div class='title'><span class='label'>"._AUTHORSNOTES.":</span></div><div class='noteinfo'> $notes</div></div>
<div id='story'>".format_story($storytext)."</div>
<div class='notes'><div class='title'><span class='label'>"._ENDNOTES.":</span></div><div class='noteinfo'> $endnotes</div></div><br /><hr>";
Author's notes, chapter title, story text stylized, first notes before title:
if(isset($failed)) $output .= write_message($failed);
$output .= "
<div class='notes'><div class='title'><span class='label'>"._AUTHORSNOTES.":</span></div><div class='noteinfo'> $notes</div></div>
<div id='chaptertitle' style='font-weight:bold; padding:4px;'> $chaptertitle</div>
<div id='story'>".format_story($storytext)."</div>
<div class='notes'><div class='title'><span class='label'>"._ENDNOTES.":</span></div><div class='noteinfo'> $endnotes</div></div><br /><hr>";
Step 4. Save stories.php and upload to your server.
Step 5. Preview a chapter. (You can pick an already uploaded chapter, edit it and preview it.)
*Whenever stories.php is replaced due to updates, this mod will have to be reapplied.
To get rid of the forced reduced width when previewing stories, you will have to take off the forced width on the add/edit story page. I do not know how to do that.
Whoever said nothing is impossible never tried slamming a revolving door.
url: https://www.potionsandsnitches.org/fanfiction
php: 7.4.33 msql: 5.6.51-community GPL
efic version: 3.5.5 latest patches: yes
bridges: none mods: challenges, tracker, story end, beta, word
