Browse Source

Generalize bonus points to be easily renamed

spaghetti 4 years ago
parent
commit
fe9cb0641d

+ 3
- 0
classes/config.template View File

@@ -18,6 +18,9 @@ define('ANNOUNCE_URLS', [[
18 18
   'https://tracker4.'.SITE_DOMAIN.':34001'
19 19
 ]]);
20 20
 
21
+// Name for bonus points currency
22
+define('BONUS_POINTS', 'Nips');
23
+
21 24
 // Don't hard code API keys for services
22 25
 define('API_KEYS', ['ANIDB' => 'AAAAAAAAAAAAAAAA']);
23 26
 

+ 1
- 1
classes/users.class.php View File

@@ -161,7 +161,7 @@ class Users {
161 161
           i.DisableWiki,
162 162
           i.DisableAvatar,
163 163
           i.DisablePM,
164
-          i.DisableNips,
164
+          i.DisablePoints,
165 165
           i.DisablePromotion,
166 166
           i.DisableRequests,
167 167
           i.DisableForums,

+ 1
- 1
design/privateheader.php View File

@@ -337,7 +337,7 @@ if (check_perms('site_send_unlimited_invites')) {
337 337
 <?  }
338 338
 ?>
339 339
           <li id="bonus_points">
340
-            <a href="wiki.php?action=article&amp;id=8">Nips</a>:
340
+            <a href="wiki.php?action=article&amp;id=8"><?=BONUS_POINTS?></a>:
341 341
             <span class="stat">
342 342
               <a href="store.php"><?=number_format(G::$LoggedUser['BonusPoints'])?></a>
343 343
             </span>

+ 1
- 1
gazelle.sql View File

@@ -1476,7 +1476,7 @@ CREATE TABLE `users_info` (
1476 1476
   `DisableUpload` enum('0','1') NOT NULL DEFAULT '0',
1477 1477
   `DisableWiki` enum('0','1') NOT NULL DEFAULT '0',
1478 1478
   `DisablePM` enum('0','1') NOT NULL DEFAULT '0',
1479
-  `DisableNips` enum('0','1') NOT NULL DEFAULT '0',
1479
+  `DisablePoints` enum('0','1') NOT NULL DEFAULT '0',
1480 1480
   `RatioWatchEnds` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
1481 1481
   `RatioWatchDownload` bigint(20) unsigned NOT NULL DEFAULT '0',
1482 1482
   `RatioWatchTimes` tinyint(1) unsigned NOT NULL DEFAULT '0',

+ 1
- 1
sections/schedule/hourly/bonus_points.php View File

@@ -14,7 +14,7 @@ $getUsers = $DB->query("
14 14
   LEFT JOIN xbt_snatched AS xs ON x.uid=xs.uid AND x.fid=xs.fid
15 15
   WHERE
16 16
     um.Enabled = '1'
17
-    AND i.DisableNips = '0'
17
+    AND i.DisablePoints = '0'
18 18
     AND x.active = 1
19 19
     AND x.completed = 0
20 20
     AND x.Remaining = 0

+ 1
- 1
sections/store/100k_points.php View File

@@ -17,7 +17,7 @@ if ($DB->has_results()) {
17 17
       WHERE ID = $UserID");
18 18
     $DB->query("
19 19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 100,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 100,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21 21
       WHERE UserID = $UserID");
22 22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23 23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/10k_points.php View File

@@ -17,7 +17,7 @@ if ($DB->has_results()) {
17 17
       WHERE ID = $UserID");
18 18
     $DB->query("
19 19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 10,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 10,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21 21
       WHERE UserID = $UserID");
22 22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23 23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/1k_points.php View File

@@ -17,7 +17,7 @@ if ($DB->has_results()) {
17 17
       WHERE ID = $UserID");
18 18
     $DB->query("
19 19
       UPDATE users_info
20
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000 Nips from the store\n\n', AdminComment)
20
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000 ".BONUS_POINTS." from the store\n\n', AdminComment)
21 21
       WHERE UserID = $UserID");
22 22
     $Cache->delete_value('user_info_heavy_'.$UserID);
23 23
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/1m_points.php View File

@@ -19,7 +19,7 @@ if ($DB->has_results()) {
19 19
       WHERE ID = $UserID");
20 20
     $DB->query("
21 21
       UPDATE users_info
22
-      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000,000 Nips from the store\n\n', AdminComment)
22
+      SET AdminComment = CONCAT('".sqltime()." - Purchased 1,000,000 ".BONUS_POINTS."s from the store\n\n', AdminComment)
23 23
       WHERE UserID = $UserID");
24 24
     $Cache->delete_value('user_info_heavy_'.$UserID);
25 25
     $Cache->delete_value('user_stats_'.$UserID);

+ 1
- 1
sections/store/badge.php View File

@@ -39,7 +39,7 @@ if (!$BadgeID) {
39 39
         $Cache->delete_value("user_info_heavy_$UserID");
40 40
       }
41 41
     } else {
42
-      $Err = 'Not enough Nips.';
42
+      $Err = 'Not enough '.BONUS_POINTS.'.';
43 43
     }
44 44
   }
45 45
 }

+ 2
- 2
sections/store/capture_user.php View File

@@ -75,11 +75,11 @@ if (isset($_POST['target']) && isset($_POST['amount'])) {
75 75
       <form action="store.php" method="POST">
76 76
         <input type="hidden" name="item" value="capture_user">
77 77
         <strong>
78
-          Enter the name of the user you want to capture and the nips you want to spend
78
+        Enter the name of the user you want to capture and the <?=BONUS_POINTS?> you want to spend
79 79
         </strong>
80 80
         <br>
81 81
         <input type="text" name="target_name" placeholder="Username">
82
-        <input type="text" name="amount" placeholder="Nips">
82
+        <input type="text" name="amount" placeholder="<?=BONUS_POINTS?>">
83 83
         <input type="submit">
84 84
       </form>
85 85
       <p><a href="/store.php">Back to Store</a></p>

+ 2
- 2
sections/store/freeleechpool.php View File

@@ -84,7 +84,7 @@ if (isset($_POST['donation'])) {
84 84
   <div class="thin">
85 85
     <h2 id="general">Donation Successful</h2>
86 86
     <div class="box pad" style="padding: 10px 10px 10px 20px;">
87
-      <p>You donated <?=number_format($Donation)?> nips to the Freeleech Pool</p>
87
+      <p>You donated <?=number_format($Donation)?> <?=BONUS_POINTS?> to the Freeleech Pool</p>
88 88
 <? if ($PoolTipped) { ?>
89 89
       <p>Your donation triggered a freeleech!</p>
90 90
 <? } ?>
@@ -111,7 +111,7 @@ if (isset($_POST['donation'])) {
111 111
       <form action="store.php" method="POST">
112 112
         <input type="hidden" name="item" value="freeleechpool">
113 113
         <strong>
114
-        There are currently <?=number_format($Pool)?> nips in the Freeleech Pool
114
+        There are currently <?=number_format($Pool)?> <?=BONUS_POINTS?> in the Freeleech Pool
115 115
         </strong>
116 116
         <br><br>
117 117
         <input type="text" name="donation" value="">

+ 2
- 2
sections/store/index.php View File

@@ -1,12 +1,12 @@
1 1
 <?
2 2
 enforce_login();
3 3
 
4
-if ($LoggedUser['DisableNips']) {
4
+if ($LoggedUser['DisablePoints']) {
5 5
   View::show_header('Store'); ?>
6 6
   <div class='thin'>
7 7
     <h2 id='general'>Denied</h2>
8 8
     <div class='box pad' style='padding: 10px 10px 10px 20px;'>
9
-      <p>You are not allowed to spend nips.</p>
9
+    <p>You are not allowed to spend <?=BONUS_POINTS?>.</p>
10 10
     </div>
11 11
   </div>
12 12
   <? View::show_footer();

+ 24
- 24
sections/store/promotion.php View File

@@ -5,53 +5,53 @@ $GiB = 1024*1024*1024;
5 5
 $Classes = array(
6 6
   MEMBER => array(
7 7
     'Name'        => 'Modest Mounds', // name
8
-    'Price'        => 1000, // cost in nips
9
-    'MinUpload'    => 10, // minimum upload in GiB
10
-    'MinDownload'  => 1, // minimum download in GiB
8
+    'Price'       => 1000, // cost in points
9
+    'MinUpload'   => 10, // minimum upload in GiB
10
+    'MinDownload' => 1, // minimum download in GiB
11 11
     'MinUploads'  => 0, // minimum upload count
12
-    'NonSmall'     => 0, // must have at least this many non-doujin torrents or doujins with more than 50 pages
12
+    'NonSmall'    => 0, // must have at least this many non-doujin torrents or doujins with more than 50 pages
13 13
     'MinRatio'    => 0.7, // minimum ratio
14 14
     'TorUnique'   => false // do the uploads have to be unique groups?
15 15
   ),
16 16
   POWER => array(
17 17
     'Name'        => 'Well Endowed',
18
-    'Price'        => 10000,
19
-    'MinUpload'    => 100,
20
-    'MinDownload'  => 25,
18
+    'Price'       => 10000,
19
+    'MinUpload'   => 100,
20
+    'MinDownload' => 25,
21 21
     'MinUploads'  => 10,
22
-    'NonSmall'     => 2,
22
+    'NonSmall'    => 2,
23 23
     'MinRatio'    => 1.1,
24
-    'TorUnique'    => false
24
+    'TorUnique'   => false
25 25
   ),
26 26
   ELITE => array(
27 27
     'Name'        => 'Bombshell',
28
-    'Price'        => 30000,
29
-    'MinUpload'    => 500,
30
-    'MinDownload'  => 100,
28
+    'Price'       => 30000,
29
+    'MinUpload'   => 500,
30
+    'MinDownload' => 100,
31 31
     'MinUploads'  => 50,
32
-    'NonSmall'     => 12,
32
+    'NonSmall'    => 12,
33 33
     'MinRatio'    => 1.2,
34
-    'TorUnique'    => false
34
+    'TorUnique'   => false
35 35
   ),
36 36
   TORRENT_MASTER => array(
37 37
     'Name'        => 'Top Heavy',
38
-    'Price'        => 60000,
39
-    'MinUpload'    => 1024,
40
-    'MinDownload'  => 250,
38
+    'Price'       => 60000,
39
+    'MinUpload'   => 1024,
40
+    'MinDownload' => 250,
41 41
     'MinUploads'  => 250,
42
-    'NonSmall'     => 60,
42
+    'NonSmall'    => 60,
43 43
     'MinRatio'    => 1.3,
44
-    'TorUnique'    => false
44
+    'TorUnique'   => false
45 45
   ),
46 46
   POWER_TM => array(
47 47
     'Name'        => 'Titty Monster',
48
-    'Price'        => 100000,
49
-    'MinUpload'    => 1.5*1024,
50
-    'MinDownload'  => 500,
48
+    'Price'       => 100000,
49
+    'MinUpload'   => 1.5*1024,
50
+    'MinDownload' => 500,
51 51
     'MinUploads'  => 500,
52
-    'NonSmall'     => 160,
52
+    'NonSmall'    => 160,
53 53
     'MinRatio'    => 1.5,
54
-    'TorUnique'    => true
54
+    'TorUnique'   => true
55 55
   )
56 56
 );
57 57
 

+ 23
- 23
sections/store/store.php View File

@@ -2,7 +2,7 @@
2 2
 $UserID = $LoggedUser['ID'];
3 3
 $PermID = $LoggedUser['PermissionID'];
4 4
 
5
-if (!$LoggedUser['DisableNips']) {
5
+if (!$LoggedUser['DisablePoints']) {
6 6
   $PointsRate = 0.5;
7 7
   $getTorrents = $DB->query("
8 8
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
@@ -26,11 +26,11 @@ if (!$LoggedUser['DisableNips']) {
26 26
     $PointsRate += (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
27 27
   }
28 28
   $PointsRate = intval($PointsRate**0.95);
29
-  $PointsPerHour = number_format($PointsRate) . " nips/hour";
30
-  $PointsPerDay = number_format($PointsRate*24) . " nips/day";
29
+  $PointsPerHour = number_format($PointsRate) . " ".BONUS_POINTS."/hour";
30
+  $PointsPerDay = number_format($PointsRate*24) . " ".BONUS_POINTS."/day";
31 31
 } else {
32
-  $PointsPerHour = "0 nips/hour";
33
-  $PointsPerDay = "Nips disabled";
32
+  $PointsPerHour = "0 ".BONUS_POINTS."/hour";
33
+  $PointsPerDay = BONUS_POINTS." disabled";
34 34
 }
35 35
 
36 36
 //Include the header
@@ -39,7 +39,7 @@ View::show_header('Store');
39 39
 <div class="thin">
40 40
   <h2 id="general">Store</h2>
41 41
   <div class="box pad">
42
-    <h3 id="lists" style="float: left;">You have <?=number_format($LoggedUser['BonusPoints'])?> nips to spend</h3>
42
+    <h3 id="lists" style="float: left;">You have <?=number_format($LoggedUser['BonusPoints'])?> <?=BONUS_POINTS?> to spend</h3>
43 43
     <h3 id="lists" style="float: right;">You're making <?=$PointsPerHour?> (<?=$PointsPerDay?>)</h3>
44 44
     <table width="100%" class="store_table">
45 45
       <tr class="colhead">
@@ -52,7 +52,7 @@ View::show_header('Store');
52 52
           <a href="store.php?item=upload_1GB">1GiB Upload</a>
53 53
         </td>
54 54
         <td class="nobr">
55
-          1,000 nips
55
+          1,000 <?=BONUS_POINTS?>
56 56
         </td>
57 57
         <td class="nobr">
58 58
           Purchase 1GiB of upload
@@ -63,7 +63,7 @@ View::show_header('Store');
63 63
           <a href="store.php?item=upload_10GB">10GiB Upload</a>
64 64
         </td>
65 65
         <td class="nobr">
66
-          10,000 nips
66
+          10,000 <?=BONUS_POINTS?>
67 67
         </td>
68 68
         <td class="nobr">
69 69
           Purchase 10GiB of upload
@@ -74,7 +74,7 @@ View::show_header('Store');
74 74
           <a href="store.php?item=upload_100GB">100GiB Upload</a>
75 75
         </td>
76 76
         <td class="nobr">
77
-          100,000 nips
77
+          100,000 <?=BONUS_POINTS?>
78 78
         </td>
79 79
         <td class="nobr">
80 80
           Purchase 100GiB of upload
@@ -85,7 +85,7 @@ View::show_header('Store');
85 85
           <a href="store.php?item=upload_1000GB">1,000GiB Upload</a>
86 86
         </td>
87 87
         <td class="nobr">
88
-          1,000,000 nips
88
+          1,000,000 <?=BONUS_POINTS?>
89 89
         </td>
90 90
         <td class="nobr">
91 91
           Purchase 1,000GiB of upload
@@ -93,46 +93,46 @@ View::show_header('Store');
93 93
       </tr>
94 94
       <tr class="row">
95 95
         <td class="nobr">
96
-          <a href="store.php?item=1k_points">1,000 nips</a>
96
+          <a href="store.php?item=1k_points">1,000 <?=BONUS_POINTS?></a>
97 97
         </td>
98 98
         <td class="nobr">
99 99
           1GiB Upload
100 100
         </td>
101 101
         <td class="nobr">
102
-          Purchase 1,000 nips
102
+          Purchase 1,000 <?=BONUS_POINTS?>
103 103
         </td>
104 104
       </tr>
105 105
       <tr class="row">
106 106
         <td class="nobr">
107
-          <a href="store.php?item=10k_points">10,000 nips</a>
107
+          <a href="store.php?item=10k_points">10,000 <?=BONUS_POINTS?></a>
108 108
         </td>
109 109
         <td class="nobr">
110 110
           10GiB Upload
111 111
         </td>
112 112
         <td class="nobr">
113
-          Purchase 10,000 nips
113
+          Purchase 10,000 <?=BONUS_POINTS?>
114 114
         </td>
115 115
       </tr>
116 116
       <tr class="row">
117 117
         <td class="nobr">
118
-          <a href="store.php?item=100k_points">100,000 nips</a>
118
+          <a href="store.php?item=100k_points">100,000 <?=BONUS_POINTS?></a>
119 119
         </td>
120 120
         <td class="nobr">
121 121
           100GiB Upload
122 122
         </td>
123 123
         <td class="nobr">
124
-          Purchase 100,000 nips
124
+          Purchase 100,000 <?=BONUS_POINTS?>
125 125
         </td>
126 126
       </tr>
127 127
       <tr class="row">
128 128
         <td class="nobr">
129
-          <a href="store.php?item=1m_points">1,000,000 nips</a>
129
+          <a href="store.php?item=1m_points">1,000,000 <?=BONUS_POINTS?></a>
130 130
         </td>
131 131
         <td class="nobr">
132 132
           1,000GiB Upload
133 133
         </td>
134 134
         <td class="nobr">
135
-          Purchase 1,000,000 nips
135
+          Purchase 1,000,000 <?=BONUS_POINTS?>
136 136
         </td>
137 137
       </tr>
138 138
       <tr class="row">
@@ -140,7 +140,7 @@ View::show_header('Store');
140 140
           <a href="store.php?item=freeleechize">Freeleechize</a>
141 141
         </td>
142 142
         <td class="nobr">
143
-          20,000 nips
143
+          20,000 <?=BONUS_POINTS?>
144 144
         </td>
145 145
         <td class="nobr">
146 146
           Make a torrent freeleech (to everyone) for 24 hours
@@ -151,7 +151,7 @@ View::show_header('Store');
151 151
           <a href="store.php?item=title">Custom Title</a>
152 152
         </td>
153 153
         <td class="nobr">
154
-          50,000 nips
154
+          50,000 <?=BONUS_POINTS?>
155 155
         </td>
156 156
         <td class="nobr">
157 157
           Purchase a custom title
@@ -162,7 +162,7 @@ View::show_header('Store');
162 162
           <a href="store.php?item=invite">Invite</a>
163 163
         </td>
164 164
         <td class="nobr">
165
-          100,000 nips
165
+          100,000 <?=BONUS_POINTS?>
166 166
         </td>
167 167
         <td class="nobr">
168 168
           Purchase an invite for your friend
@@ -191,7 +191,7 @@ if (isset($To)) { ?>
191 191
           <a href="store.php?item=promotion">Promotion</a>
192 192
         </td>
193 193
         <td class="nobr">
194
-        <?=$To[1]?> nips
194
+        <?=$To[1]." ".BONUS_POINTS?>
195 195
         </td>
196 196
         <td class="nobr">
197 197
           Get promoted to <?=$To[0]?>
@@ -203,7 +203,7 @@ if (isset($To)) { ?>
203 203
           <a href="store.php?item=become_admin">Become Admin</a>
204 204
         </td>
205 205
         <td class="nobr">
206
-          4,294,967,296 nips
206
+          4,294,967,296 <?=BONUS_POINTS?>
207 207
         </td>
208 208
         <td class="nobr">
209 209
           Have your class changed to Sysop

+ 1
- 1
sections/store/token.php View File

@@ -23,7 +23,7 @@ if ($DB->has_results()) {
23 23
     $Worked = true;
24 24
   } else {
25 25
     $Worked = false;
26
-    $ErrMessage = "Not enough Nips.";
26
+    $ErrMessage = "Not enough ".BONUS_POINTS.".";
27 27
   }
28 28
 }
29 29
 

+ 2
- 2
sections/user/index.php View File

@@ -95,8 +95,8 @@ switch ($_REQUEST['action']) {
95 95
     break;
96 96
   case 'take_update_rank':
97 97
     break;
98
-  case 'nips':
99
-    include(SERVER_ROOT.'/sections/user/nips.php');
98
+  case 'points':
99
+    include(SERVER_ROOT.'/sections/user/points.php');
100 100
     break;
101 101
   default:
102 102
     if (isset($_REQUEST['id'])) {

sections/user/nips.php → sections/user/points.php View File

@@ -8,8 +8,8 @@ $Message = $_POST['message'];
8 8
 // 10% tax
9 9
 $Tax = 0.1;
10 10
 
11
-if ($LoggedUser['DisableNips']) {
12
-  $Err = 'You are not allowed to send nips.';
11
+if ($LoggedUser['DisablePoints']) {
12
+  $Err = 'You are not allowed to send '.BONUS_POINTS.'.';
13 13
 } else {
14 14
   if ($Adjust)
15 15
     $Amount = $Amount/(1-$Tax);
@@ -19,14 +19,14 @@ if ($LoggedUser['DisableNips']) {
19 19
   $Amount = (int) $Amount;
20 20
 
21 21
   if ($UserID == $To) {
22
-    $Err = 'If you sent nips to yourself it wouldn\'t even do anything. Stop that.';
22
+    $Err = 'If you sent '.BONUS_POINTS.' to yourself it wouldn\'t even do anything. Stop that.';
23 23
   } elseif ($Amount < 0) {
24
-    $Err = 'You can\'t a negative amount you shitter.';
24
+    $Err = 'You can\'t send a negative amount of '.BONUS_POINTS.'.';
25 25
   } elseif ($Amount < 100) {
26
-    $Err = 'You must send at least 100 Nips.';
26
+    $Err = 'You must send at least 100 '.BONUS_POINTS.'.';
27 27
   } else {
28 28
     $DB->query("
29
-      SELECT ui.DisableNips
29
+      SELECT ui.DisablePoints
30 30
       FROM users_main AS um
31 31
         JOIN users_info AS ui ON um.ID = ui.UserID
32 32
       WHERE ID = $To");
@@ -35,7 +35,7 @@ if ($LoggedUser['DisableNips']) {
35 35
     } else {
36 36
       list($Disabled) = $DB->next_record();
37 37
       if ($Disabled) {
38
-        $Err = "This user is not allowed to receive nips.";
38
+        $Err = "This user is not allowed to receive ".BONUS_POINTS.".";
39 39
       } else {
40 40
         $DB->query("
41 41
           SELECT BonusPoints
@@ -45,7 +45,7 @@ if ($LoggedUser['DisableNips']) {
45 45
           list($BP) = $DB->next_record();
46 46
 
47 47
           if ($BP < $Amount) {
48
-            $Err = 'You don\'t have enough Nips.';
48
+            $Err = 'You don\'t have enough '.BONUS_POINTS.'.';
49 49
           } else {
50 50
             $DB->query("
51 51
               UPDATE users_main
@@ -61,14 +61,14 @@ if ($LoggedUser['DisableNips']) {
61 61
 
62 62
             $DB->query("
63 63
               UPDATE users_info
64
-              SET AdminComment = CONCAT('".sqltime()." - Sent $Amount Nips (".$SentAmount." after tax) to [user]".$ToInfo['Username']."[/user]\n\n', AdminComment)
64
+              SET AdminComment = CONCAT('".sqltime()." - Sent $Amount ".BONUS_POINTS." (".$SentAmount." after tax) to [user]".$ToInfo['Username']."[/user]\n\n', AdminComment)
65 65
               WHERE UserID = $UserID");
66 66
             $DB->query("
67 67
               UPDATE users_info
68
-              SET AdminComment = CONCAT('".sqltime()." - Received ".$SentAmount." Nips from [user]".$UserInfo['Username']."[/user]\n\n', AdminComment)
68
+              SET AdminComment = CONCAT('".sqltime()." - Received ".$SentAmount." ".BONUS_POINTS." from [user]".$UserInfo['Username']."[/user]\n\n', AdminComment)
69 69
               WHERE UserID = $To");
70 70
 
71
-            $PM = '[user]'.$UserInfo['Username'].'[/user] has sent you a gift of '.$SentAmount.' Nips!';
71
+            $PM = '[user]'.$UserInfo['Username'].'[/user] has sent you a gift of '.$SentAmount.' '.BONUS_POINTS.'!';
72 72
 
73 73
             if (!empty($Message)) {
74 74
               $PM .= "\n\n".'[quote='.$UserInfo['Username'].']'.$Message.'[/quote]';
@@ -89,11 +89,11 @@ if ($LoggedUser['DisableNips']) {
89 89
   }
90 90
 }
91 91
 
92
-View::show_header('Send Nips'); ?>
92
+View::show_header('Send '.BONUS_POINTS); ?>
93 93
 <div class='thin'>
94
-  <h2 id='general'>Send Nips</h2>
94
+  <h2 id='general'>Send <?=BONUS_POINTS?></h2>
95 95
   <div class='box pad' style='padding: 10px 10px 10px 20p;'>
96
-    <p><?=$Err?'Error: '.$Err:'Sent '.$Amount.' Nips ('.$SentAmount.' after tax) to '.$ToInfo['Username'].'.'?></p>
96
+    <p><?=$Err?'Error: '.$Err:'Sent '.$Amount.' '.BONUS_POINTS.' ('.$SentAmount.' after tax) to '.$ToInfo['Username'].'.'?></p>
97 97
     <p><a href='/user.php?id=<?=$To?>'>Return</a></p>
98 98
   </div>
99 99
 </div>

+ 7
- 7
sections/user/takemoderate.php View File

@@ -77,7 +77,7 @@ $DisableTagging = isset($_POST['DisableTagging']) ? 1 : 0;
77 77
 $DisableUpload = isset($_POST['DisableUpload']) ? 1 : 0;
78 78
 $DisableWiki = isset($_POST['DisableWiki']) ? 1 : 0;
79 79
 $DisablePM = isset($_POST['DisablePM']) ? 1 : 0;
80
-$DisableNips = isset($_POST['DisableNips']) ? 1 : 0;
80
+$DisablePoints = isset($_POST['DisablePoints']) ? 1 : 0;
81 81
 $DisablePromotion = isset($_POST['DisablePromotion']) ? 1 : 0;
82 82
 $DisableIRC = isset($_POST['DisableIRC']) ? 1 : 0;
83 83
 $DisableRequests = isset($_POST['DisableRequests']) ? 1 : 0;
@@ -134,7 +134,7 @@ $DB->query("
134 134
     DisableUpload,
135 135
     DisableWiki,
136 136
     DisablePM,
137
-    DisableNips,
137
+    DisablePoints,
138 138
     DisablePromotion,
139 139
     DisableIRC,
140 140
     DisableRequests,
@@ -652,12 +652,12 @@ if ($DisablePM != $Cur['DisablePM'] && check_perms('users_disable_any')) {
652 652
   }
653 653
 }
654 654
 
655
-if ($DisableNips != $Cur['DisableNips'] && check_perms('users_disable_any')) {
656
-  $UpdateSet[] = "DisableNips = '$DisableNips'";
657
-  $EditSummary[] = 'Nip earning ' . ($DisableNips ? 'disabled' : 'enabled');
658
-  $HeavyUpdates['DisableNips'] = $DisableNips;
655
+if ($DisablePoints != $Cur['DisablePoints'] && check_perms('users_disable_any')) {
656
+  $UpdateSet[] = "DisablePoints = '$DisablePoints'";
657
+  $EditSummary[] = BONUS_POINTS.' earning ' . ($DisablePoints ? 'disabled' : 'enabled');
658
+  $HeavyUpdates['DisablePoints'] = $DisablePoints;
659 659
   if (!empty($UserReason)) {
660
-    Misc::send_pm($UserID, 0, 'Your Nip-earning ability has been disabled', "Your Nip-earning ability has been disabled. The reason given was: [quote]{$UserReason}[/quote] If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
660
+    Misc::send_pm($UserID, 0, 'Your '.BONUS_POINTS.'-earning ability has been disabled', "Your ".BONUS_POINTS."-earning ability has been disabled. The reason given was: [quote]{$UserReason}[/quote] If you would like to discuss this, please join ".BOT_DISABLED_CHAN.' on our IRC network. Instructions can be found [url='.site_url().'wiki.php?action=article&amp;name=IRC+-+How+to+join]here[/url].');
661 661
   }
662 662
 }
663 663
 

+ 15
- 15
sections/user/user.php View File

@@ -63,7 +63,7 @@ if (check_perms('users_mod')) { // Person viewing is a staff member
63 63
       i.DisableUpload,
64 64
       i.DisableWiki,
65 65
       i.DisablePM,
66
-      i.DisableNips,
66
+      i.DisablePoints,
67 67
       i.DisablePromotion,
68 68
       i.DisableIRC,
69 69
       i.DisableRequests," . "
@@ -84,7 +84,7 @@ if (check_perms('users_mod')) { // Person viewing is a staff member
84 84
     header("Location: log.php?search=User+$UserID");
85 85
   }
86 86
 
87
-  list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $BonusPoints, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisableNips, $DisablePromotion, $DisableIRC, $DisableRequests, $FLTokens, $CommentHash, $InfoTitle, $LockedAccount) = $DB->next_record(MYSQLI_NUM, array(8, 11));
87
+  list($Username, $Email, $LastAccess, $IP, $Class, $Uploaded, $Downloaded, $RequiredRatio, $CustomTitle, $torrent_pass, $Enabled, $Paranoia, $Invites, $DisableLeech, $Visible, $BonusPoints, $JoinDate, $Info, $Avatar, $AdminComment, $Donor, $Artist, $Warned, $SupportFor, $RestrictedForums, $PermittedForums, $InviterID, $InviterName, $ForumPosts, $RatioWatchEnds, $RatioWatchDownload, $DisableAvatar, $DisableInvites, $DisablePosting, $DisableForums, $DisableTagging, $DisableUpload, $DisableWiki, $DisablePM, $DisablePoints, $DisablePromotion, $DisableIRC, $DisableRequests, $FLTokens, $CommentHash, $InfoTitle, $LockedAccount) = $DB->next_record(MYSQLI_NUM, array(8, 11));
88 88
 } else { // Person viewing is a normal user
89 89
   $DB->query("
90 90
     SELECT
@@ -270,12 +270,12 @@ if ($Avatar && Users::has_avatars_enabled()) {
270 270
     </div>
271 271
 <?
272 272
 }
273
-if (!$OwnProfile && !$LoggedUser['DisableNips']) { ?>
274
-    <div class='box nip_gift_box'>
275
-      <div class='head colhead_dark'>Send Nips</div>
273
+if (!$OwnProfile && !$LoggedUser['DisablePoints']) { ?>
274
+    <div class='box point_gift_box'>
275
+    <div class='head colhead_dark'>Send <?=BONUS_POINTS?></div>
276 276
       <div class="pad">
277 277
         <form action='user.php' method='post'>
278
-          <input type='hidden' name='action' value='nips' />
278
+          <input type='hidden' name='action' value='points' />
279 279
           <input type='hidden' name='to' value='<?=$UserID?>' />
280 280
           <input type='text' name='amount' placeholder='Amount' /><input type='submit' value='Send' /><br>
281 281
           <textarea name='message' rows='2' placeholder='Message'></textarea><br>
@@ -308,11 +308,11 @@ if ($LoggedUser['Class'] >= 200 || $DB->has_results()) { ?>
308 308
 ?>
309 309
       <p>This user is wild and level <?=$Level?></p>
310 310
 <?  if (!$OwnProfile) { ?>
311
-      <p>Try to capture them with nips? The more you spend, the higher the chance of capture</p>
311
+      <p>Try to capture them with <?=BONUS_POINTS?>? The more you spend, the higher the chance of capture</p>
312 312
       <form action='store.php' method='post'>
313 313
         <input type='hidden' name='item' value='capture_user' />
314 314
         <input type='hidden' name='target' value='<?=$UserID?>' />
315
-        <input type='text' name='amount' placeholder='Nips' /><input type='submit' value='Capture' />
315
+        <input type='text' name='amount' placeholder='<?=BONUS_POINTS?>' /><input type='submit' value='Capture' />
316 316
       </form>
317 317
 <?  }
318 318
   } ?>
@@ -1150,11 +1150,11 @@ if (check_perms('users_mod', $Class)) { ?>
1150 1150
         </td>
1151 1151
       </tr>
1152 1152
       <tr>
1153
-        <td class="label">Nips:</td>
1153
+      <td class="label"><?=BONUS_POINTS?>:</td>
1154 1154
         <td>
1155 1155
           <input type="text" size="20" name="BonusPoints" value="<?=$BonusPoints?>" />
1156 1156
 <?
1157
-if (!$DisableNips) {
1157
+if (!$DisablePoints) {
1158 1158
   $PointsRate = 0.5;
1159 1159
   $getTorrents = $DB->query("
1160 1160
     SELECT COUNT(DISTINCT x.fid) AS Torrents,
@@ -1178,11 +1178,11 @@ if (!$DisableNips) {
1178 1178
     $PointsRate += (0.67*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3));
1179 1179
   }
1180 1180
   $PointsRate = intval($PointsRate**0.95);
1181
-  $PointsPerHour = number_format($PointsRate) . " nips/hour";
1182
-  $PointsPerDay = number_format($PointsRate*24) . " nips/day";
1181
+  $PointsPerHour = number_format($PointsRate)." ".BONUS_POINTS."/hour";
1182
+  $PointsPerDay = number_format($PointsRate*24)." ".BONUS_POINTS."/day";
1183 1183
 } else {
1184
-  $PointsPerHour = "0 nips/hour";
1185
-  $PointsPerDay = "Nips disabled";
1184
+  $PointsPerHour = "0 ".BONUS_POINTS."/hour";
1185
+  $PointsPerDay = BONUS_POINTS." disabled";
1186 1186
 }
1187 1187
 ?>
1188 1188
           <?=$PointsPerHour?> (<?=$PointsPerDay?>)
@@ -1391,7 +1391,7 @@ if (!$DisableNips) {
1391 1391
           <input type="checkbox" name="DisableLeech" id="DisableLeech"<? if ($DisableLeech == 0) { ?> checked="checked"<? } ?> /> <label for="DisableLeech">Leech</label> |
1392 1392
           <input type="checkbox" name="DisableRequests" id="DisableRequests"<? if ($DisableRequests == 1) { ?> checked="checked"<? } ?> /> <label for="DisableRequests">Requests</label> |
1393 1393
           <input type="checkbox" name="DisableUpload" id="DisableUpload"<? if ($DisableUpload == 1) { ?> checked="checked"<? } ?> /> <label for="DisableUpload">Torrent upload</label> |
1394
-          <input type="checkbox" name="DisableNips" id="DisableNips"<? if ($DisableNips == 1) { ?> checked="checked"<? } ?> /> <label for="DisableNips">Nips</label>
1394
+          <input type="checkbox" name="DisablePoints" id="DisablePoints"<? if ($DisablePoints == 1) { ?> checked="checked"<? } ?> /> <label for="DisablePoints"><?=BONUS_POINTS?></label>
1395 1395
           <br /><br />
1396 1396
 
1397 1397
           <input type="checkbox" name="DisableTagging" id="DisableTagging"<? if ($DisableTagging == 1) { ?> checked="checked"<? } ?> /> <label for="DisableTagging" class="tooltip" title="This only disables a user's ability to delete tags.">Tagging</label> |

+ 2
- 2
static/styles/oppai/style.css View File

@@ -1062,10 +1062,10 @@ input.inputtext:focus {
1062 1062
   max-width: 100%;
1063 1063
 }
1064 1064
 
1065
-.nip_gift_box p {
1065
+.point_gift_box p {
1066 1066
   margin: 7px 2px 0px;
1067 1067
 }
1068
-.nip_gift_box input[type="text"], .nip_gift_box textarea {
1068
+.point_gift_box input[type="text"], .point_gift_box textarea {
1069 1069
   width: 100%;
1070 1070
   box-sizing: border-box;
1071 1071
   margin-bottom: 3px;

Loading…
Cancel
Save