Piwigo has a graphical interface for the administration panel, where many options can be easily changed in only a few clicks. But Piwigo allows much more customization. In order to keep the essential options easily identifiable, all these additional options are not available in the graphical interface but in a file.
The default config file, which should be never modified, is include/config_default.inc.php : it's an essential file, and you can open it to see what the available additional options are, but not to modify them!
The best way is to use the plugin LocalFiles Editor, available as a default plugin in any Piwigo installation :
The Local Config uses a PHP syntax:
$conf['NAME OF THE VARIABLE'] = VALUE_OF_THE_VARIABLE;
For example
$conf['top_number'] = 15; $conf['comment_spam_reject'] = true; $conf['newcat_default_status'] = 'public';
The workflow:
$conf['newcat_default_visible'] = true;
$conf['newcat_default_visible'] = false;
File written successfully. Backup file created (local/config/config.inc.bak.php)
You can revert your changes by restoring the backup file.
If you want to use a specific function to check password, you will have to “protect” the function definition with “function_exists”. Here is an example:
$conf['password_verify'] = 'smf_password_verify'; if (!function_exists('smf_password_verify')) { function smf_password_verify($password_clear, $password_hash, $user_id) { global $conf; if (empty($user_id)) { return false; } $query = ' SELECT memberName, passwd FROM '.$conf['users_table'].' WHERE ID_MEMBER = '.$user_id.' AND is_activated=1 ;'; $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { if (sha1(strtolower($row['memberName']).$password_clear) == $password_hash) { return true; } break; } return false; } }
The plugin itself handle the php tags: <?php at the beginning and ?> at the end.
The file location is local/config/config.inc.php.