Multiple Authors
 
Notifications
Clear all

Multiple Authors

5 Posts
3 Users
0 Reactions
1,173 Views
(@jetblack)
Posts: 33
Eminent Member
Topic starter
 

Hi:

We're having an issue where a story with more than one author keeps getting stripped of the second/third author whenever the story is saved.  I keep having to go in and add them back in.  Is there anyway to keep the added authors in without blanking that section of the dialog?

Additionally, in the Most Recent block, it's only showing the one author, not all the authors.  I know this is all superficial, but I think they have a point about making sure everyone gets credit, and not just the one who created the story within the system.

Thanks!

MDg


Archive: Ad Astra Star Trek Fanfiction Archive
Version: 3.5.3
Skin: One of Kali's, but I'm not sure. It's been heavily modded.
PHP: 7.4.27
MySQL: 5.7.36

 
Posted : 01/04/2009 5:54 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Are you talking about it stripping the coauthors when the story is first created, or when the story is edited/added to?  The second is a known issue.  I've been looking at it briefly; it seems complicated to change but I might take a stab at it. See here: https://efiction.org/forums/index.php?topic=6951.msg37321#msg37321

For the second thing, I think blocks/recent/recent.php needs to be edited.  I'm not sure quite how.  This line, I think. (But first, you have to go to Admin > Blocks, then Options on Recent, and change "Block Style" to "Use .tpl".)


if(!$use_tpl) $content .= "<div class='recentstory'>".title_link($stories)." "._BY." ".author_link($stories)." ".$ratingslist[$stories['rid']]['name']."<br />".stripslashes($stories['summary'])."</div>";

That section defines what appears in the $content variable in a tpl... which tpl I'm not really sure.

I don't know what to add.  The relevant section of includes/storyblock.php is the very top section, like so...


if($stories['coauthors'] == 1) {
$coauthors = array();
$coauth = dbquery("SELECT "._PENNAMEFIELD." as penname, co.uid FROM ".TABLEPREFIX."fanfiction_coauthors AS co LEFT JOIN "._AUTHORTABLE." ON co.uid = "._UIDFIELD." WHERE co.sid = '".$stories['sid']."'");
while($c = dbassoc($coauth)) {
$coauthors[$c['uid']] = $c['penname'];
}
$stories['coauthors'] = $coauthors;
unset($coauthors);
}
else if(empty($stories['coauthors'])) $stories['coauthors'] = array( );
$tpl->assign("title"   , stripslashes(title_link($stories)) );
$tpl->assign("author"   , author_link($stories));
$tpl->assign("summary", stripslashes($stories['summary']) );
$tpl->assign("rating"   , $ratingslist[$stories['rid']]['name']);
$tpl->assign("score", ratingpics($stories['rating']) );
$tpl->assign("count", $stories['count'] ? $stories['count'] : "0");
$allclasslist = "";
$adminlinks = "";

Or maybe there's an easier way. I don't think there's an easy way to do it in the tpl files because according to the above there's no $coauthors for tpls (ie $tpl->assign("coauthors") ), it's part of $author, it looks like; and anyway not sure how you would work that into a block.  I don't think there's an easy way to change that because of the number of times coauthor stuff appears in the script.  So the easiest would be to change the block file like I mentioned at first.

Anyway, what I'm getting at is it's complicated.  Sorry if I'm making it more confusing, I'm kind of thinking out loud here.


 
Posted : 01/04/2009 6:46 pm
(@jetblack)
Posts: 33
Eminent Member
Topic starter
 

Thanks for the pointer, but either I'm blind or I don't see a solution, there.  Is there something in the way the addstory form pulls the data that needs changing or modification?

Thanks!


Archive: Ad Astra Star Trek Fanfiction Archive
Version: 3.5.3
Skin: One of Kali's, but I'm not sure. It's been heavily modded.
PHP: 7.4.27
MySQL: 5.7.36

 
Posted : 02/04/2009 1:00 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

No, there's no solution there.  I was basically thinking out loud about how to approach the problem, so that maybe others could take a look, basically.


 
Posted : 02/04/2009 2:28 pm
(@carissa)
Posts: 791
Member Moderator
 

It looks like you would need to use an if/else statement to check if $coauthors is defined and if it is, create the variable for authors from that and if it's not, use the $authors variable. Not sure though, I'm not really a php expert.


 
Posted : 02/04/2009 2:32 pm
Share: