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
guest
Controls ·  Search New posts · Mark unread

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

2020-02-16 11:11:54
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 } ?>






<?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 } ?>
2020-02-16 12:04:03
Hi niki !

Search:
<?php if ($CURUSER){ ?>


Replace with:
<?php if (!$site_config["MEMBERSONLY"] || $CURUSER) { ?>


....member should be online to see it

@+
2020-02-16 12:32:28
Merci spiritblue j'ai mis tes code et sa ne fonctionne pas j'ai une page blanche d'erreur

Thank you spiritblue I put in your code and it doesn't work, I have a blank page of error.


<?php if (!$site_config["MEMBERSONLY"] || $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 } ?>
2020-02-16 15:06:40
merci spiritblue j'ai trouver voici le code pour cacher  la fonction thanks ou autre dans torrent detail pour les invité (y)



if ($site_config['NEWSON'] && $CURUSER['view_news'] == "yes"){
loggedinonly();

ici le code a cacher

   }
2020-02-16 16:38:18
[color=rgb(184, 49, 47)]===[/color]Resolved/Résolu[color=rgb(184, 49, 47)]===[/color]

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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728