Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #11  
Old 23rd July 2013, 15:14
Giorgatzelos's Avatar
Giorgatzelos Giorgatzelos is offline
Senior Member
 
Join Date: Nov 2009
Greece
Posts: 300
Default
i did what you said but this changes only the background of the images as you can see in the snapshot i took...the part above the pictures as you can see is still undefined...
Attached Thumbnails
23-7-2013 4-11-12 ??.png  
Reply With Quote
  #12  
Old 23rd July 2013, 23:49
fireknight's Avatar
fireknight fireknight is offline
Administrator
 
Join Date: Aug 2010
Australia
Posts: 173
Default
Chances are is you will still have some undefined <table> or <td> or something.

At the top of your code you have a undefined table in the marque section.
Code:

    $news = $db->sql_query("SELECT id, name, added, post_img 
                            FROM ".$db_prefix."_torrents 
                            WHERE banned = 'no' 
                            AND visible='yes' 
                            ORDER BY ".$db_prefix."_torrents.id DESC LIMIT 5")or sqlerr(__FILE__, __LINE__);

    if ($db->sql_numrows($news) > 0) 
    {

        print("<marquee scrollamount=\"1\" onmouseover=\"this.scrollAmount=0\" onmouseout=\"this.scrollAmount=1\" scrolldelay=\"0\" direction=\"right\">
        <table align=center cellpadding=0 cellspacing=0 width=100% border=0>\n<tr>\n");

        while ($row2 = $db->sql_fetchrow($news)) 
        {

You also have an open table function
Code:
OpenTable("Τελευταίες Προσθήκες:");
Without seeing the function I cannot see how it is defined.
You can see by the example I posted in the previous page.
Of what to look for and how to correct the problem
Reply With Quote
  #13  
Old 23rd July 2013, 23:53
Giorgatzelos's Avatar
Giorgatzelos Giorgatzelos is offline
Senior Member
 
Join Date: Nov 2009
Greece
Posts: 300
Default
I made 4 identical latestimages_block.php and numbered them latestimages1_block.php etc...[i altered the colors of eack one]then from index.php i called each one for each theme i use at my site! PROBLEM SOLVED!
I use my brain, even my coding skill are very limited ! !



example:
at index.php

Code:
if($theme == 'xxxxxxxxxxxxxx')include("blocks/latestimagesX_block.php");
Reply With Quote
  #14  
Old 24th July 2013, 00:19
fireknight's Avatar
fireknight fireknight is offline
Administrator
 
Join Date: Aug 2010
Australia
Posts: 173
Default
That is one way to solve it.
And well done with limited coding skills.
The problem is every time you add a new theme.
You will have to code another latestimages_block.php to match the theme.
And the same goes for any other file you add, where you have the same issues.
Far easier to define all the classes in your latestimages_block.php once.
Then create a section in your CSS theme file

Example
Code:
/*==Start All Defines For latestimages_block.php==*/

Then put all the define code here

/*==Finish All Defines For latestimages_block.php==*/
Then you just copy and paste that into each theme you have, and every new theme you add.
And just alter the colors to suit the theme.

Saves your root folder from been filled with loads of identical files.
Reply With Quote
The Following 2 Users Say Thank You to fireknight For This Useful Post:
Giorgatzelos (24th July 2013), romano1 (31st July 2013)
  #15  
Old 21st August 2013, 04:27
Giorgatzelos's Avatar
Giorgatzelos Giorgatzelos is offline
Senior Member
 
Join Date: Nov 2009
Greece
Posts: 300
Default
this is my final latest_images.php

PHP Code:
<?php

if (!defined('IN_PMBT')) die ("You can't access this file directly");

OpenTable("Τελευταίες Προσθήκες:");


    
$news $db->sql_query("SELECT id, name, added, post_img FROM ".$db_prefix."_torrents WHERE banned = 'no' AND visible='yes' ORDER BY ".$db_prefix."_torrents.id DESC LIMIT 5")or sqlerr(__FILE____LINE__);

    if (
$db->sql_numrows($news) > 0) {

        print(
"<marquee scrollamount=\"3\" onmouseover=\"this.scrollAmount=0\" onmouseout=\"this.scrollAmount=3\" scrolldelay=\"0\" direction=\"left\"><table align=center cellpadding=0 cellspacing=0 width=100% border=1 bordercolor=#2f74b3 >\n<tr>\n");

        while (
$row2 $db->sql_fetchrow($news)) {
            
$tor $row2['0'];

            
$altname $row2['1'];
            
$orderby "ORDER BY ".$db_prefix."_torrents.id DESC"//Order
            
$limit "LIMIT 5"//Limit
            
$where "WHERE banned = 'no' AND visible='yes' AND ".$db_prefix."_torrents.id='$tor'";
            
$res $db->sql_query("SELECT ".$db_prefix."_torrents.id, ".$db_prefix."_torrents.seeders, ".$db_prefix."_torrents.leechers, ".$db_prefix."_torrents.post_img, ".$db_prefix."_torrents.screen1, ".$db_prefix."_torrents.screen2, ".$db_prefix."_torrents.screen3, ".$db_prefix."_torrents.screen4, ".$db_prefix."_torrents.added, ".$db_prefix."_torrents.comments, ".$db_prefix."_categories.name AS cat_name FROM ".$db_prefix."_torrents LEFT JOIN ".$db_prefix."_categories ON ".$db_prefix."_torrents.category = ".$db_prefix."_categories.id $where  $orderby $limit")or sqlerr(__FILE____LINE__);
            
$row $db->sql_fetchrow($res);
            
$cat $row['cat_name'];
            
$seed =$row['seeders'];
            
$comments =$row['comments'];
            
$leech =$row['leechers'];
                
$dispname htmlspecialchars($row2["name"]);
                
$dispname str_replace("_"" "$dispname);
                
$dispname str_replace("."" "$dispname);

                        
$simg1 $row['screen1'];
                        
$simg2 $row['screen2'];
                        
$simg3 $row['screen3'];
                        
$simg4 $row['screen4'];
                        
                        
$show2 = ($simg2 != '')? ($simg2 != 'NULL')?"<td><img src=$simg2 height='160' width=250 border=0></td>" '' '' ;
                        
$show3 = ($simg3 != '')? ($simg3 != 'NULL')?"<td><img src=$simg3 height='160' width=250 border=0></td>" '' '' ;
                        
$show4 = ($simg4 != '')? ($simg4 != 'NULL')?"<td><img src=$simg4 height='160' width=250 border=0></td>" '' '' ;




                    
$img1 "<b><font color=#2f74b3>" $dispname "</color></b><br><b><font color=white>".$row["added"]."</color></b><br><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='120' width='185' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table class=imgfgcolor width=100%><br><tr><td><img src=$simg1 width=250 border=0></td><td><img src=$simg2 width=250 border=0></td><td><img src=$simg3 width=250 border=0></td><td><img src=$simg4 width=250 border=0></td></tr></table>', CENTER, HEIGHT, 160, WIDTH, 250, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><br></b><br><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" $row["comments"] . "</a></b><br>";
                    
$img2 "<b><font color=#2f74b3>" $dispname "</color></b><br><b><font color=white>".$row["added"]."</color></b><br><a href='$siteurl/details.php?id=$row[id]'><img border='0' src='$row[post_img]' alt=\"$altname / $cat\" height='120' width='185' onmouseover=\" return overlib('<center><h1><b>Στιγμιότυπα:</b></h1></center><hr><table class=imgfgcolor width=100%><br><br><br><br><br><tr><td><center><font color=#2f74b3 size=4><b>Μη διαθέσιμη προεπισκόπηση</b></font></center></td></tr></table>', CENTER, HEIGHT, 160, WIDTH, 250, FGCOLOR, '#313131', BGCOLOR, '#313131');\" onmouseout=\"return nd();\"></a><br><font color=\"green\"><b>Τροφοδότες $seed </font></b><br> <font color=\"red\"><b>Αποδέκτες $leech </font></b><br><b><font color=#2f74b3>Σχόλια: <a href=\"details.php?id=".$row["id"].$hit."\">" $row["comments"] . "</a></b><br>";





            if (
$row["post_img"] != ""){
                        if (
$row["screen1"]!=''){
                print(
"<td style=\"text-align: center;\" >"$img1 ."<BR>\n</td>\n");
                        }else{
                                print(
"<td style=\"text-align: center;\" >"$img2 ."<BR>\n</td>\n");
                         }
            }
                     
        }

        print(
"</tr></table></marquee>");
}
CloseTable();              
?>

how can i make it show all torrents [dead and seeding]?
Reply With Quote
  #16  
Old 21st August 2013, 15:06
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
remove
AND visible='yes'
from the query.
__________________
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
The Following User Says Thank You to joeroberts For This Useful Post:
Giorgatzelos (21st August 2013)
  #17  
Old 21st August 2013, 15:52
fireknight's Avatar
fireknight fireknight is offline
Administrator
 
Join Date: Aug 2010
Australia
Posts: 173
Default
To help with your coding.
A couple of tags you are using

<center>
<font>

Quote:
Not supported in HTML5. Deprecated in HTML 4.01.
This link should help you with further coding projects
http://www.w3schools.com/tags/default.asp

Reply With Quote
The Following User Says Thank You to fireknight For This Useful Post:
Giorgatzelos (21st August 2013)
Reply

Tags
latestimagesphp

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 00:56. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.