| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,36 @@ |
| 1 |
+// ---------------------------------------------------------------------- |
|
| 2 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 3 |
+// Also Like Module developed for eFiction 3.0 |
|
| 4 |
+// // http://efiction.hugosnebula.com/ |
|
| 5 |
+// ---------------------------------------------------------------------- |
|
| 6 |
+// LICENSE |
|
| 7 |
+// |
|
| 8 |
+// This program is free software; you can redistribute it and/or |
|
| 9 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 10 |
+// as published by the Free Software Foundation; either version 2 |
|
| 11 |
+// of the License, or (at your option) any later version. |
|
| 12 |
+// |
|
| 13 |
+// This program is distributed in the hope that it will be useful, |
|
| 14 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 15 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 16 |
+// GNU General Public License for more details. |
|
| 17 |
+// |
|
| 18 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 19 |
+// ---------------------------------------------------------------------- |
|
| 20 |
+ |
|
| 21 |
+This little module will let you add an option to the members list page to |
|
| 22 |
+display a list of the betareaders on your site. It's designed to work with |
|
| 23 |
+the default beta-reader field. If you've installed a custom betareader |
|
| 24 |
+module make sure the name of the field is "betareader" and that it's a |
|
| 25 |
+yes/no field. Otherwise, this module won't work. |
|
| 26 |
+ |
|
| 27 |
+To install this module: |
|
| 28 |
+ |
|
| 29 |
+1. Upload the entire betareader folder to the the modules folder within your |
|
| 30 |
+eFiction installation. |
|
| 31 |
+ |
|
| 32 |
+2. Go to Admin->Modules and select "Install this Module" in the menu. |
|
| 33 |
+ |
|
| 34 |
+To uninsall this module: |
|
| 35 |
+ |
|
| 36 |
+1. Go to Admin->Modules and select "Uninstall this Module" in the menu. |
| 1 | 5 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,51 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 4 |
+// Also Like Module developed for eFiction 3.0 |
|
| 5 |
+// // http://efiction.hugosnebula.com/ |
|
| 6 |
+// ---------------------------------------------------------------------- |
|
| 7 |
+// LICENSE |
|
| 8 |
+// |
|
| 9 |
+// This program is free software; you can redistribute it and/or |
|
| 10 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 11 |
+// as published by the Free Software Foundation; either version 2 |
|
| 12 |
+// of the License, or (at your option) any later version. |
|
| 13 |
+// |
|
| 14 |
+// This program is distributed in the hope that it will be useful, |
|
| 15 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 16 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 17 |
+// GNU General Public License for more details. |
|
| 18 |
+// |
|
| 19 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 20 |
+// ---------------------------------------------------------------------- |
|
| 21 |
+$current = "adminarea"; |
|
| 22 |
+include ("../../header.php");
|
|
| 23 |
+ |
|
| 24 |
+//make a new TemplatePower object |
|
| 25 |
+if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );
|
|
| 26 |
+else $tpl = new TemplatePower(_BASEDIR."default_tpls/default.tpl"); |
|
| 27 |
+$tpl->assignInclude( "header", "$skindir/header.tpl" ); |
|
| 28 |
+$tpl->assignInclude( "footer", "$skindir/footer.tpl" ); |
|
| 29 |
+include(_BASEDIR."includes/pagesetup.php"); |
|
| 30 |
+include_once(_BASEDIR."languages/".$language."_admin.php"); |
|
| 31 |
+if(!isADMIN) accessDenied( ); |
|
| 32 |
+$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
|
| 33 |
+if($confirm == "yes") {
|
|
| 34 |
+ list($installed) = dbrow(dbquery("SELECT COUNT(code_module) FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_module = 'betareader'"));
|
|
| 35 |
+ if(!$installed) {
|
|
| 36 |
+ dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/betareader/members.php\");', 'membersList', 'betareader');");
|
|
| 37 |
+ include("version.php");
|
|
| 38 |
+ dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_modules`(`version`, `name`) VALUES('$moduleVersion', '$moduleName')");
|
|
| 39 |
+ dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/betareader/stats.php\");', 'sitestats', 'betareader');");
|
|
| 40 |
+ } |
|
| 41 |
+ $output = write_message(_ACTIONSUCCESSFUL); |
|
| 42 |
+} |
|
| 43 |
+else if($confirm == "no") {
|
|
| 44 |
+ $output = write_message(_ACTIONCANCELLED); |
|
| 45 |
+} |
|
| 46 |
+else {
|
|
| 47 |
+ $output = write_message(_CONFIRMINSTALL."<br /><a href='install.php?confirm=yes'>"._YES."</a> "._OR." <a href='install.php?confirm=no'>"._NO."</a>"); |
|
| 48 |
+} |
|
| 49 |
+$tpl->assign("output", $output);
|
|
| 50 |
+$tpl->printToScreen( ); |
|
| 51 |
+?> |
|
| 0 | 52 |
\ No newline at end of file |
| 1 | 53 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,11 @@ |
| 1 |
+<?php |
|
| 2 |
+if(!defined("_CHARSET")) exit( );
|
|
| 3 |
+list($field_id, $field_title) = dbrow(dbquery("SELECT field_id, field_title FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_name = 'betareader'"));
|
|
| 4 |
+$listOpts .= "<option value=\"authors.php?".($let ? "let=$let&" : "")."list=beta\"".($list == "beta" ? " selected" : "").">$field_title</option>"; |
|
| 5 |
+if($list == "beta") {
|
|
| 6 |
+ $countquery = "SELECT COUNT(DISTINCT ai.uid) FROM ".TABLEPREFIX."fanfiction_authorinfo as ai, "._AUTHORTABLE." WHERE ai.field = '$field_id' AND ai.info = '"._YES."' AND "._UIDFIELD." = ai.uid".(isset($letter) ? " AND $letter" : ""); |
|
| 7 |
+ $authorquery = "SELECT ap.stories as stories, "._PENNAMEFIELD." as penname, "._UIDFIELD." as uid FROM ".TABLEPREFIX."fanfiction_authorinfo as ai, "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs AS ap ON "._UIDFIELD." = ap.uid WHERE ai.field = '$field_id' AND ai.info = '"._YES."' AND "._UIDFIELD." = ai.uid ".(isset($letter) ? " AND $letter" : "")." GROUP BY "._UIDFIELD; |
|
| 8 |
+ $pagetitle .= $field_title; |
|
| 9 |
+} |
|
| 10 |
+ |
|
| 11 |
+?> |
|
| 0 | 12 |
\ No newline at end of file |
| 1 | 13 |
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 |
| 1 | 39 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,49 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 4 |
+// Also Like Module developed for eFiction 3.0 |
|
| 5 |
+// // http://efiction.hugosnebula.com/ |
|
| 6 |
+// ---------------------------------------------------------------------- |
|
| 7 |
+// LICENSE |
|
| 8 |
+// |
|
| 9 |
+// This program is free software; you can redistribute it and/or |
|
| 10 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 11 |
+// as published by the Free Software Foundation; either version 2 |
|
| 12 |
+// of the License, or (at your option) any later version. |
|
| 13 |
+// |
|
| 14 |
+// This program is distributed in the hope that it will be useful, |
|
| 15 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 16 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 17 |
+// GNU General Public License for more details. |
|
| 18 |
+// |
|
| 19 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 20 |
+// ---------------------------------------------------------------------- |
|
| 21 |
+$current = "adminarea"; |
|
| 22 |
+include ("../../header.php");
|
|
| 23 |
+ |
|
| 24 |
+//make a new TemplatePower object |
|
| 25 |
+if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );
|
|
| 26 |
+else $tpl = new TemplatePower(_BASEDIR."default_tpls/default.tpl"); |
|
| 27 |
+$tpl->assignInclude( "header", "$skindir/header.tpl" ); |
|
| 28 |
+$tpl->assignInclude( "footer", "$skindir/footer.tpl" ); |
|
| 29 |
+include(_BASEDIR."includes/pagesetup.php"); |
|
| 30 |
+include_once(_BASEDIR."languages/".$language."_admin.php"); |
|
| 31 |
+if(!isADMIN) accessDenied( ); |
|
| 32 |
+$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
|
| 33 |
+if($confirm == "yes") {
|
|
| 34 |
+ include("version.php");
|
|
| 35 |
+ dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_modules` WHERE name = '$moduleName'");
|
|
| 36 |
+ dbquery("DELETE FROM `".TABLEPREFIX."fanfiction_codeblocks` WHERE code_module = 'betareader'");
|
|
| 37 |
+ $output = write_message(_ACTIONSUCCESSFUL); |
|
| 38 |
+} |
|
| 39 |
+else if($confirm == "no") {
|
|
| 40 |
+ $output = write_message(_ACTIONCANCELLED); |
|
| 41 |
+} |
|
| 42 |
+else {
|
|
| 43 |
+ $modquery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_module = 'betareader'");
|
|
| 44 |
+ if(dbnumrows($modquery)) $output = write_message(_CONFIRMUNINSTALL."<a href='uninstall.php?confirm=yes'>"._YES."</a> "._OR." <a href='uninstall.php?confirm=no'>"._NO."</a>"); |
|
| 45 |
+ else $output .= write_message(_MODNOTINSTALLED); |
|
| 46 |
+} |
|
| 47 |
+$tpl->assign("output", $output);
|
|
| 48 |
+$tpl->printToScreen( ); |
|
| 49 |
+?> |
|
| 0 | 50 |
\ No newline at end of file |
| 1 | 51 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,58 @@ |
| 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 |
+$current = "betareader"; |
|
| 25 |
+include ("../../header.php");
|
|
| 26 |
+ |
|
| 27 |
+//make a new TemplatePower object |
|
| 28 |
+if(file_exists( "$skindir/default.tpl")) $tpl = new TemplatePower("$skindir/default.tpl" );
|
|
| 29 |
+else $tpl = new TemplatePower(_BASEDIR."default_tpls/default.tpl"); |
|
| 30 |
+$tpl->assignInclude( "header", "$skindir/header.tpl" ); |
|
| 31 |
+$tpl->assignInclude( "footer", "$skindir/footer.tpl" ); |
|
| 32 |
+include(_BASEDIR."includes/pagesetup.php"); |
|
| 33 |
+if(file_exists(_BASEDIR."languages/".$language."_admin.php")) include_once(_BASEDIR."languages/".$language."_admin.php"); |
|
| 34 |
+else include_once(_BASEDIR."languages/en_admin.php"); |
|
| 35 |
+if(file_exists(_BASEDIR."languages/".$language.".php")) include_once(_BASEDIR."languages/".$language.".php"); |
|
| 36 |
+else include_once(_BASEDIR."languages/en.php"); |
|
| 37 |
+if(!isADMIN) accessDenied( ); |
|
| 38 |
+$confirm = isset($_GET['confirm']) ? $_GET['confirm'] : false; |
|
| 39 |
+include("version.php");
|
|
| 40 |
+list($currentVersion) = dbrow(dbquery("SELECT version FROM ".TABLEPREFIX."fanfiction_modules WHERE name = '$moduleName' LIMIT 1"));
|
|
| 41 |
+$installed = dbnumrows(dbquery("SELECT COUNT(code_module) FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_module = 'betareader'"));
|
|
| 42 |
+if(empty($currentVersion) || $currentVersion < "1.4" || !$installed) {
|
|
| 43 |
+if($confirm == "yes") {
|
|
| 44 |
+ dbquery("UPDATE ".TABLEPREFIX."fanfiction_modules SET version = '1.4' WHERE name = '$moduleName' LIMIT 1");
|
|
| 45 |
+ if($currentVersion < "1.2") dbquery("INSERT INTO `".TABLEPREFIX."fanfiction_codeblocks` (`code_text`, `code_type`, `code_module`) VALUES ( 'include(_BASEDIR.\"modules/betareader/stats.php\");', 'sitestats', 'betareader');");
|
|
| 46 |
+ $output = write_message(_ACTIONSUCCESSFUL); |
|
| 47 |
+} |
|
| 48 |
+else if($confirm == "no") {
|
|
| 49 |
+ $output = write_message(_ACTIONCANCELLED); |
|
| 50 |
+} |
|
| 51 |
+else {
|
|
| 52 |
+ $output = write_message(_CONFIRMUPDATE."<br /><a href='update.php?confirm=yes'>"._YES."</a> "._OR." <a href='update.php?confirm=no'>"._NO."</a>"); |
|
| 53 |
+} |
|
| 54 |
+} |
|
| 55 |
+else $output .= write_message(_ALREADYUPDATED); |
|
| 56 |
+$tpl->assign("output", $output);
|
|
| 57 |
+$tpl->printToScreen( ); |
|
| 58 |
+?> |
|
| 0 | 59 |
\ No newline at end of file |
| 1 | 60 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,18 @@ |
| 1 |
+<?php |
|
| 2 |
+/* |
|
| 3 |
+This file will be called by admin/modules.php and update.php to determine if |
|
| 4 |
+the module version in the database is the current version of the module. |
|
| 5 |
+The version number in this file will be the current version. |
|
| 6 |
+*/ |
|
| 7 |
+ |
|
| 8 |
+if(!defined("_CHARSET")) exit( );
|
|
| 9 |
+ |
|
| 10 |
+$moduleVersion = "1.4"; |
|
| 11 |
+$moduleName = "Beta-Reader List"; |
|
| 12 |
+ |
|
| 13 |
+$moduleDescription = "This tiny module adds a beta-reader option to the members page. Requires 3.1."; |
|
| 14 |
+$moduleAuthor = "Tammy Keefer"; |
|
| 15 |
+$moduleAuthorEmail = "efiction@hugosnebula.com"; |
|
| 16 |
+$moduleWebsite = "http://efiction.hugosnebula.com"; |
|
| 17 |
+ |
|
| 18 |
+?> |
|
| 0 | 19 |
\ No newline at end of file |