Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Gender icon on user name
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2024-01-09 14:02:21
Hi guys,
an new mode for my friend crazyspirit an other members:

1. If you don't have class user MOD installed you need to install it
2. Open functions.php and find class_user MOD line:

SELECT u.class, u.donated, u.donoruntil, u.warned, u.enabled, g.Color, g.level, u.uploaded, u.downloaded


after u.downloaded
add
u.gender


before
$rang = auto_rank_icon($classy['uploaded'], $classy['downloaded'], $classy['level']);

add

	if ($classy['gender'] == "1") {
$gender = "<i class='fab fa-reddit-alien' style='color:red;font-size:16px;text-shadow: 1px 1px 1px #000;'></i>";
} elseif ($classy['gender'] == "2") {
$gender = "<i class='fas fa-male' style='color:lightblue;font-size:16px;text-shadow: 1px 1px 1px #000;'></i>";
} elseif ($classy['gender'] == "3") {
$gender = "<i class='fas fa-female' style='color:orange;font-size:16px;text-shadow: 1px 1px 1px #000;'></i>";
} elseif ($classy['gender'] == "4") {
$gender = "<i class='far fa-hand-peace' style='color:lime;font-size:16px;text-shadow: 1px 1px 1px #000;'></i>";
} elseif ($classy['gender'] == "0") {
$gender = "<i class='fas fa-user-secret' style='color:gold;font-size:16px;text-shadow: 1px 1px 1px #000;'></i>";
} else {
$gender = "";
}


Quote:
I use font awesome instead of images
so you can exchange these codes for images you want instead


Change line return unesc("<font color='".$col."'>".$name."".$star."".$warn."".$disabled."</font>");

to

return unesc("<font color='".$col."'>".$name."  &nbsp;  ".$gender." ".$star." ".$warn." ".$disabled."</font>");





www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2024-01-10 16:19:05
L'idée était bonne Botanicar, merci l'ami !♫
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The idea was good Botanicar, thank you friend ♫
Last edited by spiritblue on 2024-01-10 16:19:34
2024-01-10 22:37:24
OK otherway

on functions.php find

$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";


change to:

$a ="SELECT class, donated, warned, enabled, gender FROM `users` WHERE username ='".$name."'";


after:

$c = @mysqli_fetch_row($b);


add

$res = SQL_Query_exec($a);
 $classy = @mysqli_fetch_array($res);



before:

return unesc("<font color='".$col."'>".$name."</font>".$donor." ".$warned." ".$disabled."");


add

if ($classy['gender'] == "Male") {
$gender = "<img src=".$site_config[SITEURL]."/images/gender/male.png title='Disabled' border='0'>";
} elseif ($classy['gender'] == "Female") {
$gender = "<img src=".$site_config[SITEURL]."/images/gender/female.png title='Disabled' border='0'>";
} elseif ($classy['gender'] == "Alien") {
$gender = "<img src=".$site_config[SITEURL]."/images/gender/alien.png title='Disabled' border='0'>";
} elseif ($classy['gender'] == "LGBTQ") {
$gender = "<img src=".$site_config[SITEURL]."/images/gender/lgbtq.png title='Disabled' border='0'>";
} elseif ($classy['gender'] == "Wont") {
$gender = "<img src=".$site_config[SITEURL]."/images/gender/wont.png title='Disabled' border='0'>";
} else {
$gender = "";
}


change:

return unesc("<font color='".$col."'>".$name."</font>".$donor." ".$warned." ".$disabled."");


to

return unesc("<font color='".$col."'>".$name."</font>&nbsp; ".$gender." ".$donor." ".$warned." ".$disabled."");



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2024-01-10 22:42:56
I forgot two things to say:
1. Make backup on your files
2. Make sure you fully install this MOD before everything you do

User class MOD


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2024-01-11 21:15:27
Big thanks Botanicar, cool! #1  ;)
2024-01-14 03:50:19
This is a supplement

ADD SQL:
CREATE TABLE `gender` (
 `id` int(10) UNSIGNED NOT NULL,
 `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
 `genpic` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
 `gen` char(3) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `gender` (`id`, `name`, `genpic`, `gen`) VALUES
(1, 'Male', 'male.png', 'MU'),
(2, 'Female', 'female.png', 'ZE'),
(3, 'Alien', 'alien.gif', 'AL'),
(4, 'Peace', 'peace.png', 'LT'),
(5, 'Secret', 'secret.png', 'NO');



Search in account.php :
					$gender = "<option value='Homme'" . ($CURUSER["gender"] == "Male" ? " selected='selected'" : "") . ">" . T_("MALE") . "</option>\n"
. "<option value='Femme'" . ($CURUSER["gender"] == "Female" ? " selected='selected'" : "") . ">" . T_("FEMALE") . "</option>\n";


Replace with :
	// Select Mod Gender
   print('<td align="right" class="alt2">' .T_("GENDER"). ' :</td>
   <td class="alt2">
' .T_("MALE"). ' :
 <input type="radio" name="gender" value="Male" id="box" /> <img src="images/gender/male.png" alt="' .T_("MALE"). '" title="' .T_("MALE"). '" />
           ' .T_("FEMALE"). ' :
 <input type="radio" name="gender" value="Female" id="box" /> <img src="images/gender/female.png" alt="'  .T_("FEMALE"). '" title="' .T_("FEMALE"). '" />
' .T_("Alien"). ' :
 <input type="radio" name="gender" value="Alien" id="box" /> <img src="images/gender/alien.gif" alt="' .T_("Alien"). '" title="' .T_("Alien"). '" />
<hr />
' .T_("LGBTQ"). ' :
 <input type="radio" name="gender" value="LGBTQ" id="box" /> <img src="images/gender/peace.gif" style="width:22px;height:24px;" alt="' .T_("Peace"). '" title="' .T_("Peace"). '" />
' .T_("Secret"). ' :
 <input type="radio" name="gender" value="Wont" id="box" /> <img src="images/gender/secret.png" style="width:22px;height:24px;" alt="' .T_("Secret"). '" title="' .T_("Secret"). '" /></td>');
// End Mod Gender


Search :
<b><?php echo T_("USERNAME"); ?>:</b> <?php echo class_user($CURUSER["username"]); ?><br />


Add after :
<b><?php echo T_("GENDER"); ?>:</b> <?php echo T_($CURUSER["gender"]); ?><br />


Search in account-signup.php :
				<td>
<input type="radio" name="gender" value="Male" /><?php echo T_("MALE"); ?>
  
<input type="radio" name="gender" value="Female" /><?php echo T_("FEMALE"); ?>
</td>


Change to :
			<td>
<?php echo T_("GENDER"); ?>:</td><td>
<?php echo T_("MALE"); ?> :   <input type="radio" name="gender" value="Male" id="box" /> <img src="images/gender/male.png" title="<?php echo T_('MALE'); ?>" /> <?php echo T_("MALE"); ?>

<?php echo T_("FEMALE"); ?> :
 <input type="radio" name="gender" value="Female" id="box" /> <img src="images/gender/female.png" alt="<?php echo T_('FEMALE'); ?>" title="<?php echo T_('FEMALE'); ?>" /> <?php echo T_("FEMALE"); ?>
<hr />
<?php echo T_("Alien"); ?> :
   <input type="radio" name="gender" value="Alien" id="box" /> <img src="images/gender/alien.gif" alt="<?php echo T_('Alien'); ?>" title="<?php echo T_('Alien'); ?>" /> <?php echo T_("Alien"); ?>

<?php echo T_("LGBTQ"); ?> :
 <input type="radio" name="gender" value="LGBTQ" id="box" /> <img src="images/gender/peace.gif" style="width:22px;height:24px;" alt="<?php echo T_('Peace'); ?>" title="<?php echo T_('Peace'); ?>" /> <?php echo T_("Peace"); ?>
<hr />
<?php echo T_("Secret"); ?> :
 <input type="radio" name="gender" value="Wont" id="box" /> <img src="images/gender/secret.png" style="width:22px;height:24px;" alt="<?php echo T_('Secret'); ?>" title="<?php echo T_('Secret'); ?>" /> <?php echo T_("Secret"); ?>
</td>


You just have to review the name of the images and those which will match the style of your theme by yourself, but I can give you the images if that is important to you.

* A big thank you to Botanicar for its support :)


Last edited by spiritblue on 2024-01-14 04:06:49
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728