Jump to content

Removing "date added" and "number of downloads"


Candrew

Recommended Posts

Please help! I'm a newbie and I'm going crazy trying to stop the number of dowloads and date added from displaying on our web. I believe I found the correct file that has the instructions, but the commands are below the statement "Don't modify anything below this line." Even if I delete the portion of the command contained between quote marks "Added on {date}" and "{downloads} Downloads", the darned web page still shows this information.

 

 

//Don't modify anything below this line.

 

if (!isset($db)) {

    require $path. "/includes/db/mysql.php";

    $db = new padb_mysql();

    $db->connect();

    $config = $db->fetch(array(), 'settings');

    $config = $config[0];

}

 

if (!isset($list)) {

    @$list = $_GET['list'];

}

switch ($list) {

case 'newest':

$result = $db->fetch(array(), 'files', array(), 'file_time', 'DESC');

$info = "Added on {date}";

break;

case 'downloads':

$result = $db->fetch(array(), 'files', array(), 'file_dls', 'DESC');

$info = "{downloads} Downloads";

break;

default:

die("You didn't select the type of list to show!");

break;

}

 

$i = 1;

foreach($result as $file) {

//if ($i-1 == $config['topnumber']) { break; }  //edited to display only one new file

if ($i-1 == 1) { break; }

$line = str_replace("{number}", $i, $template);

$line = str_replace("{filelink}", $config['dburl']."/index.php?act=view&id=".$file['file_id'], $line);

$line = str_replace("{filename}", $file['file_name'], $line);

if ($list == "newest") {  $infoline = str_replace("{date}", date("n/j/y", $file['file_time']), $info); }

if ($list == "downloads") {$infoline = str_replace("{downloads}", $file['file_dls'] , $info); }

$line = str_replace("{info}", $infoline, $line);

echo $line;

$i++;

}

Take this out to stop the number of downloads from showing:

if ($list == "downloads") {$infoline = str_replace("{downloads}", $file['file_dls'] , $info); }
   $line = str_replace("{info}", $infoline, $line);
   echo $line;
   $i++;

Actually, those are the only two things are the only options that are able to be displayed, if you take them out you will automatically get an error.  So why are you trying to remove just these, why not take out the option that lets you choose instead?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.