Browse Source

Color some tag namespaces

spaghetti 8 years ago
parent
commit
09e4eaf252

+ 2
- 0
classes/config.template View File

185
   [10  * 1024**3, 0.05, 0.00],
185
   [10  * 1024**3, 0.05, 0.00],
186
 ]);
186
 ]);
187
 
187
 
188
+define('TAG_NAMESPACES', ['male', 'female', 'parody', 'character']);
189
+
188
 // God I wish I didn't have to do this but I just don't care anymore.
190
 // God I wish I didn't have to do this but I just don't care anymore.
189
 define('AUTOMATED_BADGE_IDS', [
191
 define('AUTOMATED_BADGE_IDS', [
190
   'DL' => [
192
   'DL' => [

+ 13
- 2
classes/rules.class.php View File

49
 
49
 
50
       <li>Only tag information on the title itself&#8202;&mdash;&#8202;<strong>not the individual release</strong>. Tags such as "<strong class="important_text">mkv</strong>", "<strong class="important_text">windows</strong>", "<strong class="important_text">scan</strong>", "<strong class="important_text">from.dlsite</strong>", etc. are strictly forbidden. Remember that these tags will be used for other versions of the same title.</li>
50
       <li>Only tag information on the title itself&#8202;&mdash;&#8202;<strong>not the individual release</strong>. Tags such as "<strong class="important_text">mkv</strong>", "<strong class="important_text">windows</strong>", "<strong class="important_text">scan</strong>", "<strong class="important_text">from.dlsite</strong>", etc. are strictly forbidden. Remember that these tags will be used for other versions of the same title.</li>
51
 
51
 
52
-      <li>Derivative works may be tagged with the name of the parent series or characters within the work. For example, tags such as "<strong class="important_text_alt">touhou</strong>" or "<strong class="important_text_alt">iori.minase</strong>" may be acceptable if they are being used on derivative (parody) works. These kinds of tags should NOT be used if the series is primarily erotic in nature. Characters should be tagged with the form "<strong class="important_text_alt">surname.firstname</strong>" if applicable.</li>
52
+      <li>Derivative works may be tagged with the name of the parent series or characters within the work. For example, tags such as "<strong class="tag_parody">touhou</strong>" or "<strong class="tag_character">iori.minase</strong>" may be acceptable if they are being used on derivative (parody) works. These kinds of tags should NOT be used if the series is primarily erotic in nature. Characters should be tagged with the form "<strong class="important_text_alt">surname.firstname</strong>" if applicable.</li>
53
 
53
 
54
       <li><strong>Tags should reflect significant aspects of a torrent.</strong> Don't tag something with "<strong class="important_text">blowjob</strong>" if there's only 30 seconds of dick-sucking. However, certain tags may be acceptable, such as "<strong class="important_text_alt">stockings</strong>", even if the torrent in question isn't centered around that fetish. Be smart.</li>
54
       <li><strong>Tags should reflect significant aspects of a torrent.</strong> Don't tag something with "<strong class="important_text">blowjob</strong>" if there's only 30 seconds of dick-sucking. However, certain tags may be acceptable, such as "<strong class="important_text_alt">stockings</strong>", even if the torrent in question isn't centered around that fetish. Be smart.</li>
55
 
55
 
56
       <li><strong>Certain tags are strongly encouraged for appropriate uploads:</strong> "<strong class="important_text_alt">3d</strong>", "<strong class="important_text_alt">anthology</strong>", "<strong class="important_text_alt">yuri</strong>", "<strong class="important_text_alt">yaoi</strong>". People search for these kinds of things specifically, so tagging them properly will get you more snatches.</li>
56
       <li><strong>Certain tags are strongly encouraged for appropriate uploads:</strong> "<strong class="important_text_alt">3d</strong>", "<strong class="important_text_alt">anthology</strong>", "<strong class="important_text_alt">yuri</strong>", "<strong class="important_text_alt">yaoi</strong>". People search for these kinds of things specifically, so tagging them properly will get you more snatches.</li>
57
 
57
 
58
-      <li>Tags for game genres such as "<strong class="important_text_alt">rpg</strong>", "<strong class="important_text_alt">visual.novel></strong>", or "<strong class="important_text_alt">nukige</strong>" are encouraged.</li>
58
+      <li>Tags for game genres such as "<strong class="important_text_alt">rpg</strong>", "<strong class="important_text_alt">visual.novel</strong>", or "<strong class="important_text_alt">nukige</strong>" are encouraged.</li>
59
 
59
 
60
       <li><strong>Certain tags are <strong class="important_text">required</strong> for appropriate uploads:</strong>"<strong class="important_text_alt">lolicon</strong>", "<strong class="important_text_alt">shotacon</strong>", "<strong class="important_text_alt">toddlercon</strong>". Failure to use these tags may result in punishment.</li>
60
       <li><strong>Certain tags are <strong class="important_text">required</strong> for appropriate uploads:</strong>"<strong class="important_text_alt">lolicon</strong>", "<strong class="important_text_alt">shotacon</strong>", "<strong class="important_text_alt">toddlercon</strong>". Failure to use these tags may result in punishment.</li>
61
 
61
 
62
+			<li><strong>Use tag namespaces when appropriate.</strong> Oppaitime allows for tag namespaces to aid with searching. For example, you may want to use the tags "<strong class="important_text_alt">masturbation:male</strong>" or "<strong class="important_text_alt">masturbation:female</strong>" instead of just "<strong class="important_text">masturbation</strong>". They can be used to make search queries more specific. Searching for "<strong class="important_texti_alt">masturbation</strong>" will show all torrents tagged with "<strong class="important_text_alt">masturbation</strong>", "<strong class="important_text_alt">masturbation:male</strong>", or "<strong class="important_text_alt">masturbation:female</strong>". However, searching for "<strong class="important_text_alt">masturbation:female</strong>" will ONLY show torrents with that tag. Tags with namespaces will appear differently depending on the namespace used, which include:
63
+				<ul>
64
+					<li><strong>:parody<strong> - Used to denote a parodied work: <strong class="tag_parody">touhou</strong>, <strong class="tag_parody">kantai.collection</strong></li>
65
+					<li><strong>:character</strong> - Used to denote a character in a parodied work: <strong class="tag_character">iori.minase</strong>, <strong class="tag_character">hakurei.reimu</strong></li>
66
+					<li><strong>:male</strong> - Used to denote that the tag refers to a male character: <strong class="tag_male">masturbation</strong>, <strong class="tag_male">teacher</strong></li>
67
+					<li><strong>:female</strong> - Used to denote that the tag refers to a female character: <strong class="tag_female">masturbation</strong>, <strong class="tag_female">shaved</strong></li>
68
+				</ul>
69
+
70
+				Note: gender namespaces should <strong class="important_text">NOT</strong> be used for tags where the gender is implied, such as "<strong class="important_text_alt">lolicon</strong>" or "<strong class="important_text_alt">shotacon</strong>".
71
+			</li>
72
+
62
       <li><strong>All uploads require a minimum of 5 tags.</strong></li>
73
       <li><strong>All uploads require a minimum of 5 tags.</strong></li>
63
 
74
 
64
       <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>. If you are in any doubt about whether or not a tag is acceptable, do not add it.</strong></li>
75
       <li><strong>You should be able to build up a list of tags using only the official tags <?=($OnUpload ? 'to the left of the text box' : 'on <a href="upload.php">the torrent upload page</a>')?>. If you are in any doubt about whether or not a tag is acceptable, do not add it.</strong></li>

+ 8
- 1
classes/tags.class.php View File

136
       $ArtistName = "&amp;artistname=" . urlencode($ArtistName) . "&amp;action=advanced&amp;searchsubmit=1";
136
       $ArtistName = "&amp;artistname=" . urlencode($ArtistName) . "&amp;action=advanced&amp;searchsubmit=1";
137
     }
137
     }
138
     foreach ($this->Tags as $Tag) {
138
     foreach ($this->Tags as $Tag) {
139
+			$Name = $Tag;
140
+			$Class = "";
141
+			$Split = explode(':', $Tag);
142
+			if (count($Split) > 1 && in_array($Split[1], TAG_NAMESPACES)) {
143
+				$Name = $Split[0];
144
+				$Class = "tag_" . $Split[1];
145
+			}
139
       if (empty($this->TagLink[$Tag])) {
146
       if (empty($this->TagLink[$Tag])) {
140
-        $this->TagLink[$Tag] = '<a href="' . $Link . $Tag . $ArtistName . '">' . $Tag . '</a>';
147
+        $this->TagLink[$Tag] = '<a class="' . $Class . '" href="' . $Link . $Tag . $ArtistName . '">' . $Name . '</a>';
141
       }
148
       }
142
     }
149
     }
143
     return implode(', ', $this->TagLink);
150
     return implode(', ', $this->TagLink);

+ 11
- 1
sections/torrents/details.php View File

92
     $Tags[$TagKey]['score'] = ($TagPositiveVotes[$TagKey] - $TagNegativeVotes[$TagKey]);
92
     $Tags[$TagKey]['score'] = ($TagPositiveVotes[$TagKey] - $TagNegativeVotes[$TagKey]);
93
     $Tags[$TagKey]['id'] = $TorrentTagIDs[$TagKey];
93
     $Tags[$TagKey]['id'] = $TorrentTagIDs[$TagKey];
94
     $Tags[$TagKey]['userid'] = $TorrentTagUserIDs[$TagKey];
94
     $Tags[$TagKey]['userid'] = $TorrentTagUserIDs[$TagKey];
95
+		$Tags[$TagKey]['display'] = $TagName;
96
+		$Tags[$TagKey]['class'] = "";
97
+
98
+		$Split = explode(':', $TagName);
99
+		if (count($Split) > 1 && in_array($Split[1], TAG_NAMESPACES)) {
100
+			$Tags[$TagKey]['display'] = $Split[0];
101
+			$Tags[$TagKey]['class'] = "tag_" . $Split[1];
102
+		}
103
+
95
   }
104
   }
96
   uasort($Tags, 'compare');
105
   uasort($Tags, 'compare');
97
 }
106
 }
308
       <ul class="stats nobullet">
317
       <ul class="stats nobullet">
309
 <?
318
 <?
310
   foreach ($Tags as $TagKey=>$Tag) {
319
   foreach ($Tags as $TagKey=>$Tag) {
320
+
311
 ?>
321
 ?>
312
         <li>
322
         <li>
313
-          <a href="torrents.php?taglist=<?=$Tag['name']?>" style="float: left; display: block;"><?=display_str($Tag['name'])?></a>
323
+          <a href="torrents.php?taglist=<?=$Tag['name']?>" style="float: left; display: block;" class="<?=display_str($Tag['class'])?>" ><?=display_str($Tag['display'])?></a>
314
           <div style="float: right; display: block; letter-spacing: -1px;" class="edit_tags_votes">
324
           <div style="float: right; display: block; letter-spacing: -1px;" class="edit_tags_votes">
315
           <a href="torrents.php?action=vote_tag&amp;way=up&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Vote this tag up" class="brackets tooltip vote_tag_up">&and;</a>
325
           <a href="torrents.php?action=vote_tag&amp;way=up&amp;groupid=<?=$GroupID?>&amp;tagid=<?=$Tag['id']?>&amp;auth=<?=$LoggedUser['AuthKey']?>" title="Vote this tag up" class="brackets tooltip vote_tag_up">&and;</a>
316
           <?=$Tag['score']?>
326
           <?=$Tag['score']?>

+ 16
- 0
static/styles/beluga/style.css View File

2044
 	border-top: none !important;
2044
 	border-top: none !important;
2045
 }
2045
 }
2046
 
2046
 
2047
+.tag_parody {
2048
+	color: #e8ab3a !important;
2049
+}
2050
+
2051
+.tag_character {
2052
+	color: #529e63 !important;
2053
+}
2054
+
2055
+.tag_male {
2056
+	color: #3d77e2 !important;
2057
+}
2058
+
2059
+.tag_female {
2060
+	color: #e896e8 !important;
2061
+}
2062
+
2047
 /* Pink Additions */
2063
 /* Pink Additions */
2048
 
2064
 
2049
 body.style_pink .cats_anime:after { color: #78467f; }
2065
 body.style_pink .cats_anime:after { color: #78467f; }

+ 12
- 0
static/styles/genaviv/style.css View File

1399
 .autocomplete-suggestion {
1399
 .autocomplete-suggestion {
1400
   padding:5px
1400
   padding:5px
1401
 }
1401
 }
1402
+.tag_parody {
1403
+	background: #d2aa4b !important;
1404
+}
1405
+.tag_character {
1406
+	background: #689f78 !important;
1407
+}
1408
+.tag_female {
1409
+	background: #e993e9 !important;
1410
+}
1411
+.tag_male {
1412
+	background: #5959f9 !important;
1413
+}
1402
 
1414
 
1403
 /* Fixed Header addition */
1415
 /* Fixed Header addition */
1404
 body.style_fixed_header #menu, body.style_fixed_header .main-menu {
1416
 body.style_fixed_header #menu, body.style_fixed_header .main-menu {

+ 13
- 0
static/styles/oppai/style.css View File

1098
 .forum_post .staff_post {
1098
 .forum_post .staff_post {
1099
   background: #f1849a;
1099
   background: #f1849a;
1100
 }
1100
 }
1101
+
1102
+.tag_parody {
1103
+	color: #e08e00 !important;
1104
+}
1105
+.tag_character {
1106
+	color: #099809 !important;
1107
+}
1108
+.tag_female {
1109
+	color: #d51b8a !important;
1110
+}
1111
+.tag_male {
1112
+	color: #0000ff !important;
1113
+}

Loading…
Cancel
Save