TSSE unofficial support
hello guys i will be posting lots of support from TSSE VIP forum by xam to all of you who has a legal liscenc of tsse BUT with out anymore VIP access you can check out this thread as long as i have time, any question just leave it here and ill be happly posting your answer here Bump: First many thanks for the New Ajax Torrent view (Update ajaxtabs 2.3), i have change som things, and it work perfect. All you need to do is download the file and insert it under the and you have all the new torrents with pic and all. I have done so it run over the screen, from side and in again. Hope you will enjoy this. header1.php Quote:
?> |
/* +-------------------------------------------------------------------------- | TS Special Edition v.7.2 | ======================================== | by xam | (c) 2005 - 2010 Template Shares Services | http://templateshares.net | ======================================== +--------------------------------------------------------------------------- */ define('THIS_SCRIPT', 'browse.php'); define('B_VERSION', '6.6.1 by xam'); define('SKIP_MOD_QUERIES', true); define('SKIP_CACHE_MESSAGE', true); require('./global.php'); if (!isset($CURUSER)) { print_no_permission(); } /* ---------------------------------------------------------------------- TS SE Security Team Message: ---------------------------------------------------------------------- Please DO NOT modify this file unless you know what are you doing! ---------------------------------------------------------------------- */ if (isset($CURUSER) AND $CURUSER['announce_read'] == 'no') stderr("Sorry", "Site rules require you to read all announcements before browsing torrents!", false); if ($CURUSER['pmunread'] > 0) stderr("Sorry", "Site rules require you to read all PM before browsing torrents!", false); if (!headers_sent()) { setcookie('acqu', base64_encode($CURUSER['usergroup']), TIMENOW+24*60*60); } $TSSEConfig->TSLoadConfig('ANNOUNCE'); $defaulttemplate = ts_template(); $lang->load('browse'); $category = intval(TS_Global('category')); $keywords = TS_Global('keywords'); $search_type = TS_Global('search_type'); $special_search = TS_Global('special_search'); $sort = TS_Global('sort'); $order = TS_Global('order'); $daysprune = TS_Global('daysprune'); $include_dead_torrents = TS_Global('include_dead_torrents'); $Links = array(); require_once(INC_PATH.'/functions_mkprettytime.php'); if ($progressbar == 'yes') { include_once(INC_PATH.'/functions_external.php'); } $TWebSeeders = array(); if ($TSSECache->Cache['webseeders']['lastupdate'] < TIMENOW - ($cachetime * 60)) { $WebSeeders = array(); $WSQuery = sql_query('SELECT id FROM users WHERE options LIKE \'%R1%\'') or sqlerr(__FILE__,__LINE__); if (mysql_num_rows($WSQuery)) { while($WSU = mysql_fetch_row($WSQuery)) { $WebSeeders[] = $WSU['0']; } $WebSeeders = implode(',', $WebSeeders); } else { $WebSeeders = '0'; } $TSSECache->UpdateCache('webseeders', $WebSeeders); } $Webseeders = $TSSECache->Cache['webseeders']['content']; if (empty($WebSeeders)) { $WebSeeders = '0'; } else { if ($xbt_active == 'yes') $PSQuery = sql_query('SELECT fid as torrent FROM xbt_files_users WHERE active = 1 AND uid IN ('.$WebSeeders.')') or sqlerr(__FILE__,__LINE__); else $PSQuery = sql_query('SELECT torrent FROM peers WHERE userid IN ('.$WebSeeders.')') or sqlerr(__FILE__,__LINE__); if (mysql_num_rows($PSQuery)) { while($PSU = mysql_fetch_assoc($PSQuery)) { if (isset($TWebSeeders[$PSU['torrent']])) { $TWebSeeders[$PSU['torrent']]++; } else { $TWebSeeders[$PSU['torrent']] = 1; } } } unset($WebSeeders); } $isfree = $issilver = $isdoubleupload = false; $___notice = ''; if ($xbt_active != 'yes') { include(TSDIR.'/'.$cache.'/freeleech.php'); $TSSEConfig->TSLoadConfig('KPS'); if ($__F_START < get_date_time() && $__F_END > get_date_time()) { switch($__FLSTYPE) { case 'freeleech'; $___notice = show_notice(sprintf($lang->browse['f_leech'], $__F_START, $__F_END),false,$lang->browse['f_leech_h']); $isfree = true; break; case 'silverleech'; $___notice = show_notice(sprintf($lang->browse['s_leech'], $__F_START, $__F_END),false,$lang->browse['s_leech_h']); $issilver = true; break; case 'doubleupload'; $___notice = show_notice(sprintf($lang->browse['d_leech'], $__F_START, $__F_END),false,$lang->browse['d_leech_h']); $isdoubleupload = true; break; } } elseif ($bdayreward == 'yes' AND $bdayrewardtype AND isset($CURUSER['birthday']) AND !empty($CURUSER['birthday'])) { if (($curuserbday = explode('-', $CURUSER['birthday'])) AND isset($curuserbday[0]) AND isset($curuserbday[1]) AND date('j-n') === $curuserbday[0].'-'.$curuserbday[1]) { switch ($bdayrewardtype) { case 'freeleech'; $___notice = show_notice(sprintf($lang->browse['f_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['f_leech_h']); $isfree = true; break; case 'silverleech'; $___notice = show_notice(sprintf($lang->browse['s_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['s_leech_h']); $issilver = true; break; case 'doubleupload'; $___notice = show_notice(sprintf($lang->browse['d_leech'], $curuserbday[0].'-'.$curuserbday[1].'-'.date('Y'), ($curuserbday[0] + 1).'-'.$curuserbday[1].'-'.date('Y')),false,$lang->browse['d_leech_h']); $isdoubleupload = true; break; } } } } require(TSDIR.'/'.$cache.'/categories.php'); $subcategories = array(); $searcincategories = array(); if (count($_categoriesS) > 0) { foreach ($_categoriesS as $sc) { if ($sc['canview'] != '[ALL]' AND !in_array($CURUSER['usergroup'], explode(',',$sc['canview']))) { continue; } $sc['name'] = htmlspecialchars_uni($sc['name']); $searcincategories[] = $sc['id']; $scdesc = htmlspecialchars_uni($sc['cat_desc']); $SEOLinkC = ts_seo($sc['id'],$sc['name'],'c'); $subcategories[$sc['pid']][] = ' '.$sc['name'].' '; } unset($_categoriesS); } $count = 0; $categories = '
require_once(INC_PATH.'/functions_category.php'); $catdropdown = ts_category_list('category',(isset($category) ? $category : ''),'', 'categories'); $SearchTorrent = '
'; $WHERE = " WHERE".($include_dead_torrents == 'yes' ? '' : " t.visible = 'yes' AND")." t.banned = 'no'"; $Links[] = 'include_dead_torrents='.($include_dead_torrents == 'yes' ? 'yes' : 'no'); $WHERE .= " AND (INSTR(CONCAT(',',c.canview,','),',[ALL],') > 0 OR INSTR(CONCAT(',',c.canview,','),',".$CURUSER['usergroup'].",') > 0)"; if (TS_Match($CURUSER['options'], 'E0')) { $WHERE .= " AND t.offensive = 'no'"; } $innerjoin = ''; if ($special_search == 'myreseeds') { $Links[] = 'special_search=myreseeds'; $WHERE .= ' AND t.seeders = 0 AND t.leechers > 0 AND t.owner = \''.$CURUSER['id'].'\''; } elseif ($special_search == 'mybookmarks') { $Links[] = 'special_search=mybookmarks'; $innerjoin = ' INNER JOIN bookmarks b ON (b.torrentid = t.id)'; $WHERE .= ' AND b.userid = \''.$CURUSER['id'].'\''; } elseif ($special_search == 'mytorrents') { $Links[] = 'special_search=mytorrents'; $WHERE .= ' AND t.owner = \''.$CURUSER['id'].'\''; } elseif ($special_search == 'weaktorrents') { $Links[] = 'special_search=weaktorrents'; $WHERE .= " AND t.moderate = '0' AND t.visible = 'no' OR (t.leechers > 0 AND t.seeders = 0 AND t.moderate = '0') OR (t.leechers = 0 AND t.seeders = 0 AND t.moderate = '0')"; } $extraquery = array(); if ($keywords AND $search_type) { $OrjKeywords = $keywords; $Links[] = 'keywords='.htmlspecialchars_uni($keywords); $Links[] = 'search_type='.htmlspecialchars_uni($search_type); if ($fulltextsearch == 'yes') { require(INC_PATH.'/function_search_clean.php'); $keywords = clean_keywords_ft($keywords); } if ($keywords) { if ($fulltextsearch == 'yes') { $query = sql_query("SHOW VARIABLES LIKE 'ft_min_word_len';"); $array = mysql_fetch_assoc($query); $min_length = $array['Value']; if(is_numeric($min_length)) { $minsearchword = $min_length; } else { $minsearchword = 4; } $keywords_exp = explode("\"", $keywords); $inquote = false; foreach($keywords_exp as $phrase) { if(!$inquote) { $split_words = preg_split("#\s{1,}#", $phrase, -1); foreach($split_words as $word) { $word = str_replace(array("+", "-", "*"), "", $word); if(!$word) { continue; } if(strlen($word) < $minsearchword) { $lang->load('tsf_forums'); $lang->error_minsearchlength = sprintf($lang->tsf_forums['searcherror3'], $minsearchword); stderr($lang->global['error'], $lang->error_minsearchlength,false); exit; } } } else { $phrase = str_replace(array("+", "-", "*"), "", $phrase); if(strlen($phrase) < $minsearchword) { $lang->load('tsf_forums'); $lang->error_minsearchlength = sprintf($lang->tsf_forums['searcherror3'], $minsearchword); stderr($lang->global['error'], $lang->error_minsearchlength,false); exit; } } $inquote = !$inquote; } } else { if (strlen($keywords) < 3) { stderr($lang->global['error'], $lang->global['nothingfound']); exit; } } switch ($search_type) { case 't_name': if ($fulltextsearch == 'yes') $extraquery[] = "(MATCH(t.name) AGAINST('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE))"; else $extraquery[] = "(t.name LIKE '".mysql_real_escape_string("%".$keywords."%")."')"; break; case 't_description': if ($fulltextsearch == 'yes') $extraquery[] = "(MATCH(t.descr) AGAINST('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE))"; else $extraquery[] = "(t.descr LIKE '".mysql_real_escape_string("%".$keywords."%")."')"; break; case 't_both': if ($fulltextsearch == 'yes') $extraquery[] = "(MATCH(t.name) AGAINST('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE) OR MATCH(t.descr) AGAINST('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE))"; else $extraquery[] = "(t.name LIKE '".mysql_real_escape_string("%".$keywords."%")."' OR t.descr LIKE '".mysql_real_escape_string("%".$keywords."%")."')"; break; case 't_uploader': $query = sql_query("SELECT id FROM users WHERE upper(username) = ".sqlesc(strtoupper($OrjKeywords))." LIMIT 1"); if (mysql_num_rows($query) > 0) { $user = mysql_fetch_assoc($query); $extraquery[] = "t.owner = ".sqlesc($user['id']).(!$is_mod ? " AND t.anonymous != 'yes'" : ""); } else $extraquery[] = "t.owner = ".sqlesc($OrjKeywords); break; case 't_genre': if ($fulltextsearch == 'yes') $extraquery[] = "(MATCH(t.t_link) AGAINST('".mysql_real_escape_string($keywords)."' IN BOOLEAN MODE))"; else $extraquery[] = "(t.t_link LIKE '".mysql_real_escape_string("%".$keywords."%")."')"; break; } $keywords = $OrjKeywords; } } if ($category) { $query = sql_query("SELECT id FROM categories WHERE type='s' AND pid = '$category'"); if (mysql_num_rows($query) > 0) { $squerycats=array(); while ($squery=mysql_fetch_assoc($query)) { $squerycats[] = $squery['id']; } $extraquery[] = 't.category IN ('.$category.', '.implode(', ', $squerycats).')'; } else { $extraquery[] = "t.category = ".$category; } $Links[] = 'category='.$category; } elseif ($usergroups['canemailnotify'] == 'yes' AND preg_match("#\[cat.+#i", $CURUSER['notifs'])) { $defaultcategories = array(); foreach ($searcincategories as $catid) { if (strpos($CURUSER['notifs'], '[cat'.$catid.']') !== FALSE) { $defaultcategories[] = $catid; } } if (count($defaultcategories) > 0) { $WHERE .= ' AND t.category IN ('.implode(',', $defaultcategories).')'; unset($defaultcategories); } } if ($special_search) { $Links[] = 'special_search='.htmlspecialchars_uni($special_se arch); } if (count($extraquery) > 0) { $WHERE .= ' AND '.implode(' AND ', $extraquery); } $orderby = 't.sticky, t.added DESC'; if ($sort OR $daysprune) { $sort_array = array( 'category', 'name', 'added', 'comments', 'size', 'times_completed', 'seeders', 'leechers', 'owner', 'hits', 'sticky', 'free', 'silver', 'isnuked', 'isrequest', 'doubleupload', 'ts_external', 'visible', 'isScene'); $sort = (in_array($sort, $sort_array) ? $sort : false); $order = (strtolower($order) == 'asc' ? 'ASC' : 'DESC'); $daysprune = ($daysprune == '-1' ? false : intval($daysprune)); if ($sort) { if ($xbt_active == 'yes') { switch($sort) { case 'free': $orderby = 't.download_multiplier ASC'; break; case 'silver': $orderby = 't.download_multiplier DESC'; break; case 'doubleupload': $orderby = 't.upload_multiplier DESC'; break; default: $orderby = 't.'.$sort.' '.$order; break; } } else { $orderby = 't.'.$sort.' '.$order; } $Links[] = 'sort='.htmlspecialchars_uni($sort); $Links[] = 'order='.htmlspecialchars_uni($order); } if ($daysprune) { $WHERE .= " AND UNIX_TIMESTAMP(t.added) >= ".(TIMENOW - ($daysprune * 86400)); $Links[] = 'daysprune='.htmlspecialchars_uni($daysprune); } } $wait = intval($usergroups['waitlimit']) ? $usergroups['waitlimit'] : ''; $torrentsperpage = ($CURUSER['torrentsperpage'] <> 0 ? intval($CURUSER['torrentsperpage']) : $ts_perpage); $count = mysql_num_rows(sql_query('SELECT t.id, c.name, u.usergroup, g.gid FROM torrents t'.$innerjoin.' LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) LEFT JOIN categories c ON (t.category=c.id)'.$WHERE.' ORDER BY '.$orderby)); list($pagertop, $pagerbottom, $limit) = pager($torrentsperpage, $count, $_SERVER['SCRIPT_NAME'].'?'.(is_array($Links) && count($Links) > 0 ? implode('&', $Links) : '').'&'); $ListTorrents = ' '.($is_mod ? ' '; if ($show_recent_torrents == 'yes') { $LatestTorrents = '
'; } stdhead($lang->browse['btitle'], true, ' '.($use_ajax_search == 'yes' ? ' ' : '').($use_ajax_search == 'yes' ? ' ' : '').' '); echo ' '.$___notice.'
'; stdfoot(); ?> |
All times are GMT +2. The time now is 17:00. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.