Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
Thread Tools
  #1  
Old 20th October 2009, 18:51
devilsyard devilsyard is offline
Senior Member
 
Join Date: Jun 2009
United Kingdom
Posts: 19
Default Category image mod
i have installed this mod - Board Message
but i was wondering how do i add a scroll bar so it looks like this

Click the image to open in full size.

thanks in advance if anyone can help :)
Reply With Quote
  #2  
Old 20th October 2009, 19:01
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
set height and overflow:auto; that woud be css thing like <div id="cats" > content </div>

css
PHP Code:
#cats {
height:120px;
overflow:auto;

Reply With Quote
  #3  
Old 20th October 2009, 19:26
devilsyard devilsyard is offline
Senior Member
 
Join Date: Jun 2009
United Kingdom
Posts: 19
Default
Quote:
Originally Posted by wolfman View Post
set height and overflow:auto; that woud be css thing like <div id="cats" > content </div>

css
PHP Code:
#cats {
height:120px;
overflow:auto;


lol im a beginner at this that just looks like a foreign language to me css php would i add that into my css file in my styles and were would i add the top bit to .
Reply With Quote
  #4  
Old 20th October 2009, 19:30
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
what source for TBdev must be browse.php there find ur mod and add div tag before and close div tag after for god sake hove did u added that mod ?
Reply With Quote
  #5  
Old 20th October 2009, 23:47
devilsyard devilsyard is offline
Senior Member
 
Join Date: Jun 2009
United Kingdom
Posts: 19
Default
Quote:
Originally Posted by wolfman View Post
what source for TBdev must be browse.php there find ur mod and add div tag before and close div tag after for god sake hove did u added that mod ?
seen as were not all pros like you i only asked for a small bit help its not like iv asked you for the moon and the stars i diny want an attitude with the comment wont ask again but im sure u needed help on sumit once

and as for the mod it was explained right
Reply With Quote
  #6  
Old 20th October 2009, 23:52
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
ok post browse.php i will take a look ok ?
Reply With Quote
  #7  
Old 20th October 2009, 23:58
devilsyard devilsyard is offline
Senior Member
 
Join Date: Jun 2009
United Kingdom
Posts: 19
Default
my browse.php

Code:
<?

ob_start("ob_gzhandler");
require_once("include/bittorrent.php");
parked();
dbconn(false);
$cats = genrelist();

$searchstr = unesc($_GET["search"]);
$cleansearchstr = searchfield($searchstr);
if (empty($cleansearchstr))
    unset($cleansearchstr);

$orderby = "ORDER BY torrents.id DESC";

$addparam = "";
$wherea = array();
$wherecatina = array();

if ($_GET["incldead"] == 1)
{
    $addparam .= "incldead=1&";
    if (!$CURUSER || get_user_class() < UC_ADMINISTRATOR)
        $wherea[] = "banned != 'yes'";
}
elseif ($_GET["incldead"] == 2)
{
    $addparam .= "incldead=2&";
        $wherea[] = "visible = 'no'";
}
elseif ($_GET["incldead"] == 3)
{
    $addparam .= "incldead=3&";
    $wherea[] = "free = 'yes'";
    $wherea[] = "visible = 'yes'";
}
else
    $wherea[] = "visible = 'yes'";

$category = (int)$_GET["cat"];

$all = $_GET["all"];

if (!$all)
    if (!$_GET && $CURUSER["notifs"])
    {
      $all = True;
      foreach ($cats as $cat)
      {
        $all &= $cat[id];
        if (strpos($CURUSER["notifs"], "[cat" . $cat[id] . "]") !== False)
        {
          $wherecatina[] = $cat[id];
          $addparam .= "c$cat[id]=1&amp;";
        }
      }
    }
    elseif ($category)
    {
      if (!is_valid_id($category))
        stderr("Error", "Invalid category ID.");
      $wherecatina[] = $category;
      $addparam .= "cat=$category&amp;";
    }
    else
    {
      $all = True;
      foreach ($cats as $cat)
      {
        $all &= $_GET["c$cat[id]"];
        if ($_GET["c$cat[id]"])
        {
          $wherecatina[] = $cat[id];
          $addparam .= "c$cat[id]=1&amp;";
        }
      }
    }

if ($all)
{
    $wherecatina = array();
  $addparam = "";
}

if (count($wherecatina) > 1)
    $wherecatin = implode(",",$wherecatina);
elseif (count($wherecatina) == 1)
    $wherea[] = "category = $wherecatina[0]";

$wherebase = $wherea;

if (isset($cleansearchstr))
{
    $wherea[] = "MATCH (search_text, ori_descr) AGAINST (" . sqlesc($searchstr) . ")";
    //$wherea[] = "0";
    $addparam .= "search=" . urlencode($searchstr) . "&amp;";
    $orderby = "";
}

$where = implode(" AND ", $wherea);
if ($wherecatin)
    $where .= ($where ? " AND " : "") . "category IN(" . $wherecatin . ")";

if ($where != "")
    $where = "WHERE $where";

$res = mysql_query("SELECT COUNT(*) FROM torrents $where") or die(mysql_error());
$row = mysql_fetch_array($res);
$count = $row[0];

if (!$count && isset($cleansearchstr)) {
    $wherea = $wherebase;
    $orderby = "ORDER BY id DESC";
    $searcha = explode(" ", $cleansearchstr);
    $sc = 0;
    foreach ($searcha as $searchss) {
        if (strlen($searchss) <= 1)
            continue;
        $sc++;
        if ($sc > 5)
            break;
        $ssa = array();
        foreach (array("search_text", "ori_descr") as $sss)
            $ssa[] = "$sss LIKE '%" . sqlwildcardesc($searchss) . "%'";
        $wherea[] = "(" . implode(" OR ", $ssa) . ")";
    }
    if ($sc) {
        $where = implode(" AND ", $wherea);
        if ($where != "")
            $where = "WHERE $where";
        $res = mysql_query("SELECT COUNT(*) FROM torrents $where");
        $row = mysql_fetch_array($res);
        $count = $row[0];
    }
}

$torrentsperpage = $CURUSER["torrentsperpage"];
if (!$torrentsperpage)
    $torrentsperpage = 15;

if ($count)
{
    list($pagertop, $pagerbottom, $limit) = pager($torrentsperpage, $count, "browse.php?" . $addparam);
    $query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.free, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.description, torrents.owner,IF(torrents.nfo <> '', 1, 0) as nfoav," .
    "IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $orderby $limit";
    "categories.name AS cat_name, categories.image AS cat_pic, users.username FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where $orderby $limit";
    $res = mysql_query($query) or die(mysql_error());
}
else
    unset($res);
if (isset($cleansearchstr))
    stdhead("Search results for \"$searchstr\"");
else
    stdhead();

?>
<form method="get" action="browse.php">
<table class="bottom">
<tr>
<td class="bottom">
    <table class="bottom">
    <tr>

<?
$i = 0;
foreach ($cats as $cat)
{
    $catsperrow = 7;
    print(($i && $i % $catsperrow == 0) ? "</tr><tr>" : "");
    print("<td align=center class=bottom style=\"padding-bottom: 2px;padding-left: 7px\"><input name=c$cat[id] type=\"hidden\" " . (in_array($cat[id],$wherecatina) ? "checked " : "") . "value=1><a class=catlink href=browse.php?cat=$cat[id]><img src=pic/" . htmlspecialchars($cat[image]) . "></a></td>\n");
    $i++;
}

$alllink = "<div align=\"left\">(<a href=\"browse.php?all=1\"><b>Show all</b></a>)</div>";

$ncats = count($cats);

if ($lastrowcols != 0)
{
    if ($catsperrow - $lastrowcols != 1)
        {
            print("<td class=\"bottom\" rowspan=" . ($catsperrow  - $lastrowcols - 1) . ">&nbsp;</td>");
        }
    print("<td class=\"bottom\" style=\"padding-left: 5px\">$alllink</td>\n");
}
?>
    </tr>
    </table>
</td>

<td class="bottom">
<table class="main">
    <tr>
        <td class="bottom" style="padding: 1px;padding-left: 10px">
            <select name="incldead"><option value="0">active</option>
<option value="1"<? print($_GET["incldead"] == 1 ? " selected=\"selected\"" : ""); ?>>including dead</option>
<option value="2"<? print($_GET["incldead"] == 2 ? " selected=\"selected\"" : ""); ?>>only dead</option>
<option value="3"<? print($_GET["incldead"] == 3 ? " selected" : ""); ?>>FREE</option>
            </select>
      </td>
<?
    print("<td class=\"bottom\" style=\"padding-left: 15px\" rowspan=$nrows valign=\"center\" align=\"right\">$alllink</td>\n");
?>

  </tr>
  <tr>
      <td class="bottom" style="padding: 1px;padding-left: 10px">
      <div align="center">
          <input type="submit" class="btn" value="Go!"/>
      </div>
      </td>
  </tr>
  </table>
</td>
</tr>
</table>
</form>

<?

if (isset($cleansearchstr))
print("<h2>Search results for \"" . htmlspecialchars($searchstr) . "\"</h2>\n");

if ($count) {
    print($pagertop);

    torrenttable($res);
    //torrenttable($res, "mytorrents");

    print($pagerbottom);
}
else {
    if (isset($cleansearchstr)) {
        print("<h2>Nothing found!</h2>\n");
        print("<p>Try again with a refined search string.</p>\n");
    }
    else {
        print("<h2>Nothing here!</h2>\n");
        print("<p>Sorry pal :(</p>\n");
    }
}
mysql_query("UPDATE users SET last_browse=".gmtime()." where id=".$CURUSER['id']);
stdfoot();

?>
Reply With Quote
  #8  
Old 20th October 2009, 23:59
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
Quote:
Originally Posted by devilsyard View Post
seen as were not all pros like you i only asked for a small bit help its not like iv asked you for the moon and the stars i diny want an attitude with the comment wont ask again but im sure u needed help on sumit once

and as for the mod it was explained right
dont let Wolfman get to you he is just a ARS by nature!!!
I think he needs laid
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #9  
Old 21st October 2009, 17:38
devilsyard devilsyard is offline
Senior Member
 
Join Date: Jun 2009
United Kingdom
Posts: 19
Default
Did you have alook at that wolfman>
Reply With Quote
  #10  
Old 21st October 2009, 17:43
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
damn tbdev is wierd can't understand it :D ask joe is he's real coder
Reply With Quote
Reply

Tags
category , image , mod


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
Category icons daffy Downloads 2 24th May 2010 22:18
Category image mod simalingur TBDev 0 21st February 2010 14:57
Help with category icons! DooM TBDev 3 31st March 2009 14:40
HELP !! FTS 1.0.2 Manage category xionz Free Torrent Source 2 19th February 2009 13:08
help me please <Icons category> gvalfer Torrent Strike 6 23rd October 2008 23:17



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