I'm not sure if this is a mod request, so I decided to put it here...
Is it possible to make sure the author previews their story before pressing submit? I was thinking of a preview-only button at first, and only when they've previewed it can they submit. I checked out the code and it seems -- to me -- that eFic doesn't actually distinguish the difference hence my thought of a mod, but I'm not "well-versed" with eFiction, so to say, so I was wondering if a) it was possible and/or b) what I could do in the mean time. :3 Without having reminders everywhere because I already do. ;P
Thanks!
archive:
site:
Available for skin/mod commission! π
Use isset($_POST['submit']) to see whether or not they've previewed the item. Then around line 400 you should find where the preview and submit buttons are output. Just modify that so that only the preview button is displayed if they haven't submitted.
I used this instead:
isset($_POST['submit']) ? $_POST['submit'] : false
It'll do the same job, right?
Thanks!
archive:
site:
Available for skin/mod commission! π
You used that where? I think you need to leave it as _PREVIEW if you did it in the place I'm thinking.
Here's the chunk of it:
$submit = isset($_POST['submit']) ? $_POST['submit'] : false;
if(!$submit) $submit = _PREVIEW;
$output .= "<div class="tblborder" style="width: 80%; padding: 1em; margin: 1em auto;">
<form METHOD="POST" name="form" enctype="multipart/form-data" action='stories.php?action=$action".($newchapter ? "&sid=$sid&inorder=$inorder" : "").($admin == 1 ? "&admin=1&uid=$uid" : "")."'>";
if(!$newchapter) $output .= storyform($stories, $submit);
$output .= chapterform($inorder, $notes, $endnotes, $storytext, $chaptertitle, $uid);
// PREVIEW ONLY THEN SUBMIT
if (!$submit) {
$output .= "<div style="text-align: center;"><input type="submit" class="button" value=""._PREVIEW."" name="submit"> <input type="submit" class="button" value=""._ADDSTORY."" name="submit"></div></form>
</div>";
}
else {
$output .= "<div style="text-align: center;"><input type="submit" class="button" value=""._PREVIEW."" name="submit"></div></form>
</div>";
}
return $output;
}
That starts around line 338.
archive:
site:
Available for skin/mod commission! π
Yeah that isn't going to work because right after the first line you set submit to _PREVIEW. Change
if(!$submit) {
to
if(isset($_POST['submit'])) {
Oh! That works good.
I originally had that with the !. o_O
Thanks, Tammy. π
archive:
site:
Available for skin/mod commission! π