Just got my hands on the top10 downloads block and just for the fun I used some ideas from the collapsible forum block.
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
/************************************************************************/
/* Additional code clean-up, performance enhancements, and W3C and */
/* XHTML compliance fixes by Raven and Montego. */
/************************************************************************/
/* Some HTML addons in this script can cause the block not to be W3C */
/* compliant */
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
//Additionals Configs
$SkipSubmitter = "'eldorado','montego','gazzasan','loki'"; //these are the fools who's downloads won't be shown.Rofl I'm kidding guys :P
$MaxDownloads = 10; //Input Max Downloads to show up in the block
$Font_Size_Max = 6; //Fancy Styling the thing.
$Font_Size_Min = 1; //Set minimum font for maximum visibility
$content = '';
$n = 1;
$result = $db->sql_query("SELECT lid, title FROM ".$prefix."_downloads_downloads WHERE submitter NOT IN ($SkipSubmitter) ORDER BY hits DESC LIMIT 0,$MaxDownloads");
if($result==''){$content = "Error in MYSQL script.Either you don't have downloads or the config of the block is flawed.";
}
while (list($lid, $title) = $db->sql_fetchrow($result)) {
The idea behind this was to create a sort of height hierarchy between the top downloads.
edit:This script is unfinished .I want to add the RSS tag from nukefeed but would be cool if I had some newer Ideas.
The height hierarchy can easily be shutdown if the $font_size_max and $font_size_min are set to the same value.
Well I do have some problems with the colors not displaying in firefox. And I still need to add some additionnal config layers to make it pro
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
/* Additional security & Abstraction layer conversion */
/* 2003 chatserv */
/* http://www.nukefixes.com -- http://www.nukeresources.com */
/************************************************************************/
/************************************************************************/
/* Additional code clean-up, performance enhancements, and W3C and */
/* XHTML compliance fixes by Raven and Montego. */
/************************************************************************/
/* Modded for me and perhaps for RN */
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
global $prefix, $db;
//Additionals Configs
$SkipSubmitter = "'eldorado','montego','gazzasan','loki'"; //these are the fools who's downloads won't be shown.Rofl I'm kidding guys :P
$MaxDownloads = 10; //Input Max Downloads to show up in the block
$Font_Size_Max = 6; //Fancy Styling the thing.
$Font_Size_Min = 1; //Set minimum font for maximum visibility
$Font_Color = 1; // Allow Random Colours.Not Working in Gecko Engine for some reason.
$backend_DL_XML = 'feeds-3-rss20.xml'; //URL of your Downloads Feed.Assumed in root directory. If it's empty then it won't show up.Remember to create it with nukefeed.
$content = '';
$result = $db->sql_query("SELECT lid, title FROM ".$prefix."_downloads_downloads WHERE submitter NOT IN ($SkipSubmitter) ORDER BY hits DESC LIMIT 0,$MaxDownloads");
if($result==''){$content = "Error in MYSQL script.Either you don't have downloads or the config of the block is flawed.";}
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum