Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Free Torrent Source > Mods & Themes
Reply
  #1  
Old 27th January 2009, 21:56
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile Torrent age limit
In the Netherlands we have a look indicator oftewel a look recommendation for children so that they know also where they will look at to


first the sql

Code:
ALTER TABLE `torrents` ADD `age` VARCHAR( 40 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'all.gif'
in edit.php add where you like

PHP Code:
        tr("Age","<input type=radio name=age value=all>all
                <input type=radio name=age value=6>6
                <input type=radio name=age value=12>12
                <input type=radio name=age value=16>16
                <input type=radio name=age value=angst>angst
                <input type=radio name=age value=dis>discriminatie
                <input type=radio name=age value=drugs>drugs
                <input type=radio name=age value=geweld>geweld
                <input type=radio name=age value=grof>grof
                <input type=radio name=age value=sex>sex
                <br><font class=small size=1>Please select the apropiate!</font>"
,1); 
in takeedit.php after

PHP Code:
if ($_POST["sticky"] == "yes")
      
$updateset[] = "sticky = 'yes'";
   else
      
$updateset[] = "sticky = 'no'"
add

PHP Code:
if (!empty($_POST['age']))
$age unesc($_POST['age']); 
above

PHP Code:
$updateset[] = "anonymous = '" . ($_POST["anonymous"] ? "yes" "no") . "'"
add

PHP Code:
$updateset[] = "age = " sqlesc($age); 
in details.php in the msql query after torrents.save_as,

add

PHP Code:
torrents.age
Find in details

PHP Code:
tr("Info hash"preg_replace_callback('/./s'"hex_esc"hash_pad($row["info_hash"])));
$descrip $row["descr"];
if(!empty(
$row['imageurl']))
$descrip "[img]$row[imageurl][/img]\n".$descrip
and add after

PHP Code:
if ($row["age"] == "all")
tr("Age""<img src=/age/all.gif>"1);
if (
$row["age"] == "6")
tr("Age""<img src=/age/6.gif>"1);
if (
$row["age"] == "12")
tr("Age""<img src=/age/12.gif>"1);
if (
$row["age"] == "16")
tr("Age""<img src=/age/16.gif>"1);
if (
$row["age"] == "angst")
tr("Age""<img src=/age/angst.gif>"1);
if (
$row["age"] == "dis")
tr("Age""<img src=/age/dis.gif>"1);
if (
$row["age"] == "drugs")
tr("Age""<img src=/age/drugs.gif>"1);
if (
$row["age"] == "geweld")
tr("Age""<img src=/age/geweld.gif>"1);
if (
$row["age"] == "grof")
tr("Age""<img src=/age/grof.gif>"1);
if (
$row["age"] == "sex")
tr("Age""<img src=/age/sex.gif>"1); 
in browse.php
in the big query ADD torrents.age,
so looks like

PHP Code:
    $query "SELECT torrents.id, torrents.free, torrents.sticky, torrents.category, torrents.age, 
in functions.php in the function torrenttable
after

PHP Code:
<td class="colhead" align="center"><font color=#3D3D3D>Category</font></td> 
add

PHP Code:
<td class="colhead" align="center">Age</td
after

PHP Code:
        $id $row["id"];
        print (
"<tr>\n");
        print (
"<td align=center width=16 height=16 style='padding: 0px'>");
        if (isset(
$row["cat_name"])) {
            print (
"<a href=\"browse.php?cat=" $row["category"] . "\">");
            if (isset(
$row["cat_pic"]) && $row["cat_pic"] != "")
                print (
"<img border=\"0\" src=\"$pic_base_url$row["cat_pic"] . "\" alt=\"" .
                    
$row["cat_name"] . "\" />");
            else
                print (
$row["cat_name"]);
            print (
"</a>");
        } else
            print (
"-");
        print (
"</td>\n"); 
add

PHP Code:
if ($row["age"] == "all")
     
$d "<img src=/age/all.gif>";
  else if (
$row["age"] == "6")
     
$d "<img src=/age/6.gif>";
  else if (
$row["age"] == "12")
     
$d "<img src=/age/12.gif>";
  else if (
$row["age"] == "16")
     
$d "<img src=/age/16.gif>";
  else if (
$row["age"] == "angst")
     
$d "<img src=/age/angst.gif>";
  else if (
$row["age"] == "dis")
     
$d "<img src=/age/dis.gif>";
  else if (
$row["age"] == "drugs")
     
$d "<img src=/age/drugs.gif>";
  else if (
$row["age"] == "geweld")
     
$d "<img src=/age/geweld.gif>";
  else if (
$row["age"] == "grof")
     
$d "<img src=/age/grof.gif>";
  else if (
$row["age"] == "sex")
     
$d "<img src=/age/sex.gif>";
            print(
"<td class=\"row2\" align=\"center\">" $d "</td>\n"); 
Some screens

in browse.php

Click the image to open in full size.


and in details.php

Click the image to open in full size.


here are the pics
Attached Files
File Type: rar age.rar (37.6 KB, 18 views)

Last edited by Edgein; 27th January 2009 at 21:58.
Reply With Quote
The Following User Says Thank You to Edgein For This Useful Post:
hack346 (8th February 2009)
  #2  
Old 8th February 2009, 12:05
hack346 hack346 is offline
Banned
 
Join Date: Mar 2008
Turkey
Posts: 80
Default
yeap, nice addon
Reply With Quote
Reply

Tags
age , limit , torrent

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
Today torrent and last week torrent tsse5.6 Claude33 Template Shares 2 18th May 2010 19:29
TSSE 5.1 does it support peer and registration limit? tigar Template Shares 3 23rd February 2009 06:40



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