| ... | ... |
@@ -25,6 +25,9 @@ |
| 25 | 25 |
if(!defined("_CHARSET")) exit( );
|
| 26 | 26 |
|
| 27 | 27 |
list($field_id, $field_title) = dbrow(dbquery("SELECT field_id, field_title FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_name = 'betareader'"));
|
| 28 |
+ |
|
| 29 |
+if(empty($field_title)) $field_title = _BETAS; |
|
| 30 |
+ |
|
| 28 | 31 |
$query = dbquery("SELECT count(uid) FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field = '$field_id' AND info = '"._YES."'");
|
| 29 | 32 |
list($count) = dbrow($query); |
| 30 | 33 |
if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
|
| ... | ... |
@@ -34,4 +37,3 @@ else if(!empty($blocks['info']['style']) && $blocks["info"]["style"] == 1) {
|
| 34 | 37 |
$content = preg_replace("@\{totalbetas\}@", $count, $content);
|
| 35 | 38 |
} |
| 36 | 39 |
else $content .= "<div><span class='label'>".$field_title.": </span>".$count."</div>"; |
| 37 |
-?> |
|
| 38 | 40 |
\ No newline at end of file |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,37 @@ |
| 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 |
+ |
|
| 25 |
+if(!defined("_CHARSET")) exit( );
|
|
| 26 |
+ |
|
| 27 |
+list($field_id, $field_title) = dbrow(dbquery("SELECT field_id, field_title FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_name = 'betareader'"));
|
|
| 28 |
+$query = dbquery("SELECT count(uid) FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE field = '$field_id' AND info = '"._YES."'");
|
|
| 29 |
+list($count) = dbrow($query); |
|
| 30 |
+if(!empty($blocks['info']['style']) && $blocks['info']['style'] == 2) {
|
|
| 31 |
+ $tpl->assignGlobal("totalbetas", $count);
|
|
| 32 |
+} |
|
| 33 |
+else if(!empty($blocks['info']['style']) && $blocks["info"]["style"] == 1) {
|
|
| 34 |
+ $content = preg_replace("@\{totalbetas\}@", $count, $content);
|
|
| 35 |
+} |
|
| 36 |
+else $content .= "<div><span class='label'>".$field_title.": </span>".$count."</div>"; |
|
| 37 |
+?> |
|
| 0 | 38 |
\ No newline at end of file |