Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=113)
-   -   [FTS 1.1] Genre mod (http://www.bvlist.com/showthread.php?t=3955)

Edgein 8th December 2009 12:51

[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\"/>(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 " .
                
str_replace(" """$timezone) . "</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double " 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 " .
                
str_replace(" """$timezone) . "<font color=#0000FF><b>Genre:&nbsp;</b></font><font color=#00B8F5>$genre&nbsp;</div>");
        else
            print (
"\"><b>$dispname $sticky</b></a> $thisisfree$double " str_replace(" ",
                
"&nbsp;"$timezone) . "<font color=#0000FF><b>Genre:&nbsp;</b></font><font color=#00B8F5>$genre&nbsp;</div>"); 


in the end you must have

http://www.edgein.org/genre.jpg

yoligim 14th December 2009 19:38

Well, I don,t know what's wrong although in the browse.php appear genres, there is no ages down, I mean I,ve taken a look at your site Edgein and you have the ages below the genres....
Could you help me, please?
thanks in advance

Edgein 16th December 2009 19:47

the age is a other mod

yoligim 16th December 2009 22:18

I would appreciate if you can tell me where I can find the age mod, Edgein,

I,ve noticed you have the age mod here http://bvlist.com/tracker-mods/1890-...age-limit.html

and I,ve followed all your instructions you posted there, but I can,t see the ages yet...any ideas?

thanks in advance

Bump: thanks Edgein, now works:drink:


All times are GMT +2. The time now is 11:52.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.