This reverts commit e9ad11742876f9f78d743a28afd547ee7480c7f9, reversing
changes made to f30fc6204a6bc7643d7952b1df98a3aa7b462dea.
This commit is contained in:
azett 2022-07-02 13:30:56 +02:00
parent fa95af79fc
commit af1aa7759b
150 changed files with 1527 additions and 4763 deletions

3
.gitignore vendored
View File

@ -7,8 +7,7 @@
/.buildpath /.buildpath
/.project /.project
/.settings /.settings
/.vscode
/fp-content/attachs /fp-content/attachs
/fp-content/images /fp-content/images
/fp-content_ /fp-content_
/fp-content__ /fp-content__

View File

@ -1,6 +1,5 @@
# Under development: [FlatPress 1.3](https://github.com/flatpressblog/flatpress/releases/tag/1.3) # Under development: [FlatPress 1.3](https://github.com/flatpressblog/flatpress/releases/tag/1.3)
## General ## General
- New responsive Admin Area: All the functions you know, but fresh'n'clean, and adapts to your screen size
- Added [SECURITY.md](https://github.com/flatpressblog/flatpress/blob/master/SECURITY.md) - Added [SECURITY.md](https://github.com/flatpressblog/flatpress/blob/master/SECURITY.md)
- [README](https://github.com/flatpressblog/flatpress/blob/master/README.md): added "help and support" section - [README](https://github.com/flatpressblog/flatpress/blob/master/README.md): added "help and support" section

View File

@ -1,123 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$flatpress.title}{$pagetitle}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$flatpress.charset}" />
<meta name="viewport" content="width=device-width, user-scalable=no">
<link href="https://fonts.googleapis.com/css?family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{$smarty.const.BLOG_BASEURL}/fp-includes/bootstrap/css/bootstrap.min.css">
<script src="{$smarty.const.BLOG_BASEURL}/fp-includes/jquery/jquery.min.js"></script>
<link rel="stylesheet" href="{$smarty.const.BLOG_BASEURL}/admin/res/admin.css">
<link rel="stylesheet" href="{$smarty.const.BLOG_BASEURL}/fp-includes/themify-icons/themify-icons.css">
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/admin.js" ></script>
<link rel="stylesheet" href="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/themes/default.min.css" />
</head>
{if isset($action)}
<body class="{"admin-$panel-$action"|tag:admin_body_class}">
{else}
<body class="{"admin-$panel"|tag:admin_body_class}">
{/if}
<nav class="navbar navbar-dark flex-md-nowrap top-nav top-color">
<div class="container-fluid">
<div class="row master-row top-row mobile_menu_hide">
<div class="col-lg-6"><a href="#" onclick="mobile_open_button()"><span class="ti-menu mobile-menu" style="color: #fff;"></span></a><h3><span class="ti-arrow-circle-right"></span> {if isset($panelstrings.head)}{$panelstrings.head}{/if}</h3></div>
<div class="col-lg-6 top-right-bar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="login.php?do=logout">
<span class="d-lg-inline small"><span class="ti-power-off"></span><span class="top_menu_item"> {$logout}</span></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" target="_blank" href="https://wiki.flatpress.org/">
<span class="d-lg-inline small"><span class="ti-help-alt"></span><span class="top_menu_item"> {$help_top}</span></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="admin.php?p=config">
<span class="d-lg-inline small"><span class="ti-user"></span><span class="top_menu_item"> {$username}</span></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{$smarty.const.BLOG_BASEURL}">
<span class="d-lg-inline small"><span class="ti-home"></span><span class="top_menu_item"> {$blog}</span></span>
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
<div class="top-background top-color shadow mobile_menu_hide"></div>
<div class="container-fluid">
<div class="row master-row">
<nav class="bg-light sidebar left-sidebar" id="sidebar">
<a href="admin.php">
<div class="admin-logo">
<img src="{$smarty.const.BLOG_BASEURL}/admin/res/fp-logo.png">
</div>
</a>
<div class="admin-logo-border"></div>
<div class="sidebar-sticky">
<ul class="nav flex-column">
{foreach from=$menubar item=tab}
{if isset($tab) && isset($panel) && $tab eq $panel}
<li id="admin-{$tab}" class="nav-item">
<a id="admin-link-{$tab}" class="admin-tab-current nav-link active" href="{$smarty.const.BLOG_BASEURL}admin.php?p={$tab}">
{$lang.admin.panels[$tab]|default:$tab}
</a>
</li>
{if isset($submenu)}
<ul class="nav flex-column submenu">
{foreach from=$submenu key=subtab item=item}
{if isset($item) && $item}
<li id="admin-{$panel}-{$subtab}" class="nav-item">
<a class="nav-link{if isset($action) && isset($subtab) && $action == $subtab} sub-active{/if}"
href="{$smarty.const.BLOG_BASEURL}admin.php?p={$panel}&amp;action={$subtab}">
<span class="ti-arrow-circle-right"></span>
{$lang.admin[$panel].submenu[$subtab]|default:$subtab}
</a>
</li>
{/if}
{/foreach}
</ul>
{/if}
{else}
<li id="admin-{$tab}" class="nav-item">
<a id="admin-link-{$tab}" class="nav-link" href="{$smarty.const.BLOG_BASEURL}admin.php?p={$tab}">
{$lang.admin.panels[$tab]|default:$tab}
</a>
</li>
{/if}
{/foreach}
<li id="close-button">
<div class="admin-logo-border"></div>
<a class="nav-link" onclick="mobile_close_button()">
<div class="btn btn-primary">
<span class="ti-close"></span>
{$close}
</div>
</a>
</li>
</ul>
<script>generate_menu_icons()</script>
</div>
</nav>
<main role="main" class="container-fluid mobile_menu_hide">
{page}
<div class="body">{controlpanel}</div>
{/page}
</div>
<div id="footer" class="mobile_menu_hide">
{action hook=wp_footer}
<p>
{$footer} <a href="http://www.flatpress.org/">FlatPress</a>.
</p>
</div> <!-- end of #footer -->
</main>
</div>
</body>
</html>

View File

@ -1,41 +0,0 @@
<?php
/* An admin AJAX Functions */
$AjaxFunctionMap = [];
define('ROOT_CONTENT', [
['attachs', true],
['images', true]
]);
$AjaxFunctionListMediaDirectory = function($route) {
$newRoute = FP_CONTENT . $route;
$dirContent = scandir($newRoute);
if(!$dirContent) {
throw new Exception('Error when trying to access the folder'.$newRoute);
}
$result = [];
if(!strlen($route)) { // Root. We show only images and attachs dir
checkIfDirAndAttachsDirExists();
return ROOT_CONTENT;
}
for($i = 2; $i < sizeof($dirContent); ++$i) { // Result = [[dir1, true], [file1, false], [file2, false]] ...
array_push($result, []);
array_push($result[$i - 2], $dirContent[$i]);
array_push($result[$i - 2], is_dir($newRoute . $dirContent[$i])); // True if is dir, false is not
}
return $result;
};
function checkIfDirAndAttachsDirExists() {
if (!file_exists(IMAGES_DIR)) {
fs_mkdir(IMAGES_DIR);
}
if (!file_exists(ATTACHS_DIR)) {
fs_mkdir(ATTACHS_DIR);
}
}
$AjaxFunctionMap['ListMediaDirectory'] = $AjaxFunctionListMediaDirectory;
?>

BIN
admin/imgs/config.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
admin/imgs/entries.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
admin/imgs/maintain.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
admin/imgs/newentry.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
admin/imgs/plugins.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

BIN
admin/imgs/widgets.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

19
admin/main.php Normal file → Executable file
View File

@ -170,22 +170,6 @@ $v = $lang ['admin'] [$panel] [$action];
$smarty->assign_by_ref('panelstrings', $v); $smarty->assign_by_ref('panelstrings', $v);
$smarty->assign_by_ref('plang', $v); $smarty->assign_by_ref('plang', $v);
// We create a varible to write user name in tpls
if($user = user_loggedin()) {
$smarty->assign("username", $user['userid']);
} else {
$smarty->assign("username", "#NAME#");
}
// Custom lang message for admin panel
$smarty->assign("help_top", $lang['admin']['general']['help_top']);
$smarty->assign("logout", $lang['admin']['general']['logout_top']);
$smarty->assign("close", $lang['admin']['general']['close']);
$smarty->assign("blog", $lang['admin']['general']['blog']);
$smarty->assign("footer", $lang['admin']['general']['footer']);
$smarty->assign("sceditor_display", "bbcode");
if (isset($_GET ['mod'])) { if (isset($_GET ['mod'])) {
switch ($_GET ['mod']) { switch ($_GET ['mod']) {
@ -196,8 +180,7 @@ if (isset($_GET ['mod'])) {
echo $smarty->get_template_vars('success'); echo $smarty->get_template_vars('success');
} }
} else { } else {
#$smarty->display('admin.tpl'); $smarty->display('admin.tpl');
$smarty->display(ABS_PATH . ADMIN_DIR . 'admin.tpl');
} }
?> ?>

34
admin/main.tpl Normal file → Executable file
View File

@ -1,4 +1,38 @@
<ul id="admin-tabmenu">
{foreach from=$menubar item=tab}
{if $tab eq $panel}
<li id="admin-{$tab}">
<a class="admin-tab-current" href="{$smarty.const.BLOG_BASEURL}admin.php?p={$tab}">
{$lang.admin.panels[$tab]|default:$tab}
</a>
</li>
{else}
<li id="admin-{$tab}">
<a href="{$smarty.const.BLOG_BASEURL}admin.php?p={$tab}">
{$lang.admin.panels[$tab]|default:$tab}
</a>
</li>
{/if}
{/foreach}
</ul>
{if isset($submenu)}
<ul id="admin-submenu">
{foreach from=$submenu key=subtab item=item}
{if $item}
<li id="admin-{$panel}-{$subtab}">
<a {if $action == $subtab}class="active" {/if}
href="{$smarty.const.BLOG_BASEURL}admin.php?p={$panel}&amp;action={$subtab}">
{$lang.admin[$panel].submenu[$subtab]|default:$subtab}
</a>
</li>
{/if}
{/foreach}
</ul>
{/if}
<div id="admin-content"> <div id="admin-content">
{if isset($action)} {if isset($action)}
{include file=$admin_resource|default:"admin:$panel/$action"} {include file=$admin_resource|default:"admin:$panel/$action"}

View File

@ -67,7 +67,7 @@
'style' => @$fp_config['general']['style'], 'style' => @$fp_config['general']['style'],
'blogid' => $fp_config['general']['blogid'], 'blogid' => $fp_config['general']['blogid'],
'charset'=> 'utf-8', 'charset'=> 'utf-8',
'sceditor_display' => $_POST['sceditor_format']
); );
$fp_config['locale'] = array( $fp_config['locale'] = array(

289
admin/panels/config/admin.config.tpl Normal file → Executable file
View File

@ -1,143 +1,186 @@
{include file='shared:admin_errorlist.tpl'} {include file='shared:errorlist.tpl'}
{html_form} {html_form}
<div class="row">
<div class="col-xl-12 col-lg-12"> <div id="admin-config" class="option-set">
<div class="card shadow mb-4">
<div class="card-header"> <div id="admin-config-general">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6>
</div> <h2> {$panelstrings.gensetts} </h2>
<div class="card-body options_page">
<div class="row"> <dl class="option-list">
<div class="col-lg-6 mb-4"> <dt><label for="title"> {$panelstrings.blogtitle} </label></dt>
<div id="admin-config-general"> {if isset($error) && isset($error.title) && !empty($error.title)}
<h2>{$panelstrings.gensetts}</h2> {assign var=class value=" field-error"}
<dl class="option-list"> {else}
<dt><label for="title"> {$panelstrings.blogtitle} </label></dt> {assign var=class value=""}
<dd><input type="text" name="title" id="title" class="textinput{if isset($error)}{$error.title|notempty:' field-error'}{/if} form-control input_gray" {/if}
value="{$flatpress.TITLE|escape:"html"}" /> <dd><input type="text" name="title" id="title" class="textinput {$class}"
</dd> value="{$flatpress.TITLE|escape:"html"}" />
</dd>
<dt><label for="subtitle"> {$panelstrings.blogsubtitle} </label></dt>
<dd><input type="text" name="subtitle" id="subtitle" class="bigtextinput" value="{$flatpress.subtitle|escape:"html"}" /></dd>
<dt><label for="blogfooter"> {$panelstrings.blogfooter} </label></dt>
<dd><input type="text" name="blogfooter" id="blogfooter" class="textinput" value="{$flatpress.footer|escape:"html"}" /></dd>
<dt><label for="author"> {$panelstrings.blogauthor} </label></dt>
<dd><input type="text" name="author" id="author" class="textinput" value="{$flatpress.author}" /></dd>
<dt><label for="www"> {$panelstrings.blogurl} </label></dt>
{if isset($error) && isset($error.www) && !empty($error.www)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd><input type="text" name="www" id="www" class="textinput {$class}"
value="{$flatpress.www|escape:"html"}" /></dd>
<dt><label for="email"> {$panelstrings.blogemail} </label></dt>
{if isset($error) && isset($error.email) && !empty($error.email)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd><input type="text" name="email" id="email" class="textinput {$class}"
value="{$flatpress.email}" /></dd>
<dt> {$panelstrings.notifications} </dt>
<dd>
<label for="notify">
<input type="checkbox" name="notify" id="notify"{if $flatpress.NOTIFY}checked="checked"{/if} />
{$panelstrings.mailnotify}
</label>
</dd>
<dt><label for="startpage"> {$panelstrings.startpage} </label></dt>
<dd><select name="startpage" id="startpage" class="textinput">
<option value=":NULL:">
{$panelstrings.stdstartpage}
</option>
{foreach from=$static_list key=staticid item=staticpage}
<option value="{$staticid}"{if $staticid == $fp_config.general.startpage} selected="selected"{/if}>
{$staticpage.subject}
</option>
{/foreach}
</select>
</dd>
<dt><label for="maxentries"> {$panelstrings.blogmaxentries} </label></dt>
{if isset($error) && isset($error.maxentries) && !empty($error.maxentries)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd><input type="text" name="maxentries" id="maxentries"
class="smalltextinput {$class}" value="{$flatpress.maxentries}" /></dd>
</dl>
</div>
<div id="admin-config-intsetts">
<h2> {$panelstrings.intsetts} </h2>
<dl class="option-list">
<dt> {$panelstrings.utctime} </dt>
{assign var=temp_time value="%b %d %Y %H:%M:%S"}
<dd> <code> {"r"|date:$smarty.now} </code> </dd>
<dt><label for="timeoffset"> {$panelstrings.timeoffset} </label></dt>
{if isset($error) && isset($error.timeoffset) && !empty($error.timeoffset)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd><input type="text" name="timeoffset" id="timeoffset"
class="smalltextinput {$class}"
value="{$fp_config.locale.timeoffset}" /> {$panelstrings.hours}
</dd>
<dt><label for="subtitle"> {$panelstrings.blogsubtitle} </label></dt> <dt><label for="dateformat"> {$panelstrings.dateformat} </label></dt>
<dd><input type="text" name="subtitle" id="subtitle" class="bigtextinput form-control input_gray" value="{$flatpress.subtitle|escape:"html"}" /></dd> {if isset($error) && isset($error.dateformat) && !empty($error.dateformat)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd> <p> <input type="text" name="dateformat" id="dateformat"
class="textinput {$class}"
value="{$fp_config.locale.dateformat}" /> </p>
<p> {$panelstrings.output}: {$smarty.now|date_format:$fp_config.locale.dateformat} </p>
</dd>
<dt><label for="blogfooter"> {$panelstrings.blogfooter} </label></dt> <dt><label for="dateformatshort"> {$panelstrings.dateformatshort} </label></dt>
<dd><input type="text" name="blogfooter" id="blogfooter" class="textinput form-control input_gray" value="{$flatpress.footer|escape:"html"}" /></dd> {if isset($error) && isset($error.dateformatshort) && !empty($error.dateformatshort)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd> <p> <input type="text" name="dateformatshort" id="dateformatshort"
class="textinput {$class}"
value="{$fp_config.locale.dateformatshort}" /> </p>
<p> {$panelstrings.output}: {$smarty.now|date_format:$fp_config.locale.dateformatshort} </p>
</dd>
<dt><label for="author"> {$panelstrings.blogauthor} </label></dt> <dt><label for="timeformat"> {$panelstrings.timeformat} </label></dt>
<dd><input type="text" name="author" id="author" class="textinput form-control input_gray" value="{$flatpress.author}" /></dd> {if isset($error) && isset($error.timeformat) && !empty($error.timeformat)}
{assign var=class value=" field-error"}
{else}
<dt><label for="www"> {$panelstrings.blogurl} </label></dt> {assign var=class value=""}
<dd><input type="text" name="www" id="www" class="form-control input_gray textinput{if isset($error)}{$error.www|notempty:" field-error"}{/if}" {/if}
value="{$flatpress.www|escape:"html"}" /></dd> <dd> <p> <input type="text" name="timeformat" id="timeformat"
class="textinput {$class}"
value="{$fp_config.locale.timeformat}" /> </p>
<dt><label for="email"> {$panelstrings.blogemail} </label></dt>
<dd><input type="text" name="email" id="email" class="form-control input_gray textinput{if isset($error)}{$error.email|notempty:" field-error"}{/if}"
value="{$flatpress.email}" /></dd>
<dt> {$panelstrings.notifications} </dt>
<dd>
<label for="notify">
<input type="checkbox" name="notify" id="notify"{if isset($flatpress.NOTIFY) && $flatpress.NOTIFY}checked="checked"{/if} />
{$panelstrings.mailnotify}
</label>
</dd>
<dt><label for="startpage"> {$panelstrings.startpage} </label></dt>
<dd><select name="startpage" id="startpage" class="textinput form-select form-control input_gray">
<option value=":NULL:">
{$panelstrings.stdstartpage}
</option>
{foreach from=$static_list key=staticid item=staticpage}
<option value="{$staticid}"{if $staticid == $fp_config.general.startpage} selected="selected"{/if}>
{$staticpage.subject}
</option>
{/foreach}
</select>
</dd>
<dt><label for="maxentries"> {$panelstrings.blogmaxentries} </label></dt>
<dd><input type="text" name="maxentries" id="maxentries"
class="form-control input_gray smalltextinput{if isset($error)}{$error.maxentries|notempty:" field-error"}{/if}" value="{$flatpress.maxentries}" /></dd>
</dl>
</div>
</div>
<div class="col-lg-6 mb-4">
<div id="admin-config-intsetts">
<h2> {$panelstrings.intsetts} </h2>
<dl class="option-list">
<dt> {$panelstrings.utctime} </dt>
{assign var=temp_time value="%b %d %Y %H:%M:%S"}
<dd> <code> {"r"|date:$smarty.now} </code> </dd>
<dt><label for="timeoffset"> {$panelstrings.timeoffset} </label></dt>
<dd><input type="text" name="timeoffset" id="timeoffset"
class="form-control input_gray smalltextinput{if isset($error)}{$error.timeoffset|notempty:" field-error"}{/if}"
value="{$fp_config.locale.timeoffset}" /> {$panelstrings.hours}
</dd>
<dt><label for="dateformat"> {$panelstrings.dateformat} </label></dt>
<dd> <p> <input type="text" name="dateformat" id="dateformat"
class="form-control input_gray textinput{if isset($error)}{$error.dateformat|notempty:" field-error"}{/if}"
value="{$fp_config.locale.dateformat}" /> </p>
<p> {$panelstrings.output}: {$smarty.now|date_format:$fp_config.locale.dateformat} </p>
</dd>
<dt><label for="dateformatshort"> {$panelstrings.dateformatshort} </label></dt>
<dd> <p> <input type="text" name="dateformatshort" id="dateformatshort"
class="form-control input_gray textinput{if isset($error)}{$error.dateformatshort|notempty:" field-error"}{/if}"
value="{$fp_config.locale.dateformatshort}" /> </p>
<p> {$panelstrings.output}: {$smarty.now|date_format:$fp_config.locale.dateformatshort} </p>
</dd>
<dt><label for="timeformat"> {$panelstrings.timeformat} </label></dt>
<dd> <p> <input type="text" name="timeformat" id="timeformat"
class="form-control input_gray textinput{if isset($error)}{$error.timeformat|notempty:" field-error"}{/if}"
value="{$fp_config.locale.timeformat}" /> </p>
{assign var=currentTime value=$smarty.now} {assign var=currentTime value=$smarty.now}
{assign var=timeDiff value=$fp_config.locale.timeoffset} {assign var=timeDiff value=$fp_config.locale.timeoffset}
{assign var=TimeDiffUTC value=$currentTime+$timeDiff*3600} {assign var=TimeDiffUTC value=$currentTime+$timeDiff*3600}
<p> {$panelstrings.output}: {$TimeDiffUTC|date_format:$fp_config.locale.timeformat} </p> <p> {$panelstrings.output}: {$TimeDiffUTC|date_format:$fp_config.locale.timeformat} </p>
</dd> </dd>
<dt><label for="lang"> {$panelstrings.langchoice} </label></dt>
<dd>
<select name="lang" id="lang" class="textinput">
{foreach from=$lang_list item=langsetts}
<option value="{$langsetts.locale}"
{if $langsetts.locale == $fp_config.locale.lang}selected="selected"{/if}>
{$langsetts.id}
</option>
{/foreach}
</select>
</dd>
<dt> <label for="charset"> {$panelstrings.charset} </label></dt>
{if isset($error) && isset($error.charset) && !empty($error.charset)}
{assign var=class value=" field-error"}
{else}
{assign var=class value=""}
{/if}
<dd> <p><input type="text" name="charset" id="charset"
class="smalltextinput {$class}"
value="{$fp_config.locale.charset}" /></p>
<p>{$panelstrings.charsettip}</p>
</dd>
<dt><label for="lang"> {$panelstrings.langchoice} </label></dt> </dl>
<dd>
<select name="lang" id="lang" class="form-control form-select input_gray textinput">
{foreach from=$lang_list item=langsetts}
<option value="{$langsetts.locale}"
{if $langsetts.locale == $fp_config.locale.lang}selected="selected"{/if}>
{$langsetts.id}
</option>
{/foreach}
</select>
</dd>
<dt> <label for="charset"> {$panelstrings.charset} </label></dt>
<dd> <p><input type="text" name="charset" id="charset"
class="form-control input_gray smalltextinput{if isset($error)}{$error.charset|notempty:" field-error"}{/if}"
value="{$fp_config.locale.charset}" /></p>
<p>{$panelstrings.charsettip}</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="buttonbar">
{html_submit name="save" id="save" class="btn btn-primary" value=$panelstrings.submit}
</div>
</div>
</div>
</div>
</div> </div>
</div>
<div class="buttonbar">
{html_submit name="save" id="save" value=$panelstrings.submit}
</div>
{/html_form} {/html_form}

View File

@ -20,6 +20,7 @@
function main() { function main() {
if (isset($_GET['do']) && $_GET['do'] == 'clear') { if (isset($_GET['do']) && $_GET['do'] == 'clear') {
$ret1 = fs_delete(CONTENT_DIR . 'categories_encoded.dat') && $ret1 = fs_delete(CONTENT_DIR . 'categories_encoded.dat') &&
$ret2 = fs_delete(CONTENT_DIR . 'categories.txt'); $ret2 = fs_delete(CONTENT_DIR . 'categories.txt');

57
admin/panels/entry/admin.entry.cats.tpl Normal file → Executable file
View File

@ -1,32 +1,27 @@
{include file=shared:admin_errorlist.tpl} <h2>{$panelstrings.head}</h2>
{include file=shared:errorlist.tpl}
<div class="row">
<div class="col-xl-8 col-lg-7"> {$panelstrings.descr}
<div class="card shadow mb-4">
<div class="card-header"> <p><a href="?p=entry&amp;action=cats&amp;do=clear">{$panelstrings.clear}</a></p>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6>
</div>
<div class="card-body">
{html_form} {if !isset($catdefs)}
<p> {assign var=catdefs value=""}
<textarea name="content" id="content" class="form-control cat-textarea" rows="20" cols="74">{if isset($catdefs)}{$catdefs|escape}{/if}</textarea> {/if}
</p> {html_form}
<div class="buttonbar text-center">
{html_submit name="save" id="save" class="btn btn-primary" value=$panelstrings.submit} <p>
<a class="btn btn-secondary" href="?p=entry&amp;action=cats&amp;do=clear">{$panelstrings.clear}</a> <textarea name="content" id="content" rows="20" cols="74">{$catdefs|escape}</textarea><br />
</div> </p>
{/html_form}
</div>
</div> <div class="buttonbar">
</div>
<div class="col-xl-4 col-lg-5"> {html_submit name="save" id="save" value=$panelstrings.submit}
<div class="card shadow mb-4">
<div class="card-header"> </div>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.cats_info}</h6>
</div> {/html_form}
<div class="card-body">
{$panelstrings.descr}
</div>
</div>
</div>
</div>

View File

@ -1,56 +1,54 @@
{html_form} <h2>{$plang.head} <a href="admin.php?p=entry&amp;action=write&amp;entry={$entryid}">{$entrysubject}</a></h2>
<p>{$plang.descr}</p>
{include file='shared:admin_errorlist.tpl'}
<div class="row"> {html_form}
<div class="col-lg-6 mb-4">
<div class="card shadow mb-4 edit_comments"> {include file='shared:errorlist.tpl'}
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$plang.head} {$entrysubject}</h6>
</div>
<div class="card-body">
<p><input type="hidden" name="entry" value="{$entryid}" /><input type="hidden" name="comment" value="{$id}" />
<div class="option-set">
<dl>
<dt><label class="textlabel" for="name">{$plang.author}</label></dt>
<dd>
<input type="text" class="bigtextinput {$error.name|notempty:'field-error'} form-control input_gray" name="name" id="name" value="{$values.name}" />
</dd>
<dt><label class="textlabel" for="email">{$plang.email}</label></dt> <p><input type="hidden" name="entry" value="{$entryid}" /><input type="hidden" name="comment" value="{$id}" />
<dd>
<input type="text" class="bigtextinput {$error.email|notempty:'field-error'} form-control input_gray" name="email" id="email" value="{$values.email}" />
</dd>
<dt><label class="textlabel" for="www">{$plang.www}</label></dt> <div class="option-set">
<dd> <dl>
<input type="text" class="bigtextinput {$error.www|notempty:'field-error'} form-control input_gray" name="url" id="url" value="{$values.url}" /> <dt><label class="textlabel" for="name">{$plang.author}</label></dt>
</dd> <dd>
<input type="text" class="bigtextinput {$error.name|notempty:'field-error'}" name="name" id="name" value="{$values.name}" />
</dd>
<dt><label class="textlabel" for="email">{$plang.email}</label></dt>
<dd>
<input type="text" class="bigtextinput {$error.email|notempty:'field-error'}" name="email" id="email" value="{$values.email}" />
</dd>
<dt><label class="textlabel" for="www">{$plang.www}</label></dt>
<dd>
<input type="text" class="bigtextinput {$error.www|notempty:'field-error'}" name="url" id="url" value="{$values.url}" />
</dd>
<dt><label class="textlabel" for="ip">{$plang.ip}</label></dt> <dt><label class="textlabel" for="ip">{$plang.ip}</label></dt>
<dd> <dd>
<input type="text" id="ip" name="ip" class="bigtextinput form-control" value="{$values.ip_address}" disabled="disabled" /> <input type="text" id="ip" name="ip" class="bigtextinput" value="{$values.ip_address}" disabled="disabled" />
</dd> </dd>
<dt><label class="textlabel" for"loggedin">{$plang.loggedin}</label></dt> <dt><label class="textlabel" for"loggedin">{$plang.loggedin}</label></dt>
<dd> <dd>
<input type="checkbox" id="loggedin" name="loggedin" {if $values.loggedin} checked="checked" {/if} disabled="disabled" /> <input type="checkbox" id="loggedin" name="loggedin" {if $values.loggedin} checked="checked" {/if} disabled="disabled" />
</dd> </dd>
</dl> </dl>
</div>
<div class="option-set">
<textarea name="content" {$error.content|notempty:'class="field-error"'}
id="content" class="form-control input_gray">{$values.content}</textarea>
</div>
<div class="buttonbar">
<input type="submit" name="save" id="submit" value="{$plang.submit}" class="btn btn-primary" />
</div>
</div>
</div>
</div> </div>
<div class="option-set">
<textarea name="content" {$error.content|notempty:'class="field-error"'}
id="content" rows="10" cols="74">{$values.content}</textarea>
</div>
<div class="buttonbar">
<input type="submit" name="save" id="submit" value="{$plang.submit}" />
</div> </div>
{/html_form} {/html_form}

View File

@ -1,8 +1,18 @@
{include file="shared:admin_errorlist.tpl"}
{entry_block} {entry_block}
{entry} {entry}
<h2>{$panelstrings.head} <a href="admin.php?p=entry&amp;action=write&amp;entry={$id}">{$subject}</a></h2>
{include file=shared:errorlist.tpl}
<p>{$panelstrings.descr}</p>
{comment_block} {comment_block}
{html_form} {html_form}
<script> <script>
{literal} {literal}
@ -10,51 +20,38 @@ function admin_entry_comment_delete() { return confirm({/literal}'{$plang.act_de
{/literal} {/literal}
</script> </script>
<div class="row"> <table class="entrylist">
<div class="col-xl-8 col-lg-7"> <thead><tr>
<div class="card shadow mb-4"> <th>{$panelstrings.date}</th>
<div class="card-header"> <th>{$panelstrings.content}</th>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head} {$subject}</h6> <th>{$panelstrings.author}</th>
</div> <th>{$panelstrings.email}</th>
<div class="card-body"> <th>{$panelstrings.ip}</th>
<div class="table-responsive"> <th>{$panelstrings.actions}</th>
<table class="entrylist table"> </tr></thead>
<thead><tr> <tbody>
<th>{$panelstrings.date}</th> {comment}
<th>{$panelstrings.content}</th> <tr>
<th>{$panelstrings.author}</th> {*<td><input type="checkbox" /></td>*}
<th>{$panelstrings.email}</th> <td>{$date|date_format:"%D, %T"}</td>
<th>{$panelstrings.ip}</th> <td class="main_cell">
<th>{$panelstrings.actions}</th> {$content|strip_tags|truncate:70}
</tr></thead> </td>
<tbody> <td>{if $url}<a href="{$url}">{$name}</a>{else}{$name}{/if}</td>
{comment} <td><a href="mailto:{$email}">{$email}</a></td>
<tr> <td>{$ip_address}</td>
{*<td><input type="checkbox" /></td>*} <td>
<td>{$date|date_format:"%D, %T"}</td> <a class="link-general"
<td class="main_cell"> href="{"`$panel_url`&entry=`$entryid`"|action_link:commedit|cmd_link:comment:$id}">
{$content|strip_tags|truncate:70} {$plang.act_edit}
</td> </a>
<td>{if $url}<a href="{$url}">{$name}</a>{else}{$name}{/if}</td> <a class="link-delete" onclick="return admin_entry_comment_delete();" href="{"`$panel_url`&entry=`$entryid`"|action_link:commentlist|cmd_link:delete:$id}">
<td><a href="mailto:{$email}">{$email}</a></td> {$plang.act_del}
<td>{$ip_address}</td> </a>
<td> </td>
<a class="link-general" </tr>
href="{"`$panel_url`&entry=`$entryid`"|action_link:commedit|cmd_link:comment:$id}"> {/comment}
{$plang.act_edit} </tbody></table>
</a>
<a class="link-delete" onclick="return admin_entry_comment_delete();" href="{"`$panel_url`&entry=`$entryid`"|action_link:commentlist|cmd_link:delete:$id}">
{$plang.act_del}
</a>
</td>
</tr>
{/comment}
</tbody></table>
</div>
</div>
</div>
</div>
</div>
{/html_form} {/html_form}
{/comment_block} {/comment_block}

View File

@ -1,25 +1,19 @@
<div class="row"> <h2>{$panelstrings.head}</h2>
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4"> <p>{$panelstrings.descr}</p>
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> {entry_block}
</div> {html_form}
<div class="card-body"> <fieldset><legend>{$panelstrings.preview}</legend>
{entry_block} {include file=preview.tpl}
{html_form} </fieldset>
{include file=preview.tpl} <p>{$panelstrings.confirm}</p>
</fieldset>
</br> <input type="hidden" name="entry" value="{$id}" />
<p class="delete_confirm">{$panelstrings.confirm}</p> <div class="buttonbar">
{html_submit name="delete" id="delete" value=$panelstrings.ok}
<input type="hidden" name="entry" value="{$id}" /> {html_submit name="cancel" id="cancel" value=$panelstrings.cancel}
<div class="buttonbar">
{html_submit name="delete" id="delete" class="btn btn-primary" value=$panelstrings.ok}
{html_submit name="cancel" id="cancel" class="btn btn-secondary" value=$panelstrings.cancel}
</div>
{/html_form}
{/entry_block}
</div>
</div>
</div> </div>
</div> {/html_form}
{/entry_block}

195
admin/panels/entry/admin.entry.list.tpl Normal file → Executable file
View File

@ -1,103 +1,98 @@
{include file=shared:admin_errorlist.tpl}
<div class="row"> <h2>{$panelstrings.head}</h2>
<div class="col-xl-8 col-lg-7">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6>
</div>
<div class="card-body">
<div class="table-responsive table-striped">
<table class="entrylist table">
<thead><tr>{*<th>{$panelstrings.sel}</th>*}
<th>{$panelstrings.date}</th>
<th class="main-cell">{$panelstrings.title}</th>
<!-- <th>{$panelstrings.author}</th> -->
<th>{$panelstrings.comms}</th>
<th>{$panelstrings.action}</th></tr></thead>
<tbody>
{entry}
<tr>
<td>{$id|entry_idtotime|date_format:"`$fp_config.locale.dateformatshort`, `$fp_config.locale.timeformat`"}</td>
<td class="main-cell">
{if isset($categories) && in_array('draft',$categories)}
(<em class="entry-flag">{$lang.entry.flags.short.draft}</em>)
{/if}
<a class="link-general"
href="{$panel_url|action_link:write}&amp;entry={$id}">
{$subject|truncate:70}
</a>
</td>
<!-- <td>{$author}</td> -->
<td><a class="link-general"
href="{$panel_url|action_link:commentlist}&amp;entry={$id}">
{* Compatibility with pre-0.702 *}
{$commentcount|default:$comments}
<span class="ti-comments"></span></a></td>
<td>
<a class="link-general"
href="{$id|link:post_link}">
<span class="ti-desktop"></span>
{$panelstrings.act_view}
</a>
<a class="link-general"
href="{$panel_url|action_link:write}&amp;entry={$id}">
<span class="ti-pencil-alt"></span>
{$panelstrings.act_edit}
</a>
<a class="link-delete"
href="{$panel_url|action_link:delete}&amp;entry={$id}">
<span class="ti-trash"></span>
{$panelstrings.act_del}
</a>
</td>
</tr>
{/entry}
</tbody></table>
</div>
{entry_block}
<div class="navigation">
<div class="prevpage">{prevpage admin=yes}</div>
<div class="nextpage">{nextpage admin=yes}</div>
</div>
</br>
{/entry_block}
<div class="entry_filter">
<form method="get" action="{if isset($smarty.request.PHP_SELF)}{$smarty.request.PHP_SELF}{/if}?p=entry">
<p> <input type="hidden" name="p" value="entry" /> </p>
<select name="category" class="alignleft form-control select_filter">
<option label="Unfiltered" value="all">{$panelstrings.nofilter}</option>
{*html_options options=$lang.entry.flags.short selected=$smarty.request.cat*}
{html_options options=$categories_all selected=$smarty.request.category}
</select>
{html_submit name='filter' id='filter' class="alignright btn btn-primary select_filter apply_filter_button" value=$panelstrings.filterbtn}
</fieldset>
</form>
</div>
<a href="admin.php?p=entry&action=write" class="btn btn-primary new_entry_button"><span class="ti-user text-white-100 small"></span> {$panelstrings.add_new_entry}</a>
</div>
</div>
</div>
{draft_block}
<div class="col-xl-4 col-lg-5">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.your_drafts}</h6>
</div>
<div class="card-body">
<div id="admin-drafts">
<ul>
{draft}
<li>
<a href="admin.php?p=entry&amp;entry={$id}&amp;action=write">{$subject|truncate:70}</a>
</li>
{/draft}
</ul>
</div>
</div>
</div>
</div>
{/draft_block}
</div>
{draft_block}
<div id="admin-drafts">
<p>Your drafts:</p>
<ul>
{draft}
<li>
<a href="admin.php?p=entry&amp;entry={$id}&amp;action=write">{$subject|truncate:70}</a>
</li>
{/draft}
</ul>
</div>
{/draft_block}
{include file=shared:errorlist.tpl}
<p>{$panelstrings.descr}</p>
<form method="get" action="{$smarty.server.PHP_SELF}?p=entry">
<p> <input type="hidden" name="p" value="entry" /> </p>
<fieldset><legend>{$panelstrings.filter}</legend>
<select name="category" class="alignleft">
<option label="Unfiltered" value="all">{$panelstrings.nofilter}</option>
{*html_options options=$lang.entry.flags.short selected=$smarty.request.cat*}
{if isset($smarty.request.category)} {assign var=category value=$smarty.request.category} {else} {assign var=category value=""}{/if}
{html_options options=$categories_all selected=$category}
</select>
{html_submit name='filter' id='filter' class="alignright" value=$panelstrings.filterbtn}
</fieldset>
</form>
{entry_block}
<table class="entrylist">
<thead><tr>{*<th>{$panelstrings.sel}</th>*}
<th>{$panelstrings.date}</th>
<th class="main-cell">{$panelstrings.title}</th>
<!-- <th>{$panelstrings.author}</th> -->
<th>{$panelstrings.comms}</th>
<th>{$panelstrings.action}</th></tr></thead>
<tbody>
{entry}
<tr>
<td>{$id|entry_idtotime|date_format:"`$fp_config.locale.dateformatshort`, `$fp_config.locale.timeformat`"}</td>
<td class="main-cell">
{if in_array('draft',$categories)}
(<em class="entry-flag">{$lang.entry.flags.short.draft}</em>)
{/if}
<a class="link-general"
href="{$panel_url|action_link:write}&amp;entry={$id}">
{$subject|truncate:70}
</a>
</td>
<!-- <td>{$author}</td> -->
<td><a class="link-general"
href="{$panel_url|action_link:commentlist}&amp;entry={$id}">
{* Compatibility with pre-0.702 *}
{$commentcount|default:$comments}</a></td>
<td>
<a class="link-general"
href="{$id|link:post_link}">
{$panelstrings.act_view}
</a>
<a class="link-general"
href="{$panel_url|action_link:write}&amp;entry={$id}">
{$panelstrings.act_edit}
</a>
<a class="link-delete"
href="{$panel_url|action_link:delete}&amp;entry={$id}">
{$panelstrings.act_del}
</a>
</td>
</tr>
{/entry}
</tbody></table>
<div class="navigation">
{prevpage admin=yes}
{nextpage admin=yes}
</div>
{/entry_block}

View File

@ -1,6 +1,6 @@
<h2>{"Statistics"}</h2> <h2>{"Statistics"}</h2>
{include file='shared:admin_errorlist'} {include file='shared:errorlist.tpl'}
<h3>{"Entries"}</h3> <h3>{"Entries"}</h3>
{"<p>You have <strong>%s</strong> {"<p>You have <strong>%s</strong>

View File

@ -12,6 +12,9 @@
* @author NoWhereMan <real_nowhereman at users dot sf dot com> * @author NoWhereMan <real_nowhereman at users dot sf dot com>
* *
*/ */
class admin_entry_write extends AdminPanelActionValidated { class admin_entry_write extends AdminPanelActionValidated {
@ -79,11 +82,12 @@
$this->id = @$_REQUEST['entry']; $this->id = @$_REQUEST['entry'];
$this->smarty->assign('id', $this->id); $this->smarty->assign('id', $this->id);
global $fp_config;
$this->smarty->assign("lang_locale", $fp_config['locale']['lang']);
} }
function main() { function main() {
global $lang; global $lang;
$id = $this->id; $id = $this->id;

241
admin/panels/entry/admin.entry.write.tpl Normal file → Executable file
View File

@ -1,141 +1,49 @@
{include file='shared:admin_errorlist.tpl'} <h2>{$panelstrings.head}</h2>
{include file='shared:errorlist.tpl'}
{entry_block} {entry_block}
<div id="admin-post-preview">
{if isset($preview)} {if isset($preview)}
<div class="row"> <fieldset id="post-preview"><legend>{$panelstrings.preview}</legend>
<div class="col-xl-12 col-lg-12"> {include file=preview.tpl}
<div class="card shadow mb-4"> </fieldset>
<div class="card-header"> {/if}
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.preview}</h6>
</div>
<div class="card-body">
{include file=preview.tpl}
</div>
</div>
</div>
</div> </div>
{/if}
{html_form} {html_form}
{if !isset($post)} {if !isset($post)}
{assign var="post" value=""} {assign var=post value=""}
{/if} {/if}
{entry content=$post alwaysshow=true} {entry content=$post alwaysshow=true}
<div class="row"> <div id="admin-editor">
<div class="col-xl-8 col-lg-7"> <p><label for="subject">{$panelstrings.subject}</label><br />
<div class="card shadow mb-4"> {if isset($error) && isset($error.subject) && !empty($error.subject)}
<div class="card-header"> {assign var=class value="field-error"}
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> {else}
</div> {assign var=class value=""}
<div class="card-body">
<div id="admin-editor">
<input type="text" {if isset($error)}{$error.subject|notempty:'class="field-error form-control input_gray input-max-width"'}{/if}
name="subject" id="subject"
value="{$subject|default:$smarty.request.subject|wp_specialchars:1}" placeholder="{$panelstrings.subject}"/ class="form-control input_gray input-max-width"><br />
<input type="hidden" name="timestamp" value="{$date}" />
<input type="hidden" name="entry" value="{$id}" />
<p>
<textarea name="content" class="{if isset($error)}{$error.content|notempty:'field-error'}{/if} form-control"
id="content_textarea" placeholder="{$panelstrings.content}">{$content|default:$smarty.request.content|htmlspecialchars}</textarea><br />
{if isset($sceditor_display) && $sceditor_display != 'disable'}
<script src="{$smarty.const.BLOG_BASEURL}/fp-includes/bootstrap/js/bootstrap.min.js"></script>
<!-- Here is the SCEditor -->
<link rel="stylesheet" type="text/css" href="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/themes/square.min.css">
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/sceditor.min.js"></script>
<!--
{if $sce_display=='bbcode'}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/bbcode.js"></script>
{else}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/xhtml.js"></script>
{/if}
-->
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/bbcode.js"></script>
<script src="{$smarty.const.BLOG_BASEURL}/fp-interface/lang/{$lang_locale}/sceditor.js"></script>
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressFileManager.js"></script>
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressCustomBBCodes.js"></script>
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressEmojis.js"></script>
<script>
// Replace the textarea #example with SCEditor
var lang_editor = "{$lang_locale}";
var eRoot = "admin/res/sceditor/";
{literal}
var textarea = document.getElementById('content_textarea');
sceditor.create(textarea, {
plugins: 'flatPressFileManager',
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emojis,youtube,date,time|ltr,rtl|print,maximize,source',
emoticonsRoot: eRoot,
format: 'bbcode',
height: "400px",
locale: lang_editor
});
</script>
{/literal}
{/if}
{*here will go a plugin hook*}
</p>
</div>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-5">
<div class="card shadow mb-4 save_options">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.saveopts}</h6>
</div>
<div class="card-body">
<div class="buttonbar">
{html_submit name="save" id="save" class="btn btn-primary" value=$panelstrings.submit accesskey=s}
{html_submit name="savecontinue" id="savecontinue" class="btn btn-primary" value=Save accesskey=c}
{html_submit name="preview" id="preview" class="btn btn-primary" value=$panelstrings.preview accesskey=p}
</div>
<p>
{foreach from=$saved_flags item=flag}
<label><input name="flags[{$flag}]" {if $categories and (bool)array_intersect(array($flag),$categories) }checked="checked"{/if} type="checkbox" /> {$lang.entry.flags.long[$flag]} </label><br />
{/foreach}
</p>
</div>
</div>
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.categories}</h6>
</div>
<div class="card-body categories_panel">
{list_categories type=form selected=$categories}
</div>
</div>
{if isset($draft) && !$draft || isset($entry)}
<div class="card shadow mb-4 other_options">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.otheropts}</h6>
</div>
<p>
<ul>
{if isset($draft) && !$draft}
<li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=commentlist">
{$panelstrings.commmsg}</a></li>
{/if}
{if isset($entry)}
<li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=delete">
{$panelstrings.delmsg}</a></li>
{/if}
</ul>
</p>
</div>
{/if} {/if}
<div class="card shadow mb-4 plugin_options"> <input type="text" class="{$class}"
<div class="card-header"> name="subject" id="subject"
<h6 class="m-0 font-weight-bold text-primary">Plugins Options</h6> value="{$subject|default:$smarty.request.subject|wp_specialchars:1}" /><br />
</div> <input type="hidden" name="timestamp" value="{$date}" />
<div class="m-4"> <input type="hidden" name="entry" value="{$id}" />
{toolbar} </p>
{action hook=simple_edit_form} <p>
</div> <label for="content">{$panelstrings.content}</label>
</div> </p>
</div> {toolbar}
</div> <p>
<textarea name="content" class="{$class}"
id="content" rows="20" cols="74">{$content|default:$smarty.request.content|htmlspecialchars}</textarea><br />
{*here will go a plugin hook*}
{action hook=simple_edit_form}
</p>
</div>
<div id="admin-options"> <div id="admin-options">
@ -149,6 +57,27 @@
*} *}
{* end of inline form *} {* end of inline form *}
<fieldset id="admin-entry-categories"><legend>{$panelstrings.categories}</legend>
{list_categories type=form selected=$categories}
</fieldset>
<fieldset id="admin-entry-saveopts"><legend>{$panelstrings.saveopts}</legend>
<p>
{foreach from=$saved_flags item=flag}
<label><input name="flags[{$flag}]" {if $categories and (bool)array_intersect(array($flag),$categories) }checked="checked"{/if} type="checkbox" /> {$lang.entry.flags.long[$flag]} </label><br />
{/foreach}
</p>
</fieldset>
</div>
<div class="buttonbar">
{html_submit name="save" id="save" value=$panelstrings.submit accesskey=s}
{html_submit name="savecontinue" id="savecontinue" value=$panelstrings.savecontinue accesskey=c}
{html_submit name="preview" id="preview" value=$panelstrings.preview accesskey=p}
</div> </div>
@ -156,33 +85,23 @@
{/html_form} {/html_form}
{/entry_block} {/entry_block}
<!-- Bootstrap Modal (Open the editor) --> {if isset($smarty.get.entry) }
<div class="modal fade" id="flatpress-files-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document"> <div id="admin-otheroptions">
<div class="modal-content">
<div class="modal-header"> <h2>{$panelstrings.otheropts}</h2>
<h5 class="modal-title" id="exampleModalLabel">File Manager</h5> <ul>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button> {if !isset($draft)}
</div> <li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=commentlist">
<div class="modal-body"> {$panelstrings.commmsg}</a></li>
<div class="row"> {/if}
<div class="col-12" id="currentDirectory"> <li><a href="admin.php?p=entry&amp;entry={$smarty.get.entry}&amp;action=delete">
<input class="form-control mw-100" id="directoryInput" readonly> {$panelstrings.delmsg}</a></li>
</div> </ul>
</div>
<div class="row visualizator"> </div>
<div class="p-2 col-6 h-100">
<div class="flatpress-files-modal-box h-100 p-3" id="mediaDirectory"></div> {/if}
</div>
<div class="p-2 col-6 h-100">
<div class="flatpress-files-modal-box h-100" id="mediaPreview"></div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="w-100 text-center" id="FilesModalFooter">
</div>
</div>
</div>
</div>
</div>

View File

@ -1,58 +1,46 @@
<h2>{$panelstrings.head}</h2>
<div class="row"> <p>{$panelstrings.descr}</p>
<!-- Pie Chart --> <dl>
<div class="col-lg-6 mb-4"> <dt class="admin-mainmenu-item">
<div class="card shadow mb-4 quick_menu"> <img src="{$smarty.const.ADMIN_DIR}imgs/newentry.png" class="alignleft" alt="{$panelstrings.op1}"
<!-- Card Header - Dropdown --> title="{$panelstrings.op1}" />
<div class="card-header"> <a href="admin.php?p=entry&amp;action=write">{$panelstrings.op1}</a>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.quick_menu}</h6> </dt>
</div> <dd class="admin-icon-descr">{$panelstrings.op1d}</dd>
<!-- Card Body -->
<div class="card-body"> <dt class="admin-mainmenu-item">
<p>Wecome back <b>{$username}</b>, {$panelstrings.can_do}</p> <img src="{$smarty.const.ADMIN_DIR}imgs/entries.png" class="alignleft" alt="{$panelstrings.op2}"
<ul> title="{$panelstrings.op2}" />
<li><a href="admin.php?p=entry&amp;action=write"><span class="ti-pencil-alt"></span> {$panelstrings.op1d}</a></li> <a href="admin.php?p=entry">{$panelstrings.op2}</a>
<li><a href="admin.php?p=entry"><span class="ti-layers-alt"></span> {$panelstrings.op2d}</a></li> </dt>
<li><a href="admin.php?p=widgets"><span class="ti-move"></span> {$panelstrings.op3d}</a></li> <dd class="admin-icon-descr">{$panelstrings.op2d}</dd>
<li><a href="admin.php?p=plugin"><span class="ti-hummer"></span> {$panelstrings.op4d}</a></li>
<li><a href="admin.php?p=config"><span class="ti-settings"></span> {$panelstrings.op5d}</a></li> <dt class="admin-mainmenu-item">
<li><a href="admin.php?p=maintain"><span class="ti-check-box"></span> {$panelstrings.op6d}</a></li> <img src="{$smarty.const.ADMIN_DIR}imgs/widgets.png" class="alignleft" alt="{$panelstrings.op3}"
</ul> title="{$panelstrings.op3}" />
</div> <a href="admin.php?p=widgets">{$panelstrings.op3}</a>
</div> </dt>
<div class="card shadow mb-4"> <dd class="admin-icon-descr">{$panelstrings.op3d}</dd>
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.help}</h6> <dt class="admin-mainmenu-item">
</div> <img src="{$smarty.const.ADMIN_DIR}imgs/plugins.png" class="alignleft" alt="{$panelstrings.op4}"
<div class="card-body maintain"> title="{$panelstrings.op4}" />
<p>{$panelstrings.useful_links}</p> <a href="admin.php?p=plugin">{$panelstrings.op4}</a>
<ul> </dt>
<li><a href="https://www.flatpress.org"><span class="ti-home"></span> {$panelstrings.fp_home}</a></li> <dd class="admin-icon-descr">{$panelstrings.op4d}</dd>
<li><a href="https://www.flatpress.org/blog.php?x=entry"><span class="ti-layers-alt"></span> {$panelstrings.fp_blog}</a></li>
<li><a href="http://forum.flatpress.org/"><span class="ti-comments"></span> {$panelstrings.fp_forums}</a></li> <dt class="admin-mainmenu-item">
<li><a href="http://wiki.flatpress.org/"><span class="ti-help-alt"></span> {$panelstrings.fp_wiki}</a></li> <img src="{$smarty.const.ADMIN_DIR}imgs/config.png" class="alignleft" alt="{$panelstrings.op5}"
</ul> title="{$panelstrings.op5}" />
</div> <a href="admin.php?p=config">{$panelstrings.op5}</a>
</div> </dt>
</div> <dd class="admin-icon-descr">{$panelstrings.op5d}</dd>
<div class="col-lg-6 mb-4">
<dt class="admin-mainmenu-item">
<div class="card shadow mb-4"> <img src="{$smarty.const.ADMIN_DIR}imgs/maintain.png" class="alignleft" alt="{$panelstrings.op6}"
<div class="card-header"> title="{$panelstrings.op6}" />
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.last_comments}</h6> <a href="admin.php?p=maintain">{$panelstrings.op6}</a>
</div> </dt>
<div class="card-body lc_table"> <dd class="admin-icon-descr">{$panelstrings.op6d}</dd>
{if isset($last_comments_table)}
{$last_comments_table} </dl>
{else}
<h2 class="text-center font-italic">No comments yet :(</h2>
{/if}
</div>
</div>
</div>
</div>
<div class="row">
</div>

View File

@ -1,53 +1,25 @@
<div class="maintain"> <h2>{$panelstrings.head}</h2>
<div class="row"> {include file=shared:errorlist.tpl}
<div class="col-lg-6 mb-4"> {if isset($files)}
<div class="card shadow mb-4"> <p>{$panelstrings.chmod_info}</p>
<div class="card-header"> <p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> <ul>
</div> {foreach from=$files item=file}
<div class="card-body"> <li>{$file}</li>
{include file=shared:admin_errorlist.tpl} {/foreach}
{if isset($files)} </ul>
<p>{$panelstrings.chmod_info}</p> <p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p>
<p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p> {elseif isset($phpinfo)}
<ul> <p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p>
{foreach from=$files item=file} {$phpinfo}
<li>{$file}</li> <p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p>
{/foreach} {else}
</ul> <p>{$panelstrings.descr}</p>
<p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p> <ul>
{elseif isset($phpinfo)} <li><a href="{$action_url|cmd_link:do:rebuild}">{$panelstrings.opt1}</a></li>
<p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p> <li><a href="{$action_url|cmd_link:do:purgetplcache}">{$panelstrings.opt2}</a></li>
{$phpinfo} <li><a href="{$action_url|cmd_link:do:restorechmods}">{$panelstrings.opt3}</a></li>
<p><a href="admin.php?p=maintain">{$panelstrings.opt0}</a></p> <li><a href="{$action_url|cmd_link:do:phpinfo}">{$panelstrings.opt4}</a></li>
{else} <li><a href="{$panel_url|action_link:updates}">{$panelstrings.opt5}</a></li>
<p>{$panelstrings.descr}</p> </ul>
<ul> {/if}
<li><a href="{$action_url|cmd_link:do:rebuild}"><span class="ti-reload"></span> {$panelstrings.opt1}</a></li>
<li><a href="{$action_url|cmd_link:do:purgetplcache}"><span class="ti-paint-bucket"></span> {$panelstrings.opt2}</a></li>
<li><a href="{$action_url|cmd_link:do:restorechmods}"><span class="ti-lock"></span> {$panelstrings.opt3}</a></li>
<li><a href="{$action_url|cmd_link:do:phpinfo}"><span class="ti-info-alt"></span> {$panelstrings.opt4}</a></li>
<li><a href="{$panel_url|action_link:updates}"><span class="ti-package"></span> {$panelstrings.opt5}</a></li>
</ul>
{/if}
</div>
</div>
</div>
<div class="col-lg-6 mb-4">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.help}</h6>
</div>
<div class="card-body">
<p>{$panelstrings.useful_links}</p>
<ul>
<li><a href="https://www.flatpress.org/" target="_blank"><span class="ti-home"></span> {$panelstrings.fp_home}</a></li>
<li><a href="https://www.flatpress.org/blog.php?x=entry" target="_blank"><span class="ti-layers-alt"></span> {$panelstrings.fp_blog}</a></li>
<li><a href="http://forum.flatpress.org/" target="_blank"><span class="ti-comments"></span> {$panelstrings.fp_forums}</a></li>
<li><a href="http://wiki.flatpress.org/" target="_blank"><span class="ti-help-alt"></span> {$panelstrings.fp_wiki}</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,30 +1,7 @@
{include file=shared:admin_errorlist.tpl} <h2>{$panelstrings.head}</h2>
{include file=shared:errorlist.tpl}
<div class="row">
<div class="col-lg-6 mb-4">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6>
</div>
<div class="card-body">
{$panelstrings.list|sprintf:$smarty.const.SYSTEM_VER:$sfweb:$stableversion:$fpweb:$unstableversion} {$panelstrings.list|sprintf:$smarty.const.SYSTEM_VER:$sfweb:$stableversion:$fpweb:$unstableversion}
</div> {if $notice}
</div> <h5>{$panelstrings.notice}</h5>
</div> <p>{$notice}</p>
{if $notice} {/if}
<div class="col-lg-6 mb-4">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.notice}</h6>
</div>
<div class="card-body">
{if isset($panelstrings) && isset($panelstrings.notice)}
<p>{$notice}</p>
{else}
<p>{$panelstrings.no_news}</p>
{/if}
</div>
</div>
</div>
{/if}
</div>

View File

@ -1,51 +1,46 @@
{include file='shared:admin_errorlist.tpl'}
<h2>{$panelstrings.head}</h2>
<p>{$panelstrings.descr}</p>
{include file='shared:errorlist.tpl'}
{html_form} {html_form}
<div class="col-xl-12 col-lg-12"> <table id="plugin-table">
<div class="card shadow mb-4"> <thead id="plugin-table-head">
<div class="card-header"> <tr>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> <th>{$panelstrings.name}</th>
</div> <th class="main-cell">{$panelstrings.description}</th>
<div class="card-body"> <th>{$panelstrings.author}</th>
<div class="table-responsive table-striped"> <th>{$panelstrings.version}</th>
<table id="plugin-table" class="table"> <th>{$panelstrings.action}</th>
<thead id="plugin-table-head"> </tr>
<tr> </thead>
<th>{$panelstrings.name}</th> <tbody id="plugin-table-body">
<th class="main-cell">{$panelstrings.description}</th> {foreach from=$pluginlist item=plugin}
<th>{$panelstrings.author}</th> {assign var=inarr value=$plugin|in_array:$enabledlist}
<th>{$panelstrings.version}</th> {$plugin|plugin_getinfo}
<th>{$panelstrings.action}</th> <tr{if $inarr} class="enabled" {/if}>
</tr> <td> {$name} </td>
</thead> <td class="main-cell"> {$description} </td>
<tbody id="plugin-table-body"> <td> {$author} </td>
{foreach from=$pluginlist item=plugin} <td> {$version} </td>
{assign var=inarr value=$plugin|in_array:$enabledlist} <td> {if $inarr}
{$plugin|plugin_getinfo} <a class="link-disable"
<tr{if $inarr} class="enabled" {/if}> href="{$action_url|cmd_link:disable:$plugin}">
<td> {$name} </td> {$panelstrings.disable}
<td class="main-cell"> {$description} </td> </a>
<td> {$author} </td> {else}
<td> {$version} </td> <a class="link-enable"
<td> {if $inarr} href="{$action_url|cmd_link:enable:$plugin}">
<a class="link-disable" {$panelstrings.enable}
href="{$action_url|cmd_link:disable:$plugin}"> </a>
{$panelstrings.disable} {/if}
</a> </td>
{else} </tr>
<a class="link-enable" {/foreach}
href="{$action_url|cmd_link:enable:$plugin}"> </tbody>
{$panelstrings.enable} </table>
</a>
{/if}
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
{/html_form} {/html_form}

View File

@ -1,25 +1,18 @@
<div class="row"> <h2>{$panelstrings.head}</h2>
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4"> <p>{$panelstrings.descr}</p>
<div class="card-header"> {statics}
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> <fieldset><legend>{$panelstrings.preview}</legend>
</div> {include file=previewstatic.tpl}
<div class="card-body"> </fieldset>
{statics} {/statics}
{include file=previewstatic.tpl} <p>{$panelstrings.confirm}</p>
</fieldset>
{/statics} {html_form}
</br> <input type="hidden" name="page" value="{$pageid}" />
<p class="delete_confirm">{$panelstrings.confirm}</p> <div class="buttonbar">
{html_submit name="delete" id="delete" value=$panelstrings.ok}
{html_form} {html_submit name="cancel" id="cancel" value=$panelstrings.cancel}
<input type="hidden" name="page" value="{$pageid}" />
<div class="buttonbar">
{html_submit name="delete" id="delete" class="btn btn-primary" value=$panelstrings.ok}
{html_submit name="cancel" id="cancel" class="btn btn-secondary" value=$panelstrings.cancel}
</div>
{/html_form}
</div>
</div>
</div> </div>
</div> {/html_form}

View File

@ -1,60 +1,52 @@
{include file='shared:admin_errorlist.tpl'}
<h2>{$panelstrings.head}</h2>
{include file='shared:errorlist.tpl'}
<p>{$panelstrings.descr}</p>
{static_block} {static_block}
{html_form} {html_form}
<div class="row">
<div class="col-xl-12 col-lg-12"> <table class="entrylist">
<div class="card shadow mb-4"> <thead><tr>{*<th>{$panelstrings.sel}</th>*}
<div class="card-header"> <th>{$panelstrings.name}</th>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> <th class="main-cell">{$panelstrings.title}</th>
</div> <th>{$panelstrings.author}</th>
<div class="card-body"> <th>{$panelstrings.action}</th></tr></thead>
<div class="table-responsive table-striped"> <tbody>
<table class="entrylist table"> {static}
<thead><tr>{*<th>{$panelstrings.sel}</th>*} <tr>
<th>{$panelstrings.name}</th> {*<td><input type="checkbox" /></td>*}
<th class="main-cell">{$panelstrings.title}</th> <td>{$id}</td>
<th>{$panelstrings.author}</th> <td class="main-cell">
<th>{$panelstrings.action}</th></tr></thead> <a class="link-general"
<tbody> href="{$panel_url|action_link:write}&amp;page={$id}">
{static} {$subject|truncate:70}
<tr> </a>
{*<td><input type="checkbox" /></td>*} </td>
<td>{$id}</td> <td>{$author}</td>
<td class="main-cell"> <td>
<a class="link-general" <a class="link-general"
href="{$panel_url|action_link:write}&amp;page={$id}"> href="{$id|link:page_link}">
{$subject|truncate:70} {$panelstrings.act_view}
</a> </a>
</td> <a
<td>{$author}</td> class="link-general"
<td> href="{$panel_url|action_link:write}&amp;page={$id}">
<a class="link-general" {$panelstrings.act_edit}
href="{$id|link:page_link}"> </a>
<span class="ti-desktop"></span> <a class="link-delete"
{$panelstrings.act_view} href="{$panel_url|action_link:delete}&amp;page={$id}">
</a> {$panelstrings.act_del}
<a </a>
class="link-general" </td>
href="{$panel_url|action_link:write}&amp;page={$id}">
<span class="ti-pencil-alt"></span>
{$panelstrings.act_edit}
</a>
<a class="link-delete"
href="{$panel_url|action_link:delete}&amp;page={$id}">
<span class="ti-trash"></span>
{$panelstrings.act_del}
</a>
</td>
</tr> </tr>
{/static} {/static}
</tbody></table> </tbody></table>
</div>
</div>
</div>
</div>
</div>
{/html_form} {/html_form}
{/static_block} {/static_block}

View File

@ -62,9 +62,6 @@
global $lang; global $lang;
$this->smarty->assign('static_id', 'static'.date_time()); $this->smarty->assign('static_id', 'static'.date_time());
global $fp_config;
$this->smarty->assign("lang_locale", $fp_config['locale']['lang']);
if (isset($_GET['page'])) { if (isset($_GET['page'])) {
$id = $_GET['page']; $id = $_GET['page'];

199
admin/panels/static/admin.static.write.tpl Normal file → Executable file
View File

@ -1,134 +1,71 @@
{include file='shared:admin_errorlist.tpl'} <h2>{$panelstrings.head}</h2>
{static_block}
{if isset($preview)} {include file='shared:errorlist.tpl'}
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4"> {static_block}
<div class="card-header"> {if isset($preview)}
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.preview}</h6> <fieldset id="post-preview"><legend>{$panelstrings.preview}</legend>
</div> {include file=preview.tpl}
<div class="card-body"> </fieldset>
{include file=preview.tpl} {/if}
</div>
</div> {html_form}
</div>
</div> {if !isset($post)}
{/if} {assign var=post value=""}
<div class="row"> {/if}
<div class="col-xl-8 col-lg-7"> {static content=$post alwaysshow=true}
<div class="card shadow mb-4">
<div class="card-header"> <p><label for="subject">{$panelstrings.subject}</label><br />
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6> {if isset($error) && isset($error.subject) && !empty($error.subject)}
</div> {assign var=class value=" field-error"}
<div class="card-body"> {else}
{html_form} {assign var=class value=""}
{if !isset($post)} {/if}
{assign var="post" value=""} <input type="text" name="subject" id="subject" class="{$class}"
{/if} value="{$subject|default:$smarty.request.subject|default:$smarty.request.page|wp_specialchars:1}" /><br />
{static content=$post alwaysshow=true} <input type="hidden" name="timestamp" value="{$date}" />
<input type="text" name="subject" id="subject" class="form-control input_gray input-max-width" placeholder="{$panelstrings.subject}" {if isset($error)}{$error.subject|notempty:'class="field-error"'}{/if} </p>
value="{$subject|default:$smarty.request.subject|default:$smarty.request.page|wp_specialchars:1}" /> <p>
<input type="hidden" name="timestamp" value="{$date}" /> <label for="content">{$panelstrings.content}</label>
<p> </p>
<label for="content"></label> {toolbar}
<textarea name="content" {if isset($error)}{$error.content|notempty:'class="field-error"'}{/if} id="content_textarea" placeholder="{$panelstrings.content}" class="form-control">{$content|default:$smarty.request.content|htmlspecialchars}</textarea><br /> <p>
{if $sceditor_display != 'disable'} {if isset($error) && isset($error.content) && !empty($error.content)}
<script src="{$smarty.const.BLOG_BASEURL}/fp-includes/bootstrap/js/bootstrap.min.js"></script> {assign var=class value=" field-error"}
<!-- Here is the SCEditor --> {else}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/sceditor.min.js"></script> {assign var=class value=""}
<!-- {/if}
{if $sce_display=='bbcode'} <textarea name="content" class="{$class}" id="content"
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/bbcode.js"></script> rows="20" cols="74">{$content|default:$smarty.request.content|htmlspecialchars}</textarea><br />
{else} {*here will go a plugin hook*}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/xhtml.js"></script> </p>
{/if}
--> <fieldset id="admin-static-filename"><legend>{$panelstrings.fieldset2}</legend>
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/formats/bbcode.js"></script> <input type="hidden" name="oldid" id="oldid" value="{$id|default:$smarty.request.oldid}" />
<script src="{$smarty.const.BLOG_BASEURL}/fp-interface/lang/{$lang_locale}/sceditor.js"></script> <p><label for="id">{$panelstrings.pagename}</label><br />
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressFileManager.js"></script> {if isset($error) && isset($error.id) && !empty($error.id)}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressCustomBBCodes.js"></script> {assign var=class value=" field-error"}
<script src="{$smarty.const.BLOG_BASEURL}/admin/res/sceditor/plugins/flatPressEmojis.js"></script> {else}
<script> {assign var=class value=""}
// Replace the textarea #example with SCEditor {/if}
var lang_editor = "{$lang_locale}"; <input type="text" name="id" id="id" class="maxsize{$class}"
var eRoot = "admin/res/sceditor/"; value="{$smarty.request.id|default:$smarty.request.page|default:$static_id}" /></p>
var FileManagerDir = "{$smarty.const.BLOG_BASEURL}/fp-plugins/sceditorfilemanager"; {html_submit name="save" id="save" value=$panelstrings.submit accesskey=s}
{literal} {html_submit name="preview" id="preview" value=$panelstrings.preview accesskey=p}
var textarea = document.getElementById('content_textarea');
sceditor.create(textarea, { </fieldset>
plugins: 'flatPressFileManager',
toolbar: 'bold,italic,underline,strike,subscript,superscript|left,center,right,justify|font,size,color,removeformat|cut,copy,pastetext|bulletlist,orderedlist,indent,outdent|table|code,quote|horizontalrule,flatPressFileManager,email,link,unlink|emojis,youtube,date,time|ltr,rtl|print,maximize,source',
emoticonsRoot: eRoot, {/static}
format: 'bbcode',
height: "400px",
locale: lang_editor
});
</script>
{/literal}
{/if}
{*here will go a plugin hook*}
</p>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-5">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.pagename}</h6>
</div>
<div class="card-body">
<input type="hidden" name="oldid" id="oldid" class="form-control input_gray" value="{$id|default:$smarty.request.oldid}" />
<input type="text" name="id" id="id" class="maxsize{if isset($error)}{$error.id|notempty:' field-error'}{/if} form-control input_gray "
value="{$smarty.request.id|default:$smarty.request.page|default:$static_id}" /></p>
{html_submit name="save" id="save" class="btn btn-primary" value=$panelstrings.submit accesskey=s}
{html_submit name="preview" id="preview" class="btn btn-primary" value=$panelstrings.preview accesskey=p}
</fieldset>
</div>
</div>
<div class="card shadow mb-4 plugin_options">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">Plugins Options</h6>
</div>
<div class="m-4">
{toolbar}
<!-- {action hook=simple_edit_form} (Only writting an entry) -->
</div>
</div>
</div>
</div>
</div>
{/static}
{/html_form} {/html_form}
{/static_block} {/static_block}
<!-- Bootstrap Modal (Open the editor) -->
<div class="modal fade" id="flatpress-files-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">File Manager</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row">
<div class="col-12" id="currentDirectory">
<input class="form-control mw-100" id="directoryInput" readonly>
</div>
</div>
<div class="row visualizator">
<div class="p-2 col-6 h-100">
<div class="flatpress-files-modal-box h-100 p-3" id="mediaDirectory"></div>
</div>
<div class="p-2 col-6 h-100">
<div class="flatpress-files-modal-box h-100" id="mediaPreview"></div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="w-100 text-center" id="FilesModalFooter">
</div>
</div>
</div>
</div>
</div>

View File

@ -1,61 +1,32 @@
{include file=shared:admin_errorlist.tpl} {include file=shared:errorlist.tpl}
<div class="row"> <div id="current-theme">
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head1}</h6>
</div>
<div class="card-body">
<div id="current-theme">
<img src="{$current_style.preview}" class="current-theme-img" alt="{$current_style.name}" />
<div class="current-theme-description">
<h3>{$current_style.title} &#8212; {$current_style.author|default:$panelstrings.noauthor}</h3>
{$current_style.description|default:$panelstrings.nodescr}
</div>
</div>
</div>
</div>
</div>
</div>
{if $available_styles} <h2>{$panelstrings.head1}</h2>
<img src="{$current_style.preview}" alt="{$current_style.name}" />
<div class="row"> <h5>{$current_style.title} &#8212; {$current_style.author|default:$panelstrings.noauthor}</h5>
<div class="col-xl-12 col-lg-12"> {$current_style.description|default:$panelstrings.nodescr}
<div class="card shadow mb-4">
<div class="card-header all_radius text-center red_background">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head2}</h6>
</div>
</div>
</div>
</div> </div>
<div id="available-themes"> <div id="available-themes">
<div class="row"> <h2>{$panelstrings.head2}</h2>
<p>{$panelstrings.descr}</p>
{if $available_styles}
<ul >
{foreach from=$available_styles item=thm} {foreach from=$available_styles item=thm}
<div class="col-lg-6 mb-4"> <li>
<div class="card shadow mb-4"> <h5><a href="{$action_url|cmd_link:select:$thm.id}">{$thm.title}</a></h5>
<div class="card-header"> <a href="{$action_url|cmd_link:select:$thm.id}"><img src="{$thm.preview}" alt="{$thm.name}" /></a>
<h6 class="m-0 font-weight-bold text-primary text-center"><a href="{$action_url|cmd_link:select:$thm.id}">{$thm.title}</a></h6>
</div> <p>{$thm.description|default:$panelstrings.nodescr}</p>
<div class="card-body">
<ul > </li>
<li>
<h5><a href="{$action_url|cmd_link:select:$thm.id}">{$thm.title}</a></h5>
<a href="{$action_url|cmd_link:select:$thm.id}"><img src="{$thm.preview}" alt="{$thm.name}" /></a>
<p>{$thm.description|default:$panelstrings.nodescr}</p>
</li>
</ul>
</div>
</div>
</div>
{/foreach} {/foreach}
</div> </ul>
{/if} {/if}

View File

@ -1,59 +1,36 @@
{include file=shared:admin_errorlist.tpl} {include file=shared:errorlist.tpl}
<div class="row"> <div id="current-theme">
<div class="col-xl-12 col-lg-12"> <h2>{$panelstrings.head1}</h2>
<div class="card shadow mb-4"> <img src="{$current_theme.preview}" alt="{$current_theme.name}" />
<div class="card-header"> <h5>
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head1}</h6> {$current_theme.title} &#8212; {$current_theme.author|default:$panelstrings.noauthor}
</div> </h5>
<div class="card-body">
<div id="current-theme"> {$current_theme.description|default:$panelstrings.nodescr}
<img src="{$current_theme.preview}" alt="{$current_theme.name}" class="current-theme-img"/>
<div class="current-theme-description"> </div> <!-- end of #current-theme -->
<h3>
{$current_theme.title} &#8212; {$current_theme.author|default:$panelstrings.noauthor}
</h3>
{$current_theme.description|default:$panelstrings.nodescr}
</div>
</div>
</div>
</div>
</div>
</div>
{if $available_themes} {if $available_themes}
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4">
<div class="card-header all_radius text-center red_background">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head2}</h6>
</div>
</div>
</div>
</div>
<div id="available-themes"> <div id="available-themes">
<div class="row">
{foreach from=$available_themes item=thm}
<div class="col-lg-6 mb-4">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary text-center"><a href="{$action_url|cmd_link:select:$thm.id}">{$thm.title}</a></h6>
</div>
<div class="card-body">
<ul>
<li>
<a href="{$action_url|cmd_link:select:$thm.id}"><img src="{$thm.preview}" alt="{$thm.name}" /></a>
<p>{$thm.description|default:$panelstrings.nodescr}</p>
</li>
</ul>
</div>
</div>
</div>
{/foreach}
</div>
</div>
<h2>{$panelstrings.head2}</h2>
<p>{$panelstrings.descr}</p>
<ul>
{foreach from=$available_themes item=thm}
<li>
<h5><a href="{$action_url|cmd_link:select:$thm.id}">{$thm.title}</a></h5>
<a href="{$action_url|cmd_link:select:$thm.id}"><img src="{$thm.preview}" alt="{$thm.name}" /></a>
<p>{$thm.description|default:$panelstrings.nodescr}</p>
</li>
{/foreach}
</ul>
</div> <!-- end of #available-themes -->
{/if} {/if}

View File

@ -139,6 +139,7 @@
} }
return 1; return 1;
} }
} }

View File

@ -1,7 +1,7 @@
<h2>{$panelstrings.head}</h2> <h2>{$panelstrings.head}</h2>
<p>{$panelstrings.descr}</p> <p>{$panelstrings.descr}</p>
{include file='shared:admin_errorlist.tpl'} {include file='shared:errorlist.tpl'}

106
admin/panels/uploader/admin.uploader.tpl Normal file → Executable file
View File

@ -1,70 +1,46 @@
{include file='shared:admin_errorlist.tpl'} {if !isset($smarty.request.mod) || $smarty.request.mod != 'inline'}
<h2>{$panelstrings.head}</h2>
<p>{$panelstrings.descr}</p>
{/if}
<div class="row"> {include file='shared:errorlist.tpl'}
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.fset1}</h6>
</div>
<div class="card-body">
{if $success}
<ul id="admin-uploader-filelist">
{foreach from=$uploaded_files item=file}
{*
memo: this did the trick in the panel
<a href="javascript:window.parent.window.insImage('{$file}');">
*} {if $success}
<li>{$file}</li> <ul id="admin-uploader-filelist">
{/foreach} {foreach from=$uploaded_files item=file}
</ul> {*
{/if}
{html_form enctype='multipart/form-data'}
<div class="row">
<div class="col-lg-6 mb-4">
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile2">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
</div>
<div class="col-lg-6 mb-4">
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
<div class="mb-3">
<input class="form-control mw-100" type="file" id="formFile1">
</div>
</div>
<div class="buttonbar upload-buttom">
{html_submit name="upload" id="upload" class="btn btn-primary" value=$panelstrings.submit}
</div>
</div>
</div>
</div>
</div>
</div>
{/html_form} memo: this did the trick in the panel
<a href="javascript:window.parent.window.insImage('{$file}');">
*}
<li>{$file}</li>
{/foreach}
</ul>
{/if}
{literal} {html_form enctype='multipart/form-data'}
<script>
/* This event to change name to namesfiles */
startUploadEvent(); {if !isset($smarty.request.mod) || $smarty.request.mod != 'inline'}
</script> <fieldset><legend>{$panelstrings.fset1}</legend>
{/literal} {/if}
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
<input type="file" name="upload[]" />
{if !isset($smarty.request.mod) || $smarty.request.mod != 'inline'}
</fieldset>
{/if}
<div class="buttonbar">
{html_submit name="upload" id="upload" value=$panelstrings.submit}
</div>
{/html_form}

261
admin/panels/widgets/admin.widgets.default.tpl Normal file → Executable file
View File

@ -1,157 +1,120 @@
{include file='shared:admin_errorlist.tpl'} <h2>{$panelstrings.head}</h2>
<p>{$panelstrings.descr}</p>
<!-- Jquery and Jqueryui (For widgets) --> {include file='shared:errorlist.tpl'}
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<div class="row">
<div class="col-xl-12 col-lg-12">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.head}</h6>
</div>
<div class="card-body">
<p>{$panelstrings.descr}</p>
</div>
</div>
</div>
</div>
{html_form id="admin-widgets-default"} {html_form id="admin-widgets-default"}
<div id="available-widgets">
<h2>{$panelstrings.availwdgs}</h2>
<div id="widget-trashcan">
{$panelstrings.trashcan}
</div>
<ul>
{foreach from=$fp_registered_widgets key=widgetid item=widget}
<li class="widget-class widget-id-{$widgetid}">
{* those are actually dummies just to have two inputs ready, but they might come handy *}
<input class="widget-id" type="hidden" name="avalwidg[]" value="{$widgetid}" />
{if $widget.nparams > 0}
{* class is for javascript: this input will be converted into a type="text" :) *}
<input class="textinput" style="float:right" type="hidden" />
{/if}
<p>{$widget.name}</p>
</li>
{/foreach}
</ul>
<div class="buttonbar">
<input type="submit" name="save" value="{$panelstrings.submit}" />
</div>
<div class="row"> </div>
<div class="col-xl-4 col-lg-5">
<div class="card shadow mb-4"> <div id="admin-widgetset-list">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.availwdgs}</h6> <h2>{$panelstrings.themewdgs}</h2>
</div> <p>{$panelstrings.themewdgsdescr}</p>
<div class="card-body">
<div id="widget-trashcan"> <ul>
<span class="ti-trash"></span> {$panelstrings.trashcan} {foreach from=$widgetlist key=widgetset item=widgetarr}
</div> <li class="admin-widgetset">
<div id="available-widgets"> <h3 class="widgetset-name">
<ul> {$panelstrings.stdsets[$widgetset]|default:$widgetset}
{foreach from=$fp_registered_widgets key=widgetid item=widget} </h3>
<li class="widget-class widget-id-{$widgetid}">
{* those are actually dummies just to have two inputs ready, but they might come handy *} <ul id="widgetsetid-{$widgetset}">
<input class="widget-id" type="hidden" name="avalwidg[]" value="{$widgetid}" /> {foreach from=$widgetarr item=widget}
{if $widget.nparams > 0} {if isset($widget.class)}
{* class is for javascript: this input will be converted into a type="text" :) *} {assign var=widgetclass value=$widget.class}
<input class="textinput" style="float:right" type="hidden" /> {else}
{/if} {assign var=widgetclass value=""}
<p><span class="ti-move"></span> {$widget.name}</p> {/if}
</li> {if isset($widget.params)}
{/foreach} {assign var=widgetparams value=$widget.params}
</ul> {else}
{assign var=widgetparams value=""}
{/if}
<li class="widget-instance widget-id-{$widget.id} {$widgetclass}">
<input class="widget-id" type="hidden" name="widgets[{$widgetset}][]"
value="{$widget.id}{$widgetparams}" />
{if !empty($widgetparams)}
{* this will be hooked from javascript *}
<input class="textinput" style="float:right"
type="text" value="{$widgetparams}"/>
{/if}
<p> {$widget.name} </p>
</li>
{foreachelse}
<li class="widget-placeholder"> Drop here </li>
{/foreach}
</ul>
</li>
{/foreach}
</ul>
{if $oldwidgetlist}
<h2>{$panelstrings.oldwdgs}</h2>
<p>{$panelstrings.oldwdgsdescr}</p>
<ul>
{foreach from=$oldwidgetlist key=widgetset item=widgetarr}
<li class="admin-widgetset">
<h3 class="widgetset-name">
{$panelstrings.stdsets[$widgetset]|default:$widgetset}
</h3>
<ul id="widgetsetid-{$widgetset}">
{foreach from=$widgetarr item=widget}
<li class="widget-instance widget-id-{$widget.id}">
<input class="widget-id" type="hidden" name="widgets[{$widgetset}][]"
value="{$widget.id}{if $widget.params}:{$widget.params}{/if}" />
{if $widget.params}
{* this will be hooked from javascript *}
<input class="textinput" style="float:right"
type="text" value="{$widget.params}"/>
{/if}
<p> {$widget.name} </p>
</li>
{foreachelse}
<li class="widget-placeholder"> Drop here </li>
{/foreach}
</ul>
</li>
{/foreach}
</ul>
<div class="buttonbar text-center"> {/if}
<input type="submit" name="save" class="btn btn-primary" value="{$panelstrings.submit}" />
</div> </div>
<div class="buttonbar">
{html_submit name="save" id="save" value=$panelstrings.submit}
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-8 col-lg-7">
<div class="card shadow mb-4">
<div class="card-header">
<h6 class="m-0 font-weight-bold text-primary">{$panelstrings.themewdgs}</h6>
</div>
<div class="card-body widgetset_theme">
{$panelstrings.themewdgsdescr}
<div id="admin-widgetset-list">
</br>
<ul>
{assign var=counter value=0}
{foreach from=$widgetlist key=widgetset item=widgetarr}
{if ($counter%2)==0}
<div class="row justify-content-center">
{/if}
<div class="col-xl-5 col-lg-5">
<li class="admin-widgetset">
<h3 class="widgetset-name">
{$panelstrings.stdsets[$widgetset]|default:$widgetset}
</h3>
<ul id="widgetsetid-{$widgetset}">
{foreach from=$widgetarr item=widget}
{if isset($widget.class)}
{assign var=widgetclass value=$widget.class}
{else}
{assign var=widgetclass value=""}
{/if}
{if isset($widget.params)}
{assign var=widgetparams value=$widget.params}
{else}
{assign var=widgetparams value=""}
{/if}
<li class="widget-instance widget-id-{$widget.id} {if isset($widget.class)}{$widget.class}{/if}">
<input class="widget-id" type="hidden" name="widgets[{$widgetset}][]"
value="{$widget.id}{$widgetparams}" />
{if !empty($widgetparams)}
{* this will be hooked from javascript *}
<input class="textinput" style="float:right"
type="text" value="{$widgetparams}"/>
{/if}
<p> <span class="ti-move"></span> {$widget.name} </p>
</li>
{foreachelse}
<li class="widget-placeholder"><span class="ti-layers"></span> Drop here </li>
{/foreach}
</ul>
</li>
</div>
{if ($counter%2)!=0}
</div>
{/if}
{assign var=counter value=$counter+1}
{/foreach}
</ul>
{if $oldwidgetlist}
<h2>{$panelstrings.oldwdgs}</h2>
<p>{$panelstrings.oldwdgsdescr}</p>
<ul>
{foreach from=$oldwidgetlist key=widgetset item=widgetarr}
<li class="admin-widgetset">
<h3 class="widgetset-name">
{$panelstrings.stdsets[$widgetset]|default:$widgetset}
</h3>
<ul id="widgetsetid-{$widgetset}">
{foreach from=$widgetarr item=widget}
<li class="widget-instance widget-id-{$widget.id}">
<input class="widget-id" type="hidden" name="widgets[{$widgetset}][]"
value="{$widget.id}{if isset($widget.params)}:{$widget.params}{/if}" />
{if isset($widget.params)}
{* this will be hooked from javascript *}
<input class="textinput" style="float:right"
type="text" value="{$widget.params}"/>
{/if}
<p> {$widget.name} </p>
</li>
{foreachelse}
<li class="widget-placeholder"> Drop here </li>
{/foreach}
</ul>
</li>
{/foreach}
</ul>
{/if}
</div>
<div class="buttonbar text-center">
{html_submit name="save" id="save" class="btn btn-primary" value=$panelstrings.submit}
</div>
</div>
</div>
</div>
</div>
{/html_form} {/html_form}
<script src="{$smarty.const.BLOG_BASEURL}admin/panels/widgets/admin.widgets.js"></script>

View File

@ -1,7 +1,7 @@
<h2>{$panelstrings.head}</h2> <h2>{$panelstrings.head}</h2>
<p>{$panelstrings.descr}</p> <p>{$panelstrings.descr}</p>
{include file='shared:admin_errorlist.tpl'} {include file='shared:errorlist.tpl'}
{html_form} {html_form}

View File

@ -1,774 +1,197 @@
html {
height: 100%;
}
body {
height: 100%;
font-family: 'Nunito', sans-serif;
background-color: #f2f2f2;
}
.left-sidebar {
background-color: #fff !important;
}
.left-sidebar a {
color: #212529 !important;
}
.master-row {
height: 100%;
margin-left: 14rem !important;
padding-right: 15px;
}
.top-row {
width: 100%;
color: #fff;
align-items: center;
height: 56px;
}
.top-row h3 {
margin: 0px;
font-size: 1.5rem;
}
.top-right-bar {
text-align: right;
}
.top-right-bar .nav-link {
padding: 0px;
padding-left: 1.5rem;
font-size: 1.25rem;
}
.top-right-bar a {
color: #fff !important;
}
.top-right-bar .nav-item, .top-right-bar .navbar-nav, .top-right-bar .nav-link {
display: inline;
}
.top-right-bar .nav-item {
float: right;
}
.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}
/* /*
* Sidebar
*/
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 300; /* Behind the navbar */
padding: 0; /* Height of navbar */
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
width: 14rem !important;
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
font-size: 0.9rem;
}
@supports ((position: -webkit-sticky) or (position: sticky)) {
.sidebar-sticky {
position: -webkit-sticky;
position: sticky;
}
}
.sidebar .nav-link {
font-weight: 500;
color: #333;
padding: 0.8rem;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #999;
}
.sidebar .nav-link.active {
border-left: 5px solid #aa4142;
background-color: #f9f9f9;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
/*
* Content
*/
[role="main"] {
padding-top: 133px; /* Space for fixed navbar */
}
@media (min-width: 768px) {
[role="main"] {
padding-top: 0px; /* Space for fixed navbar */
margin-top: -7.5rem !important;
}
}
/*
* Navbar
*/
.navbar-brand {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: 1rem;
background-color: rgba(0, 0, 0, .25);
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}
.navbar .form-control {
padding: .75rem 1rem;
border-width: 0;
border-radius: 0;
}
.admin-logo {
height: 56px;
text-align: center;
}
.admin-logo img {
height: 75%;
width: auto;
margin-top:5px
}
.admin-logo-border {
height: 1px;
background-color: #eee;
margin: 0 1.5rem;
}
.submenu {
margin-left: 0rem;
border-left: 5px solid #aa4142;
background-color:#f9f9f9;
}
.submenu li {
margin-left: 0rem;
}
.submenu .nav-link { compatibility for old themes, soon
padding-left: 3rem; this hackish and ugly css will be
} DROPPED
.sub-active { */
background-color: #d9d9d9;
}
.form-control-dark { #admin-tabmenu {
color: #fff; text-align: left;
background-color: rgba(255, 255, 255, .1);
border-color: rgba(255, 255, 255, .1); padding-right: 0px;
padding-left: 0px;
z-index: 1;
padding-bottom: 0px;
margin: 12px 0px 0px;
padding-top: 0px;
border-bottom: black 2px solid;
font-size: 80%;
_font-size: 90%;
font-weight: normal;
} }
.form-control-dark:focus {
border-color: transparent;
box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}
.top-nav { #admin-tabmenu li {
padding: 0px; display: inline;
overflow: hidden;
list-style-type: none;
padding-left: -10px
} }
.top-background {
width: 100%;
padding-bottom: 9rem !important;
padding-top: 57px;
}
.top-color { #admin-tabmenu a {
background-color: #aa4142; border-right: black 2px solid;
padding-right: 5px;
border-top: black 2px solid;
padding-left: 5px;
background: #f9f9f9;
padding-bottom: 0px;
margin: 0px;
border-left: black 2px solid;
padding-top: 2px;
border-bottom: black 2px solid;
text-decoration: none
} }
.bg-gradient-primary { #cpmain ul, #main li{
background: -moz-linear-gradient(45deg,rgba(184,60,50,1) 0%,rgba(254,80,68,1) 99%,rgba(255,81,69,1) 100%); list-style-type:none;
background: -webkit-gradient(linear,left bottom,right top,color-stop(0%,rgba(184,60,50,1)),color-stop(99%,rgba(254,80,68,1)),color-stop(100%,rgba(255,81,69,1)));
background: -webkit-linear-gradient(45deg,rgba(184,60,50,1) 0%,rgba(254,80,68,1) 99%,rgba(255,81,69,1) 100%);
background: -o-linear-gradient(45deg,rgba(184,60,50,1) 0%,rgba(254,80,68,1) 99%,rgba(255,81,69,1) 100%);
background: -ms-linear-gradient(45deg,rgba(184,60,50,1) 0%,rgba(254,80,68,1) 99%,rgba(255,81,69,1) 100%);
background: linear-gradient(45deg,rgba(184,60,50,1) 0%,rgba(254,80,68,1) 99%,rgba(255,81,69,1) 100%);
background-color: rgba(0, 0, 0, 0);
background-size: auto;
background-color:rgba(0,0,0,0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF5145',endColorstr='#b83c32',GradientType=1);
background-size: cover;
} }
.text-primary { #cpmain ul li:before {
color: #aa4142 !important; content: none;
} }
a {
color: #aa4142 !important;
}
a:hover { #admin-tabmenu a#admin-tab-current {
text-decoration: none !important; background: #f9f9f9;
color: black;
border-bottom: #f9f9f9 3px solid;
} }
.quick_menu ul, .maintain ul { .admin-mainmenu-item {
list-style: none; clear:both;
display:block;
padding:1em;
} }
.sidebar-sticky span {
color: #aa4142;
}
#footer {
text-align: center;
margin-left: 14rem;
margin-right: 15px;
font-size: 0.8rem;
opacity: 0.6;
}
.sceditor-container {
width: 100% !important;
}
.sceditor-container textarea { #admin-content {
max-width: 100% !important; border-right: black 2px solid;
padding-right: 20px;
border-top: black 2px;
padding-left: 20px;
z-index: 2;
padding-bottom: 20px;
border-left: black 2px solid;
padding-top: 20px;
border-bottom: black 2px solid;
_font-size: 1em;
} }
.card-header .text-primary { #admin-content table {
color: #212529 !important; border-collapse: collapse;
font-weight: bold; width: 100%;
padding: 0.2rem; _width: 470px;
_font-size:100%;
} }
.shadow { #admin-content td {
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; border-bottom: solid 1px black;
width: 8px;
font-size: 0.8em;
_font-size:1em;
padding: 4px;
} }
.form-control::placeholder { #admin-content td.main_cell {
color: #bdbdbd; text-align: left;
font-weight: bold;
width: 20%;
} }
.form-control { #admin-content th {
margin-bottom: 1rem; border-bottom: solid 2px black;
background-color: #fbfbfb;
} padding: 4px;
font-size: 0.75em;
_font-size: 100%;
font-style: italic;
.new_entry_buttons {
text-align: center;
} }
.btn { #subject {
box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important; font-size: 18px;
padding-left: 1rem; font-weight: bold;
padding-right: 1rem; width: 99%;
} }
.btn-primary { .underOpt {
background-color: #aa4142; font-size: 80%;
border: 1px solid #933233; font-style: oblique;
color: #fff !important; margin: .5em 0 0 0
} }
.btn-secondary { .maxsize {
color: #fff !important; width: 99%;
} }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { input.maxsize { width: 99% }
background-color: #802627 !important;
border: 1px solid #933233 !important;
}
.buttonbar { .msg {
margin-bottom: 0.5rem; font-weight: bold;
} }
ul { .error {
list-style: square; color: red;
padding-left: 10px;
} }
.sidebar .nav-link:hover { .disabled {
background-color: #f9f9f9; background-color: red;
} }
.sidebar .nav-link.active:hover { .enabled {
padding-left: 0.8rem !important; background-color: green;
} }
.sidebar .nav-link.sub-active:hover { .locked {
padding-left: 3rem !important; background-color: grey;
background-color: #d9d9d9;
} }
.navbar.navbar-dark.flex-md-nowrap.top-nav.top-color { .draft {
position: fixed; background-color: lightgrey;
z-index: 200;
width: 100%;
border-bottom: 1px solid #8a2a2b;
} }
.select_filter {
width: auto;
float: left;
margin-right: 0.5rem;
}
input, textarea, select {
max-width: 300px;
}
.upload-buttom {
padding-left: 15px;
}
.cat-textarea {
max-width: 100%;
}
.input-max-width {
max-width: 100% !important;
}
#widget-trashcan {
text-align: center;
padding: 1rem;
background-color: #aa4142;
border: 1px solid #933233;
border-radius: 4px;
color:#fff;
font-weight: bold;
margin: 0 3rem;
margin-bottom: 0px;
margin-bottom: 1rem;
}
#available-widgets ul {
list-style: none;
padding: 0px;
text-align: center;
}
#available-widgets ul li, .admin-widgetset li {
background-color: rgba(0, 0, 0, 0.05);
margin: 0.5rem 5rem;
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #dbdbdb;
}
#available-widgets p {
margin-bottom: 0px;
}
#errorlist ul {
list-style: none;
}
.msgs.warnings {
padding: 0px;
}
.table {
border-left: 1px solid #dee2e6;
border-right: 1px solid #dee2e6;
border-bottom: 1px solid #dee2e6;
}
.table thead {
background-color: #aa4142;
color: #fff;
}
.red_background {
background-color: #212529;
}
.red_background .text-primary {
color: #fff !important;
}
.card-header a {
color: #212529 !important;
}
#admin-widgetset-list ul {
list-style: none;
padding: 0px;
text-align: center;
}
#admin-content .card-body a {
text-decoration: none;
}
#admin-content .card-body a:hover {
text-decoration: underline !important;
}
.admin-widgetset p {
margin-bottom: 0px;
}
.widgetset_theme {
text-align: center;
}
.admin-widgetset {
background-color: rgba(106, 106, 106, 0.05);
width: 100%;
padding: 0.5rem 0;
margin-bottom: 2rem;
border: 1px solid #e8e8e8;
border-radius: 4px;
}
.current-theme-img { /* ===== NOTIFICATION ===== */
float: left; #main ul.msgs, ul.msgs {
margin-top: 1em;
margin-left: 0em;
padding: 1em 2em
} }
.current-theme-description { .errors {
float: left; color: #901d1d;
margin-left: 2rem; border-top: 1px solid;
margin-top: 1rem; border-bottom: 1px solid;
border-color: #ffbbbb;
background: #ffdddd
} }
.current-theme-description h3 { .errors a {
font-weight: bold; color: #901d1d;
text-decoration: underline;
font-weight: normal
} }
#available-themes { .notifications {
text-align: center; color : #1d901d;
border-top: 1px solid #bbffbb;
border-bottom: 1px solid #bbffbb;
background: #ddffdd
} }
#available-themes ul { .field-error {
list-style: none; border: red 1px solid;
padding: 0px; background: #fdd
} }
#available-themes p {
margin-top: 0.5rem;
}
#available-themes h5 {
display: none;
}
.mobile-menu {
display: none;
}
@media only screen and (max-width: 1100px) {
.top-row h3 {
font-size: 1.2rem !important;
}
.top-right-bar .nav-link {
font-size: 1.1rem !important;
}
.top-row .col-lg-6 {
width: 60%;
}
.top-right-bar {
text-align: right;
width: 40% !important;
}
.top-row .top_menu_item {
display: none;
}
}
@media only screen and (max-width:768px) {
.master-row {
margin-left: 0px !important;
}
[role="main"] {
padding-top: 0px;
margin-top: -7.5rem;
}
#footer {
margin-left: 0px;
}
.top-row .col-lg-6 h3 {
display: none;
}
.mobile-menu {
display: block;
}
.top-row .col-lg-6 {
width: 20%;
}
.top-right-bar {
width: 80% !important;
}
#sidebar {
position: absolute;
z-index: 1000;
width: 100% !important;
height: 100%;
display: none;
}
.submenu .nav-link {
padding-left: 0rem;
}
.sidebar .nav-link {
text-align: center;
}
.sidebar-sticky {
height: auto;
}
.submenu {
border: 1px solid #ccc;
border-bottom: 1px solid #ececec;
}
.sidebar .nav-link.active {
border-top: 1px solid #ececec;
border-bottom: 1px solid #ececec;
}
.sidebar .nav-link:hover {
padding-left: 0.8rem !important;
background-color: #fff;
}
#available-widgets ul li, .admin-widgetset li {
margin: 0.5rem 0.5rem;
}
#close-button {
display: block !important;
}
}
#close-button {
display: none;
}
#close-button span {
color: #fff;
}
.display_off {
display: none !important;
}
.display_on {
display: block !important;
}
.btn {
margin-bottom: 0.5rem;
}
img {
max-width: 100%;
height: auto;
}
.paginator-left {
float: left;
padding-top: 0.2rem;
}
.paginator-right {
float: right;
}
.widget-placeholder {
background-color:#212529 !important;
border: 1px solid#000 !important;
color: #fff !important;
}
.login {
display: flex;
align-items: center;
}
.msgs.errors {
padding-left: 0px;
}
#content_textarea {
max-width: 100%;
height: 250px;
}
.lc_table ul {
padding-left: 0px;
list-style: none;
margin-bottom: 0px;
}
.lc_table li {
overflow:hidden;
width: 100%;
border-bottom: 1px solid #dee2e6;
border-right: 1px solid #dee2e6;
}
.lc_table li:nth-of-type(2n+1) {
background-color: rgba(0,0,0,.05);
}
.top-lc-table {
border-top: 1px solid #dee2e6;
background-color: #aa4142;
font-weight: lighter;
font-style: italic;
overflow:hidden;
width: 100%;
}
.comment-quote {
margin: 0rem;
}
.no_comments {
text-align: center;
}
.top-lc-table p {
color: #fff;
}
.lc_table p {
width: 50%;
float: left;
text-align: center;
border-left: 1px solid #dee2e6;
margin-bottom: 0px;
border-top: 0px;
padding: .75rem;
}
.sceditor-container iframe, .sceditor-container textarea {
margin: 0px !important;
background: #fbfbfb !important;
}
.sceditor-button.flatpress-media {
background-image: url('icons/drive_disk.png');
background-color: #aa4142;
background-position: center;
background-repeat: no-repeat;
}
.sceditor-button.flatpress-media:hover {
background-image: url('icons/drive_disk.png');
background-position: center;
background-repeat: no-repeat;
}
.sceditor-button-flatPressFileManager div {
background-position: 0px -416px !important;
}
.sceditor-container textarea {
color: #111 !important;
}
#sceditor-Emojis {
text-align: center;
}
#sceditor-Emojis a {
margin: 0.2rem;
cursor: pointer;
display: inline-block;
}
.sceditor-button-emojis div {
background-position: 0px -480px !important;
}
/* Modal to upload files */
#flatpress-files-modal .modal-header {
background-color: #aa4142;
color: #fff;
}
.flatpress-files-modal-box {
background-color: #e9ecef;
border: 1px solid #ced4da;
border-radius: .25rem;
margin-right: 15px;
margin-left: 15px;
overflow: auto;
scrollbar-width: thin;
}
#mediaDirectory ul {
list-style: none;
margin: 0px;
padding: 0px;
}
#mediaDirectory li {
background-position-x: left;
background-position-y: center;
background-repeat: no-repeat;
cursor: pointer;
}
#mediaDirectory li img {
margin-right: 0.3rem;
margin-bottom: 0.1rem;
}
#flatpress-files-modal .visualizator {
height: 300px;
}
.managerTypeFile {
width: 16px;
height: 16px;
}
.login {
max-width: 400px;
}

View File

@ -1,224 +0,0 @@
// This function generates the menu icons
function generate_menu_icons() {
let admin_tabs = ["main","entry","static","uploader","widgets","plugin","themes","config","maintain"];
let admin_icons = ["panel","pencil-alt2","file","upload","move","hummer","palette","settings","check-box"];
for(let i=0; i<admin_tabs.length; ++i) {
let new_span = document.getElementById("admin-link-"+admin_tabs[i]);
new_span.insertAdjacentHTML('afterbegin', "<span class=\"ti-"+admin_icons[i]+"\"></span>");
}
}
// Responsive functions
function mobile_close_button() {
// This close the menu and show the page
let open_element1 = document.getElementsByClassName("mobile_menu_hide");
let open_element2 = document.getElementById("sidebar");
for(let i=0; i<open_element1.length; ++i ) {
open_element1[i].classList.remove("display_off");
}
open_element2.classList.remove("display_on");
}
function mobile_open_button() {
// This open the menu and close the page
let open_element1 = document.getElementsByClassName("mobile_menu_hide");
let open_element2 = document.getElementById("sidebar");
for(let i=0; i<open_element1.length; ++i ) {
open_element1[i].classList.add("display_off");
}
open_element2.classList.add("display_on");
}
// End Responsive functions
/* Functions of uploaderFiles */
/* This function is called in the admin.uploader.tpl */
function startUploadEvent() {
const uploadInputs = document.querySelectorAll('.custom-file-input');
uploadInputs.forEach(function(currentInput) {
currentInput.addEventListener('change', function(e){ // Change namefile when user select it
const currentInputFileID = e.srcElement.id;
const fileName = document.getElementById(currentInputFileID).files[0].name;
const nextSibling = e.target.nextElementSibling
nextSibling.innerText = fileName
});
});
}
/* Functions of FileManager */
let mediaManagerRoute = '';
let currentPromiseResolve;
let currentPromiseReject; // Called in Ajax errors
function openMediaManagerAndGetMediaUrl(callback) {
return new Promise(function(resolvePromise, rejectPromise) {
currentPromiseResolve = resolvePromise;
currentPromiseReject = rejectPromise;
open_media_manager();
}).then(function(value) {
$('#flatpress-files-modal').modal('hide');
callback(value);
}).catch(function(err) {
$('#flatpress-files-modal').modal('hide');
console.log(err);
});
}
// Open the botton
function open_media_manager() {
mediaManagerRoute = '';
$('#flatpress-files-modal').modal('show');
$.post('ajax.php', {Operation : 'ListMediaDirectory', Arguments : mediaManagerRoute}, function(data) {
data = JSON.parse(data);
if(data.result) {
showDirectory(data.content); // data.content = Array of pairs: dirname + isdirectory
} else {
currentPromiseReject(data.content);
}
});
}
function showDirectory(DirectoryList) {
let mediaDirectoryModal = document.getElementById('mediaDirectory');
let mediaDirectoryULDOM = document.createElement('ul');
if(mediaManagerRoute.length) { // We add ../ to back to parent Directory
let currentMediaDirectoryLI = document.createElement('li');
currentMediaDirectoryLI.innerHTML = "..";
currentMediaDirectoryLI.onclick = () => openNewDirectory('..');
writeLiContent(currentMediaDirectoryLI, '..', true);
mediaDirectoryULDOM.appendChild(currentMediaDirectoryLI);
}
for(let i = 0; i < DirectoryList.length; ++i) {
let currentMediaDirectoryLI = document.createElement('li');
currentMediaDirectoryLI.innerHTML = DirectoryList[i][0]; // File or directory name
if(DirectoryList[i][1]) { // It is a directory
currentMediaDirectoryLI.onclick = () => openNewDirectory(DirectoryList[i][0]); // Directory name
} else { // It is a file
currentMediaDirectoryLI.onclick = () => openNewFile(DirectoryList[i][0]); // File name
}
writeLiContent(currentMediaDirectoryLI, DirectoryList[i][0], DirectoryList[i][1]); // Content = Icon + fileName
mediaDirectoryULDOM.appendChild(currentMediaDirectoryLI);
}
mediaDirectoryModal.innerHTML = '';
mediaDirectoryModal.appendChild(mediaDirectoryULDOM);
changeDirectoryInput();
}
const PARENT_DIRECTORY_REGEX = /[^\/]+\/?$/;
function writeLiContent(currentMediaDirectoryLI, fileName, isDirectory) {
const fileExtension = detectTypeFile(fileName);
let imageName;
if(isDirectory) {
imageName = 'folder';
} else {
switch(fileExtension) {
case IMAGE: {
imageName = 'image';
break;
}
default: {
imageName = 'file';
}
}
}
let currentImage = '<img src="admin/res/images/' + imageName + '.png" class="managerTypeFile">';
currentMediaDirectoryLI.innerHTML = currentImage + fileName;
}
function openNewDirectory(DirectoryName) {
if(DirectoryName === '..') { // Go Back
/* Delete last directory name from variable */
mediaManagerRoute = mediaManagerRoute.substr(0, mediaManagerRoute.length - PARENT_DIRECTORY_REGEX.exec(DirectoryName));
} else {
mediaManagerRoute += DirectoryName + '/';
}
$.post('ajax.php', {Operation : 'ListMediaDirectory', Arguments : mediaManagerRoute}, function(data) {
data = JSON.parse(data);
if(data.result) {
showDirectory(data.content);
} else {
currentPromiseReject(data.content);
//throw new Error(data.content);
}
});
}
function openNewFile(FileName) {
const fileType = detectTypeFile(FileName);
const functionType = FUNCTION_BY_FILE_FORMAT.get(fileType);
selectedFile = FileName;
selectedURL = mediaManagerRoute;
functionType(FileName);
}
function changeDirectoryInput() {
const directoryInput = document.getElementById('directoryInput');
directoryInput.value = '/' + mediaManagerRoute;
}
const FILE = 0;
const IMAGE = 1;
const VIDEO = 2;
const AUDIO = 3;
const REGEX_FILE_DETECTOR = /\.([^\.]+)$/;
/* Video and Audio files not implemented yet */
const FILE_EXTENSIONS_MAP = new Map();
FILE_EXTENSIONS_MAP.set('jpg', IMAGE);
FILE_EXTENSIONS_MAP.set('jpeg', IMAGE);
FILE_EXTENSIONS_MAP.set('gif', IMAGE);
FILE_EXTENSIONS_MAP.set('png', IMAGE);
function detectTypeFile(FileName) {
// It detects if is and image, a file, etc.
const fileExtension = REGEX_FILE_DETECTOR.exec(FileName);
if(fileExtension === null) return FILE;
const fileExtensionDetection = FILE_EXTENSIONS_MAP.get(fileExtension[1]);
if(!fileExtensionDetection) {
return FILE;
}
return fileExtensionDetection;
}
const FUNCTION_BY_FILE_FORMAT = new Map();
const INSERT_MEDIA_BUTTON = '<button type="button" class="btn btn-primary" onclick="insertMediaInSceditor()">Insert Media</button>';
FUNCTION_BY_FILE_FORMAT.set(IMAGE, function(imageURL) {
const img = '<img src="' + 'fp-content/' + mediaManagerRoute + imageURL + '" class="img-fluid">';
changeMediaPreviewContent(img);
});
FUNCTION_BY_FILE_FORMAT.set(FILE, function(fileURL) {
changeMediaPreviewContent('<p class="text-center">No file preview</p>');
});
function changeMediaPreviewContent(content) {
const mediaPreviewDiv = document.getElementById('mediaPreview');
mediaPreviewDiv.innerHTML = content;
const modalFooter = document.getElementById('FilesModalFooter');
modalFooter.innerHTML = INSERT_MEDIA_BUTTON;
}
let selectedURL;
let selectedFile;
function insertMediaInSceditor() {
/* Onyl bbcode at the moment */
const fileType = detectTypeFile(selectedFile);
switch(fileType) {
case IMAGE: {
//insertSCEditorFunction('[img]' + selectedURL + selectedFile + '[/img]')
currentPromiseResolve('[img]' + selectedURL + selectedFile + '[/img]');
break;
}
default: { /* Other files = url link */
currentPromiseResolve('[url=' + selectedURL + selectedFile + ']' + selectedFile +'[/url]');
//insertSCEditorFunction('[url=' + selectedURL + selectedFile + ']' + selectedFile +'[/url]')
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 965 B

View File

@ -1,9 +0,0 @@
Presenting, Nomicons: The Full Monty :o
Credits:
Oscar Gruno, aka Nominell v. 2.0 -> oscargruno@mac.com
Andy Fedosjeenko, aka Nightwolf -> bobo@animevanguard.com
Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko
You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1010 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,80 +0,0 @@
/* Include a headers and IMG fix */
// IMG copied and modified from format/bbcode.js
sceditor.formats.bbcode.set('img', {
allowsEmpty: true,
tags: {
img: {
src: null
}
},
allowedChildren: ['#'],
quoteType: sceditor.BBCodeParser.QuoteType.never,
format: function (element, content) {
var width, height,
attribs = '',
style = function (name) {
return element.style ? element.style[name] : null;
};
const EMOTICON_DATA_ATTR = 'data-sceditor-emoticon';
// check if this is an emoticon image
if (sceditor.dom.attr(element, EMOTICON_DATA_ATTR)) {
return content;
}
width = sceditor.dom.attr(element, 'width') || style('width');
height = sceditor.dom.attr(element, 'height') || style('height');
// only add width and height if one is specified
if ((element.complete && (width || height)) ||
(width && height)) {
attribs = '=' + sceditor.dom.width(element) + 'x' +
sceditor.dom.height(element);
}
return '[img=' + sceditor.dom.attr(element, 'src') + '' + attribs + ']' + '[/img]';
},
html: function (token, attrs, content) {
var undef, width, height, match,
attribs = '';
// handle [img width=340 height=240]url[/img]
width = attrs.width;
height = attrs.height;
// handle [img=IMAGE_URL][/img]
if (attrs.defaultattr) {
content = attrs.defaultattr;
}
if (width !== undef) {
attribs += ' width="' + sceditor.escapeEntities(width, true) + '"';
}
if (height !== undef) {
attribs += ' height="' + sceditor.escapeEntities(height, true) + '"';
}
if(/^images/.test(content)) { // Fix small bug with fp-content directory
return '<img' + attribs + ' src="fp-content/' + sceditor.escapeUriScheme(content) + '" />';
} else {
return '<img' + attribs + ' src="' + sceditor.escapeUriScheme(content) + '" />';
}
}
});
// Header tag (From h1 to h6)
for(let i = 1; i < 7; ++i) { // Headers: h1 to h6
sceditor.formats.bbcode.set('h' + i, {
tags: {
['h' + i] : null,
},
isInline: false,
format: '[h'+ i +']{0}[/h' + i + ']',
html: '<h' + i + '>{0}</h' + i + '>',
});
}

View File

@ -1,41 +0,0 @@
const EMOJIS = [
'😀', '😃', '😄', '😁', '😆', '😅', '😂', '🤣', '😊', '😇',
'🙂', '🙃', '😉', '😌', '😍', '🥰', '😘', '😗', '😙', '😚',
'😋', '😛', '😝', '😜', '🤪', '🤨', '🧐', '🤓', '😎', '🤩',
'🥳', '😏', '😒', '😞', '😔', '😟', '😕', '🙁', '☹️', '😣',
'😖', '😫', '😩', '🥺', '😢', '😭', '😤', '😠', '😡', '🤬',
'🤯', '😳', '🥵', '🥶', '😱', '😨', '😰', '😥', '😓', '🤗',
'🤔', '🤭', '🤫', '🤥', '😶', '😐', '😑', '😬', '🙄', '😯',
'😦', '😧', '😮', '😲', '🥱', '😴', '🤤', '😪', '😵', '🤐',
'🥴', '🤢', '🤮', '🤧', '😷', '🤒', '🤕', '🤑', '🤠', '😈',
'👿'
];
sceditor.command.set('emojis', {
exec: function(caller) {
const sceditorInsert = this.insert;
const createEmojiLink = function(emoji) {
let link = document.createElement('a');
const linkText = document.createTextNode(emoji);
link.appendChild(linkText);
link.onclick = () => { sceditorInsert(emoji) };
return link;
};
const emojisShowListContent = function() {
let content = document.createElement('div');
content.id = 'sceditor-Emojis';
EMOJIS.forEach(function(emoji) {
content.appendChild(createEmojiLink(emoji));
});
return content;
};
this.createDropDown(caller, 'emojis-list', emojisShowListContent());
},
tooltip: 'Insert a emoji emoticon'
});

View File

@ -1,38 +0,0 @@
/**
* SCEditor FlatPress File Manager
* http://www.flatpress.org
*
* Copyright (C) 2020, Francisco Arocas (franciscoarocas.com)
*
* SCEditor is licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* @author Francisco Arocas
*/
// After load the plugin, we add first the editor icon
sceditor.command.set('flatPressFileManager', {
exec: function() {
/*
An a open bootstrap modal function
The modal html is in the .tpl file, where sceditor is included
*/
const insertIntoSceditor = this.insert;
openMediaManagerAndGetMediaUrl(function(value) {
insertIntoSceditor(value);
});
},
tooltip: 'Open FlatPress File Manager',
});
(function (sceditor) {
'use strict';
var extend = sceditor.utils.extend;
sceditor.plugins.flatPressFileManager = function () {
this.init = function () { };
};
}(sceditor));

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */body,code:before,html,p,table{margin:0;padding:0;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;color:#111;line-height:1.25;overflow:visible}html{height:100%}.ios{overflow:auto;-webkit-overflow-scrolling:touch}.ios body{position:relative;overflow:auto}body{min-height:100%;word-wrap:break-word}body.placeholder::before{content:attr(placeholder);color:#555;font-style:italic}ol,ul{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0}table,td{border:1px dotted #000;empty-cells:show}table td{min-width:5px}code{display:block;background:#f1f1f1;white-space:pre;padding:1em;text-align:left;margin:.25em 0;direction:ltr}blockquote{background:#fff7d9;margin:.25em 0;border-left:.3em solid #f4e59f;padding:.5em .5em .5em .75em}blockquote cite{font-weight:700;display:block;font-size:1em;margin:0 -.5em .25em -.75em;padding:0 .5em .15em .75em;border-bottom:1px solid #f4e59f}h1,h2,h3,h4,h5,h6{padding:0;margin:0}div,p{min-height:1.25em}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,91 +0,0 @@
<?php
/*
Flatpress Ajax
It recives OP and arguments, and return the result
Created by Francisco Arocas
Website: franciscoarocas.com
*/
require_once ('defaults.php');
require_once (INCLUDES_DIR.'includes.php');
system_init();
// It contents all Operations and code
$ajaxFunctions = [];
// It contents if Operation is and admin operation or not
// If is and admin, user need to be logged
// True if needs admin, false if not
$ajaxIsAdminOrNot = [];
/* Functions to add Flarpress Ajax operations */
function addAjaxOperation($operationName, $isAdminOrNot, $operationFunction) {
global $ajaxFunctions, $ajaxIsAdminOrNot;
if(array_key_exists($operationName, $ajaxFunctions)) {
throw new Exception('Error, AjaxOperationName exists.');
}
$ajaxFunctions[$operationName] = $operationFunction;
$ajaxIsAdminOrNot[$operationName] = $isAdminOrNot;
}
function addAdminAjaxOperation($operationName, $operationFunction) {
addAjaxOperation($operationName, true, $operationFunction);
}
function addAdminNoAjaxOperation($operationName, $operationFunction) {
addAjaxOperation($operationName, false, $operationFunction);
}
define('AJAXERROR', false);
define('AJAXSUCCESS', true);
function returnJSONValue($resultValue, $resultContent) {
$Value = new stdClass;
$Value->result = $resultValue;
$Value->content = $resultContent;
echo json_encode($Value);
die();
}
/* Include all Admin Ajax operations */
require_once(ADMIN_DIR . 'adminAjaxOperations.php');
foreach($AjaxFunctionMap as $currentName => $currentFunction) {
addAdminAjaxOperation($currentName, $currentFunction);
}
/* Recibe $POST to access ajax Function */
if(isset($_POST)) {
if(!isset($_POST['Operation'])) {
returnJSONValue(AJAXERROR, 'Flatpress Ajax needs operation');
}
if(!array_key_exists($_POST['Operation'], $ajaxFunctions)) {
returnJSONValue(AJAXERROR, 'Flatpress Ajax Operation doesnt not exist');
}
//Check if this OP needs admin permissions. If true, check users permissions.
if($ajaxIsAdminOrNot[$_POST['Operation']]) {
if(!user_loggedin()) {
returnJSONValue(AJAXERROR, 'Forbidden. You dont have admin permissions');
}
}
try {
if(!isset($_POST['Arguments'])) {
$result = $ajaxFunctions[$_POST['Operation']]();
} else {
$result = $ajaxFunctions[$_POST['Operation']]($_POST['Arguments']);
}
returnJSONValue(AJAXSUCCESS, $result);
} catch(Exception $e) {
returnJSONValue(AJAXERROR, $e->getMessage());
}
}
?>

View File

@ -1 +0,0 @@
4.4.1

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
/*!
* Bootstrap Reboot v5.0.0-beta1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

Some files were not shown because too many files have changed in this diff Show More