Browse code

missed coauthors revert in includes/storyblock.php

Clarissa Walker authored on 2026/09/07 10:34:32
Showing 1 changed files
... ...
@@ -94,7 +94,7 @@ if(!defined("_CHARSET")) exit( );
94 94
 	$tpl->assign("ratingpics"   , ratingpics($stories['rating']) );
95 95
 	$tpl->assign("reviews"   , ($reviewsallowed ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">"._REVIEWS."</a>" : "") );
96 96
 	if(isMEMBER && !empty($favorites)) 
97
-		$tpl->assign("addtofaves", "[<a href=\""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid']."\">"._ADDSTORY2FAVES."</a>] [<a href=\""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'].(count($stories['coauthors_array']) ? ",".implode(",", array_keys($stories['coauthors_array'])) : "")."\">"._ADDAUTHOR2FAVES."</a>]");
97
+		$tpl->assign("addtofaves", "[<a href=\""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid']."\">"._ADDSTORY2FAVES."</a>] [<a href=\""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'].(count($stories['coauthors']) ? ",".implode(",", array_keys($stories['coauthors'])) : "")."\">"._ADDAUTHOR2FAVES."</a>]");
98 98
 	
99 99
 	$numchapsquery = dbquery("SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '".$stories['sid']."' AND validated > 0");
100 100
 	list($chapters) = dbrow($numchapsquery);
Browse code

Revert coauthors array changes as it occasionally brings up an undefined variable warning with no real way to fix it

Clarissa Walker authored on 2026/09/01 23:36:39
Showing 1 changed files
... ...
@@ -26,15 +26,15 @@ if(!defined("_CHARSET")) exit( );
26 26
 	$tpl->assign("sid", $stories['sid']);
27 27
 	unset($challengelinks, $challengeadmin, $serieslinks, $categorylinks, $adminlinks, $authlink);
28 28
 	if($stories['coauthors'] == 1) {
29
-		$array_coauthors = array();
29
+		$coauthors = array();
30 30
 		$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']."'");
31 31
 		while($c = dbassoc($coauth)) {
32
-			$array_coauthors[$c['uid']] = $c['penname'];
32
+			$coauthors[$c['uid']] = $c['penname'];
33 33
 		}
34
-		$stories['coauthors_array'] = $array_coauthors;
35
-		unset($array_coauthors);
34
+		$stories['coauthors'] = $coauthors;
35
+		unset($coauthors);
36 36
 	}
37
-	else  $stories['coauthors_array'] = array( );	 
37
+	else if(empty($stories['coauthors'])) $stories['coauthors'] = array( );
38 38
 	$tpl->assign("title"   , stripslashes(title_link($stories)) );
39 39
 	$tpl->assign("author"   , author_link($stories));
40 40
 	$tpl->assign("summary", stripslashes($stories['summary']) );
... ...
@@ -108,7 +108,7 @@ if(!defined("_CHARSET")) exit( );
108 108
 	}
109 109
 	$tpl->assign("wordcount"   , $stories['wordcount'] ? $stories['wordcount'] : "0" );
110 110
 	$tpl->assign("numreviews"   , ($reviewsallowed == "1" ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">".$stories['reviews']."</a>" : "") );
111
-	if((isADMIN && uLEVEL < 4) || USERUID == $stories['uid'] || (is_array($stories['coauthors']) && array_key_exists(USERUID, $stories['coauthors_array'])))
111
+	if((isADMIN && uLEVEL < 4) || USERUID == $stories['uid'] || (is_array($stories['coauthors']) && array_key_exists(USERUID, $stories['coauthors'])))
112 112
 		$adminlinks .= "[<a href=\""._BASEDIR."stories.php?action=editstory&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._EDIT."</a>] [<a href=\""._BASEDIR."stories.php?action=delete&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._DELETE."</a>]";
113 113
 	global $featured;
114 114
 	if($stories['featured'] == 1) {
... ...
@@ -126,6 +126,6 @@ if(!defined("_CHARSET")) exit( );
126 126
 	$tpl->assign("oddeven", ($count % 2 ? "odd" : "even"));
127 127
 	$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&amp;url=viewstory.php?sid=".$stories['sid']."\">"._REPORTTHIS."</a>]");
128 128
 	if(isADMIN && uLEVEL < 4) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".$adminlinks."</div>");
129
-	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors_array']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
129
+	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
130 130
 	$count++;
131 131
 ?>
Browse code

3.5.8.F1 - fix rating

Jimako authored on 2024/07/22 01:47:24
Showing 1 changed files
... ...
@@ -34,12 +34,11 @@ if(!defined("_CHARSET")) exit( );
34 34
 		$stories['coauthors_array'] = $array_coauthors;
35 35
 		unset($array_coauthors);
36 36
 	}
37
-	else  $stories['coauthors_array'] = array( );	
38
- 
37
+	else  $stories['coauthors_array'] = array( );	 
39 38
 	$tpl->assign("title"   , stripslashes(title_link($stories)) );
40 39
 	$tpl->assign("author"   , author_link($stories));
41 40
 	$tpl->assign("summary", stripslashes($stories['summary']) );
42
-    $tpl->assign("rating"   , !empty($ratingslist) &&  !empty($stories['rid'] && key_exists('name', $ratingslist) )  ? $ratingslist[$stories['rid']]['name'] : "");
41
+    $tpl->assign("rating"   , !empty($ratingslist) &&  !empty($stories['rid'] && key_exists('name', $ratingslist[$stories['rid']]) )  ? $ratingslist[$stories['rid']]['name'] : "");
43 42
 	$tpl->assign("score", ratingpics($stories['rating']) );
44 43
 	$tpl->assign("count", $stories['count'] ? $stories['count'] : "0");
45 44
 	$allclasslist = "";
Browse code

coauthors fix

Jimako authored on 2024/05/12 17:29:23
Showing 1 changed files
... ...
@@ -31,10 +31,10 @@ if(!defined("_CHARSET")) exit( );
31 31
 		while($c = dbassoc($coauth)) {
32 32
 			$array_coauthors[$c['uid']] = $c['penname'];
33 33
 		}
34
-		$stories['coauthors'] = $array_coauthors;
34
+		$stories['coauthors_array'] = $array_coauthors;
35 35
 		unset($array_coauthors);
36 36
 	}
37
-	else  $stories['coauthors'] = array( );	
37
+	else  $stories['coauthors_array'] = array( );	
38 38
  
39 39
 	$tpl->assign("title"   , stripslashes(title_link($stories)) );
40 40
 	$tpl->assign("author"   , author_link($stories));
... ...
@@ -95,7 +95,7 @@ if(!defined("_CHARSET")) exit( );
95 95
 	$tpl->assign("ratingpics"   , ratingpics($stories['rating']) );
96 96
 	$tpl->assign("reviews"   , ($reviewsallowed ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">"._REVIEWS."</a>" : "") );
97 97
 	if(isMEMBER && !empty($favorites)) 
98
-		$tpl->assign("addtofaves", "[<a href=\""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid']."\">"._ADDSTORY2FAVES."</a>] [<a href=\""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'].(count($stories['coauthors']) ? ",".implode(",", array_keys($stories['coauthors'])) : "")."\">"._ADDAUTHOR2FAVES."</a>]");
98
+		$tpl->assign("addtofaves", "[<a href=\""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid']."\">"._ADDSTORY2FAVES."</a>] [<a href=\""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'].(count($stories['coauthors_array']) ? ",".implode(",", array_keys($stories['coauthors_array'])) : "")."\">"._ADDAUTHOR2FAVES."</a>]");
99 99
 	
100 100
 	$numchapsquery = dbquery("SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '".$stories['sid']."' AND validated > 0");
101 101
 	list($chapters) = dbrow($numchapsquery);
... ...
@@ -109,7 +109,7 @@ if(!defined("_CHARSET")) exit( );
109 109
 	}
110 110
 	$tpl->assign("wordcount"   , $stories['wordcount'] ? $stories['wordcount'] : "0" );
111 111
 	$tpl->assign("numreviews"   , ($reviewsallowed == "1" ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">".$stories['reviews']."</a>" : "") );
112
-	if((isADMIN && uLEVEL < 4) || USERUID == $stories['uid'] || (is_array($stories['coauthors']) && array_key_exists(USERUID, $stories['coauthors'])))
112
+	if((isADMIN && uLEVEL < 4) || USERUID == $stories['uid'] || (is_array($stories['coauthors']) && array_key_exists(USERUID, $stories['coauthors_array'])))
113 113
 		$adminlinks .= "[<a href=\""._BASEDIR."stories.php?action=editstory&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._EDIT."</a>] [<a href=\""._BASEDIR."stories.php?action=delete&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._DELETE."</a>]";
114 114
 	global $featured;
115 115
 	if($stories['featured'] == 1) {
... ...
@@ -127,6 +127,6 @@ if(!defined("_CHARSET")) exit( );
127 127
 	$tpl->assign("oddeven", ($count % 2 ? "odd" : "even"));
128 128
 	$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&amp;url=viewstory.php?sid=".$stories['sid']."\">"._REPORTTHIS."</a>]");
129 129
 	if(isADMIN && uLEVEL < 4) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".$adminlinks."</div>");
130
-	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
130
+	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors_array']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
131 131
 	$count++;
132 132
 ?>
Browse code

3.5.8.1 warnings, dbconnect, install changes

Jimako authored on 2024/05/09 06:30:39
Showing 1 changed files
... ...
@@ -100,7 +100,7 @@ if(!defined("_CHARSET")) exit( );
100 100
 	$numchapsquery = dbquery("SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '".$stories['sid']."' AND validated > 0");
101 101
 	list($chapters) = dbrow($numchapsquery);
102 102
 	$tpl->assign("numchapters", $chapters );
103
-
103
+ 
104 104
 	$tpl->assign("updated"   , date("$dateformat", $stories['updated']) );
105 105
 	$tpl->assign("published"   , date("$dateformat", $stories['date']) );
106 106
 	if(!empty($recentdays)) {
Browse code

version 3.5.7

Jimako authored on 2024/04/08 12:21:57
Showing 1 changed files
... ...
@@ -34,11 +34,12 @@ if(!defined("_CHARSET")) exit( );
34 34
 		$stories['coauthors'] = $array_coauthors;
35 35
 		unset($array_coauthors);
36 36
 	}
37
-	else if(empty($stories['coauthors'])) $stories['coauthors'] = array( );	
37
+	else  $stories['coauthors'] = array( );	
38
+ 
38 39
 	$tpl->assign("title"   , stripslashes(title_link($stories)) );
39 40
 	$tpl->assign("author"   , author_link($stories));
40 41
 	$tpl->assign("summary", stripslashes($stories['summary']) );
41
-	$tpl->assign("rating"   , !empty($ratingslist) ? $ratingslist[$stories['rid']]['name'] : "");
42
+    $tpl->assign("rating"   , !empty($ratingslist) &&  !empty($stories['rid'] && key_exists('name', $ratingslist) )  ? $ratingslist[$stories['rid']]['name'] : "");
42 43
 	$tpl->assign("score", ratingpics($stories['rating']) );
43 44
 	$tpl->assign("count", $stories['count'] ? $stories['count'] : "0");
44 45
 	$allclasslist = "";
... ...
@@ -128,4 +129,4 @@ if(!defined("_CHARSET")) exit( );
128 129
 	if(isADMIN && uLEVEL < 4) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".$adminlinks."</div>");
129 130
 	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
130 131
 	$count++;
131
-?>
132 132
\ No newline at end of file
133
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,131 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Valid HTML 4.01 Transitional
5
+// Based on eFiction 1.1
6
+// Copyright (C) 2003 by Rebecca Smallwood.
7
+// http://efiction.sourceforge.net/
8
+// ----------------------------------------------------------------------
9
+// LICENSE
10
+//
11
+// This program is free software; you can redistribute it and/or
12
+// modify it under the terms of the GNU General Public License (GPL)
13
+// as published by the Free Software Foundation; either version 2
14
+// of the License, or (at your option) any later version.
15
+//
16
+// This program is distributed in the hope that it will be useful,
17
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+// GNU General Public License for more details.
20
+//
21
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
22
+// ----------------------------------------------------------------------
23
+
24
+if(!defined("_CHARSET")) exit( );
25
+	if(!isset($count)) $count = 0;
26
+	$tpl->assign("sid", $stories['sid']);
27
+	unset($challengelinks, $challengeadmin, $serieslinks, $categorylinks, $adminlinks, $authlink);
28
+	if($stories['coauthors'] == 1) {
29
+		$array_coauthors = array();
30
+		$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']."'");
31
+		while($c = dbassoc($coauth)) {
32
+			$array_coauthors[$c['uid']] = $c['penname'];
33
+		}
34
+		$stories['coauthors'] = $array_coauthors;
35
+		unset($array_coauthors);
36
+	}
37
+	else if(empty($stories['coauthors'])) $stories['coauthors'] = array( );	
38
+	$tpl->assign("title"   , stripslashes(title_link($stories)) );
39
+	$tpl->assign("author"   , author_link($stories));
40
+	$tpl->assign("summary", stripslashes($stories['summary']) );
41
+	$tpl->assign("rating"   , !empty($ratingslist) ? $ratingslist[$stories['rid']]['name'] : "");
42
+	$tpl->assign("score", ratingpics($stories['rating']) );
43
+	$tpl->assign("count", $stories['count'] ? $stories['count'] : "0");
44
+	$allclasslist = "";
45
+	$adminlinks = "";
46
+	$storyclasses = array( );
47
+ 
48
+	if($stories['classes'] > 0) {
49
+		foreach(explode(",", $stories['classes']) as $c) {
50
+		   if(array_key_exists($c, $classlist)) {
51
+			if(isset($action) && $action == "printable") { 
52
+				 $storyclasses[$classlist["$c"]['type']][] = $classlist[$c]['name'];
53
+			}
54
+			else {
55
+				$storyclasses[$classlist["$c"]['type']][] = 
56
+				"<a href='browse.php?type=class&amp;type_id=".$classlist["$c"]['type']."&amp;classid=$c'>".$classlist[$c]['name']."</a>";
57
+			}	
58
+		}
59
+		}
60
+	}
61
+	foreach($classtypelist as $num => $c) {
62
+		if(isset($storyclasses[$num])) {
63
+			$tpl->assign($c['name'], implode(", ", $storyclasses[$num]));
64
+			$allclasslist .= "<span class='label'>".$c['title'].": </span> ".implode(", ", $storyclasses[$num])."<br />";
65
+		}
66
+		else {
67
+			$tpl->assign($c['name'], _NONE);
68
+			$allclasslist .= "<span class='label'>".$c['title'].": </span> "._NONE."<br />";
69
+		}
70
+	}		
71
+	// We only want to pull this list once
72
+	if(!isset($storycodeblocks)) {
73
+		$storycodeblocks = array( );
74
+		$codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'storyblock'");
75
+		while($code = dbassoc($codequery)) {
76
+			$storycodeblocks[] = $code['code_text'];
77
+		}
78
+	}
79
+	if(count($storycodeblocks)) foreach($storycodeblocks as $c) { eval($c); } 
80
+	$tpl->assign("classifications", $allclasslist);
81
+	$seriesquery = "SELECT series.* FROM ".TABLEPREFIX."fanfiction_inseries as list, ".TABLEPREFIX."fanfiction_series as series WHERE list.sid = '".$stories['sid']."' AND series.seriesid = list.seriesid";
82
+	$seriesresult = dbquery($seriesquery) or die(_FATALERROR."<br>Query: $seriesquery<br>Error: (". $dbconnect->errno.") ". $dbconnect->error);
83
+	$serieslinks = array( );
84
+	while($s = dbassoc($seriesresult)) {
85
+		if(isset($action) && $action == "printable") $serieslinks[] = stripslashes($s['title']);
86
+		else $serieslinks[] = "<a href=\""._BASEDIR."viewseries.php?seriesid=".$s['seriesid']."\">".stripslashes($s['title'])."</a>";
87
+	}
88
+	$tpl->assign("serieslinks", (count($serieslinks) > 0 ? implode(", ", $serieslinks) : _NONE));
89
+	$tpl->assign("characters", ($stories['charid'] ? charlist($stories['charid']) : _NONE));
90
+	
91
+	$tpl->assign("category",  $stories['catid'] == '-1' || !$stories['catid'] ? _ORPHAN : catlist($stories['catid']));
92
+	$tpl->assign("completed"   , ($stories['completed'] ? _YES : _NO) );
93
+	$tpl->assign("roundrobin"   , ($stories['rr'] ?  (!empty($roundrobin) ? $roundrobin : "<img src=\"images/roundrobin.gif\" alt=\""._ROUNDROBIN."\">") : "") );
94
+	$tpl->assign("ratingpics"   , ratingpics($stories['rating']) );
95
+	$tpl->assign("reviews"   , ($reviewsallowed ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">"._REVIEWS."</a>" : "") );
96
+	if(isMEMBER && !empty($favorites)) 
97
+		$tpl->assign("addtofaves", "[<a href=\""._BASEDIR."user.php?action=favst&amp;add=1&amp;sid=".$stories['sid']."\">"._ADDSTORY2FAVES."</a>] [<a href=\""._BASEDIR."user.php?action=favau&amp;add=".$stories['uid'].(count($stories['coauthors']) ? ",".implode(",", array_keys($stories['coauthors'])) : "")."\">"._ADDAUTHOR2FAVES."</a>]");
98
+	
99
+	$numchapsquery = dbquery("SELECT count(sid) FROM ".TABLEPREFIX."fanfiction_chapters WHERE sid = '".$stories['sid']."' AND validated > 0");
100
+	list($chapters) = dbrow($numchapsquery);
101
+	$tpl->assign("numchapters", $chapters );
102
+
103
+	$tpl->assign("updated"   , date("$dateformat", $stories['updated']) );
104
+	$tpl->assign("published"   , date("$dateformat", $stories['date']) );
105
+	if(!empty($recentdays)) {
106
+		$recent = time( ) - ($recentdays * 24 * 60 *60);
107
+		if($stories['updated'] > $recent) $tpl->assign("new", isset($new) ? file_exists(_BASEDIR.$new) ? "<img src='$new' alt='"._NEW."'>" : $new : _NEW);
108
+	}
109
+	$tpl->assign("wordcount"   , $stories['wordcount'] ? $stories['wordcount'] : "0" );
110
+	$tpl->assign("numreviews"   , ($reviewsallowed == "1" ? "<a href=\""._BASEDIR."reviews.php?type=ST&amp;item=".$stories['sid']."\">".$stories['reviews']."</a>" : "") );
111
+	if((isADMIN && uLEVEL < 4) || USERUID == $stories['uid'] || (is_array($stories['coauthors']) && array_key_exists(USERUID, $stories['coauthors'])))
112
+		$adminlinks .= "[<a href=\""._BASEDIR."stories.php?action=editstory&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._EDIT."</a>] [<a href=\""._BASEDIR."stories.php?action=delete&amp;sid=".$stories['sid'].(isADMIN ? "&amp;admin=1" : "")."\">"._DELETE."</a>]";
113
+	global $featured;
114
+	if($stories['featured'] == 1) {
115
+		$tpl->assign("featuredstory", (isset($featured) ? $featured : "<img src=\""._BASEDIR."images/blueribbon.gif\" class=\"featured\" alt=\""._FSTORY."\">"));
116
+		$tpl->assign("featuredtext", _FSTORY);
117
+		if(isADMIN && uLEVEL < 4) $adminlinks .= " ["._FEATURED.": <a href=\""._BASEDIR."admin.php?action=featured&amp;retire=".$stories['sid']."\">"._RETIRE."</a> | <a href=\""._BASEDIR."admin.php?action=featured&amp;remove=".$stories['sid']."\">"._REMOVE."</a>]";
118
+	}
119
+	else if($stories['featured'] == 2) {
120
+		$tpl->assign("featuredstory", (isset($retired) ? $retired : "<img src=\""._BASEDIR."images/redribbon.gif\"align=\"left\" class=\"retired\" alt=\""._PFSTORY."\">"));
121
+		$tpl->assign("featuredtext", _PFSTORY);
122
+		if(isADMIN && uLEVEL < 4) $adminlinks .= " [<a href=\""._BASEDIR."admin.php?action=featured&amp;remove=".$stories['sid']."\">"._REMOVE."</a>]";
123
+	}
124
+	else if(isADMIN && uLEVEL < 4) $adminlinks .= " [<a href=\""._BASEDIR."admin.php?action=featured&amp;feature=".$stories['sid']."\">"._FEATURED."</a>]";
125
+	$tpl->assign("toc", "<a href=\""._BASEDIR."viewstory.php?sid=".$stories['sid']."&amp;index=1\">"._TOC."</a>");
126
+	$tpl->assign("oddeven", ($count % 2 ? "odd" : "even"));
127
+	$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&amp;url=viewstory.php?sid=".$stories['sid']."\">"._REPORTTHIS."</a>]");
128
+	if(isADMIN && uLEVEL < 4) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".$adminlinks."</div>");
129
+	else if(isMEMBER && (USERUID == $stories['uid'] || array_key_exists(USERUID, $stories['coauthors']))) $tpl->assign("adminlinks", "<div class=\"adminoptions\"><span class='label'>"._OPTIONS.":</span> ".$adminlinks."</div>");
130
+	$count++;
131
+?>
0 132
\ No newline at end of file