Candrew Posted September 11, 2008 Share Posted September 11, 2008 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++; } Link to comment https://forums.phpfreaks.com/topic/123819-removing-date-added-and-number-of-downloads/ Share on other sites More sharing options...
thesaleboat Posted September 11, 2008 Share Posted September 11, 2008 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++; Link to comment https://forums.phpfreaks.com/topic/123819-removing-date-added-and-number-of-downloads/#findComment-639317 Share on other sites More sharing options...
thesaleboat Posted September 11, 2008 Share Posted September 11, 2008 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? Link to comment https://forums.phpfreaks.com/topic/123819-removing-date-added-and-number-of-downloads/#findComment-639328 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.