View Single Post
  #1  
Old 8th December 2009, 12:51
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile [FTS 1.1] Genre mod
run this using phpmyadmin :

PHP Code:
ALTER TABLE `torrentsADD `Genrevarchar(120NOT NULL default ''

In include/functions

find

PHP Code:
tr("Torrent name""<input type=\"text\" name=\"name\" size=\"80\" value=\"$name\"/><br />(Taken from filename if not specified. <b>Please use descriptive names.</b>)\n"1); 
Add after

PHP Code:
tr("Genres""<input type=\"text\" name=\"genre\" size=\"80\" />\n"1); 
In takeupload.php

find

PHP Code:
$imageurl = !empty($_POST['imageurl']) ? $_POST['imageurl'] : ''
after add

PHP Code:
$genre $_POST["genre"]; 
Find

PHP Code:
$ret sql_query("INSERT INTO torrents (search_text, filename, owner, visible, anonymous, info_hash, name, 
And add after name,

PHP Code:
 genre
then insert in the query :

PHP Code:
$genre
after :
PHP Code:
$torrent
in details.php

search for the $res query , it should start like this :

PHP Code:
$res sql_query("SELECT torrents.seeders, torrents.banned,".(_youtube_mod_ == 'yes' " torrents.tube," "")." torrents.leechers, torrents.info_hash, torrents.imageurl, 
then add in the query :

PHP Code:
torrents.genre 
after

PHP Code:
categories.name AS cat_name
now look for :
PHP Code:
$s=$row["name"]; 
then add under it :

PHP Code:
$genres $row["genre"]; 
Look for

PHP Code:
tr("Download""You are not allowed to download."); 
then add under it :

PHP Code:
if (!empty($row["genre"]))
print(
"<tr><td class=rowhead width=1%>Genres</td><td width=99% align=left>$genres</td></tr>"); 

then in edit.php

Find

PHP Code:
    tr("Torrent Image URL""<input type=\"text\" name=\"imageurl\" value=\"" htmlspecialchars($row["imageurl"]) . "\" size=\"80\" />"1); 
and add under it

PHP Code:
tr("Genres""<input type =\"text\" name=\"genre\" size=\"80\" value=\"" .htmlspecialchars($row["genre"]). "\">"1); 
in takeedit.php

find

PHP Code:
$dname $row["save_as"]; 
add under it

PHP Code:
$genre$_POST["genre"]; 
find this

PHP Code:
$updateset[] = "ori_descr = " sqlesc($descr); 
and add under this

PHP Code:
$updateset[] = "genre= " sqlesc($genre); 
Then in include/functions.php

find

PHP Code:
<td class="colhead" align="center"><font color=white>Type</font></td>
<td class="colhead" align="left"><a href="browse.php?<? print $oldlink?>sort=1&type=<? print
    
$link1?>"><font color=white>Name</font></a> <font color=white>/</font> <a href="browse.php?<? print $oldlink?>sort=4&type=<? print
$link4?>"><font color=white>Added</font></a></td>
Replace this with

PHP Code:
<td class="colhead" align="center"><font color=#FF0000>Type</font></td>
<td class="colhead" align="left"><a href="browse.php?<? print $oldlink?>sort=1&type=<? print
    
$link1?>"><font color=#FF0000>Name</font></a> <font color=white>/</font> <a href="browse.php?<? print $oldlink?>sort=4&type=<? print
$link4?>"><font color=#FF0000>Added</font></a>&nbsp;&nbsp;&nbsp;<font color=#FF0000><u>Genre</u></font></td>
Then find this

PHP Code:
            $dispname substr($dispname0$max_lenght_of_torrent_name) . "...";
        } else
            
$short_torrent_name_alt "title=\"$dispname\""
And add under this

PHP Code:
if (!empty($row["genre"])) {$genre "" htmlspecialchars($row["genre"]) . "";} 
Then find this

PHP Code:
        if ($added >= $last_browse)
            print (
"\"><b>$dispname $sticky</b></a> <img src=pic/new.png border=0> $thisisfree$double <br>" .
                
str_replace(" ""<br />"$timezone) . "</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double <br>" str_replace(" ",
                
"&nbsp;"$timezone) . "</div>"); 
and Replace this with

PHP Code:
        if ($added >= $last_browse)
            print (
"\"><b>$dispname $sticky</b></a> <img src=pic/new.png border=0> $thisisfree$double <br>" .
                
str_replace(" ""<br />"$timezone) . "<br><font color=#0000FF><b>Genre:&nbsp;</b></font><font color=#00B8F5>$genre&nbsp;</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double <br>" str_replace(" ",
                
"&nbsp;"$timezone) . "<br><font color=#0000FF><b>Genre:&nbsp;</b></font><font color=#00B8F5>$genre&nbsp;</div>"); 

in the end you must have

Click the image to open in full size.
Reply With Quote