1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-29 09:10:23 +02:00

Administration area - work in progress

This commit is contained in:
secretr
2008-12-10 16:59:19 +00:00
parent 7fe42a3b96
commit 13b8a037f6
12 changed files with 621 additions and 381 deletions

View File

@@ -34,8 +34,8 @@
* { margin:0; padding:0; }
body { font:12px/1.5em Arial, Helvetica, sans-serif; }
img { border:0; vertical-align:top; }
a { text-decoration:underline; }
a:hover { text-decoration:underline; }
a { text-decoration:underline; color: #13394E; }
a:hover { text-decoration:underline; color: #CB0000; }
a img { border:0; }
:focus { outline:0; }
@@ -49,7 +49,7 @@ h6 { font-size:11px; font-weight:bold; }
/* Forms */
form { display:inline; }
fieldset { border:0; }
fieldset { border: 0; margin-bottom: 10px; }
input, select{ vertical-align:middle; }
textarea { overflow:auto; }
@@ -104,25 +104,27 @@ ul,ol { list-style:none; }
/* Form elements */
input.input-text,
textarea,
select {
select, .tbox {
border-width:1px;
border-style:solid;
border-color:#aaa #c8c8c8 #c8c8c8 #aaa;
background:#fff;
font:12px arial, helvetica, sans-serif;
}
select { min-height:17px; /* to set the height for empty selects */ }
input.input-text, textarea { padding:2px; }
input.input-text, textarea, .tbox { padding:2px; }
select.tbox { min-height:17px; padding: 0px; /* to set the height for empty selects */ }
/* custom fields CSS */
#image-settings-form input.input-text { width: 300px; }
#core-emoticon-configure input.input-text { width: 300px; }
.select.order { width: 40px; }
.inline-help { width: 280px; }
/* form used for settings */
.col-label { width: 250px; }
.col-control {}
.adminform { width:100%; border:1px solid #ddd;}
.adminform col.label { width: 250px; }
.adminform td { padding: 5px; text-align: left}
@@ -258,16 +260,18 @@ button.edit:active span {}
/* THEME SPECIFIC CSS *********************************************************************************************/
/******** Page Base */
.admin-wrapper { min-width: 950px; }
.admin-wrapper { width: 100%; }
.admin-header { padding: 20px 15px 0; }
.admin-header-content {border: 1px solid #DDDDDD;}
.admin-header-content { border: 1px solid #DDDDDD; }
.admin-page-body { padding: 20px 15px 0; }
.admin-footer {}
/******** Layout */
.col-left { float:left; width: 220px;}
.col-main { margin-left: 220px; padding: 0 0 0 20px;}
.inner-wrapper { float:left; width:100%; }
.main-table { width: 100%; border: 0 none; }
.col-left { width: 220px;}
.col-right { width: 220px;}
.col-main { padding: 0 15px 0 0;}
.inner-wrapper { }
/******** Horizontal navigation ADMIN_NAV_ALT */
.admin-navigation { border: 1px solid #DDDDDD;}
@@ -297,3 +301,54 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; }
#core-frontpage-edit-home { width: 50%; float: left; }
#core-frontpage-edit-post-login { width: 50%; float: left; }
#core-frontpage-edit-home .adminlist { width: 99%; }
#core-frontpage-edit-post-login .adminlist { width: 99%; float: right; }
#core-frontpage-edit .tbox { width: 80%;}
#core-frontpage-edit select.tbox { width: 50%;}
#core-frontpage-edit .buttons-bar select.tbox { width: 140px; }
#core-frontpage-edit .buttons-bar { clear: both; }
/******** Core Block IDs */
/* cache.php */
#core-cache-settings {} /* General cache settings - Default front page */
/* emoticon.php */
#core-emoticon-activate {} /* Emote activation - Default front page */
#core-emoticon-packages {} /* Installed packs - Default front page */
#core-emoticon-configure {} /* Configure an individual emote pack */
/* frontpage.php */
#core-frontpage-settings {} /* Display list of current settings - Default front page */
#core-frontpage-edit {} /* Add / Edit existing rule - form */
#core-frontpage-edit-home {} /* Add / Edit existing rule for home page */
#core-frontpage-edit-post-login {} /* Add / Edit existing rule for post-login page */
/* image.php */
#core-image-check-avatar {} /* Check avatar sizes table */
#core-image-settings {} /* General image settings - Default front page */
/* links.php */
#core-links-list-1 {} /* Display list of current links - Default front page */
#core-links-list-2 {} /* Display list of current links - Default front page */
#core-links-list-3 {} /* Display list of current links - Default front page */
#core-links-list-4 {} /* Display list of current links - Default front page */
/* meta.php */
#core-dataform {} /* Form tag ID - Default front page - old core definition */
#core-meta-settings {} /* General meta settings - Default front page */
/* search.php */
#core-search-configuration-main {} /* Search Configuration for Searchable Areas - Default front page */
#core-search-configuration-comm {} /* Search Configuration for Searchable Comments Areas - Default front page */
#core-search-edit {} /* Edit search settings for specific area */
#core-search-settings {} /* General search settings */

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
| $Revision: 1.1 $
| $Date: 2008-12-09 15:19:03 $
| $Revision: 1.2 $
| $Date: 2008-12-10 16:59:19 $
| $Author: secretr $
+----------------------------------------------------------------------------+
*/
@@ -38,38 +38,48 @@ $ADMIN_HEADER = "
</div>
</div>
<div class='admin-page-body'>
<div class='col-2-left'>
<div class='col-left'>
{ADMIN_LANG}
{SETSTYLE=admin_menu}
{ADMIN_NAV}
{ADMIN_MENU}
{SETSTYLE=bla}
{ADMIN_PWORD}
{ADMIN_STATUS=request}
{ADMIN_LATEST=request}
{ADMIN_LOG=request}
{ADMIN_MSG}
{ADMIN_PLUGINS}
{ADMIN_PRESET}
{ADMIN_UPDATE}
{SETSTYLE=site_info}
{ADMIN_HELP}
{ADMIN_SITEINFO}
{ADMIN_DOCS}
{SETSTYLE=bla}
</div>
<div class='col-main'>
<div class='inner-wrapper'>
<table class='main-table' cellpadding='0' cellspacing='0'>
<tr>
<!--
<td class='col-left'></td>
-->
<td>
<div class='col-main'>
<div class='inner-wrapper'>
";
$ADMIN_FOOTER = "
</div>
</div>
<div class='clear'><!-- --></div>
</div>
</div>
</div>
</td>
<td class='col-right'>
<div class='col-right'>
{SETSTYLE=admin_menu}
<!--
{ADMIN_NAV}
-->
{SETSTYLE=admin_menu}
{ADMIN_MENU}
{SETSTYLE=none}
{ADMIN_LANG}
{ADMIN_PWORD}
{ADMIN_STATUS=request}
{ADMIN_LATEST=request}
{ADMIN_LOG=request}
{ADMIN_MSG}
{ADMIN_PLUGINS}
{ADMIN_PRESET}
{ADMIN_UPDATE}
{SETSTYLE=site_info}
{ADMIN_HELP}
{ADMIN_SITEINFO}
{ADMIN_DOCS}
</div>
</td>
</tr>
</table>
</div>
<div class='admin-footer'>
{ADMIN_CREDITS}

View File

@@ -1,32 +1,30 @@
if (ADMIN) {
/*
* e107 website system (c) 2001-2008 Steve Dunstan (e107.org)
* $Id: fs_admin_alt_nav.sc,v 1.2 2008-12-10 16:59:19 secretr Exp $
*/
if (ADMIN)
{
global $sql, $pref, $tp;
parse_str($parm);
require(e_ADMIN.'ad_links.php');
require_once(e_HANDLER.'admin_handler.php');
function adnav_cat_fs($cat_title, $cat_link, $cat_img, $cat_id=FALSE) {
$cat_link = ($cat_link ? $cat_link : "javascript:void(0);");
$text = '<a class="menuButton" href="'.$cat_link.'" style="background-image: url('.$cat_img.'); background-repeat: no-repeat; background-position: 10px 50%" ';
if ($cat_id) {
//$text .= 'onclick="return buttonClick(event, \''.$cat_id.'\');" onmouseover="buttonMouseover(event, \''.$cat_id.'\');"';
}
$text .= '>'.$cat_title.'</a>';
return $text;
}
function adnav_main_fs($cat_title, $cat_link, $cat_img, $cat_id=FALSE, $cat_highlight='') {
$text = "<a class='menuItem ".$cat_highlight."' href='".$cat_link."' ";
if ($cat_id) {
//$text .= "onclick=\"return false;\" onmouseover=\"menuItemMouseover(event, '".$cat_id."');\"";
}
$text .= ">".$cat_img.$cat_title;
if ($cat_id) {
$text .= "";
}
@@ -34,14 +32,26 @@ if (ADMIN) {
$text .= "</a>";
return $text;
}
/* if (file_exists(THEME.'nav_menu.js')) {
$text = "<script type='text/javascript' src='".THEME_ABS."nav_menu.js'></script>";
} else {
$text = "<script type='text/javascript' src='".e_FILE_ABS."nav_menu.js'></script>";
} */
/*
$text .= "<div style='width: 100%'><table border='0' cellspacing='0' cellpadding='0' style='width: 100%'>
<tr><td>
<div class='menuBar' style='width: 100%'>";
*/
$text .= '
<div id="nav">
';
if ($exit != 'off') {
$text .= '<ul style="float: right"><li>'.adnav_cat_fs(ADLAN_53, e_BASE.'index.php', E_16_NAV_LEAV).'</li>';
$text .= '<li>'.adnav_cat_fs(ADLAN_46, e_ADMIN.'admin.php?logout', E_16_NAV_LGOT).'</li></ul>';
}
$text .= '
<ul class="level1" id="nav-links">
';
@@ -65,20 +75,21 @@ if (ADMIN) {
$ad_links_array = asortbyindex($array_functions, 1);
$text .= '<li>';
$nav_main = adnav_cat_fs($admin_cat['title'][$i], '', $admin_cat['img'][$i], $admin_cat['id'][$i]);
$ad_texti = '<ul id="'.$admin_cat["id"][$i].'" class="menu">
';
while(list($key, $nav_extract) = each($ad_links_array)){
if($nav_extract[4]==$i){
if(getperms($nav_extract[3])){
$ad_texti = '<ul id="'.$admin_cat["id"][$i].'" class="menu">';
while(list($key, $nav_extract) = each($ad_links_array))
{
if($nav_extract[4]==$i)
{
if(getperms($nav_extract[3]))
{
$ad_texti .= '<li>'.adnav_main_fs($nav_extract[1], $nav_extract[0], $nav_extract[5]).'</li>';
$ad_tmpi = 1;
}
}
}
$ad_texti .= '</ul>';
if ($ad_tmpi == 1) {
if ($ad_tmpi == 1)
{
$text .= $nav_main;
$text .= $ad_texti;
}
@@ -94,38 +105,53 @@ if (ADMIN) {
}
$render_plugins = FALSE;
if($sql -> db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path")){
while($row = $sql -> db_Fetch()){
if(getperms('P'.$row['plugin_id'])){
include_once(e_PLUGIN.$row['plugin_path']."/plugin.php");
if($eplug_conffile){
$eplug_name = $tp->toHTML($eplug_name,FALSE,"defs");
$plugin_icon = $eplug_icon_small ? "<img src='".e_PLUGIN_ABS.$eplug_icon_small."' alt='".$eplug_caption."' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />" : E_16_PLUGIN;
$plugin_array[ucfirst($eplug_name)] = adnav_main_fs($eplug_name, e_PLUGIN.$row['plugin_path']."/".$eplug_conffile, $plugin_icon);
include_once(e_HANDLER.'plugin_class.php');
$plug = new e107plugin;
if($sql -> db_Select("plugin", "*", "plugin_installflag=1 ORDER BY plugin_path"))
{
while($row = $sql -> db_Fetch())
{
if(getperms('P'.$row['plugin_id']))
{
$_path = e_PLUGIN.$row['plugin_path'].'/';
if($plug->parse_plugin($_path))
{
$plug_vars = $plug->plug_vars;
loadLanFiles($row['plugin_path'], 'admin');
if($plug_vars['administration']['configFile'])
{
$plug_vars['@attributes']['name'] = $tp->toHTML($plug_vars['@attributes']['name'], FALSE, "defs");
$icon_src = (isset($plug_vars['plugin_php']) ? e_PLUGIN_ABS : e_PLUGIN_ABS.$row['plugin_path'].'/') .$plug_vars['administration']['iconSmall'];
$plugin_icon = $plug_vars['administration']['iconSmall'] ? "<img src='{$icon_src}' alt='".$plug_vars['administration']['caption']."' style='border:0px; vertical-align:bottom; width: 16px; height: 16px' />" : E_16_PLUGIN;
$plugin_array[ucfirst($plug_vars['@attributes']['name'])] = adnav_main_fs($plug_vars['@attributes']['name'], e_PLUGIN.$row['plugin_path']."/".$plug_vars['administration']['configFile'], $plugin_icon);
}
$render_plugins = TRUE;
$active_plugs = TRUE;
}
unset($eplug_conffile, $eplug_name, $eplug_caption, $eplug_icon_small);
$render_plugins = TRUE;
$active_plugs = TRUE;
}
}
ksort($plugin_array, SORT_STRING);
$plugs_text = '';
foreach ($plugin_array as $plugin_compile) {
foreach ($plugin_array as $plugin_compile)
{
$plugs_text .= $plugin_compile;
}
}
if (getperms('Z')) {
if (getperms('Z'))
{
$pclass_extended = $active_plugs ? 'header' : '';
$plugin_text = adnav_main_fs(ADLAN_98, e_ADMIN.'plugin.php', E_16_PLUGMANAGER, FALSE, $pclass_extended);
$render_plugins = TRUE;
}
if ($render_plugins) {
if (defined('FS_ADMIN_LINK_SEPARATOR')) {
$text .= "
<li class='fs-linkSep'>".FS_ADMIN_LINK_SEPARATOR."</li>";
}
$text .= '<li>';
$text .= adnav_cat_fs(ADLAN_CL_7, '', E_16_CAT_PLUG, 'plugMenu');
$text .= "<ul id='plugMenu' class='menu'>";
@@ -142,28 +168,27 @@ if (ADMIN) {
$text .= '<li>';
$text .= adnav_cat_fs(ADLAN_CL_8, '', E_16_NAV_DOCS, 'docsMenu');
$text .= "<ul id='docsMenu' class='menu'>";
if (!$handle=opendir(e_DOCS.e_LANGUAGE."/")) {
if (!$handle=opendir(e_DOCS.e_LANGUAGE."/"))
{
$handle=opendir(e_DOCS."English/");
}
$i=1;
while ($file = readdir($handle)) {
if ($file != "." && $file != ".." && $file != "CVS") {
while ($file = readdir($handle))
{
if ($file != "." && $file != ".." && $file != "CVS")
{
$text .= '<li>'.adnav_main_fs(str_replace("_", " ", $file), e_ADMIN."docs.php?".$i, E_16_DOCS).'</li>';
$i++;
}
}
closedir($handle);
$text .= "</ul>";
$text .='</li>';
/*
if ($exit != 'off') {
$text .= '<li>'.adnav_cat_fs(ADLAN_53, e_BASE.'index.php', E_16_NAV_LEAV).'</li>';
$text .= '<li>'.adnav_cat_fs(ADLAN_46, e_ADMIN.'admin.php?logout', E_16_NAV_LGOT).'</li>';
}
*/
$text .='</li>
</ul>
';
$text .= '
</ul>
</div>
<div class="clear"><!-- --></div>
';
return $text;

View File

@@ -8,7 +8,21 @@ input.radio { width:13px; height:13px; }
button {
width:auto;
overflow:visible;
vertical-align: middle
}
button span {
margin-top:1px;
}
/* THEME SPECIFIC CSS *********************************************************************************************/
#core-frontpage-edit-home { width: 49%; float: left; margin-right: 10px; }
#core-frontpage-edit-post-login { width: 49%; float: left;}
#core-frontpage-edit-home .adminlist { width: 100%; }
#core-frontpage-edit-post-login .adminlist { width: 100%; }

View File

@@ -38,7 +38,8 @@
float: left;
/* width: 158px; width needed or else Opera goes nuts */
}
ul.sub {border-top: 1px solid #CCCCCC;}
ul.sub {border-top: 1px solid #DDDDDD;}
#nav li ul { /* second-level lists */
position: absolute;
z-index: 10;
@@ -52,15 +53,15 @@ ul.sub {border-top: 1px solid #CCCCCC;}
#nav li.sfhover li a {
text-align: left;
background-image: none;
background-color: #FBFEF1;
background-color: #FFFFFF;
line-height: 28px;
font-size: 11px;
font-weight: bold;
padding-left: 10px;
padding-right: 0px;
border-left: 1px solid #B8DF30;
border-right: 1px solid #B8DF30;
border-bottom: 1px solid #B8DF30;
border-left: 1px solid #DDDDDD;
border-right: 1px solid #DDDDDD;
border-bottom: 1px solid #DDDDDD;
width: 188px;
w\idth : 188px;
text-transform: none;
@@ -81,7 +82,7 @@ ul.sub {border-top: 1px solid #CCCCCC;}
#nav li li a:hover{
background-color: #DDF098;
background-color: #f6f6f6;
color: #990000
}