When editing/valida...
 
Notifications
Clear all

When editing/validating/updating a story - change 'Add Story' to 'Update Story'

9 Posts
4 Users
0 Reactions
2,358 Views
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

Hi,

Is it possible to edit the 'Add Story' on the submit buttons to 'Update Story' when you're editing a chapter/story?

It's a little confusing for me and my members right now, because when we update something at the end it says 'Add Story' rather than 'Update' so it confuses us a little.


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 23/06/2007 7:01 pm
(@fanfictionworld)
Posts: 149
Estimable Member
 

well it is possible to edit it via the en.php file but then that will mess up the add story button for when users wish to add the story as well im thinking as theres only 1 add story variable defined though so it may be hardcoded... (so i wouldnt do it the way ive just said)

there may be another way to do it  that someone else here may be able to advise you of


~Spikey~

my site url: http://www.fanfictionworld.org
efic version:3.5.3

 
Posted : 23/06/2007 8:18 pm
(@soundspretty)
Posts: 65
Trusted Member
 

You'll need to edit stories.php

Find:


$output .= "<p><input type="hidden" name="sid" value="$sid"><input type="hidden" name="inorder" value="$inorder"><input type="submit" class="button" value="$submit" name="submit">&nbsp; <input type="submit" class="button" value=""._EDITSTORY."" name="submit"></p></form></div>";
return $output;

}
// end editchapter function

Replace with:


$output .= "<p><input type="hidden" name="sid" value="$sid"><input type="hidden" name="inorder" value="$inorder"><input type="submit" class="button" value="$submit" name="submit">&nbsp; <input type="submit" class="button" value=""._EDITSTORY."" name="submit"></p></form></div>";
return $output;

}
// end editchapter function

Find:


$chapters = dbnumrows($chapquery);
$output .= "<p><input type="submit" class="button" value="$submit" name="submit">&nbsp; <input type="submit" class="button" value=""._ADDSTORY."" name="submit"></p></form></div>";

Replace with:


$chapters = dbnumrows($chapquery);
$output .= "<p><input type="submit" class="button" value="$submit" name="submit">&nbsp; <input type="submit" class="button" value=""._EDITSTORY."" name="submit"></p></form></div>";

 
Posted : 23/06/2007 10:48 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

Thank you muchly!


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 24/06/2007 12:27 pm
(@tammy)
Posts: 2577
Member Moderator
 

You'll break it doing that.  It checks for the _ADDSTORY value when the story is submitted.


 
Posted : 25/06/2007 12:43 pm
(@soundspretty)
Posts: 65
Trusted Member
 

Here's the fix.

You'll edit stories.php again. I've included the approximate lines for clarity:

AROUND LINE 438 FIND:

	if(isset($_POST['submit']) && $_POST['submit'] == _ADDSTORY) {
if(!$chaptertitle || !$storytext ) $submit == _PREVIEW;
else {

REPLACE WITH:

	if(isset($_POST['submit']) && $_POST['submit'] == _EDITSTORY) {
if(!$chaptertitle || !$storytext ) $submit == _PREVIEW;
else {

AROUND LINE 575 FIND:

	if(isset($_POST['submit']) && $_POST['submit'] == _ADDSTORY) {
$oldcats = isset($_POST['oldcats']) ? array_filter(explode(",", $_POST['oldcats']), "isNumber") : array( );
if (!$rid || !$title || !$summary || !$catid) {
$output .= write_error(_MISSINGFIELDS);
$submit = _PREVIEW;
}

REPLACE WITH:

	if(isset($_POST['submit']) && $_POST['submit'] == _EDITSTORY) {
$oldcats = isset($_POST['oldcats']) ? array_filter(explode(",", $_POST['oldcats']), "isNumber") : array( );
if (!$rid || !$title || !$summary || !$catid) {
$output .= write_error(_MISSINGFIELDS);
$submit = _PREVIEW;
}

That should work for you. I've already testing adding a new story/chapter and editing them as well.


 
Posted : 25/06/2007 7:49 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

Are those changes on the 'default' stories.php or the one that I changed before?


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 27/06/2007 12:27 pm
(@soundspretty)
Posts: 65
Trusted Member
 

The one you changed before. You will need to make the changes in my first reply and also my second.


 
Posted : 28/06/2007 12:39 pm
 Elle
(@jenny)
Posts: 594
Honorable Member
Topic starter
 

Got it - thanks. πŸ™‚


archive: dramione.org
site: accio.nu

Available for skin/mod commission! πŸ™‚

 
Posted : 01/07/2007 7:08 am
Share: