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

I no longer use the PHP code top of this mod anymore because I switched away from crappy Typeahead to jQueryUI-autocomplete plugin because its hell of a lot better, and tailored to HTML results. If anyone has any use for this, its a lot better and recently became updated to PDO away from MySQLi code and works great.


<?
// Get search term
$searchTerm = $_GET['term']; // required for PDO & AJAX request - jQueryUI (autocomplete)

// New PDO VERSION - April 6, 2020 - Removed old MySQLi code & replaced all with PDO code, retaining the full array for HTML/compatibility
// Secure & faster search quering on larger result sets (query: the) for example.
try {
$conn = new PDO('mysql:host=localhost;dbname=database', 'user', 'password');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); // Prevent advanced injection by disabling emulated prepared statements
}
catch (PDOException $e) {
   die('Unable to connect with the database');
}
$stmt = $conn->prepare('SELECT * FROM torrents WHERE name LIKE :keyword OR tags LIKE :tags'); // Added: search by tags too
$stmt->bindValue('keyword', '%' . $searchTerm . '%');
$stmt->bindValue('tags', '%' . $searchTerm . '%');
$stmt->execute();
$result = array();
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
       $name           = $row['name'];
       $hits           = $row['hits'];
       $views          = $row['views'];
       $image1         = $row['image1'];
       $image2         = $row['image2'];
       $ratingsum      = (int) $row['ratingsum'];
       $numratings     = (int) $row['numratings'];    
       $descr          = $row['descr'];
       $data['id']     = $row['id'];
       $data['value']  = $name;
       $data['result'] = '<a style="cursor:default;background:none;border:none" href="/details/'.$row['id'].'/" title=" ">
                   
                          <!-- SVG loading animation for covers -->
                          <span style="background: url(https://website.com/images/loading-ellipsis.svg) 36px -0px no-repeat;border:none">
                            <img src="https://website.com/images/covers/'.$row['cover1'].'" style="width:107px;height:176px;vertical-align:middle;" />
                          </span>
                   
                          <span style="position:absolute;top:-84px;left:170px;width:1000px;font-size:24px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:1200px">
                          <img src="https://website.com/images/ajax_search_result.png" style="height:15px;vertical-align:middle;margin-left:1px;margin-right:7px" /> '.$name.'<br /><span style="font-size:15px">'.$descr.'</span><br />
                          <img src="https://website.com/uploads/images/'.$row['image1'].'" style="margin-top:12px;width:85px;height:65px;vertical-align:middle;border-radius:5px" />
                          <img src="https://website.com/uploads/images/'.$row['image2'].'" style="margin-top:12px;width:85px;height:65px;vertical-align:middle;border-radius:5px" /><br />
                          <span style="font-size:15px"><span style="color:#ED2324;font-weight:bold">'.$views.'</span> views - <span style="color:#ED2324;font-weight:bold">'.$hits.'</span> downloads -
                          <span style="color:#ED2324;font-weight:bold">'.$ratingsum.'</span> <small>/ <span style="color:#ED2324;font-weight:bold">5</span></small> rating (by '.$numratings.' users)</span></span>
                          </a>';
       
   array_push($result, $data);

   // Alternate method: Does not work. Requires - PDO::FETCH_OBJ
   //array_push($result, $title->name, $title->hits, $title->views, $title->image1, $title->image2, (int) $title->rating_sum, (int) $title->numratings, $title->descr, $title->id);
}
echo json_encode($result);
?>
I think those variables need to be put before the line with if ($CURUSER["xxx_filter"]). If that isn’t it, then the else statement needs reverse conditions, like elseif !$CURUSER etc, doesn’t seem to be picking up on what comes next, but then again error reporting is off too.

This is a odd situation. The last code I posted works for me using $CURUSER[“enabled”] as a test, but I don’t use shoutbox and I don’t turn off error reporting for things like this, you really should turn it on so you know what is of error.

error_reporting(0);             - Turns off All errors
error_reporting(E_ALL);     - Report all PHP errors script-level

Add either one (not both) to functions.php and report back.

If you do get it, and still has query errors but executed correctly, suppress query errors with @SQL_Query_Exec but use this with care, as it only masks issues and could cause major headaches if overused.
I must of been focusing on functions, in order to hide the cat pics. For the message this should be all that is needed.


//Message sur shout nouveau torrent
if ($CURUSER["xxx_filter"]){
   $image = $inames[0];
   $membre = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonyme' : $CURUSER['username'];
   $insert = sqlesc("
[img]http://".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n".$torrent."\r[img1]".$site_config["SITEURL"]."/images/Torrents/3X.png[/img1]\nPartagé ".($anon == 'no' ? "Par " .$CURUSER['username']. "" : "")."

");
}else{
   $insert = sqlesc("
[img]http://".$site_config["SITEURL"]."/images/Torrents/NouveauTorrent.png[/img]\n".$torrent."\r[img1]".$site_config["SITEURL"]."/uploads/images/".$image."[/img1]\nPartagé ".($anon == 'no' ? "Par " .$CURUSER['username']. "" : "")."

");    
   SQL_Query_exec("INSERT INTO ajshoutbox (uid, date, name, text) VALUES(0,NOW(), 'Robot Crazy' ,".$insert."".$wherex.")");
}
// Fin
First problem: iframe. You should get rid of this and embed the code properly. iFrames are dying, too many cross-origin exploits sending Chrome and others in a frenzy of updates the past 5 years.

Solution: Okay, so you will want to use a url query and pick up on that, and if seen in Url, then hide message in shout box. I just did this last night for something (introduction mod, see comments).

I don't use Shoutbox anymore, but this should do the trick. ** Please post the 3X Url without the TLD (top level domain) ** so I can better help you.

There are two ways to go:
1 ) Detect url query - isset()
2 ) Pass query params back - parse_url()

If you want to hide anything like.. /torrents.php?cat=1 then we use this to find the ID specifically:

if (array_key_exists("id", $_GET)) && trim($_GET["id"]) == 'YOUR-3X-CAT-ID-GOES-HERE' && $CURUSER["xxx_filter"] == 'yes') {
   // Hide category
}else{
   // Show category
}

Let me know what that does, I haven't tested.

Next for category covers, this bit will need to be updated - functions.php (line 927 stock):


if (!empty($row["cat_name"])) {
                   print("<a href=\"torrents.php?cat=" . $row["category"] . "\">");
                   if (!empty($row["cat_pic"]) && $row["cat_pic"] != "")
                       print("<img border=\"0\"src=\"" . $site_config['SITEURL'] . "/images/categories/" . $row["cat_pic"] . "\" alt=\"" . $row["cat_name"] . "\" />");
                   else
                       print($row["cat_parent"].": ".$row["cat_name"]);
                   print("</a>");
               } else
                   print("-");
               print("</td>\n");


I'll update bit in functions today, its best I actually test this.
I would to do this for you on my time today, but having trouble understanding the purpose of this modification. Is this a custom category type in a new field? Is this for the purpose of filtering out against other cat results? Then I see about Shoutbox, and I get a bit lost.

Let me know :)
You can practically call anything in the 'user' table by appending it to the global CURUSER variable thanks to functions.php. Append, otherwise the table column and wrap - $CURUSER["signature"], $CURUSER["somefield"];

Keep note on the SQL table field type when using this & validation ***
Following updated:

header.php - Restore feature back if member decides so.
index.php - Header redirects updated. Restore wizard added.

Coming: PDO update.
Displays a box for users first new to the site, and a option to ignore and make disappear. Opens room for a good introduction for users to explain way around the site, what does what, how why whatever.

Works for me greatly, using existing code but updated a bit.

Open index.php and find:

stdhead(T_("HOME"));


And add under:


// User hide welcome wizard - April 3, 2020
// is_string_improved() - Improved string checking function
if ($CURUSER && is_string_improved($_REQUEST["hidewizard"])) {
   SQL_Query_exec("UPDATE users SET hidewizard='yes' WHERE id=$CURUSER[id]");
   // Redirect to YOURSITE.com/?lc - "last chance" undo action - April 4, 2020
   header("Location: https://YOURSITE.com/?lc");
   exit();
}elseif ($CURUSER && is_string_improved($_REQUEST["showizard"])) {
   SQL_Query_exec("UPDATE users SET hidewizard='no' WHERE id=$CURUSER[id]");
   header("Location: https://YOURSITE.com/");
   exit();
}


Add to /backend/config.php


$site_config['theme_cache']                = false; // Enable/Disable CSS caching in browsers. MUST for updating theme files
$site_config['default_theme_name']         = "default";


Open /backend/functions.php and add:

// Improved string checking - Security
function is_string_improved($text) {
   return (is_string($text) || (is_object($text) && method_exists($text, '__toString' )));
}


Now open /themes/default/header.php and find:

<table width='100%' border='0' cellspacing='10' cellpadding='0'>
         <tr>
           <td valign='top'>
           <!-- START MAIN COLUM -->

And add this after:


<!-- BEGIN New Welcome User Wizard: Themes, Language -->
<?
// User welcome wizard - April 3, 2020

// Detect ?lc query string - "last chance" - restore update notification? - April 4, 2020
if (isset($_GET['lc'])) {
   echo "<div>Site wizard has been hidden. <a href='" . $site_config["SITEURL"] . "/?shownotif'>Undo?</a></div>";
}

if (stripos($_SERVER['PHP_SELF'],'index.php') && $CURUSER["skipwizard"] == "no") {
   $ss_r  = SQL_Query_exec("SELECT * FROM stylesheets");
   $ss_sa = array();
   while ($ss_a = mysql_fetch_assoc($ss_r)) {
       $ss_id           = $ss_a["id"];
       $ss_name         = $ss_a["name"];
       $ss_sa[$ss_name] = $ss_id;
   }
   ksort($ss_sa);
   reset($ss_sa);
   while (list($ss_name, $ss_id) = each($ss_sa)) {
       if ($ss_id == $CURUSER["stylesheet"])
           $ss = " selected='selected'";
       else
           $ss = "";
       $stylesheets .= "<option value='$ss_id'$ss>$ss_name</option>\n";
   }
   $lang_r  = SQL_Query_exec("SELECT * FROM languages");
   $lang_sa = array();
   while ($lang_a = mysql_fetch_assoc($lang_r)) {
       $lang_id             = $lang_a["id"];
       $lang_name           = $lang_a["name"];
       $lang_sa[$lang_name] = $lang_id;
   }
   ksort($lang_sa);
   reset($lang_sa);
   while (list($lang_name, $lang_id) = each($lang_sa)) {
       if ($lang_id == $CURUSER["language"])
           $lang = " selected='selected'";
       else
           $lang = "";
       $languages .= "<option value='$lang_id'$lang>$lang_name</option>\n";
   }
?>
<div style="margin-left:13px;margin-top:25px;max-width:724px">
   <article itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Article" class="card responsive-img" style="height:168px;background:url(/images/index_wizard_bg.png) no-repeat center;">

       <div style="color:#FFF;margin-top:-30px">
           <h2 style="border-top:none">
           <img src="/<? echo $CURUSER["avatar"]; ?>" border="0" style="width:55px;height:55px;border-radius:50%;vertical-align:bottom;padding-right:5px" /> Welcome, <? echo $CURUSER["username"]; ?>!
       </h2>

       </div>

       <span style="padding-left:25px;color:#FFF;font-size:15px"><b>April</b> Update: You now have <b>Themes</b> & <b>Languages</b>. You can now theme YourSite to your liking.</span>

       <form name="skip" method="post" action="?skipwizard" onsubmit="return validate();"></form>

       <form method="post" name="wizard" action="<? echo $site_config[" SITEURL "]; ?>/take-theme.php" onsubmit="return validate();">

           <table width="100%" border="0" cellspacing="0" cellpadding="0" class="responsive-table">
               <tr>
                   <td style="float:left;padding-left:20px">
                       <select name="stylesheet" style="width:180px;height:35px">
                           <? echo $stylesheets; ?>
                       </select>
                       <select name="language" style="width:180px;height:35px">
                           <? echo $languages; ?>
                       </select>
                   </td>
                   <td style="float:right;padding-right:20px">
                       <button class="btn btn-danger" onclick="document.forms.wizard.submit();">Set</button>
                       <button class="btn btn-danger" onclick="document.forms.skip.submit(); alert('You can update these in Account > Settings at any time.');">Skip</button>
                   </td>
               </tr>
           </table>

       </form>

   </article>
</div>
<!-- END New Welcome User Wizard: Themes, Language -->

<? } // End theme/lang ?>


Lastly, execute this SQL query:

ALTER TABLE users
ADD COLUMN skipwizard ENUM('yes','no') NOT NULL default 'no'


Thats it! Users will have the option of selecting a theme, language, any custom "tutorial walkthrough" or similar, giving the member a choice to skip it too. This was necessary for a lot of things I have going on.

** NOTE: You may want to replace /images/index_wizard_bg.png [color=rgb(226, 80, 65)]with your own background image or colour[color=rgb(239, 239, 239)].[/color][/color]
** NOTE: Take this code and strip the HTML for your own use.
** NOTE: I personally use the improved is_string function is_string_improved with better string checking and security. You can use PHP's is_string all the same.

Over time I want to add actual walkthroughs for the torrent process / site navigation reason, being a real wizard.

What it looks like on my end:

[ATTACH type="full" width="966px" alt="NewIndexWizard.png"]5420[/ATTACH]

** ENABLING themes in TT, allowing you to actually switch back and forth with mod above, managing the rest in admincp.php (adding theme to db).

open /themes/default/header.php and add at the very top of file:


<?
if ($CURUSER) {
   $name  = mysql_fetch_assoc(SQL_Query_exec("SELECT uri FROM stylesheets WHERE id='" . ( $CURUSER ? $CURUSER['stylesheet'] : $site_config['default_theme'] )  . "'"));
   $theme = $name['uri']; // signed in, retrieve theme name, or use default
   if ($site_config['theme_cache'])
       $cache = "?v=".rand(); // Prevents browsers caching CSS files
}else{
   $theme = $site_config['default_theme_name']; // not signed in, always 'default'
}
?>


Then find this:

<link rel="stylesheet" type="text/css" href="<?php echo $site_config["SITEURL"]; ?>/themes/default/theme.css" />


And replace with this:

<link rel="stylesheet" href="<? echo $site_config["SITEURL"] . "/themes/" . $theme . "/theme.css" . $cache; ?>">


The code above must be in every header.php file in ALL themes, for switching to work across. Works perfectly on my site ;)

Optional: allow members to see the current theme colour in account.php (selection):

In account.php find this:

print("<div class='profile-stats'>
           <ul>
               <li><span><font><font>Themes</font></font></span><font><font><select name='stylesheet'>\n$stylesheets\n</select></font></font></a></li>
               <li><span><font><font>Preferred Client</font></font></span><font><font><input type='text' size='20' maxlength='20' name='client' value=\"" . htmlspecialchars($CURUSER["client"]) . "\" /></font></font></a></li>
               <li><span><font><font>Age</font></font></span><font><font><input type='text' size='3' maxlength='2' name='age' value=\"" . htmlspecialchars($CURUSER["age"]) . "\" /></font></font></a></li>
       
           </ul>
           <div class='clear'></div>
       </div>");


And replace with this:


print("<div class='profile-stats'>
           <ul>
               <li><span class='current-theme'><font><font>Themes</font></font></span><font><font><select name='stylesheet'>\n$stylesheets\n</select></font></font></a></li>
               <li><span><font><font>Preferred Client</font></font></span><font><font><input type='text' size='20' maxlength='20' name='client' value=\"" . htmlspecialchars($CURUSER["client"]) . "\" /></font></font></a></li>
               <li><span><font><font>Age</font></font></span><font><font><input type='text' size='3' maxlength='2' name='age' value=\"" . htmlspecialchars($CURUSER["age"]) . "\" /></font></font></a></li>
       
           </ul>
           <div class='clear'></div>
       </div>");


Add this to every theme.css (every theme). Be sure to update background for each file:

.current-theme select {
   background: rgba(38, 111, 48, 1); color: rgba(255, 255, 255, 1); height: 35px
}


[ATTACH type="full" width="523px" alt="Account-Theme-Color.png"]5421[/ATTACH]
[ATTACH type="full" width="523px" alt="Account-Theme-Color2.png"]5422[/ATTACH]

This tutorial assumes [url='https://www.php.net/manual/en/ini.core.php#ini.short-open-tag']short_open_tag[/url] = On (I use short open tags strictly)
This isn't really a mod, but more so a enhancement. This will adjust your dates across all files to be friendly. This is up to date and takes care of a lot otherwise.

I recommend this be a default function for ongoing work for TT on here.

Add to functions.php

function timeAgo($time_ago)
{
   $time_ago = strtotime($time_ago);
   $cur_time   = time();
   $time_elapsed   = $cur_time - $time_ago;
   $seconds    = $time_elapsed ;
   $minutes    = round($time_elapsed / 60 );
   $hours      = round($time_elapsed / 3600);
   $days       = round($time_elapsed / 86400 );
   $weeks      = round($time_elapsed / 604800);
   $months     = round($time_elapsed / 2600640 );
   $years      = round($time_elapsed / 31207680 );
   // Seconds
   if($seconds <= 60){
       return "just now";
   }
   //Minutes
   else if($minutes <=60){
       if($minutes==1){
           return "one minute ago";
       }
       else{
           return "$minutes minutes ago";
       }
   }
   //Hours
   else if($hours <=24){
       if($hours==1){
           return "an hour ago";
       }else{
           return "$hours hrs ago";
       }
   }
   //Days
   else if($days <= 7){
       if($days==1){
           return "yesterday";
       }else{
           return "$days days ago";
       }
   }
   //Weeks
   else if($weeks <= 4.3){
       if($weeks==1){
           return "a week ago";
       }else{
           return "$weeks weeks ago";
       }
   }
   //Months
   else if($months <=12){
       if($months==1){
           return "a month ago";
       }else{
           return "$months months ago";
       }
   }
   //Years
   else{
       if($years==1){
           return "one year ago";
       }else{
           return "$years years ago";
       }
   }
}


Wrap any instance of dates, with function. for example:



$date = date('M d, Y', strtotime('-5 days', time()));
timeAgo($date);


It works pretty well.
Mark torrents New longer? — 2020-04-01 20:43:00 in v3 Support
Answered myself again, whoops. Post deletion disabled on here.

So the fix is


            //functions.php
           $added = date("M d, Y", utc_to_tz_time($result2['added']));
           /*
           $last_access = $CURUSER["last_browse"];
           $time_now = gmtime();
           if ($last_access > $time_now || !is_numeric($last_access))
               $last_access = $time_now;
           if (sql_timestamp_to_unix_timestamp($result2["added"]) >= $last_access) {
           */  
           if (strtotime($added) >= strtotime("yesterday")){ // Only show for torrents 1 day old
           $new = "New!";
           }
           //}

           $new; // use this alongside $dispname
Mark torrents New longer? — 2020-04-01 19:34:55 in v3 Support
How can I make so I can have torrents flagged as New! to last longer? user refreshes and they go away right after that permanently until next new upload. This would make sense to have this stay as New! until user clicks on the torrent link.

Maybe the code is not good?

$last_access = $CURUSER["last_browse"];
           $time_now = gmtime();
           if ($last_access > $time_now || !is_numeric($last_access))
               $last_access = $time_now;
           if (sql_timestamp_to_unix_timestamp($result2["added"]) >= $last_access) {
               $disname .= "New!";
           }
Rating: Why half working? — 2020-04-01 06:33:44 in v3 Support
This has been updated with tooltips and fixes for if logged in or not, if anyone wants
Rating: Why half working? — 2020-04-01 00:55:07 in v3 Support
"spiritblue, post: 68259, member: 401":

allo STorrents2020

You have to bandage to test with this renge there for the non vote?


// Rating
if ($count >= 1){
$rater .= '<span class="stars-rating" style="--rating: ' . $rating_1 . '"></span>Total: ' . $count . ' ' . $tense;
}elseif ($count == 0){
$rater .= '<span class="stars-rating" style="--rating: 0.0"></span>';
}else{
$rater .= '<span class="stars-rating" style="">0.0</span>';
}
//


I haven't tested your code on my test site, but it's an idea lol (y)


This line is needed to be changed from [color=rgb(41, 105, 176)]$rating_2[/color] to [color=rgb(41, 105, 176)]$count[/color]:

$rater .= '<div style="color:#242424;font-size:35px;font:arial,helvetica,sans-serif;margin-bottom:-48px;font-weight:400"><span style="font-weight:500">' . $count . '</span>/' . 5 . '</div>';
Does this mean anything? — 2020-03-31 06:46:28 in v3 Support
Does this mean anything? This is a firewall block on Cloudflare blocking a query string and logging attack.

[ATTACH type="full"]5418[/ATTACH]
TTv3 Modded — 2020-03-31 03:21:22 in v3 Download
"DarkMaster, post: 68261, member: 1":

Have you tried this https://github.com/M-jay84/TTv3


Recommended, don’t end up like me who used original V3 source and flew south with it. Very difficult to retain these changes with so much rework. Build upon these newer releases.
Rating: Why half working? — 2020-03-31 03:17:21 in v3 Support
"spiritblue, post: 68259, member: 401":

allo STorrents2020

You have to bandage to test with this renge there for the non vote?


// Rating
if ($count >= 1){
$rater .= '<span class="stars-rating" style="--rating: ' . $rating_1 . '"></span>Total: ' . $count . ' ' . $tense;
}elseif ($count == 0){
$rater .= '<span class="stars-rating" style="--rating: 0.0"></span>';
}else{
$rater .= '<span class="stars-rating" style="">0.0</span>';
}
//


I haven't tested your code on my test site, but it's an idea lol (y)


ill give this a try, thank you good tip!
Rating: Why half working? — 2020-03-30 10:04:13 in v3 Support
Could someone please run down the logic of this code for me? I have it working perfectly across torrents & main index, except.. refuses to display my html for stars IF user has not voted yet (if no other votes are already saved from other users, otherwise its a white space). Wracking my brain over this.. I know the code is rough, because there were really long routines that didn't make sense and a lot of wasted lines.. but it works.

Problem: Does not show rating stars IF torrent has zero ratings yet from anybody. So a first time vote isn't possible. It was possible on the original code, that was a mess to work with.

Can anyone test this or at least assess what it may be?

Ignore the HTML, that is needed on my end.
// New AJAX Rating Feature - Jan 26, 2020
$total_votes = 0;
$total_value = 0;
$query       = SQL_Query_exec("SELECT COUNT(torrent) as total_votes, SUM(rating) as total_value FROM `ratings` WHERE `torrent` = '$id'");
while ($rating = mysql_fetch_array($query)) {
   $total_votes = $rating['total_votes'];
   $total_value = $rating['total_value'];
}
$voted = get_row_count("ratings", "WHERE `torrent` = '" . $id . "' AND `user` = '" . $CURUSER["id"] . "'");
if ($total_votes < 1) { // Require at least 1 vote to show votes to all
   $count = 0;
} else {
   $count = $total_votes;
}
$current_rating = $total_value;
$tense          = ($count == 1) ? "rating" : "ratings";
if (is_numeric($current_rating) && is_numeric($count)) {
   $rating_width = number_format($current_rating / $count, 2) * 30;
   $rating_1     = number_format($current_rating / $count, 1); // Vote result format: 2 = 5.00, 1 = 5.0, 0 = 5.  -  Jan 26 2020
   $rating_2     = number_format($current_rating / $count, 1);
}
if (!$voted) {
   $rater .= '<ul>';
   $rater .= '<div style="color:#242424;font-size:35px;font:arial,helvetica,sans-serif;margin-bottom:-48px;font-weight:400"><span style="font-weight:500">' . $rating_2 . '</span>/' . 5 . '</div>'; // For SCORE next to rating (eg. 4.7/5) - UL must stay here to align!
   for ($ncount = 1; $ncount <= 5; $ncount++) {

   // New rating stars work
   $rater .= '<li class="stars-rating" style="--rating: ' . $ncount . '; position:relative;" aria-label="rating: ' . $ncount . '/' . $units . '">
              <div style="position:absolute;top:56px;left:12px;"><a title="' . $ncount . ' out of ' . 5 . '" href="' . $site_config["SITEURL"] . '/torrents-details.php?id=' . $id . '&takerating=yes&j=' . $ncount . '" style="text-decoration:none;color:transparent">
              <span style="">?</span></a></div></li>';    
   }
   $ncount = 0;
   $rater .= '</ul>';
}

if ($voted) {
$static_rater = array();
$static_rater[] .= '<ul>';
$static_rater[] .= '<li class="stars-rating" style="--rating: ' . $rating_2 . '"><span style="color:#242424;font-size:35px;font:arial,helvetica,sans-serif;margin-bottom:-65px;font-weight:400"><span style="font-weight:500">' . $rating_2 . '</span>/' . 5 . '</span></li>';
$static_rater[] .= '</ul>';
$rater .= join("\n", $static_rater);
}

// rating
$rater .= '<span class="stars-rating" style="--rating: ' . $rating_1 . '"></span>Total: ' . $count . ' ' . $tense;


Working across ALL torrents (and viewing torrents that received other votes)
[ATTACH type="full" width="664px" alt="ratings_working.png"]5412[/ATTACH]

My own vote on a already-voted torrent (by someone else) works fine too
[ATTACH type="full" width="665px" alt="my_own_rating_working.png"]5413[/ATTACH]

Finally.. I can't vote worth crap. Nothing shows up, I see the CSS is there but how can it phase out the rest?
[ATTACH type="full" width="667px" alt="no_votes_impossible_to_vote.png"]5414[/ATTACH]

EDIT: Working. This is needed.

// Rating
if ($count >= 1){
$rater .= '<span class="stars-rating" style="--rating: ' . $rating_1 . '"></span>Total: ' . $count . ' ' . $tense;
}elseif ($count == 0){
$rater .= '<span class="stars-rating" style="--rating: 0.0"></span>';  
}


[ATTACH type="full" width="671px" alt="votes_working.png"]5415[/ATTACH]
Update INFOHASH — 2020-03-29 22:12:50 in v2.08 Support
what trackers do you rely on for most of your content? Use the updated mega scrape and modify the tracker URL in the database and it updates everything right away, I have mine scanning all udp and http easily, I plan to assign it to CRON too soon. It is resource-heavy so hopefully your on a dedicated box.
I’m sure it does, but not everybody is on Cloudflare and (wish to have their A-record leaked), so we have here a simple function for the average joe / hosting. This is the first result on google search, this can be done at least 9 different ways.
Tested with Cloudflare and the service only hooks onto script type. SSI are very outdated, and should be used only to imply a outdated browser (really leans on IE conditional statements).

best practice is <!— comment, condition or wrap —>

Im a CSS3/HTML5 designer and that practice would have people frowning. Use server-side solution. Anyone can decrypt eval, however it’s the randomization that deters bots and email harvesting.
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