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
User Posts

Go to Profile

Auto-Promote Users — 2020-11-13 00:21:54 in v3 Mods Completed
"STorrents2020, post: 69538, member: 20382":

Those variables in the query may need double quotes to be valid, I prepare these in a array usually so may of missed legacy approach


Error:
Database Error in backend/cleanup.php on line 429: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2020-10-16 01:16:06' at line 1. Query was: SELECT `id`, `username` FROM `users` WHERE class = 1 AND `uploaded` = 26843545600 AND `uploaded` / `downloaded` = 1.05 AND `added`  2020-10-16 01:16:06.

$res22       = SQL_Query_exec("SELECT `id`, `username` FROM `users` WHERE class = $regular AND `uploaded` > = $limit AND `uploaded/downloaded` > = $minratio AND `added` < $maxdt");


almost to the truth :ROFLMAO:
if another test I am ready to solve the problem ;)


// Auto promote users
$regular     = 1; // Regular class ID
$promotclass = 2; // Promoted class ID
$limit       = 25 * 1024 * 1024 * 1024;
$minratio    = 1.05;
$maxdt       = get_date_time(time() - 86400 * 28);
$res22       = SQL_Query_exec("SELECT `id`, `username` FROM `users` WHERE class = $regular AND `uploaded` > = $limit AND `uploaded/downloaded` > = $minratio AND `added` < $maxdt");
if ($res22) {
   $dt  = get_date_time();
   $msg = "Félicitations, vous avez été automatiquement promu Super Membre. \rVous pouvez maintenant faire plus de choses. ";
   while ($arr = mysqli_fetch_assoc($res22)) {
       SQL_Query_exec("UPDATE users SET class = $promotclass WHERE id = $arr[id]");
       $txt   = "Vous avez été promu utilisateur avancé!";
       $event = "$arr[username] a été promu Super Membre";
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $txt, 0)");
       SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES (NULL, $arr[username], $event, $dt, 0)");
       write_log("L utilisateur <a href=\"/user/?id=$arr[id]\">$arr[username]</a> a été automatiquement promu Super Membre.");
   }
}
Auto-Promote Users — 2020-11-12 23:36:15 in v3 Mods Completed
"niki, post: 69540, member: 20338":

Bonjour spiriteblue test celui ci-dessous et devrais fonctionner




####################################

# AUTO PROMOTE SUPER MEMBRES #

####################################

$gigs = 25*1073741824; // 25 GB

   $res_premote = SQL_Query_exec("SELECT id FROM users WHERE class = 1 AND uploaded >= $gigs AND (uploaded / downloaded) >= 1.0");

   $time = get_date_time();

   while ($arr_premote = mysqli_fetch_assoc($res_premote)) {

       SQL_Query_exec("UPDATE users SET class = 2 WHERE id = $arr_premote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_premote[id], '$time', '

Félicitations, vous avez été automatiquement promu Membre pour Super Membre vous pouvez maintenant faire plus de choses.

, Si votre ratio tombe en dessous de 1,00, vous serez rétrogradé.', 'Vous avez été promu à: Super Membre')");

   }

               unset($res_premote,$arr_premote);

   $res_demote = SQL_Query_exec("SELECT id FROM users WHERE class = 2 AND uploaded >= $gigs AND (uploaded / downloaded) <= 1.0");

   while ($arr_demote = mysqli_fetch_assoc($res_demote)) {

       SQL_Query_exec("UPDATE users SET class = 1 WHERE id = $arr_demote[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES(0, $arr_demote[id], '$time', 'Vous avez été automatiquement rétrogradé deSuper Membre pourMembre.', 'Vous avez été rétrogradé au rang d'utilisateur')");

   }

               unset($res_demote,$arr_demote);

##########################

# END AUTO PROMOTE SUPEER MEMBRES#

##########################


yo niki ;)
Mais STorrents2020 a raison et j'y est pensé aussi a utiliser les vieux code en sachant qui fonctionne mais peux de cassure des objets
===============//
but STorrents2020 is right and I also thought about using the old code knowing which works but can break objects
Auto-Promote Users — 2020-11-11 23:52:11 in v3 Mods Completed
"STorrents2020, post: 69413, member: 20382":

*** Post updated for both promoting/demoting with:

- Easier IDs for managing promoting/demoting by class
- Corrected datetime entry


yo" ;)

error..
Database Error in backend/cleanup.php on line 429: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '00:48:17' at line 1. Query was: SELECT id, username FROM users WHERE class = 1 AND uploaded >= 26843545600 AND uploaded / downloaded >= 1.05 AND added < 2020-10-15 00:48:17. 



Error lign 229#
$res22       = SQL_Query_exec("SELECT id, username FROM users WHERE class=$regular AND uploaded >= $limit AND uploaded / downloaded >= $minratio AND added < $maxdt");




// Auto promote users
$regular     = 1; // Regular class ID
$promotclass = 2; // Promoted class ID
$limit       = 25 * 1024 * 1024 * 1024;
$minratio    = 1.05;
$maxdt       = get_date_time(time() - 86400 * 28);
$res22       = SQL_Query_exec("SELECT id, username FROM users WHERE class=$regular AND uploaded >= $limit AND uploaded / downloaded >= $minratio AND added < $maxdt");
if ($res22) {
   $dt  = get_date_time();
   $msg = "Félicitations, vous avez été automatiquement promu Super Membre. \rVous pouvez maintenant faire plus de choses. ";
   while ($arr = mysqli_fetch_assoc($res22)) {
       SQL_Query_exec("UPDATE users SET class = $promotclass WHERE id = $arr[id]");
       $txt   = "Vous avez été promu utilisateur avancé!";
       $event = "$arr[username] a été promu Super Membre";
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $txt, 0)");
       SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES (NULL, $arr[username], $event, $dt, 0)");
       write_log("L utilisateur <a href=\"/user/?id=$arr[id]\">$arr[username]</a> a été automatiquement promu Super Membre.");
   }
}

// Auto demote users
$minratio = 0.95;
$res22   = SQL_Query_exec("SELECT id, username FROM users WHERE class=$promotclass AND uploaded / downloaded < $minratio");
if ($res22) {
   $dt  = get_date_time();
   $msg = "Vous avez été automatiquement rétrogradé de Super Mmebre à Membre parce que votre ratio de partage est tombé en dessous de $minratio.";
   while ($arr = $res22->fetch()) {
       SQL_Query_exec("UPDATE users SET class = $regular WHERE id = $arr[id]");
       $txt   = "Vous avez été rétrogradé au statut régulier!";
       $event = "$arr[username] a été rétrogradé Membre";
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $txt, 0)");
       SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES (NULL, $arr[username], $event, $dt, 0)");
       write_log("L utilisateur <a href=\"/user/?id=$arr[id]\">$arr[username]</a> a été automatiquement rétrogradé au statut normal.");
   }
}
// End auto promote users

thanks in advance for help ;)
Helpdesk tbdev — 2020-11-09 22:39:31 in v2.08 Mods Completed
"coco, post: 69530, member: 20298":

Thank you spiritblue but again same error :(


the sql calls of the column had the wrong name, support_desk FOR helpdesk
use this sql and replace your file for mine
SQL:

CREATE TABLE IF NOT EXISTS `helpdesk` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `title` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
 `msg_problem` text COLLATE utf8_unicode_ci,
 `added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `solved_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `solved` enum('no','yes','ignored') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
 `added_by` int(10) NOT NULL DEFAULT '0',
 `solved_by` int(10) NOT NULL DEFAULT '0',
 `msg_answer` text COLLATE utf8_unicode_ci,
 UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;


Index.php :

//=== HELP DESK message
if (get_user_class() >= 5){
$resa = SQL_Query_exec("select count(id) as problems from helpdesk WHERE solved = 'no'");
$arra = mysqli_fetch_assoc($resa);
$problems = $arra['problems'];
if ($problems > 0)
echo("<p><table align=center border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #A60A15'>".
"Hi <b>$CURUSER[username]</b>, there ".($problems == 1 ? 'is' : 'are')." <b>$problems question".($problems == 1 ? '' : 's')."</b> at the HELP DESK that needs a reply.<br>please click <b><a href=helpdesk.php?action=problems>HERE</a></b> to deal with it.".
"</td></tr></table></p><br />");
}


...and complete lang with the post to UFFENO1 ;)

Example img:
[ATTACH type="full" width="623px" alt="Capture.PNG"]5961[/ATTACH]


but it doesn't say how to create? ??

[color=rgb(235, 107, 86)]Link add:[/color]
MY NAME HERE DOMAINE/[color=rgb(0, 168, 133)]helpdesk.php?action=added[/color]

Example img:
[ATTACH type="full" width="628px" alt="Capture3.PNG"]5962[/ATTACH]
Helpdesk tbdev — 2020-11-09 09:39:26 in v2.08 Mods Completed
"coco, post: 69528, member: 20298":

Can this mod be modified for TTv.3.0 MySQLI
I run UFFENO1 version but when post message and press Help Me give me error Database Error. Please report this to an administrator.
Thanks in advance

...nothing for upload ?
thanks !  (y)

...there is nothing for upload?
"coco, post: 69516, member: 20298":

Hi all. Give me this error after i replace all files: Warning: Use of undefined constant username - assumed 'username' (this will throw an Error in a future version of PHP) in /home/www/tbtw.space/backend/functions.php on line 971

[ATTACH=full]5955[/ATTACH]


add SQL ;)

ALTER TABLE `groups` ADD `Color` VARCHAR( 7 ) NOT NULL DEFAULT '#856A00' AFTER `level` ;
UPDATE `groups` SET `Color` = '#BD8B00' where group_id = 2;
UPDATE `groups` SET `Color` = '#FF5E00' where group_id = 3;
UPDATE `groups` SET `Color` = '#00ABA6' where group_id = 4;
UPDATE `groups` SET `Color` = '#007F00' where group_id = 5;
UPDATE `groups` SET `Color` = '#00C000' where group_id = 6;
UPDATE `groups` SET `Color` = '#FF0000' where group_id = 7;


and check the part on functions.php is completed,
"niki, post: 69461, member: 20338":

merci spiritblue sa ne fonctionne pas je regarde pour reprendre depuis le début plus tard

ok ! (y)
"niki, post: 69459, member: 20338":

merci mais je n'ai pas cette ligne
<link rel="stylesheet" href="<?php echo $site_config["SITEURL"]; ?>/themes/NOM ICI DU DOSSIER DE TON THEME PAR DEFAUT/top/style.css">

je joint le fichier header

Oups! desolé mon erreur...
je voulais dire cette ligne:
<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/NOM ICI DU DOSSIER DE TON THEME PAR DEFAUT/theme.css" />


(update de correction sur premier post)
"niki, post: 69457, member: 20338":

merci de l'aide spiritblue j'ai fait comme tu dit et rien a faire ça ne fonctionne pas et merci quand même :rolleyes:

il te reste plus qu'a changer la direction et test direct a partir de ton theme pour le dossier js et change tes ligne de direction sur ton header, et si ca fait pas fait de même vers  la racine du site a la place.

ps: la patience c'est une vertu, faut tu test, probablement juste une question de direction ;)
"niki, post: 69453, member: 20338":

Bonjour spiritblue c'est se que j'ai fait j'ai suivi les instructions et ça ne fonctionne pas faudrait remettre le module à jour se n'est pas clair tout est mélanger  :rolleyes:

houais !!
comme  moi tu as eu le même probleme de direction.

Voilà mes directions de fichier etc..

Dans le theme/header.php chercher cette ligne :
<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/ICI LE NOM DE TON DOSSIER DU THEME PAR DEFAUT/theme.css" />


Ajouter après:

<!-- Lightbox pop-ups en style css/js -->
<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/js/prettyphoto/css/prettyPhoto.css" media="screen" charset="utf-8" />

[color=rgb(209, 72, 65)]* Créer un dossier a la racine de ton site du nom de js et ajout le dossier du nom de prettyphoto[/color]

[color=rgb(209, 213, 216)]En suite cherche la balise de fermeture </head> et ajout après :

<!-- Lightbox pop-ups -->
<script src="<?php echo $site_config["SITEURL"]; ?>/js/jquery-2.2.3.min.js"></script>
<script src="<?php echo $site_config["SITEURL"]; ?>/js/prettyphoto/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
 $(document).ready(function(){
   $("a[rel^='prettyPhoto']").prettyPhoto({
     callback: function(){}, /* Called when prettyPhoto is closed */
     theme: 'pp_default', /* pp_default / light_rounded / dark_rounded / light_square / dark_square / facebook */
     autoplay: true, /* Automatically start videos: True/False */
     default_width: 854,
     default_height: 480,
     deeplinking: false,
     animation_speed: 'normal', /* fast/slow/normal */
     });
 });
</script>
[/color]


[color=rgb(209, 72, 65)]* Ton fichier js tu met directement là! .. [/color] js / jquery-2.2.3.min.js

Normalement ça devrait fonctionner,  mais porte bien attention a la direction de tes fichier qui soit bien comme moi ici  ?
"niki, post: 69447, member: 20338":

Bonjour spititblue j'ai pas toucher au js mais peut tu me donner ton js et et autre fichier si il y a ? avec l'explication ou le mettre car j'ai peut être mal placer les fichier ??, merci d'avance de ton aide :D

[url='https://www.torrenttrader.xyz/index.php?threads/lightbox-pop-ups.4842/#post-66705']Here / Ici[/url] ;)
"niki, post: 69444, member: 20338":

merci spiritblue et toujours pareille youtube ne s'ouvre pas dans une nouvelle fenêtre :rolleyes:

faut pas ouvrir sur autre fenêtre mais ouvrir en parallèle en popup sur la même page, as tu toucher au js ou autre ligne du code?
"niki, post: 69442, member: 20338":

merci spiritblue j'ai fait les changement et pour moi ça ne fonctionne pas:rolleyes:

ouais plate çà,  tien prend ma ligne complet de mon fichier fonctions.php

        case 'tube':
               if ($row["tube"])
               print("<td class='ttable_col$x' align='center'><a rel='prettyPhoto' href=".$row['tube']." data-title=\"".T_("VIDEO_WATCH_THIS_VIDEO")."\"><".htmlspecialchars($row['tube'])."><img src='".$site_config["SITEURL"]."/images/Torrents/youtube1.png' border='0' width='50' height='50' alt=\"".$row["name"]."\" /></a></td>");  
           else
               print("<td class='ttable_colx' align='center'><img src='" .$site_config['SITEURL']. "/images/Torrents/no_youtube1.png' border='0' width='50' height='50' alt=\"\" data-title=\"".T_("VIDEO_WATCH_THIS_VIDEO")."\"/></td>");
        break;    
Niki merci de la suite, faut aussi installer ce mode (lightbox pop-ups)
[url='https://www.torrenttrader.xyz/index.php?threads/lightbox-pop-ups.4842/#post-66705']Here / Ici[/url]

et voilà pour ma redirection ouverture la page web qui fonctionne chez moi
<a rel='prettyPhoto' href=".$row['tube']." data-title=\"".T_("VIDEO_WATCH_THIS_VIDEO")."\">


d’après moi l'ouverture est deja sur js, don faut pas l'ajouter target=_blank l'ouverture sur popup est déjà défini.
"niki, post: 69434, member: 20338":

:rolleyes: Bonjour, quand j'ajoute la partie de code ci-dessous dans le fichier function.php l'image youtube n'est pas visible dans la page des torrent



         case 'tube':
     if ($row["tube"])
           print("<td class='ttable_col$x' align='center'><a rel=\"prettyPhoto\"  href=".$row['tube']." ><".htmlspecialchars($row['tube'])."><img src='" . $site_config['SITEURL'] . "/images/youtube1.png'  border='0' width='50' height='50' alt=\"\" /></a></td>");
           else
        print("<td class='ttable_colx' align='center'>-</td>");
        break;


allo niki

tu as  pas la parti sur config plus haut
simple..

Dans [color=rgb(251, 160, 38)]backend[/color]/[color=rgb(243, 121, 52)]config.php[/color] chercher les colonnes visible sur tes pages de torrents et ajoute >>   [color=rgb(235, 107, 86)]tube,[/color]   ...a la suite d’où tu veux voir la colonne video
EXEMPLE:  
$site_config["torrenttable_columns"] = "category,tube,name,comments,completed,seeders,leechers";
? bien pansé, mais ça ne me rajeunie pas lol ?
Auto-Promote Users — 2020-09-24 00:56:11 in v3 Mods Completed
Hi ;)
Erro sql
#89
$res = SQL_Query_exec("SELECT id, username FROM users WHERE class = 1 AND uploaded >= $limit AND uploaded / downloaded >= $minratio AND added < $maxdt");



Database Error in backend/cleanup.php on line 89: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '01:54:06' at line 1. Query was: SELECT id, username FROM users WHERE class = 1 AND uploaded >= 26843545600 AND uploaded / downloaded >= 3 AND added < 2020-08-27 01:54:06.[/TD]


Thanks you!
download ban — 2020-09-20 13:30:06 in v3 Mods Requests
"niki, post: 69374, member: 20338":

[URL unfurl="true"]https://www.torrenttrader.xyz/index.php?threads/mod-stop-user-downloading.1651/[/url]

Hello, is it possible to modify the download ban module for the v3 because I tested the download ban of the v8 on the v3 and it doesn't work, thank you in advance.;)

allo niki
tu as juste l'ami a changer mysql_ pour ajouter le i (mysqli_) pour le reste c'est  la même procédure d’installation. ;)
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: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728