ma voglio "tutelarmi" nel senso che ogni forum e provvisto di banner pubblicitari e per non farli togliere, ho eliminato da script in includes/acp/acp_styles.php
questa porzione di codice
Codice: Seleziona tutto
case 'template':
switch ($action)
{
// Refresh template data stored in db and clear cache
case 'refresh':
$sql = 'SELECT *
FROM ' . STYLES_TEMPLATE_TABLE . "
WHERE template_id = $style_id";
$result = $db->sql_query($sql);
$template_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$template_row)
{
trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
if (confirm_box(true))
{
$template_refreshed = '';
// Only refresh database if the template is stored in the database
if ($template_row['template_storedb'] && file_exists("{$phpbb_root_path}styles/{$template_row['template_path']}/template/"))
{
$filelist = array('' => array());
$sql = 'SELECT template_filename, template_mtime
FROM ' . STYLES_TEMPLATE_DATA_TABLE . "
WHERE template_id = $style_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
// if (@filemtime("{$phpbb_root_path}styles/{$template_row['template_path']}/template/" . $row['template_filename']) > $row['template_mtime'])
// {
// get folder info from the filename
if (($slash_pos = strrpos($row['template_filename'], '/')) === false)
{
$filelist[''][] = $row['template_filename'];
}
else
{
$filelist[substr($row['template_filename'], 0, $slash_pos + 1)][] = substr($row['template_filename'], $slash_pos + 1, strlen($row['template_filename']) - $slash_pos - 1);
}
// }
}
$db->sql_freeresult($result);
$this->store_templates('update', $style_id, $template_row['template_path'], $filelist);
unset($filelist);
$template_refreshed = $user->lang['TEMPLATE_REFRESHED'] . '<br />';
add_log('admin', 'LOG_TEMPLATE_REFRESHED', $template_row['template_name']);
}
$this->clear_template_cache($template_row);
trigger_error($template_refreshed . $user->lang['TEMPLATE_CACHE_CLEARED'] . adm_back_link($this->u_action));
}
else
{
confirm_box(false, ($template_row['template_storedb']) ? $user->lang['CONFIRM_TEMPLATE_REFRESH'] : $user->lang['CONFIRM_TEMPLATE_CLEAR_CACHE'], build_hidden_fields(array(
'i' => $id,
'mode' => $mode,
'action' => $action,
'id' => $style_id
)));
}
break;
}
$this->frontend('template', array('edit', 'cache', 'details'), array('refresh', 'export', 'delete'));
break;
oggi però mi è venuto in mente un metodo più veloce e avevo pensato di disabilitare la modifica dei template da Gestione Moduli / Pannello controllo amministratore e cosi ho fatto.
Ora però il problema e che se disabilito anche l'accesso al Gestione Moduli all'amministratore, dopo non sarà più possibile metterci mano in futuro... ma se lo disabilito togliendo la parte di codice che controlla il menu (come fatto con i template) non si può accedere lo stesso ma basta che lo ripristino e si può di nuovo accedere..
Spero fin qui abbiate seguito il mio discorso...
Ora la mia domanda e che porzione di codice devo togliere per eliminare Pannello di Controllo Amministrazione in gestione moduli?
per ora credo di aver identificato il file php che è acp_modules ma non trovo il codice
