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

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

2020-02-09 13:46:36
Hello, I'm trying to put the color of the groups in the torrent detail for the members who say thank you.


here's the thanks code snippet from torrent detail


    //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="button" value="Dire merci" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>Thanks by : </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><br/>';

////END THANKS\\\\\
2020-02-09 16:07:24
try with this
    //START THANKS\\\\

$thanksl = explode(",", $row['thanks']);
if class_user($CURUSER["username"] == class_user($row["username"]) {
$leftthanks = true;
$leftthanks2 = true;
} else {
foreach ($thanksl as $u) {
$thanks .= ($i > 0) ? ", $u" : $u;
if ($u == class_user($CURUSER["username"]) {
$leftthanks2 = true;
$leftthanks = true;
}
$i++;
}
}

if (!$leftthanks2) {
$button='<br/><input type="button" value="Dire merci" id="refresh">';
} else {
$button='';
}
echo '<tr><td align="left"><b>Thanks by : </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><br/>';

////END THANKS\\\\\
2020-02-09 16:28:13
thanks for your help but with the change I have a blank page. :rolleyes:
2020-02-09 16:59:12
"niki, post: 67855, member: 20338":

thanks for your help but with the change I have a blank page. :rolleyes:

search in torrents-details:
=================
dans torrents-details cherche :
($u == class_user($CURUSER["username"])

add sfter :
======
Ajoute après la paranthèse:
)


change for my file :
============
Utilise mon fichier thanks.php

...we are testing!
======
...juste un test!
thanks.rar
Download

2020-02-09 18:54:18
merci de l'aide spiritblue mais je ne comprend pas se que tu veux dire ??
2020-02-10 01:03:19
"niki, post: 67857, member: 20338":

merci de l'aide spiritblue mais je ne comprend pas se que tu veux dire ??

j'AI edité mon post ;)
2020-02-10 19:10:07
(y):Dmerci de ton aide spiritblue je regarde pour la modification ce samedi et te dit quoi
2020-02-13 16:32:29
Bonjour spiriteblue  sa ne fonctionne pas voici mon code  de torrent detail et le fichier thanks.php non modifier , merci pour l'aide





    //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>Thanks by : </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><br/>';

////END THANKS\\\\\
thanks.rar
Download
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