Right now, this only works if someone is an admin...
how could this be tweeked to check the admin_groups value in the pages table to see if a user has been enabled as an editor?
I have people who are editors of specific pages. I could hard code this something like...
if ($wb->get_session('GROUP_ID')==1) | ($wb->get_session('GROUP_ID')==3) {
But that only works if the group of editors is editors for every page...
ideally, doing a check of the DB would be slick so it checks and only shows up an edit option if you are authorized to edit that particular page.
Side note to this, I modified it a bit to show the "edit page" icon from the admin panel in the upper right corner of my content area when logged in..
<div id="content">
<?php
if (FRONTEND_LOGIN == 'enabled' AND is_numeric($wb->get_session('USER_ID')))
if ($wb->get_session('GROUP_ID')==1) {
?>
<a href="<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php
if ($page_id)
echo $page_id;
else
echo $wb->default_page_id; ;
?>" target="_blank"><img align="right" src="<?php echo ADMIN_URL ?>/images/modify_16.png" alt="<?php echo $HEADING['MODIFY_PAGE']; ?>" /></a>
<?php } ?>
<h2><?php echo MENU_TITLE; ?></h2>
<?php page_content(); ?>
I placed it just inside my content div container, before any other headers or content.