mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Site Prefs Administration, imageselector SC fix - work in progress
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/header.php,v $
|
||||
| $Revision: 1.21 $
|
||||
| $Date: 2008-12-16 11:05:36 $
|
||||
| $Revision: 1.22 $
|
||||
| $Date: 2008-12-17 17:27:07 $
|
||||
| $Author: secretr $
|
||||
+---------------------------------------------------------------+
|
||||
*/
|
||||
@@ -400,11 +400,11 @@ if (!function_exists('show_admin_menu')) {
|
||||
$BUTTON_TEMPLATE = $sub_link ? $SUB_BUTTON : $BUTTON;
|
||||
}
|
||||
$replace[0] = str_replace(" ", " ", $e107_vars[$act]['text']);
|
||||
$replace[1] = $e107_vars[$act]['link'];
|
||||
$replace[1] = varset($e107_vars[$act]['link'], "#{$act}");
|
||||
if (!empty($e107_vars[$act]['include'])) {
|
||||
$replace[2] = $e107_vars[$act]['include'];
|
||||
} else {
|
||||
$replace[2] = $js ? "onclick=\"showhideit('".$act."');\"" : "onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\"";
|
||||
$replace[2] = $js ? " onclick=\"showhideit('".$act."');\"" : " onclick=\"document.location='".$e107_vars[$act]['link']."'; disabled=true;\"";
|
||||
}
|
||||
$replace[3] = $title;
|
||||
$replace[4] = $id_title;
|
||||
|
1926
e107_admin/prefs.php
1926
e107_admin/prefs.php
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: admin_lang.sc,v 1.4 2008-12-16 17:23:25 secretr Exp $
|
||||
* $Id: admin_lang.sc,v 1.5 2008-12-17 17:27:07 secretr Exp $
|
||||
*
|
||||
* Admin Language Shortcode
|
||||
*
|
||||
|
@@ -1,15 +1,19 @@
|
||||
// $Id: imagepreview.sc,v 1.1 2008-03-18 00:39:02 e107coders Exp $
|
||||
global $tp;
|
||||
list($name,$width,$height,$img_path) = explode("|",$parm);
|
||||
|
||||
if(!$width)
|
||||
// $Id: imagepreview.sc,v 1.2 2008-12-17 17:27:07 secretr Exp $
|
||||
global $e107;
|
||||
|
||||
list($name, $width, $height) = explode("|",$parm, 3);
|
||||
|
||||
$name = varset($name);//avoid warnings
|
||||
if(varset($width))
|
||||
{
|
||||
$width = "32px";
|
||||
$width = " width: {$width};";
|
||||
}
|
||||
if(!$height)
|
||||
if(varset($height))
|
||||
{
|
||||
$height = "32px";
|
||||
$height = " width: {$height};";
|
||||
}
|
||||
|
||||
$path = ($_POST[$name] && $_POST['ajax_used']) ? $img_path.$tp->replaceConstants($_POST[$name]) : e_IMAGE_ABS."generic/blank.gif";
|
||||
return "<img src='".$path."' alt=\"\" style='border: 0px; width: {$width}; height: {$height}' />";
|
||||
$path = (varset($_POST[$name]) && defsettrue('e_AJAX_REQUEST')) ? $e107->tp->replaceConstants($_POST[$name], 'full') : e_IMAGE_ABS."generic/blank.gif";
|
||||
|
||||
return "<img src='{$path}' alt=\"\" class='image-selector' style='{$width}{$height}' />";
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// $Id: imageselector.sc,v 1.7 2008-11-20 20:34:58 e107steved Exp $
|
||||
|
||||
// $Id: imageselector.sc,v 1.8 2008-12-17 17:27:07 secretr Exp $
|
||||
//FIXME - full rewrite, backward compatible
|
||||
global $sql,$parm,$tp;
|
||||
|
||||
if(strstr($parm,"="))
|
||||
@@ -9,35 +10,10 @@ if(strstr($parm,"="))
|
||||
}
|
||||
else
|
||||
{ // comma separated parms.
|
||||
list($name,$path,$default,$width,$height,$multiple,$label,$subdirs,$filter,$fullpath,$click_target,$click_prefix,$click_postfix) = explode(",",$parm);
|
||||
list($name,$path,$default,$width,$height,$multiple,$label,$subdirs,$filter,$fullpath,$click_target,$click_prefix,$click_postfix,$tabindex,$class) = explode(",",$parm);
|
||||
}
|
||||
|
||||
require_once(e_HANDLER."file_class.php");
|
||||
$fl = new e_file;
|
||||
|
||||
$paths = explode("|",$path);
|
||||
$recurse = ($subdirs) ? $subdirs : 0;
|
||||
$imagelist = array();
|
||||
|
||||
foreach($paths as $pths)
|
||||
{
|
||||
$imagelist += $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG', 'standard', $recurse);
|
||||
}
|
||||
|
||||
if($imagelist)
|
||||
{
|
||||
sort($imagelist);
|
||||
}
|
||||
|
||||
if(!$fullpath && (count($paths) > 1))
|
||||
{
|
||||
$fullpath = TRUE;
|
||||
}
|
||||
|
||||
$multi = ($multiple == "TRUE" || $multiple == "1") ? "multiple='multiple' style='height:{$height}'" : "style='float:left'";
|
||||
$width = ($width) ? $width : "*";
|
||||
$height = ($height) ? $height : "*";
|
||||
$label = ($label) ? $label : " -- -- ";
|
||||
|
||||
if(trim($default[0])=="{")
|
||||
{
|
||||
@@ -45,38 +21,78 @@ if(trim($default[0])=="{")
|
||||
$path = ""; // remove the default path if a constant is used.
|
||||
}
|
||||
|
||||
$text .= "<select {$multi} class='tbox' name='$name' id='$name' onchange=\"replaceSC('imagepreview={$name}|{$width}|{$height}|{$path}',this.form,'{$name}_prev');\">
|
||||
<option value=''>".$label."</option>\n";
|
||||
foreach($imagelist as $icon)
|
||||
{
|
||||
$dir = str_replace($paths,"",$icon['path']);
|
||||
$scaction = varsettrue($scaction, 'all');
|
||||
$text = '';
|
||||
|
||||
if(!$filter || ($filter && ereg($filter,$dir.$icon['fname'])))
|
||||
//Get Select Box Only!
|
||||
if($scaction == 'select' || $scaction == 'all')
|
||||
{
|
||||
require_once(e_HANDLER."file_class.php");
|
||||
$fl = new e_file;
|
||||
|
||||
|
||||
$recurse = ($subdirs) ? $subdirs : 0;
|
||||
$imagelist = array();
|
||||
|
||||
foreach($paths as $pths)
|
||||
{
|
||||
$pth = ($fullpath) ? $tp->createConstants($icon['path'],1) : $dir;
|
||||
$selected = ($default == $pth.$icon['fname']) ? " selected='selected'" : "";
|
||||
$text .= "<option value='".$pth.$icon['fname']."'".$selected.">".$dir.$icon['fname']."</option>\n";
|
||||
$imagelist += $fl->get_files($pths,'\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG', 'standard', $recurse);
|
||||
}
|
||||
|
||||
if($imagelist)
|
||||
{
|
||||
sort($imagelist);
|
||||
}
|
||||
|
||||
if(!$fullpath && (count($paths) > 1))
|
||||
{
|
||||
$fullpath = TRUE;
|
||||
}
|
||||
|
||||
$multi = ($multiple == "TRUE" || $multiple == "1") ? " multiple='multiple' style='height:{$height}'" : "";//style='float:left'
|
||||
$width = ($width) ? $width : "0";
|
||||
$height = ($height) ? $height : "0";
|
||||
$label = ($label) ? $label : " -- -- ";
|
||||
$tabindex = varset($tabindex) ? " tabindex='{$tabindex}'" : '';
|
||||
$class = varset($class) ? " class='{$class}'" : " class='tbox'";
|
||||
|
||||
$text .= "<select{$multi}{$tabindex}{$class} name='{$name}' id='{$name}' onchange=\"replaceSC('imagepreview={$name}|{$width}|{$height}',this.form,'{$name}_prev'); \">
|
||||
<option value=''>".$label."</option>\n";
|
||||
foreach($imagelist as $icon)
|
||||
{
|
||||
$dir = str_replace($paths,"",$icon['path']);
|
||||
|
||||
if(!$filter || ($filter && ereg($filter,$dir.$icon['fname'])))
|
||||
{
|
||||
$pth = ($fullpath) ? $tp->createConstants($icon['path'],1) : $dir;
|
||||
$selected = ($default == $pth.$icon['fname']) ? " selected='selected'" : "";
|
||||
$text .= "<option value='{$pth}{$icon['fname']}'{$selected}>{$dir}{$icon['fname']}</option>\n";
|
||||
}
|
||||
|
||||
}
|
||||
$text .= "</select>";
|
||||
|
||||
|
||||
if($scaction == 'select') return $text;
|
||||
}
|
||||
$text .= "</select>";
|
||||
|
||||
if(!$pvw_default)
|
||||
{
|
||||
$pvw_default = ($default) ? $path.$default : e_IMAGE_ABS."generic/blank.gif";
|
||||
}
|
||||
|
||||
$text .= "<div class='imgselector-container' id='{$name}_prev'>";
|
||||
if(varset($click_target))
|
||||
{
|
||||
$pre = varset($click_prefix);
|
||||
$post = varset($click_postfix);
|
||||
$text .= "<a href='#' onclick='addtext(\"{$pre}\"+document.getElementById(\"{$name}\").value+\"{$post}\", true);document.getElementById(\"{$name}\").selectedIndex = -1;return false;'>";
|
||||
}
|
||||
$text .= " <span id='{$name}_prev'><img src='{$pvw_default}' alt='' style='width:{$width};height:{$height}' /></span>\n";
|
||||
$text .= "<img src='{$pvw_default}' alt='' style='width:{$width};height:{$height}' />";
|
||||
if(varset($click_target))
|
||||
{
|
||||
$text .= "</a>";
|
||||
}
|
||||
$text .= "</div>\n";
|
||||
|
||||
//$text .= " <span id='{$name}_prev'><img src='{$pvw_default}' alt='' style='width:{$width};height:{$height}' /></span>\n";
|
||||
|
||||
|
||||
return "\n\n<!-- Start Image Selector -->\n\n".$text."\n\n<!-- End Image Selector -->\n\n";
|
||||
return "\n\n<!-- Start Image Selector [{$scaction}] -->\n\n".$text."\n\n<!-- End Image Selector [{$scaction}] -->\n\n";
|
@@ -121,6 +121,7 @@ select.tbox { min-height:17px; padding: 0px; /* setting the height of empty sel
|
||||
.select.time-offset { width: 60px !important; }
|
||||
input.radio { margin-right: 3px; }
|
||||
label { cursor: pointer; }
|
||||
.checkbox { margin-right: 5px; }
|
||||
|
||||
/* Related JS functionality - .autocheck together with .auto-toggle-area (see admin/image.php) */
|
||||
.auto-toggle-area { width: 280px; cursor: pointer; }
|
||||
@@ -131,6 +132,10 @@ label { cursor: pointer; }
|
||||
|
||||
.adminform { width:100%; border:1px solid #ddd;}
|
||||
|
||||
.adminform th { padding: 5px; font-weight: bold; white-space:nowrap; }
|
||||
.adminform td { padding: 5px; }
|
||||
|
||||
|
||||
.adminform td { padding: 5px; text-align: left}
|
||||
.adminform td div.field-spacer { clear: both; margin-bottom: 3px; } /* multi-fields per row separator */
|
||||
|
||||
@@ -300,10 +305,19 @@ input.action { vertical-align: middle; } /* default */
|
||||
input.action.delete {}
|
||||
input.action.edit {}
|
||||
|
||||
/********** Page Loading Status default style */
|
||||
#loading-mask { color: #556B2F; font-size: 1.2em; font-weight:bold; position:absolute; text-align: center; padding: 0; margin: 0; background-color: transparent; }
|
||||
#loading-mask .loader { position: fixed; top: 40%; left: 50%; width: 200px; text-align: center; background: #F0F9E3 none repeat scroll 0 0; border: 2px solid #556B2F; font-weight: bold; padding: 10px 5px; margin-left: -100px; margin-top: 0; }
|
||||
#loading-mask img { margin: 10px auto; }
|
||||
|
||||
/********** Element Loading Status default style */
|
||||
.element-loading-mask { background-repeat: no-repeat; background-position: 50% 50%; background-color: #f5f5f5; }
|
||||
|
||||
/********** Misc */
|
||||
.e-pointer { cursor: pointer; } /* Pointer Hand */
|
||||
.expand-container { padding: 10px; } /* Block with expandable items */
|
||||
.nextprev-bar { clear: both; padding: 5px; font-size: 14px; margin: 5px; border:1px solid #ddd; } /* Page NextPrev nabigation block */
|
||||
.imgselector-container { clear: both; } /* ImageSelector.sc */
|
||||
|
||||
/*******************************************************************************************************************/
|
||||
|
||||
@@ -347,10 +361,12 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
|
||||
/******** Block Elements */
|
||||
.block { border: 1px solid #DDDDDD; margin-bottom: 10px;}
|
||||
.block-text { padding: 10px 10px 10px; }
|
||||
.block h2, .block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
|
||||
.block h2.caption, .block h4.caption { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
|
||||
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
|
||||
.page-info p { padding: 10px; }
|
||||
|
||||
#core-banlist-times .textarea { width: 98%; }
|
||||
|
||||
#core-emoticon-configure input.input-text { width: 300px; }
|
||||
#core-links-edit textarea { width: 390px !important; }
|
||||
#core-links-edit .helpbox { width: 390px !important; margin: 5px 0px; }
|
||||
@@ -358,9 +374,6 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
|
||||
|
||||
#core-admin-log-config legend { font-weight: bold; }
|
||||
|
||||
#core-admin-log-options .checkbox,
|
||||
#core-admin-log-filter .checkbox { margin-right: 5px; }
|
||||
|
||||
#core-admin-log-maintenance .select { width: 60px; }
|
||||
#core-admin-log-maintenance button { margin-left: 10px; }
|
||||
|
||||
@@ -382,6 +395,19 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
|
||||
#core-admin-log-list {}
|
||||
#core-admin-log-confirm-delete {}
|
||||
|
||||
/* administrator.php */
|
||||
#core-administrator-list {} /* List current administrators - Default front page */
|
||||
#core-administrator-edit {} /* Edit administrators permissions */
|
||||
|
||||
/* banlist.php */
|
||||
#core-banlist-options {}
|
||||
#core-banlist-options-ban {}
|
||||
#core-banlist-times {}
|
||||
#core-banlist-edit {}
|
||||
#core-banlist-transfer-export {}
|
||||
#core-banlist-transfer-import {}
|
||||
|
||||
|
||||
/* cache.php */
|
||||
#core-cache-settings {} /* General cache settings - Default front page */
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* Admin template - _blank theme
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2008-12-16 17:23:25 $
|
||||
* $Revision: 1.7 $
|
||||
* $Date: 2008-12-17 17:27:07 $
|
||||
* $Author: secretr $
|
||||
*
|
||||
*/
|
||||
@@ -104,18 +104,18 @@ $BUTTONS_START = '
|
||||
';
|
||||
$BUTTON = '
|
||||
<li>
|
||||
<a class="link" {ONCLICK}>» {LINK_TEXT}</a>
|
||||
<a class="link" href="{LINK_URL}"{ONCLICK}>» {LINK_TEXT}</a>
|
||||
</li>
|
||||
';
|
||||
$BUTTON_OVER = '
|
||||
<li>
|
||||
<a class="link-active" {ONCLICK}>» {LINK_TEXT}</a>
|
||||
<a class="link-active" href="{LINK_URL}"{ONCLICK}>» {LINK_TEXT}</a>
|
||||
</li>
|
||||
';
|
||||
$SUB_BUTTONS_START = '
|
||||
<ul class="plugin-navigation">
|
||||
<li>
|
||||
<a class="link" onclick="expandit(\'{SUB_HEAD_ID}\');" >» {SUB_HEAD}</a>
|
||||
<a class="link" href="{LINK_URL}"onclick="expandit(\'{SUB_HEAD_ID}\');" >» {SUB_HEAD}</a>
|
||||
<ul class="sub-nav" id="{SUB_HEAD_ID}" style="display: none">
|
||||
';
|
||||
$SUB_BUTTON = '
|
||||
|
Reference in New Issue
Block a user