Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Template-Switcher DZCP 1.6 Permissons
//SQL-Befehl in PhpMyAdmin ausführen:
//ALTER TABLE `dzcp_permissions` ADD `template_switch` INT(1) NOT NULL DEFAULT '0' AFTER `dlintern`;
//In deutsch.php und english.php schreiben
define('_perm_template_switch', 'Design ändern');
define('_perm_template_switch', 'Switch Template');
//Zeile 2500 //init templateswitch mit text ersetzen:
//init templateswitch
$template_switch = ''; //Set template switch to null
if($chkMe == 4 || permission('template_switch')) { //Check permissions
$tmpldir = "";
$tmps = get_files('../inc/_templates_/', true);
foreach ($tmps as $tmp) {
$selt = ($tmpdir == $tmp ? 'selected="selected"' : '');
$tmpldir .= show(_select_field, array("value" => "?tmpl_set=" . $tmp, "what" => $tmp, "sel" => $selt));
}
$template_switch = show("menu/tmp_switch", array("templates" => $tmpldir)); //Output switch
}
//Zeile 2509 löschen:
$template_switch = show("menu/tmp_switch", array("templates" => $tmpldir));
//Zeile 276:
if(cookie::get('tmpdir') != false && cookie::get('tmpdir') != NULL) {
//ersetzen gegen:
if(cookie::get('tmpdir') != false && cookie::get('tmpdir') != NULL && $chkMe == 4 && permission('template_switch')) {
//Rechte den Gruppen in "Adminbereich: User Ränge" zusweisen und fertig!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment