move tinymce to resources folder
@@ -213,7 +213,7 @@ class TheliaHttpKernel extends HttpKernel
|
||||
}
|
||||
}
|
||||
|
||||
protected function initSession(Request $request)
|
||||
public function initSession(Request $request)
|
||||
{
|
||||
if (null === self::$session) {
|
||||
$storage = new Session\Storage\NativeSessionStorage();
|
||||
|
||||
@@ -1,20 +1 @@
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
{include file="include/tinymce_init.tpl"}
|
||||
@@ -1,20 +1 @@
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
{include file="include/tinymce_init.tpl"}
|
||||
@@ -1,20 +1 @@
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
{include file="include/tinymce_init.tpl"}
|
||||
@@ -1,20 +1 @@
|
||||
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
|
||||
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector: ".wysiwyg",
|
||||
theme: "modern",
|
||||
menubar : false,
|
||||
language: "",
|
||||
plugins: [
|
||||
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
|
||||
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
|
||||
"table contextmenu directionality emoticons paste textcolor filemanager"
|
||||
],
|
||||
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect | filemanager | link unlink anchor | image media | forecolor backcolor | print preview code ",
|
||||
image_advtab: true ,
|
||||
external_filemanager_path:"{url file='/tinymce/plugins/filemanager/'}'",
|
||||
filemanager_title:"{intl l='Files manager'}" ,
|
||||
external_plugins: { "filemanager" : "{url file='/tinymce/plugins/filemanager/plugin.min.js'}"}
|
||||
});
|
||||
</script>
|
||||
{include file="include/tinymce_init.tpl"}
|
||||
@@ -22,10 +22,12 @@
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Tinymce\Listener;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Thelia\Core\Event\Cache\CacheEvent;
|
||||
use Thelia\Core\Thelia;
|
||||
|
||||
|
||||
@@ -42,10 +44,19 @@ class VerifyTinymceListener implements EventSubscriberInterface
|
||||
if(false === file_exists(THELIA_WEB_DIR . '/tinymce')) {
|
||||
$fs = new Filesystem();
|
||||
|
||||
$fs->mirror(__DIR__ . '/../Config/tinymce', THELIA_WEB_DIR . '/tinymce');
|
||||
$fs->mirror(__DIR__ . '/../Resources/js/tinymce', THELIA_WEB_DIR . '/tinymce');
|
||||
}
|
||||
}
|
||||
|
||||
public function clearCache(CacheEvent $event)
|
||||
{
|
||||
$fs = new Filesystem();
|
||||
|
||||
$directory = new \DirectoryIterator(THELIA_WEB_DIR . '/tinymce');
|
||||
|
||||
$fs->remove($directory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of event names this subscriber wants to listen to.
|
||||
*
|
||||
@@ -69,7 +80,8 @@ class VerifyTinymceListener implements EventSubscriberInterface
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
TheliaEvents::BOOT => array('verifyTinymce', 128)
|
||||
TheliaEvents::BOOT => array('verifyTinymce', 128),
|
||||
TheliaEvents::CACHE_CLEAR => array("clearCache", 128)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 323 B |
|
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
@@ -1,5 +1,45 @@
|
||||
<?php
|
||||
session_start();
|
||||
use Thelia\Core\HttpKernel\HttpCache\HttpCache;
|
||||
use Thelia\Core\Thelia;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
|
||||
//use Symfony\Component\DependencyInjection;
|
||||
|
||||
$env = 'prod';
|
||||
require __DIR__ . '/../../../../../core/bootstrap.php';
|
||||
|
||||
$request = Request::createFromGlobals();
|
||||
|
||||
$thelia = new Thelia("prod", false);
|
||||
$thelia->boot();
|
||||
|
||||
$httpKernel = $thelia->getContainer()->get('http_kernel');
|
||||
|
||||
$httpKernel->getContainer()->enterScope('request');
|
||||
$httpKernel->getContainer()->set('request', $request, 'request');
|
||||
$httpKernel->initSession($request);
|
||||
/** @var \Thelia\Core\Security\SecurityContext $securityContext */
|
||||
$securityContext = $httpKernel->getContainer()->get('thelia.securityContext');
|
||||
|
||||
$isGranted = $securityContext->isGranted(
|
||||
array('ADMIN'),
|
||||
array(
|
||||
\Thelia\Core\Security\Resource\AdminResources::PRODUCT,
|
||||
\Thelia\Core\Security\Resource\AdminResources::CATEGORY,
|
||||
\Thelia\Core\Security\Resource\AdminResources::FOLDER,
|
||||
\Thelia\Core\Security\Resource\AdminResources::CONTENT,
|
||||
),
|
||||
array(),
|
||||
array(
|
||||
\Thelia\Core\Security\AccessManager::UPDATE,
|
||||
\Thelia\Core\Security\AccessManager::CREATE,
|
||||
)
|
||||
);
|
||||
|
||||
if (false === $isGranted) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// DON'T COPY THIS VARIABLES IN FOLDERS config.php FILES
|
||||
@@ -19,8 +59,8 @@ session_start();
|
||||
// | | | |- responsivefilemanager
|
||||
// | | | | |- plugin.min.js
|
||||
|
||||
$base_url="http://www.site.com"; // base url (only domain) of site (without final /). If you prefer relative urls leave empty
|
||||
$upload_dir = '/source/'; // path from base_url to base of upload folder (with start and final /)
|
||||
$base_url=rtrim(\Thelia\Model\ConfigQuery::read('url_site'), '/'); // base url (only domain) of site (without final /). If you prefer relative urls leave empty
|
||||
$upload_dir = '/media/'; // path from base_url to base of upload folder (with start and final /)
|
||||
$current_path = '../source/'; // relative path from filemanager folder to upload folder (with final /)
|
||||
//thumbs folder can't put inside upload folder
|
||||
$thumbs_base_path = '../thumbs/'; // relative path from filemanager folder to thumbs folder (with final /)
|
||||
@@ -93,7 +133,7 @@ $ext=array_merge($ext_img, $ext_file, $ext_misc, $ext_video,$ext_music); //allow
|
||||
|
||||
/******************
|
||||
* AVIARY config
|
||||
*******************/
|
||||
*******************/
|
||||
$aviary_key="dvh8qudbp6yx2bnp";
|
||||
$aviary_secret="m6xaym5q42rpw433";
|
||||
$aviary_version=3;
|
||||
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 648 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 412 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |