Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > FreeTSP
Reply
  #1  
Old 8th July 2014, 16:55
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default TV Guide-- Requested by graaf
Add this to your css

Code:
.tvg {
    width: 600px;
    margin-right: auto;
    margin-left: auto;
}
.cal_tv {
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
}
Add this to main function

Code:

function re_brac($string){
$data =  preg_replace("/\([^)]+\)/","",$string);
$originals = array("-");
$replacements = array("");    
return str_ireplace($originals, $replacements, $data);    
}

if (!isset($HTTP_POST_VARS) && isset($_POST))
{
    $HTTP_POST_VARS = $_POST;
    $HTTP_GET_VARS = $_GET;
    $HTTP_SERVER_VARS = $_SERVER;
    $HTTP_COOKIE_VARS = $_COOKIE;
    $HTTP_ENV_VARS = $_ENV;
    $HTTP_POST_FILES = $_FILES;
}
Create a new file called " tv_guide.php " and copy and save the below code.

Code:
<?php

/**
 **************************
 ** FreeTSP Version: 1.0 **
 **************************
 ** http://www.freetsp.info
 ** https://github.com/Krypto/FreeTSP
 ** Licence Info: GPL
 ** Copyright (C) 2010 FreeTSP v1.0
 ** A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 ** Project Leaders: Krypto, Fireknight.
 **/

require_once (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'functions' . DIRECTORY_SEPARATOR . 'function_main.php');
require_once (FUNC_DIR . 'function_vfunctions.php');
require_once (FUNC_DIR . 'function_user.php');
require_once (FUNC_DIR . 'function_bbcode.php');

db_connect();
logged_in();

site_header();
$action = $HTTP_GET_VARS["date"];

switch ($action)
{
case tomorrow:
  $wd = 'Tomorrow';
  $feedUrl = 'http://www.tvrage.com/myrss.php?date=tomorrow';
  break;
case yesterday:
  $wd = 'Yesterday';
  $feedUrl = 'http://www.tvrage.com/myrss.php?date=yesterday';
  break;
default:
  $wd = 'Today';
  $feedUrl = 'http://www.tvrage.com/myrss.php';
}

echo "<h2><div class='head_font'><center>TvGuide ($wd)</center></div></h2>";
echo '<table align="center" width="700"><tr><td>';

echo '<table width="300" align="center" class="tvg_button">
  <tr>
    <td height="102" class="cal_tv"><a href="tv_guide.php?date=yesterday"><img src="/images/yes.png" alt="yes" width="100" height="100" border="0"></a></td>
    <td class="cal_tv"><a href="tv_guide.php?date=today"><img src="/images/today.png" alt="to" width="100" height="100" border="0"></a></td>
    <td class="cal_tv"><a href="tv_guide.php?date=tomorrow"><img src="/images/tom.png" alt="tom" width="100" height="100" border="0"></a></td>
 </tr>
</table>';

$rawFeed = file_get_contents($feedUrl);
//print($rawFeed);
$anobii = new SimpleXmlElement($rawFeed);
$breakholder = 0;

foreach ($anobii->children() as $channel) {
    echo "<div class='tvg'><ul style = \"list-style-type:none; float: left; padding-left: 0px; \">";
    foreach ($channel->item as $node) {
        $itemcount2 = $node -> count();
        if ($breakholder == 0) {
            if ($itemcount2 < 3) {
                $image = $node -> image;
                echo "<li style = \"list-style-type:none; width: 275px; float: left; min-height: 300px; padding-right:5px; \"><h2 style=\"width: 275px;\"><a href=\"" . $node -> link . "\">" . $node -> title . "</a></h2><ul style=\"text-align: left; min-height: 300px; border: 1px solid #CCCCCC;width: 100%;list-style-type: none;margin: 0px;padding: 0px;\">\n";
            } else {
                echo "<li style= \"margin: 0px;\"><a href=\"" . $node -> link . "\">" . $node -> title . "</a></li>\n";
                $breakholder = 1;
            }

        } else {
            if ($itemcount2 < 3) {
                echo "</ul></li><li style = \"list-style-type:none; width: 275px; float: left; min-height: 300px; padding-right:5px;  \"><h2 style=\"width: 275px;\"><a href=\"browe.php?search=\">" . $node -> title . "</a></h2><ul style=\"text-align: left; min-height: 300px; border: 1px solid #CCCCCC;width: 100%;list-style-type: none;margin: 0px;padding: 0px;\">\n";
            } else {    $name = $node -> title;

                echo '<li><a href="/browse.php?search=' . re_brac($name) . '"><p>' . $name . '</p></a></li>';
            }

        }

    }
    echo "</ul></li></div>";
}
echo '</td></tr></table>';

site_footer();
?>
Screen

Click the image to open in full size.

The icons are in the attachment
Attached Images
     
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me


Last edited by firefly007; 8th July 2014 at 18:58.
Reply With Quote
The Following 2 Users Say Thank You to firefly007 For This Useful Post:
BamBam0077 (23rd July 2014), hatijahat (10th September 2014)
  #2  
Old 10th September 2014, 07:10
hatijahat's Avatar
hatijahat hatijahat is offline
Senior Member
 
Join Date: Dec 2012
Malaysia
Posts: 43
Default
1 question, can this script be use by other site other then tvrage?
example : http://malaysiantvonline.com/Regular.../wednesday.htm
Reply With Quote
  #3  
Old 10th September 2014, 07:17
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
No because it doesn't seem to have xml feeds

You can use Curl or even better simpledom class.
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
hatijahat (10th September 2014)
Reply

Tags
graaf , guide , requested , tv

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



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