Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader > Mods & Themes
Reply
  #1  
Old 17th March 2010, 07:26
matrix78 matrix78 is offline
Member
 
Join Date: Jan 2010
P2P
Posts: 3
Talking Scroll Block
Create lastups-scroll_block.php


Code:
<?


if ($CURUSER){
begin_block("HTk Images");

    ?>
    <style type="text/css">

#marqueecontainertorrents{
position: relative;
width: 160px; /*marquee width */
height: 200px; /*marquee height */
background-color: white;
overflow: hidden;
border: 0px;
padding: 1px;
padding-left: 1px;
padding-right: 1px;
}

</style>

<script type="text/javascript">

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarqueetorrents")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainertorrents").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee


</script>

<div id="2">

    <div id="marqueecontainertorrents" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
    <div id="vmarqueetorrents" style="position: absolute; width: 100%;">

    <!--YOUR SCROLL CONTENT HERE-->
    <?

    $news = mysql_query("SELECT id, name, added, image1, image2 FROM torrents WHERE banned = 'no' AND visible='yes'");

    if (mysql_num_rows($news) > 0) {

        print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");

        while ($row2 = mysql_fetch_array($news, MYSQL_NUM)) {
            $tor = $row2['0'];
            $altname = $row2['1'];
            $date_time=get_date_time(time()-(3200*25)); // the 24 is the hours you want listed change by whatever you want
            $orderby = "ORDER BY torrents.id DESC"; //Order

            $limit = "LIMIT 15"; //Limit

            $where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";

            $res = mysql_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where AND torrents.added >='$date_time' $orderby $limit");
            $row = mysql_fetch_array($res);
            $cat = $row['cat_name'];

            $img1 = "<a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]'><img border='0' src='uploads/images/$row[image1]' alt=\"$altname / $cat\" width='160' align'center'></a>";

            if ($row["image1"] != ""){
                print("<tr><td align=center>". $img1 ."<BR></td></tr>");
            }
        }

        print("</table>");

    }
        ?>
        </div>
        </div>
</div>
        <?

end_block();
}
?>
sorry french

Click the image to open in full size.
Reply With Quote
The Following 5 Users Say Thank You to matrix78 For This Useful Post:
Legend2000 (20th May 2012), nicukent (8th September 2011), outvela (25th August 2011), romano1 (10th January 2013), witter (20th November 2011)
  #2  
Old 20th May 2012, 17:33
Legend2000 Legend2000 is offline
Member
 
Join Date: May 2012
P2P
Posts: 6
Question
Hi,can you tell me how to make the block scroll horizontally?.Please help?
Reply With Quote
  #3  
Old 6th September 2012, 00:24
gogo999's Avatar
gogo999 gogo999 is offline
Senior Member
 
Join Date: Feb 2012
Korea South
Posts: 140
Default hi
Quote:
Originally Posted by Legend2000 View Post
Hi,can you tell me how to make the block scroll horizontally?.Please help?


good..... Sourcecode
__________________
새로운 트래커를 위한 정보의 포럼
My Trackers : darknesschannel
Reply With Quote
  #4  
Old 25th December 2015, 08:36
08DR 08DR is offline
Member
 
Join Date: Dec 2015
Posts: 5
Talking cheers
thanks very much for this, i have a slight problem you may be able to help me with,

my tt version is 208 afaik & running on windows wamp,

only edits ive done which started the exterior frame and the scrolling error message were changing all <? to <?php,

the line the error is moaning about is:- if (mysql_num_rows($news) > 0) {

cheers op and subbed to thread :-)

Bump: edit, have it working now, found 2x errors,

love to have this running horizontally, any ideas or examples of existing ideas

cheers op
Attached Thumbnails
Screenshot_1.png  
Reply With Quote
  #5  
Old 6th June 2016, 12:55
EagleLake EagleLake is offline
Senior Member
 
Join Date: Aug 2011
France
Posts: 31
Default update
work

Bump: udate

Bump: bug fix
Attached Files
File Type: php lastups-scroll_block.php (3.3 KB, 22 views)
File Type: php lastups-scroll_block.php (3.3 KB, 2 views)
Reply With Quote
Reply

Tags
block , scroll

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