Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 18th June 2009, 10:43
mmisu120000's Avatar
mmisu120000 mmisu120000 is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 202
Default [TSSE 5.x] Genre MOD
I'm working now at a Genre MOD for TSSE (my version id 5.4.1, but I think it can be adapted quickly in other 5.x versions).

I can't promise anything, I have very little time, but I;ll give it a try.
The minute it's ready, i'll post it for reviews and comments


Genre Mod v0.1 is ready!
I was inspired by RAW Genre Mod for TBDEV, but in TSSE 5.4.1 is really tricky, so i had to do it from scratch...

here are the files modified (see attachment)
inside archive are: browse.php, upload.php, edit.php, details.php, takeedit.php, takeupload.php and the lang. files necesary


Now, let's get to installation:

First, make one table in the database:

attention

Attention


Remember to backup db and files first!





Code:
ALTER TABLE `torrents` ADD `genre` VARCHAR( 40 ) NOT NULL ;
After that, extract the files from archive, and overwite the existing ones with them (the lang files are in /include/languages/english)

That should be it!

I will to make a step by step installation tutorial for those who are familiar to php, but right now, i'm tired, I worked on that all day ... so I've putted my modified files.




Ok, i think i finished the tutorial ... It's gonna be a HUUUUGE post...

Now, let's get to installation:
First, make one table in the database:
Code:
ALTER TABLE `torrents` ADD `genre` VARCHAR( 40 ) NOT NULL ;
File modifications:
Takeedit.php:


After:
Code:

  function validfilename ($name)
    {
      return preg_match ('/^[^\\0-\\x1f:\\\\\\/?*\\xff#<>|]+$/si', $name);
    }
Insert:
Code:

  function bark ($msg, $redirect = false)
    {
      global $lang;
      global $where;
      if ($redirect)
      {
        $where .= '&msg=' . base64_encode ($msg);
        header ('' . 'Location: ' . $where);
        exit ();
      }
Find:
Code:
$res = sql_query ('SELECT owner, filename, t_image, t_link, added FROM torrents WHERE id = ' . sqlesc ($id));
And modify:
Code:
$res = sql_query ('SELECT owner, filename, genre, t_image, t_link, added FROM torrents WHERE id = ' . sqlesc ($id));
Find:
Code:
 {
        $updateset[] = 'allowcomments = \'no\'';
      }
    }
And add after that:
Code:
$genre = $_POST["genre"];
    if(empty($genre))
      {
                  bark($lang->edit['dicterror8']);
      }
  $genre1 = $_POST["genre1"];    
     if (empty($genre1))
         $genre1 = " ";
      else
                     $genre1 = " / " . $genre1 ; 
  $genre2 = $_POST["genre2"];    
     if (empty($genre2))
         $genre2 = " ";
      else
                     $genre2 = " / " . $genre2 ;
  $genre .= $genre1 . $genre2;
  $updateset[] = 'genre = ' . sqlesc ($genre);
In takeupload.php:
Find:
Code:
 $upload->url = $t_link;
        $upload->valid_link = array ('http://www.imdb.com/title/');
        $upload->file_type = 'imdb';
        $upload->check_url ();
        if (strstr ($t_link, 'imdb'))
        {
          include_once INC_PATH . '/ts_imdb.php';
        }
      }
    }
And add after that:
Code:
$genre = $_POST["genre"];
    if(empty($genre))
                  bark($lang->upload['dicterror8']);
   
  $genre1 = $_POST["genre1"];    
     if (empty($genre1))
         $genre1 = " ";
      else
                     $genre1 = " / " . $genre1 ; 
  $genre2 = $_POST["genre2"];    
     if (empty($genre2))
         $genre2 = " ";
      else
                     $genre2 = " / " . $genre2 ;
  $genre .= $genre1 . $genre2;
Find:
Code:
$ret = sql_query ('INSERT INTO torrents (t_image, t_link, filename, owner, visible, anonymous, free, silver, sticky, offensive, info_hash, name, size, numfiles, descr, category, added, last_action, ' . $q1 . 'nfo' . $sql1 . ') VALUES (' . implode (',', array_map ('sqlesc', array ((!empty ($t_image) ? $t_image : (!empty ($cover_photo_name) ? $BASEURL . '/' . $cover_photo_name : '')), (!empty ($t_link) ? $t_link : ''), $fname, $CURUSER['id'], $visible, $anonymous, $free, $silver, $sticky, $offensive, $infohash, $torrent, $totallen, count ($filelist), $descr, 0 + $_POST['type']))) . ', \'' . get_date_time () . '\', \'' . get_date_time () . '\', ' . $q2 . $nfo . $sql2 . ')');
And replace with:
Code:
 $ret = sql_query ('INSERT INTO torrents (t_image, t_link, filename, genre, owner, visible, anonymous, free, silver, sticky, offensive, info_hash, name, size, numfiles, descr, category, added, last_action, ' . $q1 . 'nfo' . $sql1 . ') VALUES (' . implode (',', array_map ('sqlesc', array ((!empty ($t_image) ? $t_image : (!empty ($cover_photo_name) ? $BASEURL . '/' . $cover_photo_name : '')), (!empty ($t_link) ? $t_link : ''), $fname, $genre, $CURUSER['id'], $visible, $anonymous, $free, $silver, $sticky, $offensive, $infohash, $torrent, $totallen, count ($filelist), $descr, 0 + $_POST['type']))) . ', \'' . get_date_time () . '\', \'' . get_date_time () . '\', ' . $q2 . $nfo . $sql2 . ')');
Find
Code:
<td align="left">'.$showwait.'<a name="#showtorrent'.$torrents['id'].'"></a>&nbsp;'.$name_torrent.'<br />'.'"genre'.$isScene.'</td>
And replace with:
Code:
<td align="left">'.$showwait.'<a name="#showtorrent'.$torrents['id'].'"></a>&nbsp;'.$name_torrent.'<br />'.'&nbsp; <font color="red"> Genre: </b>'.$genre.'</font>'.$isScene.'</td>
Find:
Code:
$torrents['name'] = htmlspecialchars_uni($torrents['name']);
And add after that:
Code:
$torrents['genre'] = htmlspecialchars_uni($torrents['genre']);
  $genre = $torrents['genre'];
Find:
Code:
$torrent_download_link = (!$is_bookmark_page ? '<a href="'.$seolink3.'" title="'.$downloadinfo.'" alt="'.$downloadinfo.'" /><img src="'.$BASEURL.'/'.$pic_base_url.'dl.gif"></a>' : '<a href="'.$BASEURL.'/bookmarks.php?torrentid='.$torrents['id'].'&amp;action=delete" title="" alt="" /><img src="'.$BASEURL.'/'.$pic_base_url.'delete.gif"></a>');
And add after that:
Code:
$genre = $torrents['genre'];
Find:
Code:
$query = sql_query("SELECT ".($torrentspeed == 'yes' ? '(t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(t.added)) AS totalspeed,' : '')." t.*, c.id as categoryid, c.image, c.name as categoryname, u.username, g.namestyle {$from} LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) ".($torrentspeed == 'yes' ? 'LEFT JOIN peers p ON (t.id=p.torrent)' : '')." WHERE ".($showvisible ? "t.visible = 'yes' AND " : "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries : '')." {$groupby}{$orderbyvalue} $limit") or sqlerr(__FILE__,__LINE__);
And replace with:
Code:
$query = sql_query("SELECT ".($torrentspeed == 'yes' ? '(t.genre, t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(t.added)) AS totalspeed,' : '')." t.*, c.id as categoryid, c.image, c.name as categoryname, u.username, g.namestyle {$from} LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) ".($torrentspeed == 'yes' ? 'LEFT JOIN peers p ON (t.id=p.torrent)' : '')." WHERE ".($showvisible ? "t.visible = 'yes' AND " : "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries : '')." {$groupby}{$orderbyvalue} $limit") or sqlerr(__FILE__,__LINE__);
In upload.php:
Find:
Code:
$postoptions = array(
                                  '1'                            =>'<input type="text" name="trackerurl" id="specialboxg" size="70" value="'.($_GET['trackerurl'] ? htmlspecialchars_uni(base64_decode($_GET['trackerurl'])) : $alink).'"'.$enabledisable.'>'.$info.'',
                                  '2'                            =>           '<input type="file" name="file" id="specialboxn" size="70">',
                                  '3'                            =>           '<input type="file" name="nfo" id="specialboxn" size="70"><br />'.$lang->upload['field5'],
                                  '4'                            =>'
                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : $lang->upload['field23']).'" onfocus="focusfield(this)">
                                  </div>
                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : '').'><br />
                                  </div>
                                  '.$lang->upload['atypes'],
                                  '5'                            =>'<input type="text" name="t_link" id="specialboxg" size="70" value="'.($_GET['t_link'] ? htmlspecialchars_uni(base64_decode($_GET['t_link'])) : '').'">',
                                  '6'                            =>           $showcategories,
                                  '7'                            =>           '<input type="checkbox" name="nforip" value="yes" onClick="check_click2()"'.($_GET['nforip'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field20'],
                                  '8'                            =>           $offer,
                                  '9'                            =>           '<input type="checkbox" name="uplver" value="yes"'.($_GET['uplver'] == 'yes' ? ' checked="checked"' : (preg_match('#I3#is', $CURUSER['options']) || preg_match('#I4#is', $CURUSER['options']) ? ' checked="checked"' : '')).'> '.$lang->upload['field12'],
                                  '10'                         =>           $fb,
                                  '11'         =>$rb,
                                  '12'         =>           $sb,
                                  '13'         =>           '<input type="checkbox" name="offensive" value="yes"'.($_GET['offensive'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field16'],
                                  '14'         =>           '<input type="checkbox" name="scene" value="yes"'.($_GET['scene'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['scene2']
And replace with:
Code:
$postoptions = array(
                                  '1'                            =>'<input type="text" name="trackerurl" id="specialboxg" size="70" value="'.($_GET['trackerurl'] ? htmlspecialchars_uni(base64_decode($_GET['trackerurl'])) : $alink).'"'.$enabledisable.'>'.$info.'',
                                  '2'                            =>           '<input type="file" name="file" id="specialboxn" size="70">',
                                  '3'                            =>           '<input type="file" name="nfo" id="specialboxn" size="70"><br />'.$lang->upload['field5'],
                                  '4'                            =>'
                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : $lang->upload['field23']).'" onfocus="focusfield(this)">
                                  </div>
                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : '').'><br />
                                  </div>
                                  '.$lang->upload['atypes'],
                                  '5'                            =>'<input type="text" name="t_link" id="specialboxg" size="70" value="'.($_GET['t_link'] ? htmlspecialchars_uni(base64_decode($_GET['t_link'])) : '').'">',
                                  '6'                            =>           $showcategories,
                                  '7'                            =>           $genre,
                                  '8'                            =>           '<input type="checkbox" name="nforip" value="yes" onClick="check_click2()"'.($_GET['nforip'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field20'],
                                  '9'                            =>           $offer,
                                  '10'                         =>           '<input type="checkbox" name="uplver" value="yes"'.($_GET['uplver'] == 'yes' ? ' checked="checked"' : (preg_match('#I3#is', $CURUSER['options']) || preg_match('#I4#is', $CURUSER['options']) ? ' checked="checked"' : '')).'> '.$lang->upload['field12'],
                                  '11'                         =>           $fb,
                                  '12'         =>$rb,
                                  '13'         =>           $sb,
                                  '14'         =>           '<input type="checkbox" name="offensive" value="yes"'.($_GET['offensive'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field16'],
                                  '15'         =>           '<input type="checkbox" name="scene" value="yes"'.($_GET['scene'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['scene2']
Find:
Code:
require_once(INC_PATH.'/functions_category.php');
                  $showcategories = ts_category_list('type',intval($_GET['type']));
And add after that:
Code:
$genre = '<select name=genre> . <option value=0>Select genre</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" . 
   "<option value=Linux>Linux</option>\n" .
    </select>   <= REQUIRED!    
    
   <select name=genre1> . <option value=0>Select genre 1</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" . 
   "<option value=Linux>Linux</option>\n" .
    "</select> /
   
   <select name=genre2>\n <option value=0>Select genre 2</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" .
   "<option value=Linux>Linux</option>\n" .
     "</select> <=   (optional)';
(you can edit those line according your needs…)

Find:
Code:
$postoptionstitle = array(
                                  '1'                            => $lang->upload['field0'],
                                  '2'                            =>           $lang->upload['field1'],
                                  '3'                            =>           $lang->upload['field4'],
                                  '4'                            =>           $lang->upload['field21'],
                                  '5'                            =>           $lang->upload['field22'],
                                  '6'                            =>           $lang->upload['field8'],
                                  '7'                            =>           $lang->upload['field19'],
                                  '8'                            =>           $o,
                                  '9'                            =>           $lang->upload['anonymous'],
                                  '10'         =>           $fa,
                                  '11'         =>$ra,
                                  '12'         =>           $sa,
                                  '13'         =>           $lang->upload['field15'],
                                  '14'         => $lang->upload['scene'],
And modify to:
Code:
$postoptionstitle = array(
                                  '1'                            =>  $lang->upload['field0'],
                                  '2'                            =>           $lang->upload['field1'],
                                  '3'                            =>           $lang->upload['field4'],
                                  '4'                            =>           $lang->upload['field21'],
                                  '5'                            =>           $lang->upload['field22'],
                                  '6'                            =>           $lang->upload['field8'],
                                  '7'                            =>  $lang->upload['genre'],
                                  '8'                            =>           $lang->upload['field19'],
                                  '9'                            =>           $o,
                                  '10'         =>           $lang->upload['anonymous'],
                                  '11'         =>           $fa,
                                  '12'         =>  $ra,
                                  '13'         =>           $sa,
                                  '14'         =>           $lang->upload['field15'],
                                  '15'         =>  $lang->upload['scene'],
Find:
Code:
$postoptions = array(
                                  '1'                            =>'<input type="text" name="trackerurl" id="specialboxg" size="70" value="'.($_GET['trackerurl'] ? htmlspecialchars_uni(base64_decode($_GET['trackerurl'])) : $alink).'"'.$enabledisable.'>'.$info.'',
                                  '2'                            =>           '<input type="file" name="file" id="specialboxn" size="70">',
                                  '3'                            =>           '<input type="file" name="nfo" id="specialboxn" size="70"><br />'.$lang->upload['field5'],
                                  '4'                            =>'
                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : $lang->upload['field23']).'" onfocus="focusfield(this)">
                                  </div>
                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : '').'><br />
                                  </div>
                                  '.$lang->upload['atypes'],
                                  '5'                            =>'<input type="text" name="t_link" id="specialboxg" size="70" value="'.($_GET['t_link'] ? htmlspecialchars_uni(base64_decode($_GET['t_link'])) : '').'">',
                                  '6'                            =>           $showcategories,
                                  '7'                            =>           '<input type="checkbox" name="nforip" value="yes" onClick="check_click2()"'.($_GET['nforip'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field20'],
                                  '8'                            =>           $offer,
                                  '9'                            =>           '<input type="checkbox" name="uplver" value="yes"'.($_GET['uplver'] == 'yes' ? ' checked="checked"' : (preg_match('#I3#is', $CURUSER['options']) || preg_match('#I4#is', $CURUSER['options']) ? ' checked="checked"' : '')).'> '.$lang->upload['field12'],
                                  '10'                         =>           $fb,
                                  '11'         =>$rb,
                                  '12'         =>           $sb,
                                  '13'         =>           '<input type="checkbox" name="offensive" value="yes"'.($_GET['offensive'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field16'],
                                  '14'         =>           '<input type="checkbox" name="scene" value="yes"'.($_GET['scene'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['scene2']
And replace to:
Code:
$postoptions = array(
                                  '1'                            =>'<input type="text" name="trackerurl" id="specialboxg" size="70" value="'.($_GET['trackerurl'] ? htmlspecialchars_uni(base64_decode($_GET['trackerurl'])) : $alink).'"'.$enabledisable.'>'.$info.'',
                                  '2'                            =>           '<input type="file" name="file" id="specialboxn" size="70">',
                                  '3'                            =>           '<input type="file" name="nfo" id="specialboxn" size="70"><br />'.$lang->upload['field5'],
                                  '4'                            =>'
                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : $lang->upload['field23']).'" onfocus="focusfield(this)">
                                  </div>
                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"'.($_GET['t_image_url'] ? htmlspecialchars_uni(base64_decode($_GET['t_image_url'])) : '').'><br />
                                  </div>
                                  '.$lang->upload['atypes'],
                                  '5'                            =>'<input type="text" name="t_link" id="specialboxg" size="70" value="'.($_GET['t_link'] ? htmlspecialchars_uni(base64_decode($_GET['t_link'])) : '').'">',
                                  '6'                            =>           $showcategories,
                                  '7'                            =>           $genre,
                                  '8'                            =>           '<input type="checkbox" name="nforip" value="yes" onClick="check_click2()"'.($_GET['nforip'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field20'],
                                  '9'                            =>           $offer,
                                  '10'                         =>           '<input type="checkbox" name="uplver" value="yes"'.($_GET['uplver'] == 'yes' ? ' checked="checked"' : (preg_match('#I3#is', $CURUSER['options']) || preg_match('#I4#is', $CURUSER['options']) ? ' checked="checked"' : '')).'> '.$lang->upload['field12'],
                                  '11'                         =>           $fb,
                                  '12'         =>$rb,
                                  '13'         =>           $sb,
                                  '14'         =>           '<input type="checkbox" name="offensive" value="yes"'.($_GET['offensive'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['field16'],
                                  '15'         =>           '<input type="checkbox" name="scene" value="yes"'.($_GET['scene'] == 'yes' ? ' checked="checked"' : '').'> '.$lang->upload['scene2']
In edit.php:

Find:
Code:
$postoptionstitle = array ('1' => $lang->edit['torrentname'], '2' => $lang->edit['nfofile'], '3' => $lang->upload['field21'], '4' => $lang->upload['field22'], '5' => $lang->edit['type'], '6' => $lang->edit['visible'], '7' => $lang->edit['au'], '8' => $fa, '9' => $ra, '10' => $ba, '11' => $sa, '12' => $lang->edit['offensive'], '13' => $na, '14' => $za, '15' => $da, '16' => $ca, '17' => $lang->upload['scene'], '18' => $lang->upload['finfo']);
And modify to:
Code:
$postoptionstitle = array ('1' => $lang->edit['torrentname'], '2' => $lang->edit['nfofile'], '3' => $lang->upload['field21'], '4' => $lang->upload['field22'], '5' => $lang->edit['type'], '6' => $lang->edit['genre'], '7' => $lang->edit['visible'], '8' => $lang->edit['au'], '9' => $fa, '10' => $ra, '11' => $ba, '12' => $sa, '13' => $lang->edit['offensive'], '14' => $na, '15' => $za, '16' => $da, '17' => $ca, '18' => $lang->upload['scene'], '18' => $lang->upload['finfo']);
Find:
Code:
<b>Allowed file types: Jpg, Gif, Png</b>', '4' => '<input type="text" name="t_link" id="specialboxg" size="70" value="' . htmlspecialchars_uni ($row['t_link']) . '"> ' . (!empty ($row['t_link']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_link=true">X</a></b>]' : '') . '', '5' => $s, '6' => '<input type="checkbox" name="visible"' . ($row['visible'] == 'yes' ? ' checked="checked"' : '') . ' value="1"> ' . $lang->edit['visible2'], '7' => '<input type="checkbox" name="anonymous"' . ($row['anonymous'] == 'yes' ? ' checked="checked"' : '') . ' value="1">  ' . $lang->edit['au2'], '8' => $fb, '9' => $rb, '10' => $bb, '11' => $sb, '12' => '<input type="checkbox" name="offensive"' . ($row['offensive'] == 'yes' ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->edit['offensive2'], '13' => $nb, '14' => $zb, '15' => $db, '16' => $cb, '17' => '<input type="checkbox" name="scene"' . (0 < $row['isScene'] ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->upload['scene2'], '18' => '<table width="85%" border="0" cellpadding="2" cellspacing="2">
And modify to:
Code:
<b>Allowed file types: Jpg, Gif, Png</b>', '4' => '<input type="text" name="t_link" id="specialboxg" size="70" value="' . htmlspecialchars_uni ($row['t_link']) . '"> ' . (!empty ($row['t_link']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_link=true">X</a></b>]' : '') . '', '5' => $s, '6' => $genre, '7' => '<input type="checkbox" name="visible"' . ($row['visible'] == 'yes' ? ' checked="checked"' : '') . ' value="1"> ' . $lang->edit['visible2'], '8' => '<input type="checkbox" name="anonymous"' . ($row['anonymous'] == 'yes' ? ' checked="checked"' : '') . ' value="1">  ' . $lang->edit['au2'], '9' => $fb, '10' => $rb, '11' => $bb, '12' => $sb, '13' => '<input type="checkbox" name="offensive"' . ($row['offensive'] == 'yes' ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->edit['offensive2'], '14' => $nb, '15' => $zb, '16' => $db, '17' => $cb, '18' => '<input type="checkbox" name="scene"' . (0 < $row['isScene'] ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->upload['scene2'], '19' => '<table width="85%" border="0" cellpadding="2" cellspacing="2">
Find:
Code:
$postoptions = array ('1' => '
                                                  <input type="text" size="60" name="filename" value="' . htmlspecialchars ($row['filename']) . '"' . (!$is_mod ? ' disabled="disabled"' : '') . '>
                                                  ', '2' => '
                                                  <input type="radio" name="nfoaction" value="keep" checked="checked">' . $lang->edit['keepcurrent'] . '<br />
                                                  <input type="radio" name="nfoaction" value="update">' . $lang->edit['update'] . '<br />
                                                  <input type="file" name="nfo" size="60">', '3' => '
                                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="' . (!empty ($row['t_image']) ? unhtmlspecialchars ($row['t_image']) : $lang->upload['field23']) . '" onfocus="focusfield(this)"> ' . (!empty ($row['t_image']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_image=true">X</a></b>]' : '') . '
                                                  </div>
                                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"><br />
                                                  </div>
                                                  <b>Allowed file types: Jpg, Gif, Png</b>', '4' => '<input type="text" name="t_link" id="specialboxg" size="70" value="' . htmlspecialchars_uni ($row['t_link']) . '"> ' . (!empty ($row['t_link']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_link=true">X</a></b>]' : '') . '', '5' => $s, '6' => '<input type="checkbox" name="visible"' . ($row['visible'] == 'yes' ? ' checked="checked"' : '') . ' value="1"> ' . $lang->edit['visible2'], '7' => '<input type="checkbox" name="anonymous"' . ($row['anonymous'] == 'yes' ? ' checked="checked"' : '') . ' value="1">  ' . $lang->edit['au2'], '8' => $fb, '9' => $rb, '10' => $bb, '11' => $sb, '12' => '<input type="checkbox" name="offensive"' . ($row['offensive'] == 'yes' ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->edit['offensive2'], '13' => $nb, '14' => $zb, '15' => $db, '16' => $cb, '17' => '<input type="checkbox" name="scene"' . (0 < $row['isScene'] ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->upload['scene2'], '18' => '<table width="85%" border="0" cellpadding="2" cellspacing="2">
And modify to:
Code:
$postoptionstitle = array ('1' => $lang->edit['torrentname'], '2' => $lang->edit['nfofile'], '3' => $lang->upload['field21'], '4' => $lang->upload['field22'], '5' => $lang->edit['type'], '6' => $lang->edit['genre'], '7' => $lang->edit['visible'], '8' => $lang->edit['au'], '9' => $fa, '10' => $ra, '11' => $ba, '12' => $sa, '13' => $lang->edit['offensive'], '14' => $na, '15' => $za, '16' => $da, '17' => $ca, '18' => $lang->upload['scene'], '18' => $lang->upload['finfo']);
    $query = sql_query ('SELECT video_info, audio_info FROM ts_torrents_details WHERE tid = ' . sqlesc ($id));
    if (0 < mysql_num_rows ($query))
    {
      $Torrent_Details = mysql_fetch_assoc ($query);
      $video_info = @explode ('~', $Torrent_Details['video_info']);
      $audio_info = @explode ('~', $Torrent_Details['audio_info']);
    }
   
    $postoptions = array ('1' => '
                                                  <input type="text" size="60" name="filename" value="' . htmlspecialchars ($row['filename']) . '"' . (!$is_mod ? ' disabled="disabled"' : '') . '>
                                                  ', '2' => '
                                                  <input type="radio" name="nfoaction" value="keep" checked="checked">' . $lang->edit['keepcurrent'] . '<br />
                                                  <input type="radio" name="nfoaction" value="update">' . $lang->edit['update'] . '<br />
                                                  <input type="file" name="nfo" size="60">', '3' => '
                                                  <div id="upurl">
                                                  <input type="text" name="t_image_url" size="70" id="specialboxg" value="' . (!empty ($row['t_image']) ? unhtmlspecialchars ($row['t_image']) : $lang->upload['field23']) . '" onfocus="focusfield(this)"> ' . (!empty ($row['t_image']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_image=true">X</a></b>]' : '') . '
                                                  </div>
                                                  <div id="upfile" style="display: none">
                                                  <input type="file" name="t_image_file" size="70" id="specialboxg"><br />
                                                  </div>
                                                  <b>Allowed file types: Jpg, Gif, Png</b>', '4' => '<input type="text" name="t_link" id="specialboxg" size="70" value="' . htmlspecialchars_uni ($row['t_link']) . '"> ' . (!empty ($row['t_link']) ? '[<b><a href="' . $BASEURL . '/takeedit.php?id=' . $id . '&remove_link=true">X</a></b>]' : '') . '', '5' => $s, '6' => $genre, '7' => '<input type="checkbox" name="visible"' . ($row['visible'] == 'yes' ? ' checked="checked"' : '') . ' value="1"> ' . $lang->edit['visible2'], '8' => '<input type="checkbox" name="anonymous"' . ($row['anonymous'] == 'yes' ? ' checked="checked"' : '') . ' value="1">  ' . $lang->edit['au2'], '9' => $fb, '10' => $rb, '11' => $bb, '12' => $sb, '13' => '<input type="checkbox" name="offensive"' . ($row['offensive'] == 'yes' ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->edit['offensive2'], '14' => $nb, '15' => $zb, '16' => $db, '17' => $cb, '18' => '<input type="checkbox" name="scene"' . (0 < $row['isScene'] ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->upload['scene2'], '19' => '<table width="85%" border="0" cellpadding="2" cellspacing="2">
Find:
Code:
$res = sql_query ('SELECT filename,owner,name,descr,category,visible,anonymous,free,silver,banned,sticky,offensive,t_image,t_link,isnuked,isrequest,doubleupload,allowcomments,isScene FROM torrents WHERE id = ' . sqlesc ($id));
And modify to:
Code:
$res = sql_query ('SELECT filename,owner,name,descr,category,genre,visible,anonymous,free,silver,banned,sticky,offensive,t_image,t_link,isnuked,isrequest,doubleupload,allowcomments,isScene FROM torrents WHERE id = ' . sqlesc ($id));
Find:
Code:
$cb = '<input type="checkbox" name="allowcomments"' . ($row['allowcomments'] == 'yes' ? ' checked="checked"' : '') . ' value="yes"> ' . $lang->edit['cb'];
    }
And add after that:
Code:
$genre = '<select name=genre> . <option value=0>Select genre</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" . 
   "<option value=Linux>Linux</option>\n" .
    </select>   <= REQUIRED!    
    
   <select name=genre1> . <option value=0>Select genre 1</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" . 
   "<option value=Linux>Linux</option>\n" .
    "</select> /
   
   <select name=genre2>\n <option value=0>Select genre 2</option>\n .
   "<option value=Action>Action</option>\n" .
   "<option value=Adventure>Adventure</option>\n" .
   "<option value=Anime>Anime</option>\n" .
   "<option value=Comedy>Comedy</option>\n" .
   "<option value=Fantasy>Fantasy</option>\n" .
   "<option value=Thriller>Thriller</option>\n" .
   "<option value=Horror>Horror</option>\n" .
   "<option value=Crime>Crime</option>\n" .
   "<option value=SciFi>SciFi</option>\n" .
   "<option value=War>War</option>\n" .
   "<option value=Romance>Romance</option>\n" .
   "<option value=Musical>Musical</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Drama>Drama</option>\n" .
   "<option value=Reality-TV>Reality-TV</option>\n" .
   "<option value=Documentary>Documentary</option>\n" .
   "<option value=XXX>XXX</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Strategy>Strategy</option>\n" .
   "<option value=Shooter>Shooter</option>\n" .
   "<option value=RPG>RPG</option>\n" .
   "<option value=Sports>Sports</option>\n" .
   "<option value=Cars>Cars</option>\n" .
   "<option value=Simulator>Simulator</option>\n" .
   "<option value=Oldies but Goldies>Oldies but Goldies</option>\n" .
   "<option value=PS2>PS2</option>\n" .
   "<option value=PSP>PSP</option>\n" .
   "<option value=Nintendo>Nintendo</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Rock>Rock</option>\n" .
   "<option value=Metal>Metal</option>\n" .
   "<option value=Disco>Disco</option>\n" .
   "<option value=Dance>Dance</option>\n" .
   "<option value=Pop>Pop</option>\n" .
   "<option value=Electro>Electro</option>\n" .
   "<option value=House>House</option>\n" .
   "<option value=Rap>Rap</option>\n" .
   "<option value=Tehno>Tehno</option>\n" .
    "<option value=Trance>Trance</option>\n" .
   "<option value=Lo-Fi>Lo-Fi</option>\n" .
   "<option value=Blues>Blues</option>\n" .
   "<option value=Ambient>Ambient</option>\n" .
   "<option value=Reggae>Reggae</option>\n" .
   "<option value=Accoustic>Accoustic</option>\n" .
   "<option value=Jazz>Jazz</option>\n" .
   "<option value=Ethno>Ethno</option>\n" .
   "<option value=Classic>Classic</option>\n" .
   "<option value=Misc.>Misc.</option>\n" .
   "<option value=....>....</option>\n" .
   
   "<option value=Document>Document</option>\n" .
   "<option value=Software>Software</option>\n" .
   "<option value=AntiVirus>Antivirus</option>\n" .
   "<option value=Tools>Tools</option>\n" .
   "<option value=CD-DVD Burning>CD-DVD Burning</option>\n" .
   "<option value=Graphics>Graphics</option>\n" .
   "<option value=Windows>Windows</option>\n" .
   "<option value=Linux>Linux</option>\n" .
     "</select> <=   (optional)';
In details.php:
Find:
Code:
<tr>
                                  <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'.$lang->details['type'].'</td>
                                  <td valign="top" style="padding-left: 5px;">'.$torrent['categoryname'].'</td>
                  </tr>
And add after that:
Code:
<tr>
                  <td style="padding-left: 5px;" class="subheader" valign="top" width="147">'.$lang->details['genre'].'</td>
                  <td valign="top" style="padding-left: 5px;">'.$torrent['genre'].'</td>
  </tr>
Find:
Code:
$query = sql_query('SELECT t.name, t.allowcomments, t.banned, t.descr, t.category, t.size, t.numfiles, LENGTH(t.nfo) AS nfosz, t.anonymous, t.added, t.comments, t.hits, t.times_completed, t.leechers, t.seeders, t.owner, t.free, t.sticky, t.offensive, t.silver, t.t_image, t.t_link, t.isnuked, t.WhyNuked, t.isrequest, t.ts_external, t.doubleupload, t.isScene, c.name as categoryname, c.vip, c.pid, c.type, c.id as categoryid, d.video_info, d.audio_info, u.username, u.donor, u.warned, u.leechwarn, g.namestyle FROM torrents t LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN ts_torrents_details d ON (t.id=d.tid) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.id = '.sqlesc($id)) or sqlerr(__FILE__,__LINE__);
And modify to:
Code:
$query = sql_query('SELECT t.name, t.genre, t.allowcomments, t.banned, t.descr, t.category, t.size, t.numfiles, LENGTH(t.nfo) AS nfosz, t.anonymous, t.added, t.comments, t.hits, t.times_completed, t.leechers, t.seeders, t.owner, t.free, t.sticky, t.offensive, t.silver, t.t_image, t.t_link, t.isnuked, t.WhyNuked, t.isrequest, t.ts_external, t.doubleupload, t.isScene, c.name as categoryname, c.vip, c.pid, c.type, c.id as categoryid, d.video_info, d.audio_info, u.username, u.donor, u.warned, u.leechwarn, g.namestyle FROM torrents t LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN ts_torrents_details d ON (t.id=d.tid) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE t.id = '.sqlesc($id)) or sqlerr(__FILE__,__LINE__);
Now, the lang files:
In /include/languages/english/upload.lang.php:
Add this line:
Code:
'dicterror8'                                          =>'You must enter at least a genre!',
In /include/languages/english/edit.lang.php:
Add this line:
Code:
'dicterror8'                                          =>'You must enter at least a genre!',
In /include/languages/english/details.lang.php:
Add this line:
Code:
'genre'                                                                                  =>'Genre',
And that should be it!
If I forgot something, just tell me and I’ll try to compare the original files with mine, and I’ll post the correction.
Good luck!
Attached Files
File Type: rar genre_mod.rar (43.8 KB, 195 views)

Last edited by mmisu120000; 18th June 2009 at 22:27.
Reply With Quote
The Following 7 Users Say Thank You to mmisu120000 For This Useful Post:
diskotrisko (20th June 2009), DrNet (21st June 2009), Fynnon (6th August 2011), Marco (21st August 2013), mdxpro (6th June 2012), systemilc (30th May 2011), wellqfk (20th December 2011)
  #2  
Old 20th June 2009, 12:17
Muikku Muikku is offline
Senior Member
 
Join Date: Aug 2008
Posts: 68
Default
Is that packed all ready to fix? or must i do that all change in that php file? or can i upload that packed files my tracker and owerwrite old php files and put that sql in my database and then all works whit genre mod?

Thanx nice mod anyway :)
Reply With Quote
  #3  
Old 21st June 2009, 00:19
mmisu120000's Avatar
mmisu120000 mmisu120000 is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 202
Default
the modified files are in the pack ... the step by step tutorial is for those who want to make more modifications
Reply With Quote
  #4  
Old 21st June 2009, 02:01
Ashur's Avatar
Ashur Ashur is offline
Senior Member
 
Join Date: Jun 2008
Posts: 523
Default
cool so is this genre mod global to all categories or can you specify which category to have it?

i.e. for anime, films, series --> have similar genre
but for music & music videos --> different type of genre
and for application --> no need

looking great so far :D
__________________
Say NO to private tracking
Running TorrentHoster 2.5 on IraqiGate.org
Reply With Quote
  #5  
Old 21st June 2009, 10:08
Muikku Muikku is offline
Senior Member
 
Join Date: Aug 2008
Posts: 68
Default
Quote:
Originally Posted by mmisu120000 View Post
the modified files are in the pack ... the step by step tutorial is for those who want to make more modifications
ok nice

but now i have one proplem i think that sql table is not working
can yoy make workking database sql table and post it here?
Reply With Quote
  #6  
Old 21st June 2009, 10:44
mmisu120000's Avatar
mmisu120000 mmisu120000 is offline
Senior Member
 
Join Date: Jun 2009
P2P
Posts: 202
Default
Quote:
Originally Posted by Ashur View Post
cool so is this genre mod global to all categories or can you specify which category to have it?

i.e. for anime, films, series --> have similar genre
but for music & music videos --> different type of genre
and for application --> no need

looking great so far :D
it's global, but you can edit the genres in those 2 files ...
there is 1 minimum genre mandatory, the other 2 are optional ... This way you don't add more load to your tracker.
There is an other way, mysql based, i'll make an other version, in wich you can edit your genres in admin panel ... but that's more difficult and tricky ... I'll see what I can do ...
Reply With Quote
  #7  
Old 21st June 2009, 16:37
Ashur's Avatar
Ashur Ashur is offline
Senior Member
 
Join Date: Jun 2008
Posts: 523
Default
files are better :)
they're just options so there is no real need to be stored in sql so less pull on sql
i think if we switch many useless options of TS to file system we might able to save tons of CPU load on servers
__________________
Say NO to private tracking
Running TorrentHoster 2.5 on IraqiGate.org
Reply With Quote
  #8  
Old 30th December 2009, 21:03
Muikku Muikku is offline
Senior Member
 
Join Date: Aug 2008
Posts: 68
Default
can someone fix this genremod becouse only staff can edit torrent and put genre back user canīt but genre if they edit own torrentīs

Last edited by Muikku; 16th October 2010 at 18:46.
Reply With Quote
  #9  
Old 20th January 2011, 10:05
turktiger turktiger is offline
Senior Member
 
Join Date: Jan 2011
Turkey
Posts: 20
Default
what is genre mod , u re only writing smtg and no information ??


images re dead :S
Reply With Quote
  #10  
Old 9th February 2011, 17:29
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default
it's something like torrentleech even if the torrent is in the category (divx) they also have a genre (comedy,drama,horror, romance ....) with this mod will shown on your tracker what kind of category is the movie


very nice mod :)
Reply With Quote
The Following User Says Thank You to Marco For This Useful Post:
turktiger (7th June 2011)
Reply

Tags
5x , genre , mod , tsse

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
TSSE v5.4.1 - Genre Mod Edition mmisu120000 Template Shares 156 18th January 2017 23:12
TSSE v5.4.1 - Genre Mod Edition dean winchester Template Shares 4 2nd January 2010 23:38
[FTS 1.1] Genre mod Edgein Mods & Themes 3 16th December 2009 22:18
Genre mod fix saggy00 Template Shares 0 16th September 2009 19:19
TSSE v5.4.1 Genre Mod Edition (RADIO MOD REQUEST) deanguk Template Shares 2 1st September 2009 17:49



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