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
update torrents-search.php
Controls ·  Search New posts · Mark unread

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

2021-09-13 21:06:28
Hello gang !

I have come to share with you an update that works very well and will allow you to search and find the word in all the length of the title of the torrent which owns the title to search.

<~~~~French~~~~>

Je viens vous partager une mise a jours qui fonctionne très bien et vous permettras de chercher et de trouver le mot dans tous la  longueur du titre du torrent qui possédant le titre rechercher.

in torrents-search you find this line:
foreach ($searcha as $searchss) {
       if (strlen($searchss) <= 1)
       continue;
       $sc++;
       if ($sc > 5)
       break;
       $ssa = array();
       foreach (array("torrents.name") as $sss)
       $ssa[] = "$sss LIKE '%" . sqlwildcardesc($searchss) . "%'";
       $wherea[] = "(" . implode(" OR ", $ssa) . ")";
   }

Replace for:
foreach ($searcha as $searchss) {
       if (strlen($searchss) <= 1)
       continue;
       $sc++;
       if ($sc > 5)
       break;
       $ssa = array();
       foreach (array("torrents.name") as $sss)
       $ssa[] = "LOWER($sss) LIKE '%" . sqlwildcardesc(strtolower($searchss)) . "%'"; // update by raidewine 2021-08-30
       $wherea[] = "(" . implode(" OR ", $ssa) . ")";
   }


*Thanks to my team crazy ! :angel
Last edited by spiritblue on 2021-09-13 21:08:04
2021-09-13 22:33:54
Thanks for sharing Sprit :smile. I also believe that this function should be this way as well. deprecated curly braces for array and string. I already edited this, so you can just copy and paste this over your old function unless you feel I am wrong. The change was from curly braces {} to brackets []. Its a 7.4 deprecation
//Sort by
if ($addparam != "") {
if ($pagerlink != "") {
if ($addparam[strlen($addparam)-1] != ";") { // & = &
$addparam = $addparam . "&" . $pagerlink;
} else {
$addparam = $addparam . $pagerlink;
}
}
} else {
$addparam = $pagerlink;
}
 
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-09-13 22:46:22
2021-09-14 08:10:33
Big thanks, fix done and I will test with php7.4  :thumb   :grin
==========================================
Un gros merci, correction fait et je vais testé avec php7.4  :thumb   :grin
Last edited by spiritblue on 2021-09-14 08:15:34
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728