Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrolling downloads block.

    PHP Code:
    if (eregi("block-LatestDownloads.php"$_SERVER['SCRIPT_NAME'])) {
        
    Header("Location: index.php");
        die();
    }

    global 
    $prefix$db$admin;



    // Set up some default vars
    // change as necessary

    $how_many_downloads 5;
    $download_module_name "Downloads";


    // Don't change below unless you know what you're doing

    $sql "SELECT  d.*
            FROM    `${prefix}_downloads_downloads` AS d
            ORDER BY d.`lid` DESC 
            LIMIT $how_many_downloads"
    ;
            
    $link_index 1;
    $content "";

    if(
    $res $db->sql_query($sql)) {
        
    $content "<table border='0' width='100%' cellpadding='2' cellspacing='0'>";    
        while(
    $row $db->sql_fetchrow($res)) {
            
    $link_view "modules.php?name=$download_module_name&d_op=viewdownloaddetails&lid=" $row['lid'] . "&ttitle=" $row['title'];
            
    $content .= "<tr valign='top'><td>$link_index:</td><td><a href='$link_view'>" $row['title'] . "</a>  </td></tr>";
            
    $link_index++;
        }
        
    $content .= "</table>";
    }
     
    ?> 

    I'm trying to get my downloads to scroll through the block instead of just sitting there. If anyone knows how to do this I would appreciate it.

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Im not 100% sure what you mean here... Do you want a scrollable menu or a dynamically moving list of downloads?

    Either way, this is in the wrong forum (at least from what I can tell) it has nothing to do with PHP, its more of an issue with the HTML/CSS/JavaScript of the page.

    I am going to move this to General Web Building for now, it may possibly get moved again if the question becomes a bit more specific.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Is this for a phpnuke site? You are probably going to have to use some javascript to get a cross browser marquee. www.dynamicdrive.com has some marquee scripts. If this is for a phpnuke site, there are already blocks and mods you can make.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •