Torrents with poster problem on index

Started by tobbz, July 31, 2011, 09:59:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tobbz

I've put the code in latest_torrents_scroll.php.

Still not work :(

Quote from: Bjw on August 08, 2011, 10:08:10 PM
Ok in the index page you have its not the way v2 is set up look in your file folder named blocks/index .your should see a php file named latest_torrents_scroll.php.
<?php
// 09 poster mod
    
$query "SELECT id, seeders, leechers, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT {$INSTALLER09['latest_torrents_limit']}or sqlerr(__FILE____LINE__);
    
$result mysql_query$query );
    
$num mysql_num_rows$result );
    
// count rows
    
$HTMLOUT .="<script type='text/javascript' src='{$INSTALLER09['baseurl']}/scripts/scroll.js'></script>";
    
$HTMLOUT .= "<div class='headline'>{$lang['index_latest']}</div>
    <div class='headbody'>
    <div style=\"overflow:hidden\">
    <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> 
    <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
    
$i $INSTALLER09['latest_torrents_limit'];
    while ( 
$row mysql_fetch_assoc$result ) ) {
        
$id = (int) $row['id'];
        
$name htmlspecialchars$row['name'] );
        
$poster = ($row['poster'] == '' ''.$INSTALLER09['pic_base_url'].'no_poster.png' htmlspecialchars$row['poster'] ));
        
$seeders number_format($row['seeders']);
        
$leechers number_format($row['leechers']);
        
$name str_replace'_'' ' $name );
        
$name str_replace'.'' ' $name );
        
$name substr$name050 );
        if ( 
$i == )
        
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div><div style=\"overflow:hidden\">
        <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
        
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" htmlspecialchars$poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='100' height='120' border='0' /></a>&nbsp;&nbsp;&nbsp;";
        
$i++;
    }
    
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div></div><br />\n";
    
//== end 09 poster mod
?>


now in your real index.php in your root you should have this line.

if (curuser::$blocks['index_page'] & block_index::LATEST_TORRENTS_SCROLL && $BLOCKS['latest_torrents_scroll_on']){
   require(BLOCK_DIR.'index/latest_torrents_scroll.php');
   }

If you don't have this then search around or download the latest v2 and get the info out of it.

You do not put the actual code in your index.php

It is not set up to do it the way you are trying to do it.Its also a lot easier the way mindless has it set up to enable blocks on the site and also to move the blocks around on your index page.

I have tested this thoroughly on three sites linux with no problems.I never had to adjust hieht or width.I actually have it on the index and the browse page.

Bjw

#8
Ok in the index page you have its not the way v2 is set up look in your file folder named blocks/index .your should see a php file named latest_torrents_scroll.php.
<?php
// 09 poster mod
    
$query "SELECT id, seeders, leechers, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT {$INSTALLER09['latest_torrents_limit']}or sqlerr(__FILE____LINE__);
    
$result mysql_query$query );
    
$num mysql_num_rows$result );
    
// count rows
    
$HTMLOUT .="<script type='text/javascript' src='{$INSTALLER09['baseurl']}/scripts/scroll.js'></script>";
    
$HTMLOUT .= "<div class='headline'>{$lang['index_latest']}</div>
    <div class='headbody'>
    <div style=\"overflow:hidden\">
    <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> 
    <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
    
$i $INSTALLER09['latest_torrents_limit'];
    while ( 
$row mysql_fetch_assoc$result ) ) {
        
$id = (int) $row['id'];
        
$name htmlspecialchars$row['name'] );
        
$poster = ($row['poster'] == '' ''.$INSTALLER09['pic_base_url'].'no_poster.png' htmlspecialchars$row['poster'] ));
        
$seeders number_format($row['seeders']);
        
$leechers number_format($row['leechers']);
        
$name str_replace'_'' ' $name );
        
$name str_replace'.'' ' $name );
        
$name substr$name050 );
        if ( 
$i == )
        
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div><div style=\"overflow:hidden\">
        <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
        
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" htmlspecialchars$poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='100' height='120' border='0' /></a>&nbsp;&nbsp;&nbsp;";
        
$i++;
    }
    
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div></div><br />\n";
    
//== end 09 poster mod
?>


now in your real index.php in your root you should have this line.

if (curuser::$blocks['index_page'] & block_index::LATEST_TORRENTS_SCROLL && $BLOCKS['latest_torrents_scroll_on']){
   require(BLOCK_DIR.'index/latest_torrents_scroll.php');
   }

If you don't have this then search around or download the latest v2 and get the info out of it.

You do not put the actual code in your index.php

It is not set up to do it the way you are trying to do it.Its also a lot easier the way mindless has it set up to enable blocks on the site and also to move the blocks around on your index page.

I have tested this thoroughly on three sites linux with no problems.I never had to adjust hieht or width.I actually have it on the index and the browse page.

tobbz

Anyone got any clues?

I still haven't got this fixed :(

tobbz

Didn't work that neither, I've edited blocks/index/lastest_torrents_scroll.php and index.php .

Quote from: gram on July 31, 2011, 11:36:56 PM
you have to edit index.php too
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" . htmlspecialchars( $poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='133' height='180' border='0' /></a>&nbsp;&nbsp;&nbsp;";

gram

you have to edit index.php too
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" . htmlspecialchars( $poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='133' height='180' border='0' /></a>&nbsp;&nbsp;&nbsp;";

tobbz

won't work Mindless, just the same but it works if I use the Iwall V2 theme.

Quote from: Mindless on July 31, 2011, 10:27:54 PM
I already told you that the poster size is defined on the output, the index.php is no use what so ever it only has all the requires for the blocks, so go and edit blocks/index/latest_torrent_scroll.php and edit the <img> src line where it specifys the height and width.

gram

#3
mindless the images doesnt scroll why?
ok fixed

Mindless

I already told you that the poster size is defined on the output, the index.php is no use what so ever it only has all the requires for the blocks, so go and edit blocks/index/latest_torrent_scroll.php and edit the <img> src line where it specifys the height and width.

tobbz

#1
Hello,

Everything works execpt that the whole image are not shown, it looks like this:




It only like 30% of the poster that are shown.

My index.php:
<?php
/**
 *   https://09source.kicks-ass.net:8443/svn/installer09/
 *   Licence Info: GPL
 *   Copyright (C) 2010 Installer09 v.2
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn,kidvision.
 **/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require_once 
INCL_DIR.'pager_functions.php';
require_once 
CACHE_DIR.'block_settings_cache.php';
require_once 
CLASS_DIR.'class_blocks_index.php';
require_once 
INCL_DIR.'user_functions.php';
require_once 
INCL_DIR.'bbcode_functions.php';
require_once 
ROOT_DIR.'polls.php';
dbconn(true);
loggedinorreturn();

   
$stdfoot = array(/** include js **/'js' => array('shout','java_klappe'));
   
$lang array_mergeload_language('global'), load_language('index') );
   
$HTMLOUT '';
   
//==Global blocks by elephant2
   //==Curuser blocks by pdq
   
if (curuser::$blocks['index_page'] & block_index::IE_ALERT && $BLOCKS['ie_user_alert']){
   require(
BLOCK_DIR.'index/ie_user.php');
   }
   
   if (
curuser::$blocks['index_page'] & block_index::ANNOUNCEMENT && $BLOCKS['announcement_on']){
   require(
BLOCK_DIR.'index/announcement.php');
   }

   

   if (
curuser::$blocks['index_page'] & block_index::SHOUTBOX && $BLOCKS['shoutbox_on']){
   require(
BLOCK_DIR.'index/shoutbox.php');
   }
   
   
// 09 poster mod
    
$query "SELECT id, seeders, leechers, name, poster FROM torrents WHERE poster <> '' ORDER BY added DESC LIMIT {$INSTALLER09['latest_torrents_limit']}or sqlerr(__FILE____LINE__);
 /*if ($CURUSER["view_xxx"] != "yes")
$query = "SELECT id, name, poster FROM torrents WHERE poster <> '' AND category != '6' ORDER BY added DESC limit 50";
else*/
    
$result mysql_query$query );
    
$num mysql_num_rows$result );
    
// count rows
    
$HTMLOUT .= "<div class='headline'>{$lang['index_latest']}</div>
    <div class='headbody'>
    <div style='overflow:hidden'>
    <div id='marqueecontainer' onmouseover='copyspeed=pausespeed' onmouseout='copyspeed=marqueespeed'> 
    <span id='vmarquee' style='position: absolute; width: 100%;'><span style='white-space: nowrap;'>"
;
    
$i $INSTALLER09['latest_torrents_limit'];
    while ( 
$row mysql_fetch_assoc$result ) ) {
        
$id = (int) $row['id'];
        
$name htmlspecialchars$row['name'] );
        
$poster = ($row['poster'] == '' ''.$INSTALLER09['pic_base_url'].'no_poster.png' htmlspecialchars$row['poster'] ));
        
$seeders number_format($row['seeders']);
        
$leechers number_format($row['leechers']);
        
$name str_replace'_'' ' $name );
        
$name str_replace'.'' ' $name );
        
$name substr$name050 );
        if ( 
$i == )
        
$HTMLOUT .= "</span></span><span id='vmarquee2' style='position: center; width: 100%;'></span></div></div><div style='overflow:hidden'>
        <div id='marqueecontainer' onmouseover='copyspeed=pausespeed' onmouseout='copyspeed=marqueespeed'> <span id='vmarquee' style='position: absolute; width: 100%;'><span style='white-space: nowrap;'>"
;
        
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" htmlspecialchars$poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='133' height='180' border='0' /></a>&nbsp;&nbsp;&nbsp;";
        
$i++;
    }
    
$HTMLOUT .= "</span></span><span id='vmarquee2' style='position: absolute; width: 98%;'></span></div></div></div><br />\n";
    
//== end 09 poster mod

// 09 poster mod pop
    
$query "SELECT id, seeders, poster, leechers, name from torrents ORDER BY seeders + leechers DESC LIMIT 6 " or sqlerr(__FILE____LINE__);
    
$result mysql_query$query );
    
$num mysql_num_rows$result );
    
// count rows
    
$HTMLOUT .= "<div class='headline'>{$lang['index_latest3']}</div>
    <div class='headbody'>
    <div style=\"overflow:hidden\">
    <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> 
    <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
    
$i $INSTALLER09['latest_torrents_limit'];
    while ( 
$row mysql_fetch_assoc$result ) ) {
        
$id = (int) $row['id'];
        
$name htmlspecialchars$row['name'] );
        
$poster = ($row['poster'] == '' ''.$INSTALLER09['pic_base_url'].'no_poster.png' htmlspecialchars$row['poster'] ));
        
$seeders number_format($row['seeders']);
        
$leechers number_format($row['leechers']);
        
$name str_replace'_'' ' $name );
        
$name str_replace'.'' ' $name );
        
$name substr$name050 );
        if ( 
$i == )
        
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div><div style=\"overflow:hidden\">
        <div id=\"marqueecontainer\" onmouseover=\"copyspeed=pausespeed\" onmouseout=\"copyspeed=marqueespeed\"> <span id=\"vmarquee\" style=\"position: absolute; width: 98%;\"><span style=\"white-space: nowrap;\">"
;
        
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/details.php?id=$id'><img src='" htmlspecialchars$poster ) . "' alt='{$name}' title='{$name} - Seeders : {$seeders} - Leechers : {$leechers}' width='133' height='180' border='0' /></a>&nbsp;&nbsp;&nbsp;";
        
$i++;
    }
    
$HTMLOUT .= "</span></span><span id=\"vmarquee2\" style=\"position: absolute; width: 98%;\"></span></div></div></div><br />\n";
    
//== end 09 poster mod
   
   
if (curuser::$blocks['index_page'] & block_index::NEWS && $BLOCKS['news_on']){
   require(
BLOCK_DIR.'index/news.php');
   }

      if (
curuser::$blocks['index_page'] & block_index::LATEST_TORRENTS && $BLOCKS['latest_torrents_on']){
   require(
BLOCK_DIR.'index/latest_torrents.php');
   }



   
   if (
curuser::$blocks['index_page'] & block_index::LATEST_TORRENTS_SCROLL && $BLOCKS['latest_torrents_scroll_on']){
   require(
BLOCK_DIR.'index/latest_torrents_scroll.php');
   }

   
   if (
curuser::$blocks['index_page'] & block_index::FORUMPOSTS && $BLOCKS['forum_posts_on']){
   require(
BLOCK_DIR.'index/forum_posts.php');
   }


        
   if (
curuser::$blocks['index_page'] & block_index::STATS && $BLOCKS['stats_on']){
   require(
BLOCK_DIR.'index/stats.php');
   }

   if (
curuser::$blocks['index_page'] & block_index::ACTIVE_USERS && $BLOCKS['active_users_on']){
   require(
BLOCK_DIR.'index/active_users.php');
   }
   
   if (
curuser::$blocks['index_page'] & block_index::IRC_ACTIVE_USERS && $BLOCKS['active_irc_users_on']){
   require(
BLOCK_DIR.'index/active_irc_users.php');
   }
   
   if (
curuser::$blocks['index_page'] & block_index::LAST_24_ACTIVE_USERS && $BLOCKS['active_24h_users_on']){
   require(
BLOCK_DIR.'index/active_24h_users.php');
   }
   
   if (
curuser::$blocks['index_page'] & block_index::BIRTHDAY_ACTIVE_USERS && $BLOCKS['active_birthday_users_on']){
   require(
BLOCK_DIR.'index/active_birthday_users.php');
   }

   if (
curuser::$blocks['index_page'] & block_index::LATEST_USER && $BLOCKS['latest_user_on']){
   require(
BLOCK_DIR.'index/latest_user.php');
   }

   if (
curuser::$blocks['index_page'] & block_index::ACTIVE_POLL && $BLOCKS['active_poll_on']){
   require(
BLOCK_DIR.'index/poll.php');
   }

   if (
curuser::$blocks['index_page'] & block_index::DONATION_PROGRESS && $BLOCKS['donation_progress_on']){
   require(
BLOCK_DIR.'index/donations.php');
   }
   


   if (
curuser::$blocks['index_page'] & block_index::TORRENTFREAK && $BLOCKS['torrentfreak_on']){
   require(
BLOCK_DIR.'index/torrentfreak.php');
   }
   
   if (
curuser::$blocks['index_page'] & block_index::DISCLAIMER && $BLOCKS['disclaimer_on']){
   require(
BLOCK_DIR.'index/disclaimer.php');
   }
echo 
stdhead('Home') . $HTMLOUT stdfoot($stdfoot);
?>

Thanks