Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Category image mod (http://www.bvlist.com/showthread.php?t=3637)

devilsyard 20th October 2009 18:51

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

http://i37.tinypic.com/msksbp.jpg

thanks in advance if anyone can help :)

wMan 20th October 2009 19:01

set height and overflow:auto; that woud be css thing like
content


css
PHP Code:

#cats {
height:120px;
overflow:auto;



devilsyard 20th October 2009 19:26

Quote:

Originally Posted by wolfman (Post 16735)
set height and overflow:auto; that woud be css thing like
content


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 .

wMan 20th October 2009 19:30

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 ?

devilsyard 20th October 2009 23:47

Quote:

Originally Posted by wolfman (Post 16737)
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 :lol:

wMan 20th October 2009 23:52

ok post browse.php i will take a look ok ?

devilsyard 20th October 2009 23:58

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&";
        }
      }
    }
    elseif ($category)
    {
      if (!is_valid_id($category))
        stderr("Error", "Invalid category ID.");
      $wherecatina[] = $category;
      $addparam .= "cat=$category&";
    }
    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&";
        }
      }
    }

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) . "&";
    $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();

?>








   
   

$i = 0;
foreach ($cats as $cat)
{
    $catsperrow = 7;
    print(($i && $i % $catsperrow == 0) ? "" : "");
    print("\n");
    $i++;
}

$alllink = "";

$ncats = count($cats);

if ($lastrowcols != 0)
{
    if ($catsperrow - $lastrowcols != 1)
        {
            print("");
        }
    print("\n");
}
?>
   
   
 $alllink



   
       
    print("\n");
?>

 
 
     
 
 

           
     
$alllink

     

         
     

     





if (isset($cleansearchstr))
print("

Search results for \"" . htmlspecialchars($searchstr) . "\"

\n");

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

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

    print($pagerbottom);
}
else {
    if (isset($cleansearchstr)) {
        print("

Nothing found!

\n");
        print("

Try again with a refined search string.

\n");
    }
    else {
        print("

Nothing here!

\n");
        print("

Sorry pal :(

\n");
    }
}
mysql_query("UPDATE users SET last_browse=".gmtime()." where id=".$CURUSER['id']);
stdfoot();

?>


joeroberts 20th October 2009 23:59

Quote:

Originally Posted by devilsyard (Post 16748)
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 :lol:

dont let Wolfman get to you he is just a ARS by nature!!!
I think he needs laid :lol:

devilsyard 21st October 2009 17:38

Did you have alook at that wolfman>

wMan 21st October 2009 17:43

damn tbdev is wierd can't understand it :D ask joe is he's real coder


All times are GMT +2. The time now is 17:01.

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