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

attachments — 2022-01-11 14:28:53 in M-BiTsy Support
heres the code i used for attachments - very different from v3 but easy to run through just change all sql and look out for paths

sql
CREATE TABLE `attachments` (
 `id` int(11)  UNSIGNED NOT NULL AUTO_INCREMENT,
 `content_id` int(10) UNSIGNED NOT NULL,
 `view_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
 `user_id` int(10) UNSIGNED NOT NULL,
 `upload_date` int(10) UNSIGNED NOT NULL,
 `filename` varchar(100) NOT NULL,
 `file_size` int(10) UNSIGNED NOT NULL,
 `file_hash` varchar(50) NOT NULL,
 `attach_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
 `content_type` varchar(10) NOT NULL DEFAULT 'post',
 `topicid` int(10) UNSIGNED NOT NULL,
 PRIMARY KEY (`id`)
) ENGINE=MyISAM;


make two functions get & set sql & html will need replacing then just pass id the function auto upload i add thumbnails as well

function get_attachment($id)
{
   $sql = DB::raw('attachments', '*', ['content_id' =>$id]);
   if ($sql->rowCount() != 0) {
       foreach ($sql as $row7) {
           print("<br><br> <b>$row7[filename]</b><br>");
           $extension = substr($row7['filename'], -3);
           if ($extension == 'zip') {
               $daimage = UPLOADDIR . "/attachment/$row7[file_hash].data";
               if (file_exists($daimage)) {
                   print(" <a class='btn btn-sm ttbtn' href=\"" . URLROOT . "/download/attachment?id=$row7[id]&hash=" . rawurlencode($row7["file_hash"]) . "\"><i class='fa fa-file-archive-o tticon' ></i>Download</a><br>");
               } else {
                   print("no zip<br>");
               }
           } else {
               $daimage = "uploads/thumbnail/$row7[file_hash].jpg";
               if (file_exists($daimage)) { ?>
                   <!-- Trigger/Open The Model -->
                   <img id="myBtn" src='<?php echo data_uri($daimage, $row7['filename']); ?>' height='110px' width='110px' border='0' alt=''  data-toggle="modal" data-target="#myModal-<?=$daimage;?>">
                   <!-- The Modal -->
                   <div id="myModal-<?=$daimage;?>" class="modal">
                       <!-- Modal content -->
                       <div class="modal-content">
                           <!-- The Close Button --> <?php
                           $switchimage = UPLOADDIR . "/attachment/$row7[file_hash].data"; ?>
                           <button type="button" class="btn btn-sm ttbtn" data-dismiss="modal"><b>CLOSE</b></button><br><?php
                            echo $row7['filename']; ?><br>
                           <img src='<?php echo data_uri($switchimage, $row7['filename']); ?>' style="width:100%" alt=''>
                       </div>
                   </div> <?php
               } else {
                   print("<a href=\"" . URLROOT . "/download/attachment?id=$row7[id]&hash=" . rawurlencode($row7["file_hash"]) . "\"><img src='" . URLROOT . "/thumb/$row7[file_hash].jpg' height='110px' width='110px' border='0' alt='' /></a><br>");
               }
           }
       }
   }
}

function set_attachmnent($topicid, $postid)
{
   if (isset($_FILES['upfile'])):
       $array = array($_FILES['upfile']['name']);
       $result = array_filter($array);
       foreach ($result as $k => $ar):
           // check if file has one of the following extensions
           $allowedfileExtensions = array('jpg', 'gif', 'png', 'zip');
           if (in_array($_FILES['upfile']['type'][$k], $allowedfileExtensions)) {
               Redirect::autolink(URLROOT . '/forum', "Sorry, only zip, JPG, JPEG, PNG, GIF files are allowed.");
           }
           $sourcePath = $_FILES['upfile']['tmp_name'][$k]; // Storing source path of the file in a variable
           $fileSize = $_FILES['upfile']['size'][$k];
           $fileName = $_FILES['upfile']['name'][$k];
           $extension = substr($fileName, -3);
           $hash = sha1($sourcePath);

           $newfile = $hash . "." . $extension;
           $targetPath = UPLOADDIR . "/attachment/" . $hash . ".data"; // Target path where file is to be stored
           $thumbPath = "uploads/thumbnail/" . $hash . ".jpg"; // Target path where attachment as jpg is to be stored

           if ($extension == 'zip') {
               move_uploaded_file($sourcePath, $targetPath); // Moving Uploaded file
               DB::run("INSERT INTO attachments (content_id, user_id, upload_date, filename, file_size, file_hash, topicid)
                       VALUES (?,?,?,?,?,?,?)",
                       [$postid, Users::get('id'), TimeDate::gmtime(), $fileName, $fileSize, $hash, $topicid]);
           } else {
               if (move_uploaded_file($sourcePath, $targetPath)) { // Moving Uploaded file
                   SimpleThumbnail::create()->image($targetPath)->thumbnail(100)->to($thumbPath);
                   DB::run("INSERT INTO attachments (content_id, user_id, upload_date, filename, file_size, file_hash, topicid)
                           VALUES (?,?,?,?,?,?,?)",
                           [$postid, Users::get('id'), TimeDate::gmtime(), $fileName, $fileSize, $hash, $topicid]);
               }
           }
       endforeach;
   endif;
}


then in a html form
<p class='text-center'><input type="file" name="upfile[]" multiple></p>


finally download
        $id = (int) Input::get("id");
       $filename = Input::get("hash");

       $fn = UPLOADDIR . "/attachment/$filename.data";
       $sql = DB::select('attachments', '*', ['id'=>$id]);
       $extension = substr($sql['filename'], -3);
       
       if (!file_exists($fn)) {
           Redirect::autolink($_SERVER['HTTP_REFERER'], "The file $filename does not exists");
       } else {
           header('Content-Disposition: attachment; filename="' . $sql['filename'] . '"');
           header('Content-Length: ' . filesize($fn));
           header("Content-Type: application/$extension");
           readfile($fn);
       }
— 2022-01-11 10:28:06 in
that link is no good my release will be out soon  👍
Scrape — 2022-01-10 17:53:33 in v3 Support
try this create page test.php and place scraper file in backend then visit yoursite/test.php what do you host on some php.ini settings might need looking at like sockets

change torrent id for a external one on your site - $tor = ParseTorrent("uploads/1.torrent");

<?php
// uncomment if error

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(0);

require_once("backend/functions.php");
require_once("backend/parse.php");
require_once("backend/Scraper.php");
dbconn();

      $tor = ParseTorrent("uploads/1.torrent");
      $infohash = $tor[1];
      $annlist = $tor[6];

      // uncomment to see torrent parse array
     //var_dump($tor);

      $scraper = new Scraper();
      $ret = $scraper->scrape($infohash, $annlist, 20, 4, true );
      var_dump($ret);


File Tree — 2022-01-09 21:28:31 in General Chat
added the announce and file arrays now  🔥  everything seemed pretty straight forward so i had a look at the file tree

for some reason when i unserialize it breaks not sure if thats because its no longer a multidimensional array but when parsing i can start to split them into sections but im not that experienced with complex arrays it would be easier if the returned array was keyed better

here is as far as i got - change torrent path i tested this on a seperate page my code is a little different but should be able to piece together
        // parse torrent
       $torInfo = new Parse();
       $torrentInfo = $torInfo->torr(UPLOADDIR."/torrents/13.torrent");
       //var_dump($torrentInfo[8]);echo '<br>';echo '<br>';
     
       // get the tree
       $file_tree = $torrentInfo[8];

       // set a path
       $path = '';

       // loop through for path
       foreach ($file_tree as $file) {
           //var_dump($file);
           echo '<br><br>';

           // if path matches must be same folder/file
           if ($file['path'][0] == $path) {
               echo $file['path'][0];
               echo '<p style="color:red">This is a path.</p>';
           } else {
               echo $file['path'][0];
               echo '<p style="color:green">This is a file.</p>';
           }

           // so change or update path path
           $path = $file['path'][0];

       }
File Tree — 2022-01-09 11:48:55 in General Chat
im working on finishing and will be released soon Botanicar

really like this array in table idea - just realised when scraping you dont have to read the torrent file on every scrape for users on v3 you can test this
included the scrape class in backend https://github.com/medariox/scrapeer

just change the torrent path - this code would normally be on torrents-upload

<?php
require_once("backend/functions.php");
require_once("backend/Scraper.php");
dbconn();

       $tor = ParseTorrent(UPLOADDIR."/torrents/1.torrent");
       $announce = $tor[0];
       $infohash = $tor[1];
       $creationdate = $tor[2];
       $internalname = $tor[3];
       $torrentsize = $tor[4];
       $filecount = $tor[5];
       $annlist = $tor[6];
       $comment = $tor[7];
       $filelist = $tor[8];

       var_dump($tor);

       $scraper = new Scrapeer\Scraper();
       $ret = $scraper->scrape($infohash, $annlist, 20, 4, true );
       var_dump($ret);


then to encode for db
                if ($external === 'yes') {
                   $multi = array_flatten($annlist);
                   $announcelist = serialize($multi);
               }

               $multi = array_flatten($filelist);
               $fileliststring = serialize($multi);


to display announces on torrent details
    $array = unserialize($row['announcelist']);
   foreach ($array as $subarray){
      echo $subarray."<br>";
    }


then a function to scrape which updates old torrents to insert new serialize array for old torrent just pass torrent announce column
the insert querys would need fixing for v3
function ScrapeId($id, $annlist, $infohash)
   {
       if (!is_array($annlist)) {
           $tor = ParseTorrent(UPLOADDIR."/torrents/$id.torrent");
           $infohash = $tor[1];
           $annlist = array_flatten($tor[6]);
           $var2 = serialize($annlist);
       }
       
       $scraper = new Scraper();
       $scraped = $scraper->scrape($infohash, $annlist, 20, 4, true );

       $myarray = array_shift($scraped);

       $seeders = $leechers = $completed = 0;
       if ($myarray['seeders'] > 0) {
           $seeders = $myarray['seeders'];
       }
       if ($myarray['leechers'] > 0) {
           $leechers = $myarray['leechers'];
       }
       if ($myarray['completed'] > 0) {
           $completed = $myarray['completed'];
       }

       if ($seeders !== 0) {
           // Update the Torrent
           DB::update('torrents', ['leechers' =>$leechers, 'seeders' =>$seeders, 'times_completed' =>$completed, 'last_action' =>TimeDate::get_date_time(), 'visible' =>'yes', 'announcelist'=>$var2,], ['id'=>$id]);
       } else {
           // Its Dead :(
           DB::update('torrents', ['last_action' =>TimeDate::get_date_time()], ['id' => $id]);
       }
   }


just a case of insert the $announcelist & $fileliststring arrays into the torrent table
File Tree — 2022-01-08 18:21:18 in General Chat
with it been external do you use this https://github.com/johannes85/PHP-Torrent-Scraper/tree/master/src or some version of it - always looking for good libs  😀
File Tree — 2022-01-08 16:48:06 in General Chat
What type of sql table column do you use mate. Good idea saving array to table could be useful a number of ways. 👍

Just thinking of length of array

Do you use the original parse torrent function in parse.php, can you post any changes made  there on upload
SceneKat Uploads — 2022-01-06 06:51:00 in v3 Support
In admincp _ sql error is there anything in there.
Internal torrents or external  -
external maybe server related and if local torrent do you get the message to download now after uploading
Bug Tracker — 2022-01-06 06:46:52 in M-BiTsy Support
Cheers guys, one of the user querys had a spelling mistake which fixed most of them,  all sql querys has been redone ill be spending next week just checking everything over  👍
work on a Json! — 2021-12-30 10:42:53 in General Chat
Above
$data = json_decode($json_data, true);


Add
var_dump($json_data); die();
work on a Json! — 2021-12-30 05:56:51 in General Chat
try add this at top under <?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
work on a Json! — 2021-12-29 18:22:44 in General Chat
This is a broad question but most important lets start by getting data - then you can insert into database

i use website posted above for example  :thumb  make test.php then visit yoururl/test.php

<?php
   function url_get_contents($Url)
   {
       if (!function_exists('curl_init')) {
           header("HTTP/1.0 403 Forbidden");
           echo '<html><head><title>Forbidden</title> </head><body> <h1>Forbidden</h1>CURL is not installed!.<br> </body></html>';
           die();
       }
       $ch = curl_init();
       curl_setopt($ch, CURLOPT_URL, $Url);
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
       $output = curl_exec($ch);
       curl_close($ch);
       return $output;
   }

$json_data = url_get_contents("https://radio.neri-info.com/api/nowplaying/6" );
$data = json_decode($json_data, true);
foreach($data as $key => $value){
   var_dump($key);
   echo '<br>';
   var_dump($value);
   echo '<br>';
}


Bug Tracker — 2021-12-24 09:34:03 in M-BiTsy Support
Which tracker client are you using so I can check what caused the error - that code does not do anything its just to debug clients easier

If you notice any thing else let me know still fine tuning but very close to complete :thumb

Active Links — 2021-12-23 18:37:49 in v3 Mods in Progress
Added to Torrent page links, message page links in mine  :thumb will work in header navbar but not got that far yet
Bug Tracker — 2021-12-23 17:47:02 in M-BiTsy Support
cheers updated sql - i also added some new css to bottom of default/custom.css for new pagelink function (look under here) you may need to add to your theme if colour is wrong. Got 2 week off now so hoping to move all remaining sql into models - the theme wont be changed  :thumb
Bug Tracker — 2021-12-23 10:35:14 in M-BiTsy Support
Try in app/libraries/announce.php

foreach (['numwant', 'corrupt', 'no_peer_id', 'compact'] as $key) {
           if (!is_numeric($client[$key]) || $client[$key] < 0) {
               die(self::response("wrong option input"));
           }
       }


Just uncomment for now see if it works

/*
foreach (['numwant', 'corrupt', 'no_peer_id', 'compact'] as $key) {
           if (!is_numeric($client[$key]) || $client[$key] < 0) {
               die(self::response("wrong option input"));
           }
       }
*/
Bug Tracker — 2021-12-22 19:27:47 in M-BiTsy Support
lets try internal first ALLOWEXTERNAL' => 0

replace app/controller/upload.php with
<?php

class Upload
{
   public function __construct()
   {
       $this->session = Auth::user(0, 2);
   }

   public static function checks()
   {
       // Checks
       if ($_SESSION["can_upload"] == "no") {
           Redirect::autolink(URLROOT, Lang::T("UPLOAD_NO_PERMISSION"));
       }
       if (Config::TT()['UPLOADERSONLY'] && $_SESSION["class"] < _VIP) {
           Redirect::autolink(URLROOT, Lang::T("UPLOAD_ONLY_FOR_UPLOADERS"));
       }
   }

   public function index()
   {
       self::checks();
       // Announcelist
       $announce_urls = explode(",", ANNOUNCELIST);
       $data = [
           'title' => Lang::T("UPLOAD"),
           'announce_urls' => $announce_urls,
       ];
       View::render('upload/index', $data, 'user');
   }

   public function submit()
   {
       self::checks();
       if ($_POST["takeupload"] == "yes") {
           // Check form data.
           if (!isset($_POST['type'], $_POST['name'], $_FILES['torrent'])) {
               $message = Lang::T('MISSING_FORM_DATA');
           }
           $tupload = new Tupload('torrent');
           if (($num = $tupload->getError())) {
               Redirect::autolink(URLROOT . '/upload', Lang::T("UPLOAD_ERR[$num]"));
           }
           if (!($fname = $tupload->getName())) {
               $message = Lang::T("EMPTY_FILENAME");
           }
           // NFO
           $nfo = 'no';
           if ($_FILES['nfo']['size'] != 0) {
               $nfofile = $_FILES['nfo'];
               if ($nfofile['name'] == '') {
                   $message = Lang::T("NO_NFO_UPLOADED");
               }
               if (!preg_match('/^(.+)\.nfo$/si', $nfofile['name'], $fmatches)) {
                   $message = Lang::T("UPLOAD_NOT_NFO");
               }
               if ($nfofile['size'] == 0) {
                   $message = Lang::T("NO_NFO_SIZE");
               }
               if ($nfofile['size'] > 65535) {
                   $message = Lang::T("NFO_UPLOAD_SIZE");
               }
               $nfofilename = $nfofile['tmp_name'];
               if (($num = $_FILES['nfo']['error'])) {
                   $message = Lang::T("UPLOAD_ERR[$num]");
               }
               $nfo = 'yes';
           }
           // Check Post Inputs
           $descr = Input::get("descr");
           if (!$descr) {
               $descr = Lang::T("UPLOAD_NO_DESC");
           }
           $vip = Input::get("vip");
           if (!$vip) {
               $vip = 0;
           }
           $free = Input::get("free");
           if (!$free) {
               $free = 0;
           }
           $langid = (int) Input::get("lang");
           $catid = (int) Input::get("type");

           if (!Validate::Id($catid)) {
               $message = Lang::T("UPLOAD_NO_CAT");
           }
           if (!empty(Input::get('tube'))) {
               $tube = Input::get('tube');
           }
           if (!Validate::Filename($fname)) {
               $message = Lang::T("UPLOAD_INVALID_FILENAME");
           }
           if (!preg_match('/^(.+)\.torrent$/si', $fname, $matches)) {
               $message = Lang::T("UPLOAD_INVALID_FILENAME_NOT_TORRENT");
           }

           $shortfname = $torrent = $matches[1];

           if (!empty(Input::get("name"))) {
               $name = Input::get("name");
           }
           if (!empty(Input::get('tmdb'))) {
               $tmdb = Input::get('tmdb');
           }
           // If Message Show
           if ($message) {
               Redirect::autolink(URLROOT . '/upload', $message);
           }
           if (!$message) {
               //parse torrent file
               $torrent_dir = UPLOADDIR."/torrents";
               $nfo_dir = UPLOADDIR."/nfos";
               if (!($tupload->move("$torrent_dir/$fname"))) {
                   Redirect::autolink(URLROOT . '/upload', Lang::T("ERROR") . ": " . Lang::T("UPLOAD_COULD_NOT_BE_COPIED") . " $torrent_dir - $fname");
               }
               $torInfo = new Parse();
               $tor = $torInfo->torr("$torrent_dir/$fname");
               $announce = $tor[0];
               $infohash = $tor[1];
               $creationdate = $tor[2];
               $internalname = $tor[3];
               $torrentsize = $tor[4];
               $filecount = $tor[5];
               $annlist = $tor[6];
               $comment = $tor[7];
               $filelist = $tor[8];

               //if externals is turned off
               //$external = $announce !== ANNOUNCELIST ? "yes" : "no";
               $announce_urls = explode(",", ANNOUNCELIST);
               if (!in_array($announce, $announce_urls, 1)){
                   $external='yes';
               }else{
                   $external='no';
               }
               if (!Config::TT()['ALLOWEXTERNAL'] && $external == 'yes') {
                   $message = Lang::T("UPLOAD_NO_TRACKER_ANNOUNCE");
               }

           }
           if ($message) {
               @$tupload->remove();
               @unlink("$torrent_dir/$fname");
               Redirect::autolink(URLROOT . '/upload', $message);
           }

           //release name check and adjust
           if ($name == "") {
               $name = $internalname;
           }
           $name = str_replace(".torrent", "", $name);
           $name = str_replace("_", " ", $name);

           //upload images
           $allowed_types = ALLOWEDIMAGETYPES;
           $inames = array();
           for ($x = 0; $x < 2; $x++) {
               if (!($_FILES['image' . $x]['name'] == "")) {
                   $y = $x + 1;
                   if ($_FILES['image$x']['size'] > IMAGEMAXFILESIZE) {
                       Redirect::autolink(URLROOT . '/upload', Lang::T("INVAILD_FILE_SIZE_IMAGE"));
                   }
                   $uploaddir = UPLOADDIR . '/images/';
                   $ifile = $_FILES['image' . $x]['tmp_name'];
                   $im = getimagesize($ifile);
                   if (!$im[2]) {
                       Redirect::autolink(URLROOT . '/upload', sprintf(Lang::T("INVALID_IMAGE")));
                   }
                   if (!array_key_exists($im['mime'], $allowed_types)) {
                       Redirect::autolink(URLROOT . '/upload', Lang::T("INVALID_FILETYPE_IMAGE"));
                   }
                   $row = DB::run("SHOW TABLE STATUS LIKE 'torrents'")->fetch();
                   $next_id = $row['Auto_increment'];
                   $ifilename = $next_id . $x . $allowed_types[$im['mime']];
                   $copy = copy($ifile, $uploaddir . $ifilename);
                   if (!$copy) {
                       Redirect::autolink(URLROOT . '/upload', sprintf(Lang::T("IMAGE_UPLOAD_FAILED")));
                   }
                   $inames[] = $ifilename;
               }

           }

           //anonymous upload
           $anonyupload = Input::get("anonycheck");
           if ($anonyupload == "yes") {
               $anon = "yes";
           } else {
               $anon = "no";
           }

           $filecounts = (int) $filecount;
           // Insert Torrent
           try {
               DB::run("INSERT INTO torrents (filename, owner, name, vip, descr, image1, image2, category, tube, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, anon, last_action, freeleech, tmdb)
                        VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
                       [$fname, $_SESSION['id'], $name, $vip, $descr, $inames[0], $inames[1], $catid, $tube, TimeDate::get_date_time(), $infohash, $torrentsize, $filecounts, $fname, $announce, $external, $nfo, $langid, $anon, TimeDate::get_date_time(), $free, $tmdb]);
           } catch (PDOException $e) {
               rename("$torrent_dir/$fname", "$torrent_dir/duplicate.torrent"); // todo
               Redirect::to(URLROOT . '/exceptions');
           }

           $id = DB::lastInsertId();

           if ($id == 0) {
               unlink("$torrent_dir/$fname");
               Redirect::autolink(URLROOT . '/upload', Lang::T("UPLOAD_NO_ID"));
           }
           rename("$torrent_dir/$fname", "$torrent_dir/$id.torrent");

           if (is_array($filelist)) {
               foreach ($filelist as $file) {
                   $dir = '';
                   $size = $file["length"];
                   $count = count($file["path"]);
                   for ($i = 0; $i < $count; $i++) {
                       if (($i + 1) == $count) {
                           $fname = $dir . $file["path"][$i];
                       } else {
                           $dir .= $file["path"][$i] . "/";
                       }

                   }
                   Files::insertFiles($id, $fname, $size);
               }
           } else {
               Files::insertFiles($id, $internalname, $torrentsize);
           }

           if ($nfo == 'yes') {
               move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
           }
           // Log Upload
           Logs::write(sprintf(Lang::T("TORRENT_UPLOADED"), htmlspecialchars($name), $_SESSION["username"]));
           // Shout new torrent
           $msg_shout = "New Torrent: [url=" . URLROOT . "/torrent?id=" . $id . "]" . $torrent . "[/url] has been uploaded " . ($anon == 'no' ? "by [url=" . URLROOT . "/profile?id=" . $_SESSION['id'] . "]" . $_SESSION['username'] . "[/url]" : "") . "";
           Shoutboxs::insertShout(0, TimeDate::get_date_time(), 'System', $msg_shout);
           //Uploaded ok message
           if ($external == 'no') {
               $message = sprintf(Lang::T("TORRENT_UPLOAD_LOCAL"), $name, $id, $id);
           } else {
               $message = sprintf(Lang::T("TORRENT_UPLOAD_EXTERNAL"), $name, $id);
               // scrape external
               Tscraper::ScrapeId($id);
           }

           Redirect::autolink(URLROOT . "/torrent?id=$id", $message);
       } else {
           Redirect::autolink(URLROOT, Lang::T("ERROR"));
       }
   }

}


create torrent with https://XXX/TorrentTraderMVC/announce.php and upload
Bug Tracker — 2021-12-22 17:57:15 in M-BiTsy Support
Thank you I will update sql

Leave as ALLOWEXTERNAL' => 1

What is tracker url on top of upload form ?
and is torrent external ?
is file in data/uploads/torrents folder ?

Not sure if dedibox is messing with htaccess is data folder and TorrentTraderMVC folder in same place


Active Links — 2021-12-21 06:13:17 in v3 Mods in Progress
my code is much different but here is a mod ive been playing with.

in account.php show when a link is active - had a quick look at v3 account.php navmenu() and i moved it to functions.php so i can use it on seedbonus, messages etc you could also use it on the header navbar

highlight link to show which is active

so for just example on account.php

above
function navmenu(){


add
// Active Link
function activelink($page)
{
   $active = $_GET['url'] == $page ? '#fff' : '#000';
   return $active;
}


then edit navmenu() function
find
<?php print("<a href='account.php'><b>".T_("YOUR_PROFILE")."</b></a>");?>


replace
<?php print("<a href='account.php'><font color=". activelink('account.php')."><b>".T_("YOUR_PROFILE")."</b></font></a>"); ?>;


now one button should be different colour just add for each link placing the href url inside the activelink() in example above i use account.php
example of the message link in navbarfunction
<?php print("<a href='mailbox.php'><font color=". activelink('mailbox.php')."><b>".T_("YOUR_MESSAGES")."</b></font></a>");?>


If it doesn't work try remove the .php example activelink('mailbox')

mods added recently

bookmark torrents - started expanding to forum topics
catalog - https://torrenttrader.uk/catalog
ballon mod - added to users & torrents - users just basic at minute
visited users on index 24hr - example of ballon mod if you hover over names
new tmdb mod - merge tables into 1, cleaned classes, updated scraper
show file extension icon
torrent marked new for 24hr
auto promote/demote in final testing
bump torrent
Similar Torrents mod
no download ratio for vip group
work on colour class function
mass email
admincp - inactive members, still need to add to cleanup?
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728