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
AJAX search as-you-type
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2011-05-09 17:59:26
"djhowarth, post: 72444":
$result = mysql_query("SELECT `name` FROM `torrents` WHERE MATCH (`name`) AGAINST ('" . mysql_real_escape_string($_GET['q']) . "' IN BOOLEAN MODE) AND `banned` = 'no' ORDER BY `id` DESC LIMIT 10");


Hi Guys,

For people who doesn't know where to put this line, it's in SUGGEST.PHP.

Cheers t0 all.

Secure by knowledge.
2011-05-09 22:05:13
Bizard, moi ya rien qui marche!? il me donne pas de choix!?  :lol:

*************************

Bizard, I have nothing that works!? it gives me no choice!? : (

v2.06

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=4918"]AJAX_search_as_you_type.rar[/url]
AJAX_search_as_you_type.rar
Download

Unknown User
2011-05-10 09:57:42
Any way to allow clicking a result in the drop-down to go to the torrent page?
Unknown User
2011-05-12 01:46:09
u should be able to use onclick or something to redirect to the location.
Unknown User
2011-05-12 09:28:56
"djhowarth, post: 72530":
u should be able to use onclick or something to redirect to the location.

its only grabbing the filename though not the url you would have to fiddle with it more.

something along the lines of...

<?php



require("backend/functions.php");



dbconn(false);

//loggedinorreturn();



if (strlen($_GET['q']) > 3) {

$q = str_replace(" ",".",sqlesc("%".$_GET['q']."%"));

$q2 = str_replace("."," ",sqlesc("%".$_GET['q']."%"));

$result = mysql_query("SELECT torrents.id, torrents.name FROM torrents WHERE torrents.name LIKE {$q} OR torrents.name LIKE {$q2} ORDER BY id DESC LIMIT 0,10;");

if (mysql_numrows($result) > 0) {

for ($i = 0; $i < mysql_numrows($result); $i++) {

$name = mysql_result($result,$i,"name");

$name = trim(str_replace("\t","",$name));

$id=mysql_result($result,$i,"id");

$tid=(int)$id;

print" <a href='torrents-details.php?id=".$tid."'>".$name."</a>";

if ($i != mysql_numrows($result)-1) {

print "\r\n";

}

}

}

}



?>
Unknown User
2011-05-12 13:42:50
Hi Guys,

Thanx for the follow up.  Can't wait to see a solution.

Cheers m8.
2011-06-23 00:54:25
Big thank mr_mami !   :D

v2.07 #1

Moi je les ajouter a simplesearch_block.php

***********************************

I add a simplesearch_block.php

<?php

if (!$site_config["MEMBERSONLY"] || $CURUSER) {

begin_block("".SEARCH." Torrent");

?>

<center>

<form method="get" action="torrents-search.php"><br />

<input type="text" id="searchinput" name="search" autocomplete="off" style="width: 120px;" ondblclick="suggest(event.keyCode,this.value);" onkeyup="suggest(event.keyCode,this.value);" onkeypress="return noenter(event.keyCode);" value="<?= htmlspecialchars($searchstr) ?>" />

<script language="JavaScript" src="js/suggest.js" type="text/javascript"></script>

<br/>

<div id="suggcontainer" style="text-align: left; width: 240px; display: none;">

<div id="suggestions" style="cursor: default; position: absolute; background-color: #000000; border: 1px solid #FF0000;"></div>

</div>

<input class="btn" type="submit" value="<? print("" . SEARCH . "\n"); ?>" />

</form>

 </form>

</center>

<?php

end_block();

}

?>


...merci a aflan pour m'avoir aid
Unknown User
2011-08-05 03:43:06
you would like to know how to put this writings only when the user is to upload a torrent when he types the name of the torrent he be checked at the database level itself he was sent?

torrents-upload.php

Quote:
print ("<TR><TD align=right>" . TNAME . ": *</td><td align=left><input type=text name=name size=60 value=" . $_POST['name'] . "><BR>\n</td></tr>");
Unknown User
2011-08-07 18:18:29
someone could help bring up on torrents upload thanks ... sorry for my english
Unknown User
2011-09-21 16:19:55
works very well thank you :angry:
Unknown User
2012-03-21 20:08:48
Just a quick one hopefully someone can help. I have this installed , works great but when i have a char like this

Shingo & his friendsIt appears in the list but when i press accept it appears like this in the search box

Shingo &amp; his friends Problem is with the &amp; char you are unable to find the torrent.

Anyclues Ive had a bit mess about but not been successful

thanks to anyone who can help
Unknown User
2012-03-21 20:12:39
htmlspecialchars converts it to html entities so change to strip_tags
Unknown User
2012-03-21 20:26:43
Nah still the same mate, pretty much tried the lot, could it be something in the js?
Unknown User
2012-03-22 13:55:28
& = &amp; so anything with & will return as &amp; if htmlspecialchars is run. show me a screenshot...
Unknown User
2012-03-22 19:23:05
here you go mate.



Screen Shot 2012-03-22 at 19.20.14.png
Screen Shot 2012-03-22 at 19.20.14.png
Screen Shot 2012-03-22 at 19.19.55.png
Screen Shot 2012-03-22 at 19.19.55.png
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