Okay I have read through every page on in this thread and yes I see everyone says edit the anycontent.php file. Well I need some help please. First what I want to do is simply remove the things like last updated albums, last additions, most viewed, top rated, and random. At least I want to have the ability to remove them. Here is my anycontent.php:
<?php
/***************************************************************************
Coppermine 1.3.1 for CPG-Dragonfly™
**************************************************************************
Port Copyright (c) 2004-2005 CPG Dev Team
dragonflycms.com/
**************************************************************************
v1.1 (c) by Grégory Demar
coppermine.sf.net/
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, or
(at your option) any later version.
**************************************************************************
Last modification notes:
$Source: /cvs/html/modules/coppermine/anycontent.php,v $
$Revision: 9.1 $
$Author: akamu $
$Date: 2005/06/23 21:46:29 $
****************************************************************************/
if (!defined('CPG_NUKE')) { die("You can't access this file directly..."); }
starttable('100%', 'Main Photos');
?>
I'm new to PHP and DragonflyCMS but I do not see anything there to edit that would remove those items. I also read posts that said edit the config.php under modules/coppermine. Here is my config.php file but I do not see anything that says random, last additions, last updated, or such.
<?php
/***************************************************************************
Coppermine 1.3.1 for CPG-Dragonflyâ„¢
**************************************************************************
Port Copyright (c) 2004-2005 CPG Dev Team
dragonflycms.com/
**************************************************************************
v1.1 (c) by Grégory Demar
coppermine.sf.net/
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, or
(at your option) any later version.
**************************************************************************
Last modification notes:
$Source: /cvs/html/modules/coppermine/config.php,v $
$Revision: 9.1 $
$Author: akamu $
$Date: 2005/06/23 21:46:29 $
****************************************************************************/
if (!defined('CPG_NUKE')) { die("You can't access this file directly..."); }
// only nuke admins have access
define('CONFIG_PHP', true);
//require($CPG_M_DIR . '/include/load.inc');
require("modules/" . $module_name . "/include/load.inc");
if (!can_admin()) cpg_die(_ERROR, ACCESS_DENIED, __FILE__, __LINE__);
//require($CPG_M_DIR . '/include/sql_parse.inc');
function form_label($text) {
echo <<<EOT
<tr>
<td class="tableh2" colspan="2">
<b>$text</b>
</td>
</tr>
EOT;
}
function form_input($text, $name) {
global $CONFIG;
$value = htmlprepare($CONFIG[$name]);
echo <<<EOT
<tr>
<td width="300" class="tableb">
$text
</td>
<td class="tableb" valign="top">
<input type="text" class="textinput" style="width: 90%" name="$name" value="$value" />
</td>
</tr>
EOT;
}
function form_yes_no($text, $name) {
global $CONFIG;
$value = $CONFIG[$name];
$yes_selected = $value ? 'selected="selected"' : '';
$no_selected = !$value ? 'selected="selected"' : '';
echo '
<tr>
<td class="tableb">
'.$text.'
</td>
<td class="tableb" valign="top">
<select name="'.$name.'" class="listbox">
<option value="1" '.$yes_selected.'>'.YES.'</option>
<option value="0" '.$no_selected.'>'.NO.'</option>
</select>
</td>
</tr>
';
}
function gdVersion() {
if (!extension_loaded('gd')) {
return;
}
ob_start();
phpinfo(8);
$info=ob_get_contents();
ob_end_clean();
$info=stristr($info, 'gd version');
preg_match('/\d/', $info, $gd);
return $gd[0];
} // end function gdVersion()
function form_img_pkg($text, $name) {
global $CONFIG;
$value = $CONFIG[$name];
$im_selected = ($value == 'im') ? 'selected="selected"' : '';
$gd1_selected = $gd2_selected = '';
if ($gdv = gdVersion()) {
if ($gdv >=2) {
$gd2_selected = '<option value="gd2"'.(($value == 'gd2') ? ' selected="selected"' : '').'>GD version 2.x</option>';
} else {
$gd1_selected = '<option value="gd1"'.(($value == 'gd1') ? ' selected="selected"' : '').'>GD version 1.x</option>';
}
}
$netpbm_selected = ($value == 'netpbm') ? 'selected="selected"' : '';
echo <<<EOT
<tr>
<td class="tableb">
$text
</td>
<td class="tableb" valign="top">
<select name="$name" class="listbox">
<option value="im" $im_selected>Image Magick</option>
$gd1_selected
$gd2_selected
<option value="netpbm" $netpbm_selected>netpbm</option>
</select>
</td>
</tr>
EOT;
}
function form_sort_order($text, $name) {
global $CONFIG, $lang_config_php;
$value = $CONFIG[$name];
$ta_selected = ($value == 'ta') ? 'selected="selected"' : '';
$td_selected = ($value == 'td') ? 'selected="selected"' : '';
$na_selected = ($value == 'na') ? 'selected="selected"' : '';
$nd_selected = ($value == 'nd') ? 'selected="selected"' : '';
$da_selected = ($value == 'da') ? 'selected="selected"' : '';
$dd_selected = ($value == 'dd') ? 'selected="selectdd"' : '';
$ra_selected = ($value == 'ra') ? 'selected="selected"' : '';
$rd_selected = ($value == 'rd') ? 'selected="selected"' : '';
echo '
<tr>
<td class="tableb">
'.$text.'
</td>
<td class="tableb" valign="top">
<select name="'.$name.'" class="listbox">
<option value="ta" '.$ta_selected.'>'.TITLE_A.'</option>
<option value="td" '.$td_selected.'>'.TITLE_D.'</option>
<option value="na" '.$na_selected.'>'.NAME_A.'</option>
<option value="nd" '.$nd_selected.'>'.NAME_D.'</option>
<option value="da" '.$da_selected.'>'.DATE_A.'</option>
<option value="dd" '.$dd_selected.'>'.DATE_D.'</option>
<option value="ra" '.$ra_selected.'>'.RATING_A.'</option>
<option value="rd" '.$rd_selected.'>'.RATING_A.'</option>
</select>
</td>
</tr>
';
}
function form_charset($text, $name) {
global $CONFIG;
$charsets = array(
'Default' => 'language file',
'Arabic' => 'iso-8859-6',
'Baltic' => 'iso-8859-4',
'Central European' => 'iso-8859-2',
'Chinese Simplified' => 'euc-cn',
'Chinese Traditional' => 'big5',
'Cyrillic' => 'koi8-r',
'Greek' => 'iso-8859-7',
'Hebrew' => 'iso-8859-8-i',
'Icelandic' => 'x-mac-icelandic',
'Japanese' => 'euc-jp',
'Korean' => 'euc-kr',
'Maltese' => 'iso-8859-3',
'Thai' => 'windows-874 ',
'Turkish' => 'iso-8859-9',
'Unicode' => 'utf-8',
'Vietnamese' => 'windows-1258',
'Western' => 'iso-8859-1'
);
$value = strtolower($CONFIG[$name]);
echo <<<EOT
<tr>
<td class="tableb">
$text
</td>
<td class="tableb" valign="top">
<select name="$name" class="listbox">
EOT;
foreach ($charsets as $country => $charset) {
echo " <option value=\"$charset\" " . ($value == $charset ? 'selected="selected"' : '') . ">$country ($charset)</option>\n";
}
echo <<<EOT
</select>
</td>
</tr>
EOT;
}
function form_theme($text, $name) {
global $CONFIG, $CPG_M_DIR;
//if ($name == "cpgtheme") $value = $CONFIG["theme"];
//else
$value = $CONFIG['theme'];
$theme_dir = $CPG_M_DIR . '/themes/';
$dir = opendir($theme_dir);
while ($file = readdir($dir)) {
if (is_dir($theme_dir . $file) && $file != "." && $file != ".." && $file != "CVS") {
$theme_array[] = $file;
}
}
closedir($dir);
natcasesort($theme_array);
echo <<<EOT
<tr>
<td class="tableb">
$text
</td>
<td class="tableb" valign="top">
<select name="$name" class="listbox">
EOT;
foreach ($theme_array as $theme) {
echo "<option value=\"$theme\" " . ($value == $theme ? 'selected="selected"' : '') . ">" . strtr(ucfirst($theme), '_', ' ') . "</option>\n";
}
echo <<<EOT
</select>
</td>
</tr>
EOT;
}
// Added for allowing user to select which aspect of thumbnails to scale
function form_scale($text, $name) {
global $CONFIG, $lang_config_php ;
$value = $CONFIG[$name];
$any_selected = ($value == 'max') ? 'selected' : '';
$ht_selected = ($value == 'ht') ? 'selected' : '';
$wd_selected = ($value == 'wd') ? 'selected' : '';
// bug fix scott
coppermine.sourceforge....php?t=441
$any_name = $lang_config_php['th_any'];
$ht_name = $lang_config_php['th_ht'];
$wd_name = $lang_config_php['th_wd'];
echo <<<EOT
<tr>
<td class="tableb">
$text
</td>
<td class="tableb" valign="top">
<select name="$name" class="listbox">
<option value="any" $any_selected>$any_name</option>
<option value="ht" $ht_selected>$ht_name</option>
<option value="wd" $wd_selected>$wd_name</option>
</select>
</td>
</tr>
EOT;
}
function create_form(&$data) {
global $CPG_M_DIR;
foreach($data as $element) {
if ((is_array($element))) {
switch ($element[2]) {
case 0 :
form_input($element[0], $element[1]);
break;
case 1 :
form_yes_no($element[0], $element[1]);
break;
case 2 :
form_img_pkg($element[0], $element[1]);
break;
case 3 :
form_sort_order($element[0], $element[1]);
break;
case 4 :
form_charset($element[0], $element[1]);
break;
case 5 :
break;
case 6 :
form_theme($element[0], $element[1]);
break;
// Thumbnail scaling
case 7 :
form_scale($element[0], $element[1]);
break;
// Add triple dropdown later - put back in for compatibility reasons
case 8 :
// do nothing
break;
default:
die('Invalid action');
} // switch
} else {
form_label($element);
}
}
}
if (count($_POST) > 0) {
$msg = UPD_SUCCESS;
$redirect = getlink();
if (isset($_POST['update_config'])) {
$need_to_be_positive = array(
'albums_per_page',
'albums_per_page',
'album_list_cols',
'max_tabs',
'picture_width',
'thumb_width',
'thumbcols',
'thumbrows',
// Show filmstrip
'max_film_strip_items'
);
foreach ($need_to_be_positive as $parameter)
$_POST[$parameter] = max(1, intval($_POST[$parameter]));
$_POST['subcat_level'] = max(0, intval($_POST['subcat_level']));
foreach($lang_config_data as $element) {
if ((is_array($element))) {
if ((!isset($_POST[$element[1]]))) {
cpg_die(_CRITICAL_ERROR, sprintf(_ERROR_NOT_SET, $element[1]), __FILE__, __LINE__);
}
$value = Fix_Quotes($_POST[$element[1]]);
$db->sql_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value='$value' WHERE name='{$element[1]}'",false,__FILE__, __LINE__);
}
}
} elseif (isset($_POST['restore_config'])) {
require_once('includes/classes/sqlctrl.php');
if (!SQLCtrl::query_file('includes/coppermine/restore_cfg.gz', $error, array('cms_cpg_'=>$cpg_prefix))) {
cpg_error($error);
}
$msg = RESTORE_SUCCESS;
$redirect = getlink('&file=config');
}
url_refresh($redirect);
pageheader(CONFIG_TITLE,$redirect);
msg_box(INFO, $msg, CONTINU, getlink());
pagefooter();
}
pageheader(CONFIG_TITLE);
$signature = 'Coppermine Photo Gallery ' . $CPG_VERSION;
starttable('100%', CONFIG_TITLE." - $signature", 2);
echo '
<form action="'.getlink('&file=config').'" method="post" enctype="multipart/form-data" accept-charset="utf-8">
';
create_form($lang_config_data);
echo '
<tr>
<td colspan="2" align="center" class="tablef">
<input type="submit" class="button" name="update_config" value="'.SAVE_CFG.'" />
<input type="submit" class="button" name="restore_config" value="'.RESTORE_CFG.'" />
</td>
</form>
</tr>
';
endtable();
pagefooter();
?>
Can anyone tell me where to edit so I can remove these groupings?