View Full Version : Scrolling downloads block.

09-06-2005, 05:29 PM
if (eregi("block-LatestDownloads.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");

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

09-07-2005, 04:49 AM
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.

09-07-2005, 12:07 PM
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.