Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
  #1  
Old 20th February 2010, 23:06
cekosexama cekosexama is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 21
Cool Search Engine & Recommended torrents, question
Hello, can someone tell me how to put search engine on torrentstrike

Click the image to open in full size.



And the other question is, how to make ''Recommended torrents'' on brose.php. Like this:

Click the image to open in full size.
Reply With Quote
  #2  
Old 20th February 2010, 23:31
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Hi, for search engine , try the file below. Enjoy
Attached Files
File Type: php browse.php (7.3 KB, 29 views)
__________________
only me
Reply With Quote
  #3  
Old 21st February 2010, 00:13
cekosexama cekosexama is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 21
Default
Quote:
Originally Posted by Timisoreanul View Post
Hi, for search engine , try the file below. Enjoy
It didnt work , makes error
Code:
Fatal error:  Call to a member function query() on a non-object  in D:\serverr\xampp\htdocs\Upload\browse.php on line 118
Reply With Quote
  #4  
Old 21st February 2010, 00:23
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Please post your browse.php
__________________
only me
Reply With Quote
  #5  
Old 21st February 2010, 00:24
cekosexama cekosexama is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 21
Default
i found it :)

ill share code , here it is:
PHP Code:
<table width=750 class=main border=0 cellspacing=0 cellpadding=0><tr><td class=embedded><form method="get" action=browse3.php><div class="sidebox"><div class="boxhead">
<table width=750 class=main border=0 cellspacing=0 cellpadding=0>
  <tr>
    <td class=embedded><div class="sidebox">
      <div class="boxhead">
        <h2>Search torrents</h2>
      </div>
      <div class="boxbody">
        <p align="center">Search:
          <input type="text" name="search" size="40" value="<?= htmlspecialchars($searchstr?>" />
              <select name="cat">
                <option value="0">(All cats.)</option>
                <?


$cats 
genrelist();
$catdropdown "";
foreach (
$cats as $cat) {
$catdropdown .= "<option value=\"" $cat["id"] . "\"";
if (
$cat["id"] == $_GET["cat"])
$catdropdown .= " selected=\"selected\"";
$catdropdown .= ">" htmlspecialchars($cat["name"]) . "</option>\n";
}

$deadchkbox "<input type=\"checkbox\" name=\"incldead\" value=\"1\"";
if (
$_GET["incldead"])
$deadchkbox .= " checked=\"checked\"";
$deadchkbox .= " /> Including dead torrents\n";

?>
                <?= $catdropdown ?>
              </select>
              <select name=blah>
                <option value="0" selected="selected">In title</option>
                <option value="1"<? print($blah == " selected" ""); ?>>In the description</option>
                <option value="2"<? print($blah == " selected" ""); ?>>In both</option>
              </select>
              <?= $deadchkbox ?>
              <input type="submit" value="Search" />
        </p>
      </div>
    </div>
        <p></p></td>
  </tr>
</table>
<h2>&nbsp;</h2>
    </div>
        </div>
</form>
</td></tr></table>
Edit: I still need the recomended torrents code,pl0x some 1 share it :)

Last edited by cekosexama; 21st February 2010 at 01:07.
Reply With Quote
  #6  
Old 21st February 2010, 00:33
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Yes thats it, for those who want to put search in browse,
search
Code:
  		<input type="submit" class="btn" value="Go!"/>
  	</div>
  	</td>
  </tr>
  </table>
</td>
</tr>
</table>
</form>
end afther that put this :
Code:
<p><p>
<table width=650 class=main border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
<form method="get" action=browse.php>
<p align="center">
Search:
<input type="text" name="search" size="40" value="<?= htmlspecialchars($searchstr) ?>" />
in
<select name="cat">
<option value="0">(all types)</option>
<?


$cats = genrelist();
$catdropdown = "";
foreach ($cats as $cat) {
    $catdropdown .= "<option value=\"" . $cat["id"] . "\"";
    if ($cat["id"] == $_GET["cat"])
        $catdropdown .= " selected=\"selected\"";
    $catdropdown .= ">" . htmlspecialchars($cat["name"]) . "</option>\n";
}

$deadchkbox = "<input type=\"checkbox\" name=\"incldead\" value=\"1\"";
if ($_GET["incldead"])
    $deadchkbox .= " checked=\"checked\"";
$deadchkbox .= " /> including dead torrents\n";

?>
<?= $catdropdown ?>
</select>
<?= $deadchkbox ?>
<input type="submit" value="Search!" />
</p>
</form>
</td></tr></table>
this is english
cekosexama yours code is not english.
__________________
only me
Reply With Quote
  #7  
Old 21st February 2010, 01:05
cekosexama cekosexama is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 21
Default
I translated and edited the code in the forums, when i saw it was on Bulgarian :)
Reply With Quote
  #8  
Old 21st February 2010, 01:26
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
cekosexama i found recommend torrents on torrentstrike forum, thanks to nicky, here is the code
sql
Code:
ALTER TABLE `torrents` ADD `recommend` ENUM( 'Yes', 'No' ) NOT NULL DEFAULT 'No';
upload add
Code:
tr("Recommend torrent","<input type=radio name=recommend" . ($row["recommend"] == "yes" ? " checked" : "") . " value=yes>Yes<input type=radio name=recommend" . ($row["recommend"] == "no" ? " checked" : "") . " value=no>No",1);
takeupload in query after
Code:
type,
add
Code:
recommend,
and after
Code:
$type,
add
Code:
$recommend,
edit add
Code:
tr("Recommend torrent","<input type=radio name=recommend" . ($row["recommend"] == "yes" ? " checked" : "") . " value=yes>Yes<input type=radio name=recommend" . ($row["recommend"] == "no" ? " checked" : "") . " value=no>No",1);
takeedit after
Code:
$updateset[] = "category = " . (0 + $type);
add
Code:
$recommend = unesc($_POST['recommend']);
$updateset[] = "recommend = " . sqlesc($recommend);
index.php add where you want
Code:
$res1 = mysql_query("SELECT torrents.id, torrents.size, torrents.name, torrents.filename, torrents.poster, torrents.leechers, torrents.seeders, torrents.times_completed, torrents.owner, users.username AS username, users.class AS class FROM torrents INNER JOIN users ON torrents.owner = users.id WHERE torrents.recommend='yes' ORDER BY torrents.times_completed DESC LIMIT 3");
if (mysql_num_rows($res1) > 0) {
begin_frame("Recommend Torrent",true,5);
while ($arr1 = mysql_fetch_assoc($res1)) {
$dispname = htmlspecialchars(trim($arr1["name"]));
$count_dispname=strlen($dispname);
$max_lenght_of_torrent_name="15"; // maximum lenght
if($count_dispname > $max_lenght_of_torrent_name){
$short_torrent_name_alt="title=\"$dispname \"";
$dispname=substr($dispname, 0, $max_lenght_of_torrent_name) . "...";
}else
$short_torrent_name_alt="$dispname";
echo "<td width=\"50%\" align=\"center\">
<br/>
<b><a href=\"./details.php?id=$arr1[id]&hit=1\"$short_torrent_name_alt><img src=\"$arr1[poster]\" border=\"0\" width=\"150\" height=\"150\"></a></b>
<br/>
<a href=\"./details.php?id=$arr1[id]&hit=1\"$short_torrent_name_alt><b>$dispname</b></a><br/><br/>
<b><a href=\"./details.php?id=$arr1[id]&dllist=1#seeders\"><font color=green>Seed ($arr1[seeders])</font> <font color=red>Leech ($arr1[leechers])</font></a> <font color=blue>Snatched ($arr1[times_completed])</font></b><br/>
<b>Size:</b> ".mksize($arr1['size'])."<br/>
<b>Upped by:</b> <a href=userdetails.php?id=$arr1[owner]><b>".$arr1['username']."</b></a><br/>
<a class=\"index\" href=\"download.php/$arr1[id]/" . rawurlencode($arr1["filename"]) . "\">" . "<font color=red>Download Torrent</font>" . "</a><br>
</td>";
}

end_frame();
}
mysql_free_result($res1);
so if you whant to show the recommend torrents on browse , use the last code end add it to browse.php
__________________
only me
Reply With Quote
  #9  
Old 21st February 2010, 01:50
cekosexama cekosexama is offline
Senior Member
 
Join Date: Dec 2009
P2P
Posts: 21
Default
From all this i got confuzed, i cant do nothing
Reply With Quote
  #10  
Old 21st February 2010, 02:11
Timisoreanul's Avatar
Timisoreanul Timisoreanul is offline
Senior Member
 
Join Date: Apr 2008
P2P
Posts: 211
Default
Ok , let's try another method,

Step 1: go to your phpmyadmin, then select your database of tracker, then click SQL end run
Code:
ALTER TABLE `torrents` ADD `recommend` ENUM( 'Yes', 'No' ) NOT NULL DEFAULT 'No';
click execute.
Step 2: in your folder tracker,, open upload.php find
Code:
tr("Type", $s, 1);
add afther it
Code:
tr("Recommend torrent","<input type=radio name=recommend" . ($row["recommend"] == "yes" ? " checked" : "") . " value=yes>Yes<input type=radio name=recommend" . ($row["recommend"] == "no" ? " checked" : "") . " value=no>No",1);
now save end close the file.
Step 3 : find end open takeupload.php search for
Code:
$ret = mysql_query("INSERT INTO torrents:
end you will see , type, recommend, descr, ori_descr, description, category now replace that line with this:
Code:
, type, recommend, descr, ori_descr, description, category
save end close
Step 4 :find end open edit.php find
Code:
	tr("Type", $s, 1);
end add afther it this:
Code:
tr("Recommend torrent","<input type=radio name=recommend" . ($row["recommend"] == "yes" ? " checked" : "") . " value=yes>Yes<input type=radio name=recommend" . ($row["recommend"] == "no" ? " checked" : "") . " value=no>No",1);
save end close
Step 5: find end open takeedit.php find
Code:
$updateset[] = "category = " . (0 + $type);
add afther it this:
Code:
$recommend = unesc($_POST['recommend']);
$updateset[] = "recommend = " . sqlesc($recommend);
Step 6 : find end open browse.php find:
Code:
	stdhead("Search results for \"$searchstr\"");
else
	stdhead();
afther that add this:
Code:
$res1 = mysql_query("SELECT torrents.id, torrents.size, torrents.name, torrents.filename, torrents.poster, torrents.leechers, torrents.seeders, torrents.times_completed, torrents.owner, users.username AS username, users.class AS class FROM torrents INNER JOIN users ON torrents.owner = users.id WHERE torrents.recommend='yes' ORDER BY torrents.times_completed DESC LIMIT 3");
if (mysql_num_rows($res1) > 0) {
begin_frame("Recommend Torrent",true,5);
while ($arr1 = mysql_fetch_assoc($res1)) {
$dispname = htmlspecialchars(trim($arr1["name"]));
$count_dispname=strlen($dispname);
$max_lenght_of_torrent_name="15"; // maximum lenght
if($count_dispname > $max_lenght_of_torrent_name){
$short_torrent_name_alt="title=\"$dispname \"";
$dispname=substr($dispname, 0, $max_lenght_of_torrent_name) . "...";
}else
$short_torrent_name_alt="$dispname";
echo "<td width=\"50%\" align=\"center\">
<br/>
<b><a href=\"./details.php?id=$arr1[id]&hit=1\"$short_torrent_name_alt><img src=\"$arr1[poster]\" border=\"0\" width=\"150\" height=\"150\"></a></b>
<br/>
<a href=\"./details.php?id=$arr1[id]&hit=1\"$short_torrent_name_alt><b>$dispname</b></a><br/><br/>
<b><a href=\"./details.php?id=$arr1[id]&dllist=1#seeders\"><font color=green>Seed ($arr1[seeders])</font> <font color=red>Leech ($arr1[leechers])</font></a> <font color=blue>Snatched ($arr1[times_completed])</font></b><br/>
<b>Size:</b> ".mksize($arr1['size'])."<br/>
<b>Upped by:</b> <a href=userdetails.php?id=$arr1[owner]><b>".$arr1['username']."</b></a><br/>
<a class=\"index\" href=\"download.php/$arr1[id]/" . rawurlencode($arr1["filename"]) . "\">" . "<font color=red>Download Torrent</font>" . "</a><br>
</td>";
}

end_frame();
}
mysql_free_result($res1);
save end close.
good luck
__________________
only me
Reply With Quote
Reply

Tags
engine , question , recommended , search , torrents

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Torrent search engine script movizdb Downloads 1 3rd November 2010 18:14
SEO - Optimization for Search Engine kp380lv Mods & Themes 0 27th September 2009 17:48
Bit torrent search engine atencorps Downloads 0 28th December 2008 02:40
meta search engine script(pirate search) movizdb Downloads 1 13th October 2008 15:19



All times are GMT +2. The time now is 12:29. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.