Hello, I put the tracker in public mode I'm trying to hide the function thanks to the guest can you tell me if you have an idea I did a test with this piece of code but it does not work, thank you in advance.
here below is the code snippet I put to hide the guest thanks function in torrent detail
<?php if ($CURUSER){ ?>
here the code hidden from the guests
<?php } ?>
here below is the code snippet I put to hide the guest thanks function in torrent detail
<?php if ($CURUSER){ ?>
here the code hidden from the guests
<?php } ?>
<?php if ($CURUSER){ ?>
//START THANKS\\\\
$thanksl = explode(",", $row['thanks']);
if ($CURUSER['username'] == $row['username']) {
$leftthanks = true;
$leftthanks2 = true;
} else {
foreach ($thanksl as $u) {
$thanks .= ($i > 0) ? ", $u" : $u;
if ($u == $CURUSER['username']) {
$leftthanks2 = true;
$leftthanks = true;
}
$i++;
}
}
if (!$leftthanks2) {
$button='<br/><input type="image" src="images/dire-merci.png" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>remercié par : </b></td><td><div id="thankput"></div>'.$button.'
<script type="text/javascript" src="'.$site_config["SITEURL"].'/js/thanks.js"></script>
<script type="text/javascript">
var $s = jQuery.noConflict();
$s("#thankput").load("thanks.php?id='.$id.'");
$s(function() {
$s("#refresh").click(function() {
$s("#thankput").empty().html(\'<center><img src="'.$site_config["SITEURL"].'/images/ajax-loader.gif"></center>\');
$s("#thankput").load("thanks.php?id='.$id.'&to=give&torrent='.$id.'")
return false;
})
})
</script></td></tr>';
////END THANKS\\\\\
<?php } ?>
