I installed a blank new phpwcms pre1.2.9 and wanted to install your hack and guess what: the index.php changed:
Code: Select all
$content['page_end'] = '';
if(VISIBLE_MODE == 1 || VISIBLE_MODE == 2) {
$content['page_end'] = '<div id="VisualModeIndicator">';
$content['page_end'] .= VISIBLE_MODE == 1 ? 'user: ' : 'admin: ';
$content['page_end'] .= html_specialchars($_SESSION['wcs_user']);
$content['page_end'] .= ' <a href="phpwcms.php?do=articles';
if($aktion[1]) {
$content['page_end'] .= '&p=2&s=1&id='.$aktion[1];
}
$content['page_end'] .= '" target="_blank" title="edit article">';
$content['page_end'] .= '<img src="img/symbols/fe_page_edit.gif" width="16" height="16" alt="edit article" border="0" style="vertical-align:middle"'.HTML_TAG_CLOSE;
$content['page_end'] .= "</a></div>";
}
Code: Select all
// define VISIBLE_MODE
// 0 = frontend (all) mode
// 1 = article user mode
// 2 = admin user mode
if(empty($_SESSION["wcs_user_id"])) {
define('VISIBLE_MODE', 0);
} else if($_SESSION["wcs_user_fe"] == 0) {
define('VISIBLE_MODE', 2);
} else {
define('VISIBLE_MODE', $_SESSION["wcs_user_admin"] != 1 ? 0 : 2);
}
thx, and also greeting from Hamburg,
kaiser-web[/code]