Browse code

Revert 'hide member status if added by admin' commit as it breaks the Membership Status field in User Profiles entirely - wonder what the justification of this one was

Clarissa Walker authored on 2026/08/22 21:20:21
Showing 1 changed files
... ...
@@ -48,11 +48,8 @@ if($userinfo['bio']) {
48 48
 if($userinfo['image'])
49 49
 	$tpl->assign("image", "<img src=\"".$userinfo['image']."\">");
50 50
 
51
-/* don't display member if it was added by admin - release them rather */
52
-if(isset($userinfo['admicreated']) && $userinfo['admicreated'] == 0) {
53
-	$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
54
-	$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
55
-}
51
+$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
52
+
56 53
 /* Dynamic authorinfo fields */
57 54
 $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
58 55
 $dynamicfields = "";
Browse code

membersince shortcode

Jimako authored on 2024/06/20 02:14:57
Showing 1 changed files
... ...
@@ -37,6 +37,7 @@ if(!empty($favorites) && isMEMBER && $userinfo['uid'] != USERUID) {
37 37
 }
38 38
  
39 39
 $tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
40
+$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
40 41
 
41 42
 if($userinfo['realname'])
42 43
 	$tpl->assign("realname", $userinfo['realname']);
Browse code

fix for link and level for admincreated users

Jimako authored on 2024/05/13 13:49:32
Showing 1 changed files
... ...
@@ -37,7 +37,7 @@ if(!empty($favorites) && isMEMBER && $userinfo['uid'] != USERUID) {
37 37
 }
38 38
  
39 39
 $tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
40
-$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
40
+
41 41
 if($userinfo['realname'])
42 42
 	$tpl->assign("realname", $userinfo['realname']);
43 43
 if($userinfo['bio']) {
... ...
@@ -46,7 +46,12 @@ if($userinfo['bio']) {
46 46
 }
47 47
 if($userinfo['image'])
48 48
 	$tpl->assign("image", "<img src=\"".$userinfo['image']."\">");
49
-$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
49
+
50
+/* don't display member if it was added by admin - release them rather */
51
+if(isset($userinfo['admicreated']) && $userinfo['admicreated'] == 0) {
52
+	$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
53
+	$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
54
+}
50 55
 /* Dynamic authorinfo fields */
51 56
 $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
52 57
 $dynamicfields = "";
... ...
@@ -88,4 +93,4 @@ if(isADMIN && uLEVEL < 3) {
88 93
 	$tpl->assign("adminoptions", $adminopts);
89 94
 }
90 95
 $tpl->gotoBlock("_ROOT");
91
-?>
92 96
\ No newline at end of file
97
+?>
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,91 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// eFiction 3.2
4
+// Copyright (c) 2007 by Tammy Keefer
5
+// Valid HTML 4.01 Transitional
6
+// Based on eFiction 1.1
7
+// Copyright (C) 2003 by Rebecca Smallwood.
8
+// http://efiction.sourceforge.net/
9
+// ----------------------------------------------------------------------
10
+// LICENSE
11
+//
12
+// This program is free software; you can redistribute it and/or
13
+// modify it under the terms of the GNU General Public License (GPL)
14
+// as published by the Free Software Foundation; either version 2
15
+// of the License, or (at your option) any later version.
16
+//
17
+// This program is distributed in the hope that it will be useful,
18
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
+// GNU General Public License for more details.
21
+//
22
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
23
+// ----------------------------------------------------------------------
24
+
25
+if(!defined("_CHARSET")) exit( );
26
+
27
+// Build the user's profile information
28
+$tpl->newBlock("profile");
29
+$result2 = dbquery("SELECT *, date as date FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '$uid' LIMIT 1");
30
+$userinfo = dbassoc($result2);
31
+$nameinfo = "";
32
+if($userinfo['email'])
33
+	$nameinfo .= " [<a href=\"viewuser.php?action=contact&amp;uid=".$userinfo['uid']."\">"._CONTACT."</a>]";
34
+if(!empty($favorites) && isMEMBER && $userinfo['uid'] != USERUID) {
35
+	$fav = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_favorites WHERE uid = '".USERUID."' AND type = 'AU' AND item = '".$userinfo['uid']."'");
36
+	if(dbnumrows($fav) == 0) $nameinfo .= " [<a href=\"user.php?action=favau&amp;uid=".USERUID."&amp;add=".$userinfo['uid']."\">"._ADDAUTHOR2FAVES."</a>]";
37
+}
38
+ 
39
+$tpl->assign("userpenname", $userinfo['penname']." ".$nameinfo);
40
+$tpl->assign("membersince", date("$dateformat", $userinfo['date']));
41
+if($userinfo['realname'])
42
+	$tpl->assign("realname", $userinfo['realname']);
43
+if($userinfo['bio']) {
44
+	$bio = nl2br($userinfo['bio']);	
45
+	$tpl->assign("bio", stripslashes($bio));
46
+}
47
+if($userinfo['image'])
48
+	$tpl->assign("image", "<img src=\"".$userinfo['image']."\">");
49
+$tpl->assign("userlevel", isset($userinfo['level']) && $userinfo['level'] > 0 && $userinfo['level'] < 4 ? _ADMINISTRATOR.(isADMIN ? " - ".$userinfo['level'] : "") : _MEMBER);
50
+/* Dynamic authorinfo fields */
51
+$result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorinfo WHERE uid = '$uid'");
52
+$dynamicfields = "";
53
+while($field = dbassoc($result2)) {
54
+	if($field['info'] == "") continue;
55
+	$fieldinfo = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_authorfields WHERE field_id = '".$field['field']."' LIMIT 1"));
56
+	if($fieldinfo) {
57
+		$thisfield = "";
58
+		if($fieldinfo['field_on'] == 0) continue;
59
+		if($fieldinfo['field_type'] == 1) { $thisfield = format_link($field['info']);
60
+		}
61
+		if($fieldinfo['field_type'] == 4) {
62
+			$thisfield = preg_replace("@\{info\}@", $field['info'], $fieldinfo['field_options']);
63
+			$thisfield = format_link($thisfield);
64
+		}
65
+		if($fieldinfo['field_type'] == 2 || $fieldinfo['field_type'] == 6) {
66
+			$thisfield = stripslashes($field['info']);
67
+		}
68
+		if($fieldinfo['field_type'] == 3) {
69
+			$thisfield = $field['info'];
70
+		}
71
+		else eval($fieldinfo['field_code_out']);
72
+		$tpl->assign($fieldinfo['field_name'], $thisfield);
73
+		$dynamicfields .= "<div class='authorfields'><span class='label'>".$fieldinfo['field_title'].":</span> ".$thisfield."</div>";
74
+	}
75
+}
76
+$codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'userprofile'");
77
+while($code = dbassoc($codequery)) {
78
+	eval($code['code_text']);
79
+}
80
+if(!empty($dynamicfields)) $tpl->assign("authorfields", $dynamicfields);
81
+/* End dynamic fields */
82
+$tpl->assign("reportthis", "[<a href=\""._BASEDIR."contact.php?action=report&amp;url=viewuser.php?uid=".$uid."\">"._REPORTTHIS."</a>]");
83
+$adminopts = "";
84
+if(isADMIN && uLEVEL < 3) {
85
+	$adminopts .= "<div class=\"adminoptions\"><span class='label'>"._ADMINOPTIONS.":</span> ".(isset($userinfo['validated']) && $userinfo['validated'] ? "[<a href=\"admin.php?action=members&amp;revoke=$uid\" class=\"vuadmin\">"._REVOKEVAL."</a>] " : "[<a href=\"admin.php?action=members&amp;validate=$uid\" class=\"vuadmin\">"._VALIDATE."</a>] ")."[<a href=\"user.php?action=editbio&amp;uid=$uid\" class=\"vuadmin\">"._EDIT."</a>] [<a href=\"admin.php?action=members&amp;delete=$uid\" class=\"vuadmin\">"._DELETE."</a>]";
86
+	$adminopts .= " [<a href=\"admin.php?action=members&amp;".($userinfo['level'] < 0 ? "unlock=".$userinfo['uid']."\" class=\"vuadmin\">"._UNLOCKMEM : "lock=".$userinfo['uid']."\" class=\"vuadmin\">"._LOCKMEM)."</a>]";
87
+	$adminopts .= " [<a href=\"admin.php?action=admins&amp;".(isset($userinfo['level']) && $userinfo['level'] > 0 ? "revoke=$uid\" class=\"vuadmin\">"._REVOKEADMIN."</a>] [<a href=\"admin.php?action=admins&amp;do=edit&amp;uid=$uid\" class=\"vuadmin\">"._EDITADMIN : "do=new&amp;uid=$uid\" class=\"vuadmin\">"._MAKEADMIN)."</a>]</div>";
88
+	$tpl->assign("adminoptions", $adminopts);
89
+}
90
+$tpl->gotoBlock("_ROOT");
91
+?>
0 92
\ No newline at end of file