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
Icon on file list
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / Old v2 Tpoics

2021-05-26 01:18:09
Botanicar

with my modification it corrects itself




2021-05-26 14:35:18
Hi spiritblue, no it is not fixed.
You have folder with name "show" and that dont have some folder icon


=================== French ===================

Salut spiritblue, non ce n'est pas fixe.
Vous avez un dossier avec le nom "show" et qui n'a pas d'icône de dossier
Dans ce dossier, vous avez un nom de fichier "Def Leppard - Viva histerya [2003]. iso

PS
Def Leppard - Viva histerya  => Nice album mate I like it


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-11-27 16:09:09
allo Botanicar  :wink

moi ça me convient comme telle
=======================
me it suits me as such  


2021-11-27 19:09:28
can you share images spirtblue  :thumb
2021-11-28 12:10:18
M-jay:
can you share images spirtblue  :thumb  


You can use fontawesome or flaticons instead mate,
why should everything be with images or icons, it just takes unnecessary space and time to produce on the page.

Maybe I'm wrong, but I fully respect the needs of others


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-11-28 14:33:21
icons are not available in standard TT but this what i used mate - i put in function using in_array to slim code down

can be used for v3 just use image instead of icon - still need to add more extensions to the arrays
for v3 replace <i class='???'> for <img sr > see micromonkeys code

function getexttype($ext = '')
{
   $ext = strtolower($ext);
   $music = array('mp3', 'wav', 'flac', 'm3u');
   $video = array('mp4', 'avi', 'mkv', 'flv', 'wmv');
   $file = array('txt', 'pdf', 'doc', 'zip', 'nfo', 'srt', 'exe');
   $image = array('jpeg', 'gif', 'png');
   if ($ext == false || $ext == '') {
       $filetype_icon = "&nbsp;<i class='fa fa-question'></i>";
   } else if (in_array($ext, $music)) {
       $filetype_icon = "&nbsp;<i class='fa fa-music'></i>";
   } else if (in_array($ext, $video)) {
       $filetype_icon = "&nbsp;<i class='fa fa-film'></i>";
   } else if (in_array($ext, $file)) {
       $filetype_icon = "&nbsp;<i class='fa fa-file'></i>";
   } else if (in_array($ext, $image)) {
       $filetype_icon = "&nbsp;<i class='fa fa-picture-o'></i>";
   }
   return $filetype_icon;
}


then in torrents-details find
while ($frow = mysqli_fetch_assoc($fres)) {
       echo "<tr><td class='table_col1'>


replace for
while ($frow = mysqli_fetch_assoc($fres)) {
       $ext = pathinfo($frow['path'], PATHINFO_EXTENSION);
       $filetype_icon = getexttype($ext);
   echo "<tr><td class='table_col1'>" . $filetype_icon . "</td>



2021-11-28 18:09:56
Good one M-jay    :thumb

my part of torrent-datails.php



$ext = pathinfo($frow['path'], PATHINFO_EXTENSION);
if ($ext !== false && $ext == 'mp3') {
$filetype_icon = "&nbsp;<i class='flaticon-mp3' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'flac') {
$filetype_icon = "&nbsp;<i class='flaticon-sound' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'aac') {
$filetype_icon = "&nbsp;<i class='flaticon-aac' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'cue') {
$filetype_icon = "&nbsp;<i class='flaticon-audiobook' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'm3u') {
$filetype_icon = "&nbsp;<i class='flaticon-boxset' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'ape') {
$filetype_icon = "&nbsp;<i class='flaticon-music-other' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'iso') {
$filetype_icon = "&nbsp;<i class='flaticon-emulation' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'jpg') {
$filetype_icon = "&nbsp;<i class='flaticon-images' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'png') {
$filetype_icon = "&nbsp;<i class='flaticon-images' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'bmp') {
$filetype_icon = "&nbsp;<i class='flaticon-images' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'mp4') {
$filetype_icon = "&nbsp;<i class='flaticon-mp4' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'mkv') {
$filetype_icon = "&nbsp;<i class='flaticon-hd' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'divx') {
$filetype_icon = "&nbsp;<i class='flaticon-divx' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'vob') {
$filetype_icon = "&nbsp;<i class='flaticon-dvd' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'avi') {
$filetype_icon = "&nbsp;<i class='flaticon-movies' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'txt') {
$filetype_icon = "&nbsp;<i class='flaticon-book' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'srt') {
$filetype_icon = "&nbsp;<i class='flaticon-list' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'ass') {
$filetype_icon = "&nbsp;<i class='flaticon-message' style='color:gold;font-size:24px;'></i>&nbsp;";
}
else if ($ext !== false && $ext == 'NFO' || 'nfo') {
$filetype_icon = "&nbsp;<i class='flaticon-info' style='color:gold;font-size:24px;'></i>&nbsp;";
}




www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-11-30 22:56:49
I fiddled some more. I think the comparison for two types should be separated, otherwise, using || , it will mess up anything that comes after it, so maybe we should try like this. let me know if you think this would be more correct. Mine is for TTv3
 }else if ( $ext !== false && $ext == 'nfo' xor $ext == 'NFO') {
$filetype_icon = "<img width=40 height=40 src=/images/nfo.png>";
}

or maybe this works too
 }else if ( $ext !== false && $ext == 'nfo' || $ext == 'NFO') {
$filetype_icon = "<img width=40 height=40 src=/images/nfo.png>";
}

Dont use this
else if ( $ext !== false && $ext == 'nfo' || 'NFO')

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by MicroMonkey on 2021-12-02 21:57:31
2021-12-02 22:30:12
sorry for my slowness to have answered you friend M-jay
here are my images and I add the .psd to be forgiven  :giggle

Link pic: https://mega.nz/file/H4Y2RB6S#lLDakiSvlNB-ayGH0XKvVi9U7Bz0pwYJ3bzNMdh7JHw

=====================================

ExYuSubs, very good idea for the sound system, but you have to warn the world who will have to add the Font Awesome system to do like you.

I give the link here:>  https://github.com/codrops/PageTransitions

Link icons:> https://fontawesome.com/v4.7/
https://preview.keenthemes.com/metronic/demo3/features/icons/fontawesome5.html
*type on google and you will find a site package for various icon choices


for the font system, you don't need to add the size, the system works by css to define the tail with

.fa{
display:inline-block;
font:normal normal normal 14px/1 FontAwesome;
font-size:inherit;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale
}
.fa-2x {
font-size: 2em
}
.fa-3x {
font-size: 3em
}
.fa-4x {
font-size: 4em
}
.fa-5x {
font-size: 5em
}


Example Call the picture and this size:
\"><i class='fa-2x fa fa-lg fa-weibo'></i>


Last edited by spiritblue on 2021-12-02 22:42:11
2021-12-03 11:53:30
Hi @spiritblue
yes, I agree with you that you have to inform friends that they have to take into account that both font awesome and flat icons are an "add-on" for this script.

Font awesom is available in two variants (free and pro)
You can "pick" flat icons yourself from their website

#font awesome: https://fontawesome.com/start  
#font awesome: https://fontawesome.com/v5.15/icons?d=gallery&p=2&m=free

#flat icons:  https://www.freepik.com/flaticon
#flat icons:  https://www.flaticon.com/authors/freepik

after you pick up your icons then you make a special css file for just them

PS
when it comes to the actual size of font awesome then this css rules you have written in your post apply, but when it comes to flat icons then the style you have to fix yourself is what you want.

It's pure play with everything that exists and can be implemented when it comes to design, but it's always up to the designer how this person wants their website look to have

Wish you a pleasant weekend to all of you my friends





www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2023-01-17 22:16:59
just wanted to post this in case its useful to anyone. You can add more as you need, it will also cover all RAR files, as .r00, .r01, .r02 etc. This is much better than everything we were trying in previous posts.  Get some flaticons here https://www.flaticon.com/ or just use your own, just change it below to fit your needs
echo "<br /><br /><b>".T_("FILE_LIST").":</b> <img src='images/plus.gif' id='pic1' onclick='klappe_torrent(1)' alt='' /><div id='k1' style='display: none;'><table align='center' cellpadding='0' cellspacing='0' class='table_table' border='1' width='100%'><tr><th width='50' class='table_head'> ".T_("TYPE")."</th><th class='table_head' align='left'> ".T_("FILE")."</th><th width='50' class='table_head'> ".T_("SIZE")."</th></tr>";
$fres = SQL_Query_exec("SELECT * FROM `files` WHERE `torrent` = $id ORDER BY `path` ASC");
if (mysqli_num_rows($fres)) {
   while ($frow = mysqli_fetch_assoc($fres)) {
$ext = pathinfo($frow['path'], PATHINFO_EXTENSION);
$filetype_icons = [
"mp3" => "/images/filetype-icons/mp3.png",
"iso" => "/images/filetype-icons/iso.png",
"mp4" => "/images/filetype-icons/mp4.png",
"png" => "/images/filetype-icons/png.png",
"jpg" => "/images/filetype-icons/jpg.png",
"mkv" => "/images/filetype-icons/mkv.png",
"rar" => "/images/filetype-icons/rar.png",
"avi" => "/images/filetype-icons/avi.png",
"nfo" => "/images/filetype-icons/nfo.png"
 ];
 if(preg_match("/^r\d{2}$/", $ext)) {
$filetype_icon = "<img width=40 height=40 src='/images/filetype-icons/rar.png'>";
} elseif(isset($filetype_icons[$ext])) {
$filetype_icon = "<img width=40 height=40 src='" . $filetype_icons[$ext] . "'>";
} else {
$filetype_icon = "<img width=40 height=40 src='/images/filetype-icons/unknown.png'>";
}
 

       echo "<tr><td class='table_col1'>".$filetype_icon."</td><td class='table_col1'>".htmlspecialchars($frow['path'])."</td><td class='table_col2'>".mksize($frow['filesize'])."</td></tr>";
   }

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by MicroMonkey on 2023-01-18 03:35:19
2023-06-25 02:25:14
heres some icons. I was going through files and I thought I should share these in case they are useful to someone. These match with my code above
filetype-icons.zip
Download

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by MicroMonkey on 2023-07-01 15:50:22
2023-06-25 18:37:07
This should be a lot faster with less checking involved


if ($ext !== false) {
 switch ($ext) {
   case 'mp3':
   case 'FMP3':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/mp3.png>";
     break;
   case 'flac':
   case 'FLAC':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/flac.png>";
     break;
   case 'mp4':
   case 'MP4':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/mp4.png>";
     break;
   case 'm3u':
   case 'M3U':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/m3u.png>";
     break;
   case 'pdf':
   case 'PDF':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/pdf.png>";
     break;
   case 'jpg':
   case 'JPG':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/jpg.png>";
     break;
   case 'png':
   case 'PNG':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/png.png>";
     break;
   case 'txt':
   case 'TXT':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/txt.png>";
     break;
   case 'lng':
   case 'LNH':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/lng.png>";
     break;
   case 'btskin':
   case 'BTSKIN':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/btskin.png>";
     break;
   case 'epub':
   case 'EPUB':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/epub.png>";
     break;
   case 'bmp':
   case 'BMP':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/bmp.png>";
     break;
   case 'conf':
   case 'CONF':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/conf.png>";
     break;
   case 'dll':
   case 'DLL':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/dll.png>";
     break;
   case 'ini':
   case 'INI':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/ini.png>";
     break;
   case 'dat':
   case 'DAT':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/dat.png>";
     break;
   case 'apk':
   case 'APK':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/apk.png>";
     break;
   case '7z':
   case '7Z':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/7z.png>";
     break;
   case 'zip':
   case 'ZIP':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/zip.png>";
     break;
   case 'rar':
   case 'RAR':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/rar.png>";
     break;
   case 'exe':
   case 'EXE':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/exe.png>";
     break;
   case 'iso':
   case 'ISO':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/iso.png>";
     break;
   case 'mkv':
   case 'MKV':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/mkv.png>";
     break;
   case 'avi':
   case 'AVI':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/avi.png>";
     break;
   case 'url':
   case 'URL':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/url.png>";
     break;
   case 'NFO':
   case 'nfo':
   case 'NFO':
     $filetype_icon = "<img width=100 height=30 src=/images/Torrents/nfo.png>";
     break;
   default:
     // Handle unknown file extensions
     break;
 }
}


EDIT: I got confused with first page, it appeared as new when it jumped. Disregard *
Last edited by STorrents2020 on 2023-06-25 18:40:22
2023-06-26 20:42:10
yea, I noticed that when you click on the forum, it takes you to the first page then you have to click the next page to see the latest posts. The code I have posted a few posts up works perfectly and its fast and covers anything you want to add. I even added code in there to know if you have rar files in a tree, like .r00, .r01, etc, you've seen them before, its a bit more old school raring, but they still exist sometimes
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2023-06-27 14:57:16
I started giving notice on certain file types too, best to keep users safe
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