if (!$avatar)
$avatar = $site_config["SITEURL"]."/images/default_avatar.png";
if (! $ avatar)
$ avatar = $ site_config ["SITEURL"]. "/images/default_avatar.png";
"serph, post: 67503, member: 1398":
Can you zip up you're files I'll need to try and recreate you're error on my dev site I'm going to say it's a mod conflict becuase I just installed this on a fresh v3 and I dont have any issues
"serph, post: 67500, member: 1398":
you need to confirm the user before they get 2GB upload credit
SQL_Query_exec("UPDATE users SET uploaded='2150000000' WHERE id IN (" . implode(", ", $_POST['conusr']) . ") AND uploaded='0'");
$result = SQL_Query_exec("SELECT * from users WHERE username = '".$CURUSER['username']."'");
while ($row = mysqli_fetch_array($result)){ $old_upload_value = $row['uploaded'] + 2150000000; }
SQL_Query_exec("UPDATE users SET uploaded='$old_upload_value' WHERE username = '".$CURUSER['username']."'");
"MicroMonkey, post: 67490, member: 311":
I updated the github with this change
"niki, post: 67389, member: 20338":
Merci [USER=401]spiritblue[/USER] et pouvez vous me dire si c'est possible d'afficher les membres qui on visité le tracker des dernières 12 ou 24 heures, merci d'avance (y):)
begin_frame(T_("Users Online 24 Hours"));
$file = "".$site_config["cache_dir"]."/cache_usersonlineblock.txt";
$expire = 60; // time in seconds
if (file_exists($file) &&
filemtime($file) > (time() - $expire)) {
$usersonlinerecords = unserialize(file_get_contents($file));
}else{
$usersonlinequery = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE privacy !='strong' AND UNIX_TIMESTAMP('" . get_date_time() . "') - UNIX_TIMESTAMP(users.last_access) < 86400");
while ($usersonlinerecord = mysqli_fetch_array($usersonlinequery) ) {
$usersonlinerecords[] = $usersonlinerecord;
}
$OUTPUT = serialize($usersonlinerecords);
$fp = fopen($file,"w");
fputs($fp, $OUTPUT);
fclose($fp);
} // end else
if ($usersonlinerecords == ""){
echo "No Users Online";
}else{
foreach ($usersonlinerecords as $user) {
switch($user["class"]){
case 1:
$color = "yellow";// user
break;
case 2:
$color = "green";// crazy seeder
break;
case 3:
$color = "#00FF00";// nutty seeder
break;
case 4:
$color = "#32CD32";// extreme seeder
break;
case 5:
$color = "brown";// forum upper :)
break;
case 6:
$color = "#CD853F";//light upper
break;
case 7:
$color = "#8B4513";//extreme upper
break;
case 8:
$color = "orange";// vip :)
break;
$color = "#6A5ACD";// forum moderator :)
break;
}
$bimg2 = @mysqli_fetch_array(@mysqli_query("SELECT avatar FROM users WHERE id=$user[id]"));
$avatar = ("$bimg2[avatar]");
if (!$avatar) {
$avatar = "images/default_avatar.gif";
}
if ($user["donated"] > 0) { $star = " <img src=images/star.gif border=0>";
} else {
$star = ""; }
if ($user["warned"] != "no") { $warned = " <img src=images/warned.gif border=0>";
} else {
$warned = ""; }
print("<a href=\"account-details.php?id=".$user["id"]."\" target=\"_top\" style=\"text-decoration:none;\" onmouseover=\" return overlib('<table width=100%><tr><td><img src=".$avatar." width=120 height=120 border=0>', CENTER);\" onmouseout=\"return nd();\"><font style=\" color: ".$color."\">".$user["username"]."</font></a>$star$warned, ");
}
}
end_frame();
//End
begin_frame("Online Members Currently ");
?>
<?php
// Online in Offline by spiritblue
$username = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonymous' : class_user($CURUSER['username']);
$query = SQL_Query_exec("SELECT `id`, `class`, `username`, `last_access` FROM `users` WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 900");
// For class
echo "<center><table width='99%' border='0'><tr><td>";
while ($row = mysqli_fetch_array($query)){
echo " <span id='online' style='overflow: initial;height:100%;line-height:40px;margin:0 auto;'> <a href=account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b><img src='images/button_o".($row["last_access"] > $datetime ? "n":"ff")."line.png' border='0' /></a> </span> ";
}
echo "<td/></tr></table></center>";
//End
?>
<?php
end_frame();
// End
[/code ] "niki, post: 67366, member: 20338":
thanks MicroMonkey, I'm trying to hide the shoutbox from the guest and I can't find the code, I did some tests but every time I have a blank page, would you have an idea, thanks in advance
"m-jay, post: 66982, member: 20288":
you can see with this, your-url/account-torrents.php?id=1
or try this account-details.php find
<a href="report.php?user=<?php echo $user["id"]?>"><?php echo T_("REPORT_MEMBER"); ?></a><br />
add below
<?php
print("<div style='margin-bottom:3px''>[ <a href='account-torrents.php?id=$id'>".T_("ACCOUNTTORRENTS")." ]</div>");
?>
"MicroMonkey, post: 67306, member: 311":
make sure you dont have this twice in your config if using spiritblue edits :) This already exists in your config
$site_config['autoclean_interval'] = '3600'; // Time between each auto cleanup (Seconds).
//SEEDBONUS
$site_config["bonuspertime"] = 0.5;
// Seed Bonus
$site_config["bonuspertime"] = 0.5; // Set this to what ever you want to give people per torrent.
$site_config["bonusmax"] = 3000; // Set the maximum possible value of your seed bonus.
$site_config['SEEDBONUS'] = false; // On or Off ? - true / false.
// Seedbonus
$qry = "SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes' AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'";
$res = SQL_Query_exec($qry);
while ( $row = mysqli_fetch_object($res) )
{
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "'");
}
// End
// Seedbonus upadate 2019 by spiritblue
if ($CURUSER["SEEDBONUS"]) {
$qry = "SELECT DISTINCT userid as peer, (
SELECT DISTINCT COUNT( torrent )
FROM peers
WHERE seeder = 'yes' AND userid = peer) AS count
FROM peers WHERE seeder = 'yes'";
$res = SQL_Query_exec($qry);
while ( $row = mysqli_fetch_object($res) )
{
SQL_Query_exec("UPDATE users SET seedbonus = seedbonus + '" . ($site_config["bonuspertime"] * $row->count) . "' WHERE id = '" . $row->peer . "' AND seedbonus < ".$site_config["bonusmax"]."");
}
}
// End Seedbonus