From 1a55c86fc58d7879745ec85f88a9a24c417e6777 Mon Sep 17 00:00:00 2001 From: Josantonius Date: Sun, 13 Aug 2017 19:56:16 +0200 Subject: [PATCH] Updated to 1.0.2 version --- CHANGELOG.md | 8 + composer.json | 2 +- config/modules.php | 347 +++++++-------- lib/vendor/autoload.php | 2 +- lib/vendor/composer/autoload_real.php | 8 +- lib/vendor/composer/autoload_static.php | 6 +- lib/vendor/composer/installed.json | 325 +++++++------- lib/vendor/composer/installers/.travis.yml | 17 +- lib/vendor/composer/installers/CHANGELOG.md | 15 +- lib/vendor/composer/installers/README.md | 4 + lib/vendor/composer/installers/_config.yml | 1 + lib/vendor/composer/installers/composer.json | 3 + .../Installers/EzPlatformInstaller.php | 10 + .../src/Composer/Installers/Installer.php | 4 + .../LanManagementSystemInstaller.php | 27 ++ .../Composer/Installers/LavaLiteInstaller.php | 2 +- .../Composer/Installers/OsclassInstaller.php | 14 + .../Installers/UserFrostingInstaller.php | 9 + .../Installers/Test/InstallerTest.php | 26 +- .../eliasis-framework/eliasis/src/App/App.php | 79 ++-- .../eliasis-framework/module/composer.json | 2 +- .../eliasis-framework/module/src/Module.php | 4 +- lib/vendor/josantonius/url/composer.json | 2 +- lib/vendor/josantonius/url/src/Url.php | 60 +-- lib/vendor/josantonius/wp_image/composer.json | 2 +- .../josantonius/wp_image/src/WP_Image.php | 33 ++ .../josantonius/wp_menu/src/WP_Menu.php | 2 +- .../josantonius/wp_register/composer.json | 2 +- .../wp_register/src/WP_Register.php | 4 +- modules/copy-movie-grifus/LICENSE | 264 +++++++++++ modules/copy-movie-grifus/composer.json | 45 ++ modules/copy-movie-grifus/config/add-urls.php | 25 ++ modules/copy-movie-grifus/config/assets.php | 52 +++ .../copy-movie-grifus/config/namespaces.php | 25 ++ modules/copy-movie-grifus/config/paths.php | 25 ++ .../copy-movie-grifus/config/set-hooks.php | 22 + ...ifus-copy-es_ES-backup-201706230322430.po~ | 256 +++++++++++ .../extensions-for-grifus-copy-es_ES.mo | Bin 0 -> 1367 bytes .../extensions-for-grifus-copy-es_ES.po | 98 +++++ .../public/css/copy-movie-grifus.css | 14 + .../public/js/copy-movie-grifus.js | 54 +++ .../public/js/eliasis-clipboard.min.js | 7 + .../src/Controller/Front/Copy/Copy.php | 34 ++ .../src/Controller/Launcher/Launcher.php | 118 +++++ .../src/Model/Front/Copy/Copy.php | 152 +++++++ modules/custom-images-grifus/LICENSE | 264 +++++++++++ modules/custom-images-grifus/composer.json | 48 ++ .../custom-images-grifus/config/add-urls.php | 25 ++ .../custom-images-grifus/config/assets.php | 46 ++ modules/custom-images-grifus/config/menu.php | 24 + .../config/namespaces.php | 26 ++ modules/custom-images-grifus/config/pages.php | 15 + modules/custom-images-grifus/config/paths.php | 26 ++ .../custom-images-grifus/config/set-hooks.php | 22 + .../custom-images-grifus.php | 2 +- ...us-images-es_ES-backup-201708110046150.po~ | 76 ++++ .../extensions-for-grifus-images-es_ES.mo | Bin 0 -> 1563 bytes .../extensions-for-grifus-images-es_ES.po | 76 ++++ .../public/css/custom-images-grifus-admin.css | 73 +++ .../public/js/custom-images-grifus-admin.js | 146 ++++++ .../src/Controller/Admin/Image/Image.php | 122 +++++ .../Admin/Page/CustomImages/CustomImages.php | 153 +++++++ .../src/Controller/Launcher/Launcher.php | 139 ++++++ .../src/Model/Admin/Image/Image.php | 208 +++++++++ .../src/Model/Launcher/Launcher.php | 83 ++++ .../src/template/page/custom-images.php | 59 +++ modules/custom-rating-grifus/LICENSE | 264 +++++++++++ modules/custom-rating-grifus/composer.json | 47 ++ .../custom-rating-grifus/config/add-urls.php | 25 ++ .../custom-rating-grifus/config/assets.php | 73 +++ modules/custom-rating-grifus/config/menu.php | 24 + .../config/namespaces.php | 26 ++ modules/custom-rating-grifus/config/pages.php | 15 + modules/custom-rating-grifus/config/paths.php | 27 ++ .../custom-rating-grifus/config/set-hooks.php | 22 + .../custom-rating-grifus.php | 2 +- ...us-rating-es_ES-backup-201708110042230.po~ | 76 ++++ .../extensions-for-grifus-rating-es_ES.mo | Bin 0 -> 1585 bytes .../extensions-for-grifus-rating-es_ES.po | 76 ++++ .../public/css/custom-rating-grifus-admin.css | 79 ++++ .../public/css/custom-rating-grifus.css | 70 +++ .../public/js/custom-rating-grifus-admin.js | 118 +++++ .../public/js/custom-rating-grifus-home.js | 27 ++ .../public/js/custom-rating-grifus.js | 126 ++++++ .../Admin/Page/CustomRating/CustomRating.php | 152 +++++++ .../src/Controller/Admin/Rating/Rating.php | 415 ++++++++++++++++++ .../src/Controller/Launcher/Launcher.php | 237 ++++++++++ .../src/Model/Admin/Rating/Rating.php | 208 +++++++++ .../src/Model/Launcher/Launcher.php | 129 ++++++ .../template/meta-boxes/wp-insert-post.php | 31 ++ .../src/template/page/custom-rating.php | 56 +++ .../src/Controller/Admin/Info/Info.php | 1 - .../src/Model/Admin/Info/Info.php | 1 - readme.txt | 15 +- 94 files changed, 5755 insertions(+), 431 deletions(-) create mode 100644 lib/vendor/composer/installers/_config.yml create mode 100644 lib/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php create mode 100644 lib/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php create mode 100644 lib/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php create mode 100644 lib/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php create mode 100644 modules/copy-movie-grifus/LICENSE create mode 100644 modules/copy-movie-grifus/composer.json create mode 100644 modules/copy-movie-grifus/config/add-urls.php create mode 100644 modules/copy-movie-grifus/config/assets.php create mode 100644 modules/copy-movie-grifus/config/namespaces.php create mode 100644 modules/copy-movie-grifus/config/paths.php create mode 100644 modules/copy-movie-grifus/config/set-hooks.php create mode 100644 modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES-backup-201706230322430.po~ create mode 100644 modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.mo create mode 100644 modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.po create mode 100644 modules/copy-movie-grifus/public/css/copy-movie-grifus.css create mode 100644 modules/copy-movie-grifus/public/js/copy-movie-grifus.js create mode 100644 modules/copy-movie-grifus/public/js/eliasis-clipboard.min.js create mode 100644 modules/copy-movie-grifus/src/Controller/Front/Copy/Copy.php create mode 100644 modules/copy-movie-grifus/src/Controller/Launcher/Launcher.php create mode 100644 modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php create mode 100644 modules/custom-images-grifus/LICENSE create mode 100644 modules/custom-images-grifus/composer.json create mode 100644 modules/custom-images-grifus/config/add-urls.php create mode 100644 modules/custom-images-grifus/config/assets.php create mode 100644 modules/custom-images-grifus/config/menu.php create mode 100644 modules/custom-images-grifus/config/namespaces.php create mode 100644 modules/custom-images-grifus/config/pages.php create mode 100644 modules/custom-images-grifus/config/paths.php create mode 100644 modules/custom-images-grifus/config/set-hooks.php create mode 100644 modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES-backup-201708110046150.po~ create mode 100644 modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.mo create mode 100644 modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.po create mode 100644 modules/custom-images-grifus/public/css/custom-images-grifus-admin.css create mode 100644 modules/custom-images-grifus/public/js/custom-images-grifus-admin.js create mode 100644 modules/custom-images-grifus/src/Controller/Admin/Image/Image.php create mode 100644 modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php create mode 100644 modules/custom-images-grifus/src/Controller/Launcher/Launcher.php create mode 100644 modules/custom-images-grifus/src/Model/Admin/Image/Image.php create mode 100644 modules/custom-images-grifus/src/Model/Launcher/Launcher.php create mode 100644 modules/custom-images-grifus/src/template/page/custom-images.php create mode 100644 modules/custom-rating-grifus/LICENSE create mode 100644 modules/custom-rating-grifus/composer.json create mode 100644 modules/custom-rating-grifus/config/add-urls.php create mode 100644 modules/custom-rating-grifus/config/assets.php create mode 100644 modules/custom-rating-grifus/config/menu.php create mode 100644 modules/custom-rating-grifus/config/namespaces.php create mode 100644 modules/custom-rating-grifus/config/pages.php create mode 100644 modules/custom-rating-grifus/config/paths.php create mode 100644 modules/custom-rating-grifus/config/set-hooks.php create mode 100644 modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES-backup-201708110042230.po~ create mode 100644 modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES.mo create mode 100644 modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES.po create mode 100644 modules/custom-rating-grifus/public/css/custom-rating-grifus-admin.css create mode 100644 modules/custom-rating-grifus/public/css/custom-rating-grifus.css create mode 100644 modules/custom-rating-grifus/public/js/custom-rating-grifus-admin.js create mode 100644 modules/custom-rating-grifus/public/js/custom-rating-grifus-home.js create mode 100644 modules/custom-rating-grifus/public/js/custom-rating-grifus.js create mode 100644 modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php create mode 100644 modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php create mode 100644 modules/custom-rating-grifus/src/Controller/Launcher/Launcher.php create mode 100644 modules/custom-rating-grifus/src/Model/Admin/Rating/Rating.php create mode 100644 modules/custom-rating-grifus/src/Model/Launcher/Launcher.php create mode 100644 modules/custom-rating-grifus/src/template/meta-boxes/wp-insert-post.php create mode 100644 modules/custom-rating-grifus/src/template/page/custom-rating.php diff --git a/CHANGELOG.md b/CHANGELOG.md index c803b4f..df21913 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## 1.0.2 - 2017-08-13 + +* The `Custom Rating Grifus module` was updated to version 1.0.2. + +* [Custom Rating Grifus module] Fixed bug on archive or search pages, now will also replace the IMDB legend by TOTAL. + +* [Custom Rating Grifus module] Now when manipulate it the rating of the movie from the administration panel will show the total number of votes and the rating in real time. + ## 1.0.1 - 2017-08-11 * Bug fix in the Josantonius\WP_Register library. diff --git a/composer.json b/composer.json index a01d348..5ea97ef 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "josantonius/extensions-for-grifus", - "version": "1.0.1", + "version": "1.0.2", "description": "Extensions for Grifus theme.", "type": "wordpress-plugin", "keywords": [ diff --git a/config/modules.php b/config/modules.php index 0191f3d..406595f 100644 --- a/config/modules.php +++ b/config/modules.php @@ -13,185 +13,188 @@ 'module' => [ 'CopyMovieGrifus' => [ - 'copy-movie-grifus' => [ - 'copy-movie-grifus.php', - 'LICENSE', - 'composer.json', - 'config' => [ - 'add-urls.php', - 'assets.php', - 'namespaces.php', - 'paths.php', - 'set-hooks.php', - ], - 'languages' => [ - 'extensions-for-grifus-copy-es_ES.mo', - 'extensions-for-grifus-copy-es_ES.po', - ], - 'public' => [ - 'css' => [ - 'copy-movie-grifus.css', - ], - 'images' => [ - 'copy-movie-grifus.png', - ], - 'js' => [ - 'copy-movie-grifus.js', - 'eliasis-clipboard.min.js', - ], - ], - 'src' => [ - 'Controller' => [ - 'Launcher' => [ - 'Launcher.php', - ], - 'Front' => [ - 'Copy' => [ - 'Copy.php', - ], - ], - ], - 'Model' => [ - 'Front' => [ - 'Copy' => [ - 'Copy.php', - ], - ], - ], - ], - ], + 'copy-movie-grifus' => [ + 'copy-movie-grifus.php', + 'LICENSE', + 'composer.json', + 'config' => [ + 'add-urls.php', + 'assets.php', + 'namespaces.php', + 'paths.php', + 'set-hooks.php', + ], + 'languages' => [ + 'extensions-for-grifus-copy-es_ES.mo', + 'extensions-for-grifus-copy-es_ES.po', + ], + 'public' => [ + 'css' => [ + 'copy-movie-grifus.css', + ], + 'images' => [ + 'copy-movie-grifus.png', + ], + 'js' => [ + 'copy-movie-grifus.js', + 'eliasis-clipboard.min.js', + ], + ], + 'src' => [ + 'Controller' => [ + 'Launcher' => [ + 'Launcher.php', + ], + 'Front' => [ + 'Copy' => [ + 'Copy.php', + ], + ], + ], + 'Model' => [ + 'Front' => [ + 'Copy' => [ + 'Copy.php', + ], + ], + ], + ], + ], ], 'CustomRatingGrifus' => [ - 'custom-rating-grifus' => [ - 'custom-rating-grifus.php', - 'LICENSE', - 'composer.json', - 'config' => [ - 'add-urls.php', - 'assets.php', - 'menu.php', - 'namespaces.php', - 'pages.php', - 'paths.php', - 'set-hooks.php', - ], - 'languages' => [ - 'extensions-for-grifus-rating-es_ES.mo', - 'extensions-for-grifus-rating-es_ES.po', - ], - 'public' => [ - 'css' => [ - 'custom-rating-grifus.css', - 'custom-rating-grifus-admin.css', - ], - 'images' => [ - 'custom-rating-grifus.png', - ], - 'js' => [ - 'custom-rating-grifus.js', - 'custom-rating-grifus-admin.js', - 'custom-rating-grifus-home.js', - ], - ], - 'src' => [ - 'Controller' => [ - 'Launcher' => [ - 'Launcher.php', - ], - 'Admin' => [ - 'Page' => [ - 'CustomRating' => [ - 'CustomRating.php', - ], - ], - 'Rating' => [ - 'Rating.php', - ], - ], - ], - 'Model' => [ - 'Launcher' => [ - 'Launcher.php', - ], - 'Admin' => [ - 'Rating' => [ - 'Rating.php', - ], - ], - ], - 'template' => [ + 'custom-rating-grifus' => [ + 'custom-rating-grifus.php', + 'LICENSE', + 'composer.json', + 'config' => [ + 'add-urls.php', + 'assets.php', + 'menu.php', + 'namespaces.php', + 'pages.php', + 'paths.php', + 'set-hooks.php', + ], + 'languages' => [ + 'extensions-for-grifus-rating-es_ES.mo', + 'extensions-for-grifus-rating-es_ES.po', + ], + 'public' => [ + 'css' => [ + 'custom-rating-grifus.css', + 'custom-rating-grifus-admin.css', + 'custom-rating-grifus-edit-post.css', + ], + 'images' => [ + 'custom-rating-grifus.png', + ], + 'js' => [ + 'custom-rating-grifus.js', + 'custom-rating-grifus-admin.js', + 'custom-rating-grifus-home.js', + 'custom-rating-grifus-edit-post.js', + + ], + ], + 'src' => [ + 'Controller' => [ + 'Launcher' => [ + 'Launcher.php', + ], + 'Admin' => [ + 'Page' => [ + 'CustomRating' => [ + 'CustomRating.php', + ], + ], + 'Rating' => [ + 'Rating.php', + ], + ], + ], + 'Model' => [ + 'Launcher' => [ + 'Launcher.php', + ], + 'Admin' => [ + 'Rating' => [ + 'Rating.php', + ], + ], + ], + 'template' => [ 'meta-boxes' => [ 'wp-insert-post.php', ], - 'page' => [ - 'custom-rating.php', - ], - ], - ], - ], + 'page' => [ + 'custom-rating.php', + ], + ], + ], + ], ], 'CustomImagesGrifus' => [ - 'custom-images-grifus' => [ - 'custom-images-grifus.php', - 'LICENSE', - 'composer.json', - 'config' => [ - 'add-urls.php', - 'assets.php', - 'menu.php', - 'namespaces.php', - 'pages.php', - 'paths.php', - 'set-hooks.php', - ], - 'languages' => [ - 'extensions-for-grifus-images-es_ES.mo', - 'extensions-for-grifus-images-es_ES.po', - ], - 'public' => [ - 'css' => [ - 'custom-images-grifus-admin.css', - ], - 'images' => [ - 'custom-images-grifus.png', - ], - 'js' => [ - 'custom-images-grifus-admin.js', - ], - ], - 'src' => [ - 'Controller' => [ - 'Launcher' => [ - 'Launcher.php', - ], - 'Admin' => [ - 'Page' => [ - 'CustomImages' => [ - 'CustomImages.php', - ], - ], - 'Image' => [ - 'Image.php', - ], - ], - ], - 'Model' => [ - 'Launcher' => [ - 'Launcher.php', - ], - 'Admin' => [ - 'Image' => [ - 'Image.php', - ], - ], - ], - 'template' => [ - 'page' => [ - 'custom-images.php', - ], - ], - ], - ], + 'custom-images-grifus' => [ + 'custom-images-grifus.php', + 'LICENSE', + 'composer.json', + 'config' => [ + 'add-urls.php', + 'assets.php', + 'menu.php', + 'namespaces.php', + 'pages.php', + 'paths.php', + 'set-hooks.php', + ], + 'languages' => [ + 'extensions-for-grifus-images-es_ES.mo', + 'extensions-for-grifus-images-es_ES.po', + ], + 'public' => [ + 'css' => [ + 'custom-images-grifus-admin.css', + ], + 'images' => [ + 'custom-images-grifus.png', + ], + 'js' => [ + 'custom-images-grifus-admin.js', + ], + ], + 'src' => [ + 'Controller' => [ + 'Launcher' => [ + 'Launcher.php', + ], + 'Admin' => [ + 'Page' => [ + 'CustomImages' => [ + 'CustomImages.php', + ], + ], + 'Image' => [ + 'Image.php', + ], + ], + ], + 'Model' => [ + 'Launcher' => [ + 'Launcher.php', + ], + 'Admin' => [ + 'Image' => [ + 'Image.php', + ], + ], + ], + 'template' => [ + 'page' => [ + 'custom-images.php', + ], + ], + ], + ], ], ], ]; diff --git a/lib/vendor/autoload.php b/lib/vendor/autoload.php index d040fcd..3362168 100644 --- a/lib/vendor/autoload.php +++ b/lib/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInitad33692bf835983d3a15d2b4c9b3619b::getLoader(); +return ComposerAutoloaderInit711e98a1c448a0db3a79a764336bee9c::getLoader(); diff --git a/lib/vendor/composer/autoload_real.php b/lib/vendor/composer/autoload_real.php index 110d0a6..8b30f2c 100644 --- a/lib/vendor/composer/autoload_real.php +++ b/lib/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitad33692bf835983d3a15d2b4c9b3619b +class ComposerAutoloaderInit711e98a1c448a0db3a79a764336bee9c { private static $loader; @@ -19,15 +19,15 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitad33692bf835983d3a15d2b4c9b3619b', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit711e98a1c448a0db3a79a764336bee9c', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitad33692bf835983d3a15d2b4c9b3619b', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit711e98a1c448a0db3a79a764336bee9c', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitad33692bf835983d3a15d2b4c9b3619b::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit711e98a1c448a0db3a79a764336bee9c::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { diff --git a/lib/vendor/composer/autoload_static.php b/lib/vendor/composer/autoload_static.php index da8852b..1a157f6 100644 --- a/lib/vendor/composer/autoload_static.php +++ b/lib/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInitad33692bf835983d3a15d2b4c9b3619b +class ComposerStaticInit711e98a1c448a0db3a79a764336bee9c { public static $prefixLengthsPsr4 = array ( 'J' => @@ -94,8 +94,8 @@ class ComposerStaticInitad33692bf835983d3a15d2b4c9b3619b public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitad33692bf835983d3a15d2b4c9b3619b::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitad33692bf835983d3a15d2b4c9b3619b::$prefixDirsPsr4; + $loader->prefixLengthsPsr4 = ComposerStaticInit711e98a1c448a0db3a79a764336bee9c::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit711e98a1c448a0db3a79a764336bee9c::$prefixDirsPsr4; }, null, ClassLoader::class); } diff --git a/lib/vendor/composer/installed.json b/lib/vendor/composer/installed.json index 8756ab9..caeb0a4 100644 --- a/lib/vendor/composer/installed.json +++ b/lib/vendor/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "composer/installers", - "version": "v1.3.0", - "version_normalized": "1.3.0.0", + "version": "v1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045" + "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/79ad876c7498c0bbfe7eed065b8651c93bfd6045", - "reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045", + "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", + "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", "shasum": "" }, "require": { @@ -25,7 +25,7 @@ "composer/composer": "1.0.*@dev", "phpunit/phpunit": "4.1.*" }, - "time": "2017-04-24 06:37:16", + "time": "2017-08-09 07:53:48", "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", @@ -59,6 +59,7 @@ "Hurad", "ImageCMS", "Kanboard", + "Lan Management System", "MODX Evo", "Mautic", "Maya", @@ -82,6 +83,7 @@ "croogo", "dokuwiki", "drupal", + "eZ Platform", "elgg", "expressionengine", "fuelphp", @@ -98,6 +100,7 @@ "mediawiki", "modulework", "moodle", + "osclass", "phpbb", "piwik", "ppi", @@ -116,24 +119,24 @@ ] }, { - "name": "josantonius/url", - "version": "1.1.2", - "version_normalized": "1.1.2.0", + "name": "josantonius/wp_register", + "version": "dev-master", + "version_normalized": "9999999-dev", "source": { "type": "git", - "url": "https://github.com/Josantonius/PHP-Url.git", - "reference": "2893ec8de40206c4c9d9d4989c391d1e27ce37d8" + "url": "https://github.com/Josantonius/WP_Register.git", + "reference": "283b3d5f1ba2ed95b74eb52988fe1467708818e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/PHP-Url/zipball/2893ec8de40206c4c9d9d4989c391d1e27ce37d8", - "reference": "2893ec8de40206c4c9d9d4989c391d1e27ce37d8", + "url": "https://api.github.com/repos/Josantonius/WP_Register/zipball/283b3d5f1ba2ed95b74eb52988fe1467708818e6", + "reference": "283b3d5f1ba2ed95b74eb52988fe1467708818e6", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-05-09 14:19:44", + "time": "2017-08-04 14:38:41", "type": "library", "extra": { "branch-alias": { @@ -143,7 +146,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Josantonius\\Url\\": "src/" + "Josantonius\\WP_Register\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -158,36 +161,38 @@ "role": "Developer" } ], - "description": "Library for urls manipulation.", + "description": "Register css and JavaScript resources.", "keywords": [ + "JS", + "css", + "enqueue", "hhvm", - "https", - "path", "php", - "uri", - "url" + "register", + "script", + "style", + "wordpress" ] }, { - "name": "eliasis-framework/eliasis", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "name": "josantonius/hook", + "version": "dev-master", + "version_normalized": "9999999-dev", "source": { "type": "git", - "url": "https://github.com/Eliasis-Framework/Eliasis.git", - "reference": "c955eda920a03fb17af7abb9f119b5ace93ae675" + "url": "https://github.com/Josantonius/PHP-Hook.git", + "reference": "51ccc29ddc232a8a4eb6bbb71847bf33574f0f6c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Eliasis-Framework/Eliasis/zipball/c955eda920a03fb17af7abb9f119b5ace93ae675", - "reference": "c955eda920a03fb17af7abb9f119b5ace93ae675", + "url": "https://api.github.com/repos/Josantonius/PHP-Hook/zipball/51ccc29ddc232a8a4eb6bbb71847bf33574f0f6c", + "reference": "51ccc29ddc232a8a4eb6bbb71847bf33574f0f6c", "shasum": "" }, "require": { - "josantonius/url": "^1.1.2", "php": "^5.6 || ^7.0" }, - "time": "2017-06-26 02:38:04", + "time": "2017-07-16 01:19:23", "type": "library", "extra": { "branch-alias": { @@ -197,7 +202,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Eliasis\\": "src/" + "Josantonius\\Hook\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -212,33 +217,34 @@ "role": "Developer" } ], - "description": "Eliasis PHP Framework", + "description": "Library for handling hooks.", "keywords": [ - "Eliasis", - "framework", - "hmvc", + "Action Hooks", + "HOOK", + "actions", + "hhvm", "php" ] }, { - "name": "josantonius/wp_register", - "version": "dev-master", - "version_normalized": "9999999-dev", + "name": "josantonius/url", + "version": "1.1.4", + "version_normalized": "1.1.4.0", "source": { "type": "git", - "url": "https://github.com/Josantonius/WP_Register.git", - "reference": "272cb8566e8e7607359242e72deb260337cf917a" + "url": "https://github.com/Josantonius/PHP-Url.git", + "reference": "67cdf6f02234a4e354e5490f011ef02fb31a96f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/WP_Register/zipball/272cb8566e8e7607359242e72deb260337cf917a", - "reference": "272cb8566e8e7607359242e72deb260337cf917a", + "url": "https://api.github.com/repos/Josantonius/PHP-Url/zipball/67cdf6f02234a4e354e5490f011ef02fb31a96f6", + "reference": "67cdf6f02234a4e354e5490f011ef02fb31a96f6", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-06-17 18:10:59", + "time": "2017-07-18 20:56:13", "type": "library", "extra": { "branch-alias": { @@ -248,7 +254,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Josantonius\\WP_Register\\": "src/" + "Josantonius\\Url\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -263,38 +269,36 @@ "role": "Developer" } ], - "description": "Register css and JavaScript resources.", + "description": "Library for urls manipulation.", "keywords": [ - "JS", - "css", - "enqueue", "hhvm", + "https", + "path", "php", - "register", - "script", - "style", - "wordpress" + "uri", + "url" ] }, { - "name": "josantonius/hook", - "version": "dev-master", - "version_normalized": "9999999-dev", + "name": "eliasis-framework/eliasis", + "version": "1.1.0", + "version_normalized": "1.1.0.0", "source": { "type": "git", - "url": "https://github.com/Josantonius/PHP-Hook.git", - "reference": "c3489456ec2d964467ddc1ee75573b5f694537e7" + "url": "https://github.com/Eliasis-Framework/Eliasis.git", + "reference": "4369819ee8617c8c902635ce8a9d0a5715d4e3b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/PHP-Hook/zipball/c3489456ec2d964467ddc1ee75573b5f694537e7", - "reference": "c3489456ec2d964467ddc1ee75573b5f694537e7", + "url": "https://api.github.com/repos/Eliasis-Framework/Eliasis/zipball/4369819ee8617c8c902635ce8a9d0a5715d4e3b2", + "reference": "4369819ee8617c8c902635ce8a9d0a5715d4e3b2", "shasum": "" }, "require": { + "josantonius/url": "^1.1.2", "php": "^5.6 || ^7.0" }, - "time": "2017-06-26 02:16:52", + "time": "2017-07-18 01:49:56", "type": "library", "extra": { "branch-alias": { @@ -304,7 +308,7 @@ "installation-source": "dist", "autoload": { "psr-4": { - "Josantonius\\Hook\\": "src/" + "Eliasis\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -319,12 +323,11 @@ "role": "Developer" } ], - "description": "Library for handling hooks.", + "description": "Eliasis PHP Framework", "keywords": [ - "Action Hooks", - "HOOK", - "actions", - "hhvm", + "Eliasis", + "framework", + "hmvc", "php" ] }, @@ -335,18 +338,18 @@ "source": { "type": "git", "url": "https://github.com/Josantonius/PHP-Json.git", - "reference": "3bd96f56e4157d774321d78cf5fc86191378ef66" + "reference": "773d519c98bd620ce687b88a87574317722afc44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/PHP-Json/zipball/3bd96f56e4157d774321d78cf5fc86191378ef66", - "reference": "3bd96f56e4157d774321d78cf5fc86191378ef66", + "url": "https://api.github.com/repos/Josantonius/PHP-Json/zipball/773d519c98bd620ce687b88a87574317722afc44", + "reference": "773d519c98bd620ce687b88a87574317722afc44", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-05-31 06:39:12", + "time": "2017-07-18 20:14:23", "type": "library", "extra": { "branch-alias": { @@ -390,12 +393,12 @@ "source": { "type": "git", "url": "https://github.com/Eliasis-Framework/Module.git", - "reference": "b6cb835d0bf097c90aa78a7b14d7e01451f52343" + "reference": "e84018a008a1c6df30375641d40feb010df2f178" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Eliasis-Framework/Module/zipball/b6cb835d0bf097c90aa78a7b14d7e01451f52343", - "reference": "b6cb835d0bf097c90aa78a7b14d7e01451f52343", + "url": "https://api.github.com/repos/Eliasis-Framework/Module/zipball/e84018a008a1c6df30375641d40feb010df2f178", + "reference": "e84018a008a1c6df30375641d40feb010df2f178", "shasum": "" }, "require": { @@ -404,7 +407,7 @@ "josantonius/json": "^1.1.2", "php": "^5.6 || ^7.0" }, - "time": "2017-06-26 02:39:22", + "time": "2017-07-25 07:46:14", "type": "library", "extra": { "branch-alias": { @@ -446,22 +449,22 @@ "source": { "type": "git", "url": "https://github.com/Josantonius/Copy-Movie-Grifus.git", - "reference": "81c08e513fc2d1fc4cc95f68dd463c6c25122cf6" + "reference": "36199830486dee4da1c71b270b341922bc3310de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/Copy-Movie-Grifus/zipball/81c08e513fc2d1fc4cc95f68dd463c6c25122cf6", - "reference": "81c08e513fc2d1fc4cc95f68dd463c6c25122cf6", + "url": "https://api.github.com/repos/Josantonius/Copy-Movie-Grifus/zipball/36199830486dee4da1c71b270b341922bc3310de", + "reference": "36199830486dee4da1c71b270b341922bc3310de", "shasum": "" }, "require": { - "composer/installers": "^1.3.0", + "composer/installers": "^1.4.0", "eliasis-framework/eliasis": "^1.1.0", - "eliasis-framework/module": "^1.0.6", - "josantonius/wp_register": "^1.0.2", + "eliasis-framework/module": "^1.0.7", + "josantonius/wp_register": "^1.0.3", "php": "^5.3 || ^7.0" }, - "time": "2017-06-24 17:29:49", + "time": "2017-08-11 02:13:20", "type": "eliasis-module", "installation-source": "dist", "autoload": { @@ -491,6 +494,58 @@ "wordpress" ] }, + { + "name": "josantonius/wp_plugin-info", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/Josantonius/WP_Plugin-Info.git", + "reference": "ce7990a16de38f16f583e4183e5fd5a5847a4335" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Josantonius/WP_Plugin-Info/zipball/ce7990a16de38f16f583e4183e5fd5a5847a4335", + "reference": "ce7990a16de38f16f583e4183e5fd5a5847a4335", + "shasum": "" + }, + "require": { + "composer/installers": "^1.3.0", + "eliasis-framework/eliasis": "^1.0.9", + "php": "^5.3 || ^7.0" + }, + "time": "2017-07-18 02:34:43", + "type": "eliasis-module", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Eliasis\\Modules\\WP_Plugin_Info\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Josantonius", + "email": "hello@josantonius.com", + "homepage": "https://josantonius.com", + "role": "Developer" + } + ], + "description": "Get and save plugin information from WordPress API to be consumed by other modules.", + "keywords": [ + "Eliasis", + "WordPress-API", + "component", + "hhvm", + "info", + "php", + "plugin", + "wordpress" + ] + }, { "name": "josantonius/wp_menu", "version": "dev-master", @@ -498,18 +553,18 @@ "source": { "type": "git", "url": "https://github.com/Josantonius/WP_Menu.git", - "reference": "ae483bbac2fda294ea11ea611dc3375e56b6ae4a" + "reference": "1fd4192d8a4ee50ae635172b381df2e751eeed82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/WP_Menu/zipball/ae483bbac2fda294ea11ea611dc3375e56b6ae4a", - "reference": "ae483bbac2fda294ea11ea611dc3375e56b6ae4a", + "url": "https://api.github.com/repos/Josantonius/WP_Menu/zipball/1fd4192d8a4ee50ae635172b381df2e751eeed82", + "reference": "1fd4192d8a4ee50ae635172b381df2e751eeed82", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-05-28 22:23:55", + "time": "2017-07-18 03:03:36", "type": "library", "extra": { "branch-alias": { @@ -545,28 +600,28 @@ }, { "name": "josantonius/custom-rating-grifus", - "version": "1.0.0", - "version_normalized": "1.0.0.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/Josantonius/Custom-Rating-Grifus.git", - "reference": "1d276e65c27461ae5188e55450fe2bec36f31ed3" + "reference": "cfa0aa49ee67c609b4ef8cb6ae45116cb6f3b3cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/Custom-Rating-Grifus/zipball/1d276e65c27461ae5188e55450fe2bec36f31ed3", - "reference": "1d276e65c27461ae5188e55450fe2bec36f31ed3", + "url": "https://api.github.com/repos/Josantonius/Custom-Rating-Grifus/zipball/cfa0aa49ee67c609b4ef8cb6ae45116cb6f3b3cd", + "reference": "cfa0aa49ee67c609b4ef8cb6ae45116cb6f3b3cd", "shasum": "" }, "require": { - "composer/installers": "^1.3.0", + "composer/installers": "^1.4.0", "eliasis-framework/eliasis": "^1.1.0", - "eliasis-framework/module": "^1.0.6", - "josantonius/wp_menu": "^1.0.0", - "josantonius/wp_register": "^1.0.2", + "eliasis-framework/module": "^1.0.7", + "josantonius/wp_menu": "^1.0.3", + "josantonius/wp_register": "^1.0.3", "php": "^5.3 || ^7.0" }, - "time": "2017-06-24 22:20:40", + "time": "2017-08-11 00:43:23", "type": "eliasis-module", "installation-source": "dist", "autoload": { @@ -604,18 +659,18 @@ "source": { "type": "git", "url": "https://github.com/Josantonius/WP_Image.git", - "reference": "155d774cdbe8ef9a37a5f7b1d5bbf18eade2f117" + "reference": "cc1f89605e7e42f14675a811b351600b3add0598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/WP_Image/zipball/155d774cdbe8ef9a37a5f7b1d5bbf18eade2f117", - "reference": "155d774cdbe8ef9a37a5f7b1d5bbf18eade2f117", + "url": "https://api.github.com/repos/Josantonius/WP_Image/zipball/cc1f89605e7e42f14675a811b351600b3add0598", + "reference": "cc1f89605e7e42f14675a811b351600b3add0598", "shasum": "" }, "require": { "php": "^5.6 || ^7.0" }, - "time": "2017-06-07 08:46:20", + "time": "2017-08-11 01:14:12", "type": "library", "extra": { "branch-alias": { @@ -651,29 +706,29 @@ }, { "name": "josantonius/custom-images-grifus", - "version": "1.0.0", - "version_normalized": "1.0.0.0", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", "url": "https://github.com/Josantonius/Custom-Images-Grifus.git", - "reference": "5fcc33330ba5682a0fa86ac96fb5097e743a4c68" + "reference": "c3b1330abdbb03a460f2c449017599213ca247f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Josantonius/Custom-Images-Grifus/zipball/5fcc33330ba5682a0fa86ac96fb5097e743a4c68", - "reference": "5fcc33330ba5682a0fa86ac96fb5097e743a4c68", + "url": "https://api.github.com/repos/Josantonius/Custom-Images-Grifus/zipball/c3b1330abdbb03a460f2c449017599213ca247f0", + "reference": "c3b1330abdbb03a460f2c449017599213ca247f0", "shasum": "" }, "require": { - "composer/installers": "^1.3.0", + "composer/installers": "^1.4.0", "eliasis-framework/eliasis": "^1.1.0", - "eliasis-framework/module": "^1.0.6", - "josantonius/wp_image": "^1.0.0", - "josantonius/wp_menu": "^1.0.0", - "josantonius/wp_register": "^1.0.2", + "eliasis-framework/module": "^1.0.7", + "josantonius/wp_image": "^1.0.1", + "josantonius/wp_menu": "^1.0.3", + "josantonius/wp_register": "^1.0.3", "php": "^5.3 || ^7.0" }, - "time": "2017-06-25 00:28:57", + "time": "2017-08-11 01:50:02", "type": "eliasis-module", "installation-source": "dist", "autoload": { @@ -703,57 +758,5 @@ "plugin", "wordpress" ] - }, - { - "name": "josantonius/wp_plugin-info", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/Josantonius/WP_Plugin-Info.git", - "reference": "ec49acdc3d7fdf6677391bbfbe7efccbb0090a34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Josantonius/WP_Plugin-Info/zipball/ec49acdc3d7fdf6677391bbfbe7efccbb0090a34", - "reference": "ec49acdc3d7fdf6677391bbfbe7efccbb0090a34", - "shasum": "" - }, - "require": { - "composer/installers": "^1.3.0", - "eliasis-framework/eliasis": "^1.0.9", - "php": "^5.3 || ^7.0" - }, - "time": "2017-06-24 17:23:56", - "type": "eliasis-module", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Eliasis\\Modules\\WP_Plugin_Info\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0+" - ], - "authors": [ - { - "name": "Josantonius", - "email": "hello@josantonius.com", - "homepage": "https://josantonius.com", - "role": "Developer" - } - ], - "description": "Get and save plugin information from WordPress API to be consumed by other modules.", - "keywords": [ - "Eliasis", - "WordPress-API", - "component", - "hhvm", - "info", - "php", - "plugin", - "wordpress" - ] } ] diff --git a/lib/vendor/composer/installers/.travis.yml b/lib/vendor/composer/installers/.travis.yml index c2ec2d1..931191d 100644 --- a/lib/vendor/composer/installers/.travis.yml +++ b/lib/vendor/composer/installers/.travis.yml @@ -1,21 +1,30 @@ language: php +sudo: false + +dist: trusty + +git: + depth: 5 + php: - - 5.3 - 5.4 - 5.5 - 5.6 - 7.0 - 7.1 - hhvm + - nightly matrix: + include: + - dist: precise + php: 5.3 fast_finish: true allow_failures: - - php: 7.0 - - php: 7.1 + - php: nightly -before_script: +before_script: - composer self-update - composer install diff --git a/lib/vendor/composer/installers/CHANGELOG.md b/lib/vendor/composer/installers/CHANGELOG.md index d5d2619..357a7de 100644 --- a/lib/vendor/composer/installers/CHANGELOG.md +++ b/lib/vendor/composer/installers/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## [Unreleased] + +## v1.4.0 - 2017-08-09 +### Added +* Installer for eZ Platform. +* Installer for UserFrosting. +* Installer for Osclass. +* Installer for Lan Management System. + +### Changed +* Added vendor name to package path for Lavalite. + ## v1.3.0 - 2017-04-24 ### Added * Kanboard plugins installer. @@ -14,9 +26,6 @@ * OntoWiki installer. * The requirements for contributing (CONTRIBUTING.md). -### Changed -* Concrete5: block & theme install location updates. - ## v1.2.0 - 2016-08-13 ### Added * Installer for Attogram. diff --git a/lib/vendor/composer/installers/README.md b/lib/vendor/composer/installers/README.md index 332142c..b77dbe3 100644 --- a/lib/vendor/composer/installers/README.md +++ b/lib/vendor/composer/installers/README.md @@ -55,6 +55,7 @@ is not needed to install packages with these frameworks: | Elgg | `elgg-plugin` | Eliasis | `eliasis-module` | ExpressionEngine 3 | `ee3-addon`
`ee3-theme` +| eZ Platform | `ezplatform-assets`
`ezplatform-meta-assets` | FuelPHP v1.x | `fuel-module`
`fuel-package`
`fuel-theme` | FuelPHP v2.x | `fuelphp-component` | Grav | `grav-plugin`
`grav-theme` @@ -66,6 +67,7 @@ is not needed to install packages with these frameworks: | Kirby | **`kirby-plugin`**
`kirby-field`
`kirby-tag` | KodiCMS | `kodicms-plugin`
`kodicms-media` | Kohana | **`kohana-module`** +| Lan Management System | `lms-plugin`
`lms-template`
`lms-document-template`
`lms-userpanel-module` | Laravel | `laravel-library` | Lavalite | `lavalite-theme`
`lavalite-package` | Lithium | **`lithium-library`
`lithium-source`** @@ -78,6 +80,7 @@ is not needed to install packages with these frameworks: | October | **`october-module`
`october-plugin`
`october-theme`** | OntoWiki | `ontowiki-extension`
`ontowiki-theme`
`ontowiki-translation` | OXID | `oxid-module`
`oxid-theme`
`oxid-out` +| Osclass | `osclass-plugin`
`osclass-theme`
`osclass-language` | MODULEWork | `modulework-module` | Moodle | `moodle-*` (Please [check source](https://raw.githubusercontent.com/composer/installers/master/src/Composer/Installers/MoodleInstaller.php) for all supported types) | Piwik | `piwik-plugin` @@ -99,6 +102,7 @@ is not needed to install packages with these frameworks: | Tusk | `tusk-task`
`tusk-command`
`tusk-asset` | TYPO3 Flow | `typo3-flow-package`
`typo3-flow-framework`
`typo3-flow-plugin`
`typo3-flow-site`
`typo3-flow-boilerplate`
`typo3-flow-build` | TYPO3 CMS | `typo3-cms-extension` (Deprecated in this package, use the [TYPO3 CMS Installers](https://packagist.org/packages/typo3/cms-composer-installers) instead) +| UserFrosting | `userfrosting-sprinkle` | Vanilla | `vanilla-plugin`
`vanilla-theme` | Vgmcp | `vgmcp-bundle`
`vgmcp-theme` | Wolf CMS | `wolfcms-plugin` diff --git a/lib/vendor/composer/installers/_config.yml b/lib/vendor/composer/installers/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/lib/vendor/composer/installers/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/lib/vendor/composer/installers/composer.json b/lib/vendor/composer/installers/composer.json index 4dd0b90..0a7477d 100644 --- a/lib/vendor/composer/installers/composer.json +++ b/lib/vendor/composer/installers/composer.json @@ -23,6 +23,7 @@ "Elgg", "Eliasis", "ExpressionEngine", + "eZ Platform", "FuelPHP", "Grav", "Hurad", @@ -31,6 +32,7 @@ "Joomla", "Kanboard", "Kohana", + "Lan Management System", "Laravel", "Lavalite", "Lithium", @@ -41,6 +43,7 @@ "MODX Evo", "MediaWiki", "OXID", + "osclass", "MODULEWork", "Moodle", "Piwik", diff --git a/lib/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php b/lib/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php new file mode 100644 index 0000000..f30ebcc --- /dev/null +++ b/lib/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php @@ -0,0 +1,10 @@ + 'web/assets/ezplatform/', + 'assets' => 'web/assets/ezplatform/{$name}/', + ); +} diff --git a/lib/vendor/composer/installers/src/Composer/Installers/Installer.php b/lib/vendor/composer/installers/src/Composer/Installers/Installer.php index 10f28bb..8356b8c 100644 --- a/lib/vendor/composer/installers/src/Composer/Installers/Installer.php +++ b/lib/vendor/composer/installers/src/Composer/Installers/Installer.php @@ -37,6 +37,7 @@ class Installer extends LibraryInstaller 'eliasis' => 'EliasisInstaller', 'ee3' => 'ExpressionEngineInstaller', 'ee2' => 'ExpressionEngineInstaller', + 'ezplatform' => 'EzPlatformInstaller', 'fuel' => 'FuelInstaller', 'fuelphp' => 'FuelphpInstaller', 'grav' => 'GravInstaller', @@ -48,6 +49,7 @@ class Installer extends LibraryInstaller 'kirby' => 'KirbyInstaller', 'kodicms' => 'KodiCMSInstaller', 'kohana' => 'KohanaInstaller', + 'lms' => 'LanManagementSystemInstaller', 'laravel' => 'LaravelInstaller', 'lavalite' => 'LavaLiteInstaller', 'lithium' => 'LithiumInstaller', @@ -63,6 +65,7 @@ class Installer extends LibraryInstaller 'october' => 'OctoberInstaller', 'ontowiki' => 'OntoWikiInstaller', 'oxid' => 'OxidInstaller', + 'osclass' => 'OsclassInstaller', 'phpbb' => 'PhpBBInstaller', 'pimcore' => 'PimcoreInstaller', 'piwik' => 'PiwikInstaller', @@ -84,6 +87,7 @@ class Installer extends LibraryInstaller 'tusk' => 'TuskInstaller', 'typo3-cms' => 'TYPO3CmsInstaller', 'typo3-flow' => 'TYPO3FlowInstaller', + 'userfrosting' => 'UserFrostingInstaller', 'vanilla' => 'VanillaInstaller', 'whmcs' => 'WHMCSInstaller', 'wolfcms' => 'WolfCMSInstaller', diff --git a/lib/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php b/lib/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php new file mode 100644 index 0000000..903143a --- /dev/null +++ b/lib/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php @@ -0,0 +1,27 @@ + 'plugins/{$name}/', + 'template' => 'templates/{$name}/', + 'document-template' => 'documents/templates/{$name}/', + 'userpanel-module' => 'userpanel/modules/{$name}/', + ); + + /** + * Format package name to CamelCase + */ + public function inflectPackageVars($vars) + { + $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } + +} diff --git a/lib/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php b/lib/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php index 8130b88..412c0b5 100644 --- a/lib/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +++ b/lib/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php @@ -4,7 +4,7 @@ class LavaLiteInstaller extends BaseInstaller { protected $locations = array( - 'package' => 'packages/{$name}/', + 'package' => 'packages/{$vendor}/{$name}/', 'theme' => 'public/themes/{$name}/', ); } diff --git a/lib/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php b/lib/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php new file mode 100644 index 0000000..3ca7954 --- /dev/null +++ b/lib/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php @@ -0,0 +1,14 @@ + 'oc-content/plugins/{$name}/', + 'theme' => 'oc-content/themes/{$name}/', + 'language' => 'oc-content/languages/{$name}/', + ); + +} diff --git a/lib/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php b/lib/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php new file mode 100644 index 0000000..fcb414a --- /dev/null +++ b/lib/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php @@ -0,0 +1,9 @@ + 'app/sprinkles/{$name}/', + ); +} diff --git a/lib/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php b/lib/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php index 91a303a..cec3e45 100644 --- a/lib/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +++ b/lib/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php @@ -124,6 +124,8 @@ public function dataForTestSupport() array('ee2-addon', true), array('elgg-plugin', true), array('eliasis-module', true), + array('ezplatform-assets', true), + array('ezplatform-meta-assets', true), array('fuel-module', true), array('fuel-package', true), array('fuel-theme', true), @@ -138,6 +140,10 @@ public function dataForTestSupport() array('kanboard-plugin', true), array('kirby-plugin', true), array('kohana-module', true), + array('lms-plugin', true), + array('lms-template', true), + array('lms-document-template', true), + array('lms-userpanel-module', true), array('laravel-library', true), array('lavalite-theme', true), array('lavalite-package', true), @@ -192,6 +198,7 @@ public function dataForTestSupport() array('tusk-asset', true), array('typo3-flow-plugin', true), array('typo3-cms-extension', true), + array('userfrosting-sprinkle', true), array('vanilla-plugin', true), array('vanilla-theme', true), array('whmcs-gateway', true), @@ -207,6 +214,9 @@ public function dataForTestSupport() array('phifty-bundle', true), array('phifty-library', true), array('phifty-framework', true), + array('osclass-plugin', true), + array('osclass-theme', true), + array('osclass-language', true), ); } @@ -272,6 +282,8 @@ public function dataForTestInstallPath() array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'), array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'), array('ee2-theme', 'themes/third_party/ee_package/', 'author/ee_package'), + array('ezplatform-assets', 'web/assets/ezplatform/ezplatform_comp/', 'author/ezplatform_comp'), + array('ezplatform-meta-assets', 'web/assets/ezplatform/', 'author/ezplatform_comp'), array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'), array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'), array('fuel-theme', 'fuel/app/themes/theme/', 'fuel/theme'), @@ -286,9 +298,17 @@ public function dataForTestInstallPath() array('kanboard-plugin', 'plugins/my_plugin/', 'shama/my_plugin'), array('kirby-plugin', 'site/plugins/my_plugin/', 'shama/my_plugin'), array('kohana-module', 'modules/my_package/', 'shama/my_package'), + array('lms-plugin', 'plugins/MyPackage/', 'shama/MyPackage'), + array('lms-plugin', 'plugins/MyPackage/', 'shama/my_package'), + array('lms-template', 'templates/MyPackage/', 'shama/MyPackage'), + array('lms-template', 'templates/MyPackage/', 'shama/my_package'), + array('lms-document-template', 'documents/templates/MyPackage/', 'shama/MyPackage'), + array('lms-document-template', 'documents/templates/MyPackage/', 'shama/my_package'), + array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/MyPackage'), + array('lms-userpanel-module', 'userpanel/modules/MyPackage/', 'shama/my_package'), array('laravel-library', 'libraries/my_package/', 'shama/my_package'), array('lavalite-theme', 'public/themes/my_theme/', 'shama/my_theme'), - array('lavalite-package', 'packages/my_package/', 'shama/my_package'), + array('lavalite-package', 'packages/my_group/my_package/', 'my_group/my_package'), array('lithium-library', 'libraries/li3_test/', 'user/li3_test'), array('magento-library', 'lib/foo/', 'test/foo'), array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'), @@ -351,6 +371,7 @@ public function dataForTestInstallPath() array('typo3-flow-package', 'Packages/Application/my_package/', 'shama/my_package'), array('typo3-flow-build', 'Build/my_package/', 'shama/my_package'), array('typo3-cms-extension', 'typo3conf/ext/my_extension/', 'shama/my_extension'), + array('userfrosting-sprinkle', 'app/sprinkles/my_sprinkle/', 'shama/my_sprinkle'), array('vanilla-plugin', 'plugins/my_plugin/', 'shama/my_plugin'), array('vanilla-theme', 'themes/my_theme/', 'shama/my_theme'), array('whmcs-gateway', 'modules/gateways/gateway_name/', 'vendor/gateway_name'), @@ -366,6 +387,9 @@ public function dataForTestInstallPath() array('phifty-library', 'libraries/my-lib/', 'shama/my-lib'), array('phifty-framework', 'frameworks/my-framework/', 'shama/my-framework'), array('yawik-module', 'module/MyModule/', 'shama/my_module'), + array('osclass-plugin', 'oc-content/plugins/sample_plugin/', 'test/sample_plugin'), + array('osclass-theme', 'oc-content/themes/sample_theme/', 'test/sample_theme'), + array('osclass-language', 'oc-content/languages/sample_lang/', 'test/sample_lang'), ); } diff --git a/lib/vendor/eliasis-framework/eliasis/src/App/App.php b/lib/vendor/eliasis-framework/eliasis/src/App/App.php index 1510527..e1d47d0 100644 --- a/lib/vendor/eliasis-framework/eliasis/src/App/App.php +++ b/lib/vendor/eliasis-framework/eliasis/src/App/App.php @@ -87,22 +87,16 @@ public static function run($baseDirectory, $type = 'app', $id = '0') { self::$id = $id; $that = self::getInstance(); - - $that->_setPaths($baseDirectory, $that); - - $that->_setUrls($baseDirectory, $type, $that); - + + $that->_setPaths($baseDirectory); + $that->_setUrls($baseDirectory, $type); + $that->_setIp(); $that->_runErrorHandler(); - $that->_runCleaner(); - - $that->_getSettings($that); - - $that->_runHooks($that); - + $that->_getSettings(); + $that->_runHooks(); $that->_runModules(); - - $that->_runRoutes($that); + $that->_runRoutes(); } /** @@ -142,13 +136,12 @@ private function _runCleaner() { * @since 1.0.1 * * @param string $baseDirectory → directory where class is instantiated - * @param object $that → application instance */ - private function _setPaths($baseDirectory, $that) { + private function _setPaths($baseDirectory) { - $that->set("ROOT", $baseDirectory . App::DS); - $that->set("CORE", dirname(dirname(__DIR__)) . App::DS); - $that->set("MODULES", App::ROOT() . 'modules' . App::DS); + $this->set('ROOT', $baseDirectory . App::DS); + $this->set('CORE', dirname(dirname(__DIR__)) . App::DS); + $this->set('MODULES', App::ROOT() . 'modules' . App::DS); } /** @@ -158,9 +151,8 @@ private function _setPaths($baseDirectory, $that) { * * @param string $baseDirectory → directory where class is instantiated * @param string $type → application type - * @param object $that → application instance */ - private function _setUrls($baseDirectory, $type, $that) { + private function _setUrls($baseDirectory, $type) { switch ($type) { @@ -173,18 +165,33 @@ private function _setUrls($baseDirectory, $type, $that) { break; } - $that->set("MODULES_URL", $baseUrl . 'modules/'); - $that->set("PUBLIC_URL", $baseUrl . 'public/'); + $this->set('MODULES_URL', $baseUrl . 'modules/'); + $this->set('PUBLIC_URL', $baseUrl . 'public/'); + } + + /** + * Set ip. + * + * @since 1.1.0 + * + * @link https://github.com/Josantonius/PHP-Ip + */ + private function _setIp() { + + if (class_exists($Ip = 'Josantonius\Ip\Ip')) { + + $ip = $Ip::get(); + + $this->set('IP', ($ip) ? $ip : 'unknown'); + } } /** * Get settings. * * @since 1.0.0 - * - * @param object $that → application instance */ - private function _getSettings($that) { + private function _getSettings() { $path = [ @@ -202,7 +209,7 @@ private function _getSettings($that) { $config = require($dir . $file); - $that->settings = array_merge($that->settings, $config); + $this->settings = array_merge($this->settings, $config); } } } @@ -213,21 +220,19 @@ private function _getSettings($that) { * * @since 1.1.0 * - * @param object $that → application instance - * * @link https://github.com/Josantonius/PHP-Hook */ - private function _runHooks($that) { + private function _runHooks() { if (class_exists($Hook = 'Josantonius\Hook\Hook')) { $Hook::getInstance(self::$id); - if (isset($that->settings['hooks'])) { + if (isset($this->settings['hooks'])) { - $Hook::addActions($that->settings['hooks']); + $Hook::addActions($this->settings['hooks']); - unset($that->settings['hooks']); + unset($this->settings['hooks']); } } } @@ -255,19 +260,17 @@ private function _runModules() { * * @since 1.0.1 * - * @param object $that → application instance - * * @link https://github.com/Josantonius/PHP-Router */ - private function _runRoutes($that) { + private function _runRoutes() { if (class_exists($Router = 'Josantonius\Router\Router')) { - if (isset($that->settings['routes'])) { + if (isset($this->settings['routes'])) { - $Router::addRoute($that->settings['routes']); + $Router::addRoute($this->settings['routes']); - unset($that->settings['routes']); + unset($this->settings['routes']); $Router::dispatch(); } diff --git a/lib/vendor/eliasis-framework/module/composer.json b/lib/vendor/eliasis-framework/module/composer.json index 46e56c6..64ede76 100644 --- a/lib/vendor/eliasis-framework/module/composer.json +++ b/lib/vendor/eliasis-framework/module/composer.json @@ -1,6 +1,6 @@ { "name": "eliasis-framework/module", - "version": "1.0.6", + "version": "1.0.7", "description": "PHP library for adding addition of modules for Eliasis Framework.", "type": "library", "keywords": [ diff --git a/lib/vendor/eliasis-framework/module/src/Module.php b/lib/vendor/eliasis-framework/module/src/Module.php index 373da92..fa21371 100644 --- a/lib/vendor/eliasis-framework/module/src/Module.php +++ b/lib/vendor/eliasis-framework/module/src/Module.php @@ -751,10 +751,10 @@ public static function __callstatic($index, $params = false) { throw new ModuleException($message . ': ' . $index . '.', 817); } - $that = self::getInstance(); - self::$id = $index; + $that = self::getInstance(); + if (!$params) { return $that; } $method = (isset($params[0])) ? $params[0] : ''; diff --git a/lib/vendor/josantonius/url/composer.json b/lib/vendor/josantonius/url/composer.json index 926335a..9d83f76 100644 --- a/lib/vendor/josantonius/url/composer.json +++ b/lib/vendor/josantonius/url/composer.json @@ -1,6 +1,6 @@ { "name": "josantonius/url", - "version": "1.1.2", + "version": "1.1.4", "type": "library", "description": "Library for urls manipulation.", "keywords": [ diff --git a/lib/vendor/josantonius/url/src/Url.php b/lib/vendor/josantonius/url/src/Url.php index 8b2c6f9..d2af487 100644 --- a/lib/vendor/josantonius/url/src/Url.php +++ b/lib/vendor/josantonius/url/src/Url.php @@ -4,7 +4,7 @@ * * @author Josantonius - hello@josantonius.com * @author David Carr - dave@simplemvcframework.com - * @copyright Copyright (c) 2017 JST PHP Framework + * @copyright Copyright (c) 2017 * @license https://opensource.org/licenses/MIT - The MIT License (MIT) * @link https://github.com/Josantonius/PHP-Url * @since 1.0.0 @@ -12,8 +12,6 @@ namespace Josantonius\Url; -# use Josantonius\Url\Exception\UrlException; - /** * Url handler. * @@ -21,15 +19,6 @@ */ class Url { - /** - * Directory separator. - * - * @since 1.1.2 - * - * @var string - */ - const DS = DIRECTORY_SEPARATOR; - /** * Get url from the current page. * @@ -49,7 +38,7 @@ public static function getCurrentPage() { $uri = self::getUri(); - return $protocol . ':' . self::DS . self::DS . $host . $port . $uri; + return $protocol . '://' . $host . $port . $uri; } /** @@ -65,9 +54,9 @@ public static function getBaseUrl() { $url = self::addBackslash(self::getCurrentPage()); - if ($uri !== self::DS) { + if ($uri !== '/') { - $url = trim(str_replace($uri, '', $url), self::DS); + $url = trim(str_replace($uri, '', $url), '/'); } return self::addBackslash($url); @@ -78,13 +67,20 @@ public static function getBaseUrl() { * * @since 1.0.0 * + * @param string $url + * * @return string → http|https */ - public static function getProtocol() { + public static function getProtocol($url = false) { + + if ($url) { + + return (preg_match('/^https/', $url)) ? 'https' : 'http'; + } $protocol = strtolower($_SERVER['SERVER_PROTOCOL']); - $protocol = substr($protocol, 0, strpos($protocol, self::DS)); + $protocol = substr($protocol, 0, strpos($protocol, '/')); $ssl = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'); @@ -96,11 +92,13 @@ public static function getProtocol() { * * @since 1.0.0 * + * @param string $url + * * @return boolean */ - public static function isSSL() { + public static function isSSL($url = false) { - return (self::getProtocol() === 'https'); + return (self::getProtocol($url) === 'https'); } /** @@ -108,9 +106,18 @@ public static function isSSL() { * * @since 1.0.0 * - * @return string → server name + * @param string $url + * + * @return string|false → server name */ - public static function getDomain() { + public static function getDomain($url = false) { + + if ($url) { + + preg_match('/([\w]+[.]){1,}[a-z]+/', $url, $matches); + + return isset($matches[0]) ? $matches[0] : false; + } return $_SERVER['SERVER_NAME']; } @@ -138,9 +145,9 @@ public static function getUriMethods() { $root = str_replace($_SERVER["DOCUMENT_ROOT"], '', getcwd()); - $subfolder = trim($root, self::DS); + $subfolder = trim($root, '/'); - return trim(str_replace($subfolder, '', self::getUri()), self::DS); + return trim(str_replace($subfolder, '', self::getUri()), '/'); } /** @@ -171,11 +178,11 @@ public static function addBackslash($uri, $position = 'end') { case 'top': - return (substr($uri, 1) === self::DS) ? $uri : self::DS.$uri; + return (substr($uri, 1) === '/') ? $uri : '/' . $uri; case 'end': - return (substr($uri, -1) === self::DS) ? $uri : $uri.self::DS; + return (substr($uri, -1) === '/') ? $uri : $uri . '/'; case 'both': @@ -240,7 +247,6 @@ public static function autoLink($url, $custom = null) { /** * This function converts and url segment to an safe one. * For example: `test name @132` will be converted to `test-name--123`. - * Replace every character that isn't an letter or an number to an dash sign. * It will also return all letters in lowercase * * @since 1.0.0 @@ -272,7 +278,7 @@ public static function segment($uri = null) { $uri = (!is_null($uri)) ? $uri : $_SERVER['REQUEST_URI']; - return explode(self::DS, trim($uri, self::DS)); + return explode('/', trim($uri, '/')); } /** diff --git a/lib/vendor/josantonius/wp_image/composer.json b/lib/vendor/josantonius/wp_image/composer.json index 7f472ac..eb4dad8 100644 --- a/lib/vendor/josantonius/wp_image/composer.json +++ b/lib/vendor/josantonius/wp_image/composer.json @@ -1,6 +1,6 @@ { "name": "josantonius/wp_image", - "version": "1.0.0", + "version": "1.0.1", "type": "library", "description": "Save images to WordPress.", "keywords": [ diff --git a/lib/vendor/josantonius/wp_image/src/WP_Image.php b/lib/vendor/josantonius/wp_image/src/WP_Image.php index 3385067..cc95acd 100644 --- a/lib/vendor/josantonius/wp_image/src/WP_Image.php +++ b/lib/vendor/josantonius/wp_image/src/WP_Image.php @@ -80,4 +80,37 @@ public static function save($imageUrl, $postID, $featured = false) { return wp_get_attachment_url($attach_id); } + + /** + * Deletes an attachment and all of its derivatives. + * + * @since 1.0.1 + * + * @param int $postID → post id + * @param boolean $force → force deletion + * + * @return int → attachments deleted + */ + public static function deleteAttachedImages($postID, $force = false) { + + $counter = 0; + + $attachments = get_posts( array( + 'post_type' => 'attachment', + 'posts_per_page' => -1, + 'post_status' => 'any', + 'post_mime_type' => 'image/jpeg, image/png, image/gif', + 'post_parent' => $postID + ) ); + + foreach ($attachments as $attachment) { + + if (wp_delete_attachment($attachment->ID, $force) !== false) { + + $counter++; + } + } + + return $counter; + } } diff --git a/lib/vendor/josantonius/wp_menu/src/WP_Menu.php b/lib/vendor/josantonius/wp_menu/src/WP_Menu.php index fa9930a..589483c 100644 --- a/lib/vendor/josantonius/wp_menu/src/WP_Menu.php +++ b/lib/vendor/josantonius/wp_menu/src/WP_Menu.php @@ -219,7 +219,7 @@ private static function _validateMethod($method) { * 2. If it does not exist, it checks if only the name of the method has * been indicated and if it exists inside the output function. * 3. If it does not exist, it is checked if there exists the method - * "addStyles" or "addScripts" inside the output function. + * 'addStyles' or 'addScripts' inside the output function. * * @return boolean */ diff --git a/lib/vendor/josantonius/wp_register/composer.json b/lib/vendor/josantonius/wp_register/composer.json index 4c13295..2734c70 100644 --- a/lib/vendor/josantonius/wp_register/composer.json +++ b/lib/vendor/josantonius/wp_register/composer.json @@ -1,6 +1,6 @@ { "name": "josantonius/wp_register", - "version": "1.0.2", + "version": "1.0.3", "type": "library", "description": "Register css and JavaScript resources.", "keywords": [ diff --git a/lib/vendor/josantonius/wp_register/src/WP_Register.php b/lib/vendor/josantonius/wp_register/src/WP_Register.php index d95c835..d5e90db 100644 --- a/lib/vendor/josantonius/wp_register/src/WP_Register.php +++ b/lib/vendor/josantonius/wp_register/src/WP_Register.php @@ -159,14 +159,14 @@ public static function addStyles() { /** * Check if a particular style or script has been added to be enqueued. * - * @since 1.0.1 + * @since 1.0.3 * * @param string $type → script | style * @param array $name → script or style name * * @return boolean */ - public static function isSet($type, $name) { + public static function isEnqueued($type, $name) { return (in_array($name, self::$data[$type][$name])) ? true : false; } diff --git a/modules/copy-movie-grifus/LICENSE b/modules/copy-movie-grifus/LICENSE new file mode 100644 index 0000000..b017086 --- /dev/null +++ b/modules/copy-movie-grifus/LICENSE @@ -0,0 +1,264 @@ +The GNU General Public License, Version 2, June 1991 (GPLv2) +============================================================ + +> Copyright (C) 1989, 1991 Free Software Foundation, Inc. +> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +Terms And Conditions For Copying, Distribution And Modification +--------------------------------------------------------------- + +**0.** This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +**2.** You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you also +meet all of these conditions: + +* **a)** You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + +* **b)** You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, to + be licensed as a whole at no charge to all third parties under the terms of + this License. + +* **c)** If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +**3.** You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + +* **a)** Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above on + a medium customarily used for software interchange; or, + +* **b)** Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + +* **c)** Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +**7.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution of +the Program by all those who receive copies directly or indirectly through you, +then the only way you could satisfy both it and this License would be to refrain +entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +**9.** The Free Software Foundation may publish revised and/or new versions of +the General Public License from time to time. Such new versions will be similar +in spirit to the present version, but may differ in detail to address new +problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + + +No Warranty +----------- + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/modules/copy-movie-grifus/composer.json b/modules/copy-movie-grifus/composer.json new file mode 100644 index 0000000..7b89184 --- /dev/null +++ b/modules/copy-movie-grifus/composer.json @@ -0,0 +1,45 @@ +{ + "name": "josantonius/copy-movie-grifus", + "version": "1.0.0", + "description": "Copy full movie information from a single button.", + "type": "eliasis-module", + "keywords": [ + "Wordpress", + "Plugin", + "Grifus", + "Grifus Extension", + "Copy Movie", + "Copy Movie Information" + ], + "license": "GPL-2.0+", + "authors": [ + { + "name": "Josantonius", + "email": "hello@josantonius.com", + "homepage": "https://josantonius.com", + "role": "Developer" + } + ], + "config": { + "vendor-dir": "lib/vendor", + "preferred-install": "dist" + }, + "minimum-stability": "dev", + "support": { + "issues": "https://github.com/Josantonius/copy-movie-grifus/issues", + "forum": "http://stackoverflow.com/tags/copy-movie-grifus", + "source": "https://github.com/Josantonius/copy-movie-grifus" + }, + "require": { + "php": "^5.3 || ^7.0", + "eliasis-framework/eliasis" : "^1.1.0", + "eliasis-framework/module" : "^1.0.7", + "Josantonius/WP_Register" : "^1.0.3", + "composer/installers" : "^1.4.0" + }, + "autoload": { + "psr-4": { + "ExtensionsForGrifus\\Modules\\CopyMovieGrifus\\" : "src/" + } + } +} diff --git a/modules/copy-movie-grifus/config/add-urls.php b/modules/copy-movie-grifus/config/add-urls.php new file mode 100644 index 0000000..bc1fa95 --- /dev/null +++ b/modules/copy-movie-grifus/config/add-urls.php @@ -0,0 +1,25 @@ +get('folder'); + +return [ + + 'url' => [ + + 'css' => $url . 'public/css/', + 'js' => $url . 'public/js/', + 'images' => $url . 'public/images/', + ], +]; diff --git a/modules/copy-movie-grifus/config/assets.php b/modules/copy-movie-grifus/config/assets.php new file mode 100644 index 0000000..ce3acd0 --- /dev/null +++ b/modules/copy-movie-grifus/config/assets.php @@ -0,0 +1,52 @@ +get('url', 'css'); +$js = Module::CopyMovieGrifus()->get('url', 'js'); + +return [ + + 'assets' => [ + + 'js' => [ + 'copyMovieGrifus' => [ + 'name' => 'copyMovieGrifus', + 'url' => $js . 'copy-movie-grifus.js', + 'place' => 'front', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => false, + 'params' => [], + ], + 'eliasisClipboard' => [ + 'name' => 'eliasisClipboard', + 'url' => $js . 'eliasis-clipboard.min.js', + 'place' => 'front', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => true, + 'params' => [], + ], + ], + 'css' => [ + 'copyMovieGrifus' => [ + 'name' => 'copyMovieGrifus', + 'url' => $css . 'copy-movie-grifus.css', + 'place' => 'front', + 'deps' => [], + 'version' => '1.0.0', + 'media' => '', + ], + ], + ], +]; diff --git a/modules/copy-movie-grifus/config/namespaces.php b/modules/copy-movie-grifus/config/namespaces.php new file mode 100644 index 0000000..c38035a --- /dev/null +++ b/modules/copy-movie-grifus/config/namespaces.php @@ -0,0 +1,25 @@ +get('namespaces', 'modules'); + +$module = 'CopyMovieGrifus'; + +return [ + + 'namespaces' => [ + + 'controller' => $namespace . $module . '\\Controller\\', + 'front' => $namespace . $module . '\\Controller\\Front\\', + ], +]; diff --git a/modules/copy-movie-grifus/config/paths.php b/modules/copy-movie-grifus/config/paths.php new file mode 100644 index 0000000..0e55dcb --- /dev/null +++ b/modules/copy-movie-grifus/config/paths.php @@ -0,0 +1,25 @@ +get('path', 'root'); + +return [ + + 'path' => [ + + 'languages' => $ROOT.'languages'.$DS, + ], +]; diff --git a/modules/copy-movie-grifus/config/set-hooks.php b/modules/copy-movie-grifus/config/set-hooks.php new file mode 100644 index 0000000..41f08e7 --- /dev/null +++ b/modules/copy-movie-grifus/config/set-hooks.php @@ -0,0 +1,22 @@ +get('namespaces', 'controller'); + +return [ + + 'hooks' => [ + + ['launch-modules', [$namespace.'Launcher\\Launcher', 'init'], 8, 0], + ] +]; diff --git a/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES-backup-201706230322430.po~ b/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES-backup-201706230322430.po~ new file mode 100644 index 0000000..8c18255 --- /dev/null +++ b/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES-backup-201706230322430.po~ @@ -0,0 +1,256 @@ +msgid "" +msgstr "" +"Project-Id-Version: Extensions For Grifus\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-27 00:21+0000\n" +"PO-Revision-Date: 2017-05-27 00:21+0000\n" +"Last-Translator: Josantonius \n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: src/template/pages/extensions.php:39 +msgid "Uninstall" +msgstr "Desinstalar" + +#: modules/custom-images-grifus/custom-images-grifus.php:16 +#: modules/support/supports.php:16 +msgid "Save external IMDB images to your WordPress site." +msgstr "Guarda las imágenes externas de IMDB en tu sitio de WordPress." + +#: modules/custom-rating-grifus/custom-rating-grifus.php:16 +msgid "Replaces IMDB rating by your own rating system." +msgstr "Reemplaza valoración IMDB por tu propio sistema de valoración." + +#: modules/copy-movie-grifus/copy-movie-grifus.php:16 +msgid "Copy full movie information from a single button." +msgstr "Copia la información completa de la película con un simple click." + +#: modules/custom-images-grifus/config/menu.php:19 +#: modules/custom-images-grifus/config/menu.php:20 +#: modules/support/config/menu.php:19 modules/support/config/menu.php:20 +#: modules/custom-images-grifus/src/template/pages/custom-images.php:18 +#: modules/support/src/template/pages/custom-images.php:18 +msgid "Custom Images" +msgstr "Custom Images" + +#: src/template/elements/header.php:24 +msgid "Grifus Extensions" +msgstr "Grifus Extensions" + +#: src/template/elements/header.php:26 +msgid "Rate plugin" +msgstr "Valorar plugin" + +#. Name of the plugin +#: src/template/elements/header.php:44 +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#: src/template/elements/header.php:48 +msgid "" +"Hi! I'm Josantonius, the developer of this plugin. I would like to tell you " +"something..." +msgstr "" +"¡Hola! Soy Josantonius, el desarrollador de este plugin. Quería contarte " +"algo..." + +#: src/template/elements/header.php:50 +msgid "" +"Did you know that you aren't using the free version of the plugin? This is " +"the pro version at no cost to you. Why do I do this? Maybe some can not " +"afford to buy it and I want to prevent it from being downloaded from any " +"place infected with malicious code and ruin your website, I want you to try " +"it freely and I want you to have the opportunity to collaborate on this" +msgstr "" +"¿Sabías que no estás utilizando la versión gratuita del plugin? esta es la " +"versión pro sin coste alguno para ti. ¿Que por qué hago esto? Tal vez haya " +"quien no pueda permitirse comprar este plugin y quiero evitar que lo " +"descarguen desde cualquier lugar infectado con código malicioso y arruinen " +"su sitio web, quiero que puedas probarlo libremente y quiero que tengas la " +"oportunidad de colaborar en este" + +#: src/template/elements/header.php:50 +msgid "open source project" +msgstr "proyecto de código abierto" + +#: src/template/elements/header.php:50 +msgid "if you want it." +msgstr "si así lo deseas." + +#: src/template/elements/header.php:52 +msgid "Your contribution and" +msgstr "Tu contribución y" + +#: src/template/elements/header.php:52 +msgid "feedback" +msgstr "comentarios" + +#: src/template/elements/header.php:52 +msgid "" +"will help me keep updated and keep developing new versions for this plugin. " +"Thank you!" +msgstr "" +"me ayudarán a mantener actualizado y a seguir desarrollando nuevas versiones " +"para este plugin. ¡Gracias!" + +#: src/template/elements/header.php:74 +msgid "CLOSE" +msgstr "CERRAR" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:44 +msgid "Title" +msgstr "Título" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:45 +msgid "Rated" +msgstr "Valoración" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:46 +msgid "Published" +msgstr "Publicada" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:47 +msgid "Rating" +msgstr "Valoración" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:48 +msgid "Votes" +msgstr "Votos" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:49 +msgid "Awards" +msgstr "Premios" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:50 +msgid "Country" +msgstr "País" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:60 +msgid "Original" +msgstr "Título original" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:66 +msgid "Duration" +msgstr "Duración" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:70 +msgid "Sipnosis" +msgstr "Sipnosis" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:74 +msgid "Director" +msgstr "Director" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:86 +msgid "Stars" +msgstr "Estrellas" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:98 +msgid "Cast" +msgstr "Elenco" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:110 +msgid "Genre" +msgstr "Género" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:142 +msgid "Copy information" +msgstr "Copiar información" + +#: modules/copy-movie-grifus/src/Controller/Copy.php:143 +msgid "Copy" +msgstr "Copiar" + +#: src/Controller/Admin/Page/Extensions.php:155 +#: src/Controller/Admin/Page/Extensions.php:220 +#: src/Controller/Admin/Page/Extensions.php:230 +msgid "activate" +msgstr "Activar" + +#: src/Controller/Admin/Page/Extensions.php:163 +#: src/Controller/Admin/Page/Extensions.php:224 +msgid "install" +msgstr "Instalar" + +#: src/Controller/Admin/Page/Extensions.php:169 +#: src/Controller/Admin/Page/Extensions.php:216 +msgid "active" +msgstr "Activo" + +#: modules/custom-images-grifus/src/template/pages/custom-images.php:24 +#: modules/support/src/template/pages/custom-images.php:24 +msgid "Replace all current images" +msgstr "Reemplazar imágenes" + +#: modules/custom-images-grifus/src/template/pages/custom-images.php:27 +#: modules/support/src/template/pages/custom-images.php:27 +msgid "" +"This will replace all external IMDB images and saves them to your WordPress " +"site" +msgstr "" +"Esto reemplazará todas las imágenes externas de IMDB y las guardará en tu " +"sitio de WordPress" + +#: modules/custom-images-grifus/src/template/pages/custom-images.php:38 +#: modules/support/src/template/pages/custom-images.php:38 +msgid "Images were replaced" +msgstr "Imágenes fueron reemplazadas" + +#: modules/custom-images-grifus/src/template/pages/custom-images.php:43 +#: modules/support/src/template/pages/custom-images.php:43 +msgid "Replace all" +msgstr "Reemplazar todo" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:18 +msgid "Custom Rating" +msgstr "Custom Rating" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:24 +msgid "Restart all IMDB ratings" +msgstr "Reiniciar las valoraciones" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:27 +msgid "This will reset all IMDB ratings to zero" +msgstr "Esto restablecerá todas las valoraciones de IMDB a cero" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:34 +msgid "Rating were restarted" +msgstr "valoraciones reiniciadas" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:35 +msgid "All ratings had already been reset" +msgstr "Las valoraciones ya se habían reiniciado" + +#: modules/custom-rating-grifus/src/template/pages/custom-rating.php:40 +msgid "Reset all ratings" +msgstr "Reiniciar valoraciones" + +#: modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages.php:127 +#: modules/support/src/Controller/Admin/Page/CustomImages.php:86 +msgid "All post have already been reviewed" +msgstr "Las publicaciones ya fueron revisadas" + +#: modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating.php:100 +msgid "Films were reviewed" +msgstr "Películas fueron revisadas" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.mo b/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.mo new file mode 100644 index 0000000000000000000000000000000000000000..9ab2bd93bc5b17cc1a39b6ea4430d43b3b37ee15 GIT binary patch literal 1367 zcmbV~%WD%s9LGnk*2aqud>o{VUbM*MRnfXNzS6W*S{j;I^f*bT$&}5^GBazf=tTta z;?1-4Bs~-a@!&b&Nzgw)JbUn>S3&$vvrW<>9$eV{%*^k%zxh4BUylyGBzR8XJ&pIH z-{5()r_TdeKE{3se46k%co_Q^;4t_KJP5u{_y#^I{RHj@zk`RspP={u4UT}r zd%N}{pug`V=FZ;AZ}=>Pu(`uq0beZFV? z;muWU8kQ8fb)=}HwXF}8YFV2$cTy`H#LAg9G9`_uJ8j5RY`T`x11FS)kEPSv&>16_ zV@n235hOXKt|i(cO=g5Lg51`YE2ou&`+|{8sdz}raV?a#B^qRryY5%2CaK6sX)7(M zIBqPdN*4;Uq@A#&TgOlGAYE?w8{OwX{YO(QbG+O#&!Occhr$!0_^ZH5F{b1Ur( zDI2|l0@-YXEeYex3g|#B{R&fyBGSgOdE1l?b}MdLR@DJbl^3e4Xv9`;*c56AXg-^} z%(9nQew=2p760^`!%$e&aAiY|#s_quZ}e(QgrUB%tM+TDIj)*9 zZwgiwydBU=#1*Qx~?gs+mj7-okJ8NU6T*}ghX3vC@d5R;gu@6Nw6*1y6n7Fq|7^;cBf*y zhQAK9FIiz}#0~GNHIXhv+u1;ZdWUSQolO^qn(7_$t@8#aOFYzuckdfq_mo_+&R}>P TYVJnydPZH_RqvYVf9m-Uqk4F= literal 0 HcmV?d00001 diff --git a/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.po b/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.po new file mode 100644 index 0000000..5766b12 --- /dev/null +++ b/modules/copy-movie-grifus/languages/extensions-for-grifus-copy-es_ES.po @@ -0,0 +1,98 @@ +msgid "" +msgstr "" +"Project-Id-Version: Extensions For Grifus\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-23 03:22+0000\n" +"PO-Revision-Date: 2017-06-23 03:22+0000\n" +"Last-Translator: Josantonius \n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:44 +msgid "Title" +msgstr "Título" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:45 +msgid "Rated" +msgstr "Valoración" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:46 +msgid "Published" +msgstr "Publicada" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:47 +msgid "Rating" +msgstr "Valoración" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:48 +msgid "Votes" +msgstr "Votos" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:49 +msgid "Awards" +msgstr "Premios" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:50 +msgid "Country" +msgstr "País" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:60 +msgid "Original" +msgstr "Título original" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:66 +msgid "Duration" +msgstr "Duración" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:70 +msgid "Sipnosis" +msgstr "Sipnosis" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:74 +msgid "Director" +msgstr "Director" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:87 +msgid "Stars" +msgstr "Estrellas" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:99 +msgid "Cast" +msgstr "Elenco" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:111 +msgid "Genre" +msgstr "Género" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:143 +msgid "Copy information" +msgstr "Copiar información" + +#: modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php:147 +msgid "Copy" +msgstr "Copiar" + +#. Name of the plugin +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/copy-movie-grifus/public/css/copy-movie-grifus.css b/modules/copy-movie-grifus/public/css/copy-movie-grifus.css new file mode 100644 index 0000000..24bffd7 --- /dev/null +++ b/modules/copy-movie-grifus/public/css/copy-movie-grifus.css @@ -0,0 +1,14 @@ +@charset "UTF-8"; +/** + * Copy Movie Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Copy-Movie-Grifus.git + * @since 1.0.0 + */ +#copyDataSheet { + cursor: pointer; } + +/*# sourceMappingURL=copy-movie-grifus.css.map */ diff --git a/modules/copy-movie-grifus/public/js/copy-movie-grifus.js b/modules/copy-movie-grifus/public/js/copy-movie-grifus.js new file mode 100644 index 0000000..07b5768 --- /dev/null +++ b/modules/copy-movie-grifus/public/js/copy-movie-grifus.js @@ -0,0 +1,54 @@ +/** + * Copy Movie Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Copy-Movie-Grifus.git + * @since 1.0.0 + */ + +jQuery(document).ready(function($) { + + function copyDataSheet() { + + if ($("#s_right").length !== 0) { return 0; } + + $(".s_right").append( + '
' + + '

' + copyMovieGrifus.copy_title + '

' + + '' + + '
' + ); + + var movie = copyMovieGrifus.movie_info; + + var clipboard = movie.the_title + movie.title + movie.published + movie.rated + movie.duration + movie.rating + movie.votes + movie.awards + movie.country + movie.sipnosis + movie.director + movie.stars + movie.cast + movie.genre; + + $("#grifusDataSheet").attr("data-clipboard-text", clipboard); + + new Clipboard("#grifusDataSheet"); + + $("#grifusDataSheet").click(); + } + + if ($("#cap1").length || $("#cap3").length) { + + copyDataSheet(); + } + +}); diff --git a/modules/copy-movie-grifus/public/js/eliasis-clipboard.min.js b/modules/copy-movie-grifus/public/js/eliasis-clipboard.min.js new file mode 100644 index 0000000..6788dec --- /dev/null +++ b/modules/copy-movie-grifus/public/js/eliasis-clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v1.6.0 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,o){function i(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=n[a]={exports:{}};t[a][0].call(s.exports,function(e){var n=t[a][1][e];return i(n?n:e)},s,s.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function e(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function e(){var t=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function e(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function e(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function e(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function e(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function e(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function e(){this.removeFake()}},{key:"action",set:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function e(){return this._action}},{key:"target",set:function e(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function e(){return this._target}}]),e}();e.exports=c})},{select:5}],8:[function(t,n,o){!function(i,r){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof o)r(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(e,t,n,o){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var u=i(t),s=i(n),f=i(o),d=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText}},{key:"listenClick",value:function e(t){var n=this;this.listener=(0,f.default)(t,"click",function(e){return n.onClick(e)})}},{key:"onClick",value:function e(t){var n=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})}},{key:"defaultAction",value:function e(t){return l("action",t)}},{key:"defaultTarget",value:function e(t){var n=l("target",t);if(n)return document.querySelector(n)}},{key:"defaultText",value:function e(t){return l("text",t)}},{key:"destroy",value:function e(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof t?[t]:t,o=!!document.queryCommandSupported;return n.forEach(function(e){o=o&&!!document.queryCommandSupported(e)}),o}}]),t}(s.default);e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}); \ No newline at end of file diff --git a/modules/copy-movie-grifus/src/Controller/Front/Copy/Copy.php b/modules/copy-movie-grifus/src/Controller/Front/Copy/Copy.php new file mode 100644 index 0000000..da612b4 --- /dev/null +++ b/modules/copy-movie-grifus/src/Controller/Front/Copy/Copy.php @@ -0,0 +1,34 @@ +model->getMovieInfo(); + } +} diff --git a/modules/copy-movie-grifus/src/Controller/Launcher/Launcher.php b/modules/copy-movie-grifus/src/Controller/Launcher/Launcher.php new file mode 100644 index 0000000..9aa11c2 --- /dev/null +++ b/modules/copy-movie-grifus/src/Controller/Launcher/Launcher.php @@ -0,0 +1,118 @@ +get('state'); + + if ($state === 'active' || $state === 'outdated') { + + add_action('init', [$this, 'setLanguage']); + + if (!is_admin()) { + + $this->front(); + } + } + } + + /** + * Front initializer method. + * + * @since 1.0.0 + */ + public function front() { + + add_action('wp', function() { + + App::id('ExtensionsForGrifus'); + + if (App::main()->isSingle()) { + + $this->setLanguage(); + $this->addScripts(); + $this->addStyles(); + } + }); + } + + /** + * Set plugin textdomain. + * + * @since 1.0.0 + */ + public function setLanguage() { + + $DS = App::DS; + + $pSlug = App::ExtensionsForGrifus()->get('slug'); + + $mSlug = Module::CopyMovieGrifus()->get('slug'); + + $path = $pSlug . $DS .'modules' .$DS. $mSlug .$DS. 'languages' . $DS; + + load_plugin_textdomain($pSlug . '-copy', false, $path); + } + + /** + * Add scripts. + * + * @since 1.0.0 + */ + protected function addScripts() { + + $js = Module::CopyMovieGrifus()->get('assets', 'js'); + + WP_Register::add('script', $js['eliasisClipboard']); + + $setting = $js['copyMovieGrifus']; + + $params = Module::CopyMovieGrifus()->instance('Copy') + ->getMovieInfo(); + + $setting['params'] = array_merge($setting['params'], $params); + + WP_Register::add('script', $setting); + } + + /** + * Add styles. + * + * @since 1.0.0 + */ + protected function addStyles() { + + $css = Module::CopyMovieGrifus()->get('assets', 'css'); + + WP_Register::add('style', $css['copyMovieGrifus']); + } +} diff --git a/modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php b/modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php new file mode 100644 index 0000000..eb567eb --- /dev/null +++ b/modules/copy-movie-grifus/src/Model/Front/Copy/Copy.php @@ -0,0 +1,152 @@ +post_content; + $postContent = apply_filters('the_content', $postContent); + $postContent = str_replace(']]>', ']]>', $postContent); + + $movie = [ + + 'Title' => __('Title', 'extensions-for-grifus-copy'), + 'Rated' => __('Rated' ,'extensions-for-grifus-copy'), + 'Released' => __('Published' ,'extensions-for-grifus-copy'), + 'imdbRating' => __('Rating' ,'extensions-for-grifus-copy'), + 'imdbVotes' => __('Votes' ,'extensions-for-grifus-copy'), + 'Awards' => __('Awards' ,'extensions-for-grifus-copy'), + 'Country' => __('Country' ,'extensions-for-grifus-copy'), + ]; + + foreach($movie as $key => $value) { + + $data = info_movie_get_meta($key); + + $movie[$key] .= ($data) ? ': ' . $data : ': '; + } + + $movie['Original'] = __('Original', 'extensions-for-grifus-copy'); + $movie['Original'] .= ': '; + $movie['Original'] .= ($postTitle) ? $postTitle : ''; + + $duration = get_post_custom_values("Runtime"); + + $movie['Duration'] = __('Duration', 'extensions-for-grifus-copy'); + $movie['Duration'] .= ': '; + $movie['Duration'] .= (isset($duration[0])) ? $duration[0] : ''; + + $movie['Sipnosis'] = __('Sipnosis', 'extensions-for-grifus-copy'); + $movie['Sipnosis'] .= ': '; + $movie['Sipnosis'] .= ($postContent) ? $postContent : ''; + + $movie['Director'] = __('Director', 'extensions-for-grifus-copy'); + $movie['Director'] .= ': '; + + $director = wp_get_post_terms($postID, 'director'); + + foreach ($director as $key => $value) { + + if (isset($value->name)) { + + $movie['Director'] .= $value->name . ', '; + } + } + + $movie['Stars'] = __('Stars', 'extensions-for-grifus-copy') . ': '; + + $stars = wp_get_post_terms($postID, 'star'); + + foreach ($stars as $key => $value) { + + if (isset($value->name)) { + + $movie['Stars'] .= $value->name . ', '; + } + } + + $movie['Cast'] = __('Cast', 'extensions-for-grifus-copy') . ': '; + + $cast = wp_get_post_terms($postID, 'actor'); + + foreach ($cast as $key => $value) { + + if (isset($value->name)) { + + $movie['Cast'] .= $value->name . ', '; + } + } + + $movie['Genre'] = __('Genre', 'extensions-for-grifus-copy') . ': '; + + $categories = get_the_category(); + + foreach($categories as $key => $value) { + + if (isset($value->name)) { + + $movie['Genre'] .= $value->name . ', '; + } + } + + $params = [ + + 'postID' => $postID, + 'movie_info' => [ + + 'the_title' => $movie['Original'] . "\n\n", + 'title' => $movie['Title'] . "\n\n", + 'published' => $movie['Released'] . "\n\n", + 'rated' => $movie['Rated'] . "\n\n", + 'duration' => $movie['Duration'] . "\n\n", + 'rating' => $movie['imdbRating'] . "\n\n", + 'votes' => $movie['imdbVotes'] . "\n\n", + 'awards' => html_entity_decode($movie['Awards']) ."\n\n", + 'country' => $movie['Country'] . ".\n\n", + 'sipnosis' => strip_tags(trim($movie['Sipnosis'])) ."\n\n", + 'director' => trim($movie['Director'], ', ') . ".\n\n", + 'stars' => trim($movie['Stars'], ', ') . ".\n\n", + 'cast' => trim($movie['Cast'], ', ') . ".\n\n", + 'genre' => trim($movie['Genre'], ', ') . ".", + ], + 'copy_title' => __( + 'Copy information', + 'extensions-for-grifus-copy' + ), + 'copy_button' => __('Copy', 'extensions-for-grifus-copy') + ]; + + return $params; + } +} diff --git a/modules/custom-images-grifus/LICENSE b/modules/custom-images-grifus/LICENSE new file mode 100644 index 0000000..b017086 --- /dev/null +++ b/modules/custom-images-grifus/LICENSE @@ -0,0 +1,264 @@ +The GNU General Public License, Version 2, June 1991 (GPLv2) +============================================================ + +> Copyright (C) 1989, 1991 Free Software Foundation, Inc. +> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +Terms And Conditions For Copying, Distribution And Modification +--------------------------------------------------------------- + +**0.** This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +**2.** You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you also +meet all of these conditions: + +* **a)** You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + +* **b)** You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, to + be licensed as a whole at no charge to all third parties under the terms of + this License. + +* **c)** If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +**3.** You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + +* **a)** Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above on + a medium customarily used for software interchange; or, + +* **b)** Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + +* **c)** Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +**7.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution of +the Program by all those who receive copies directly or indirectly through you, +then the only way you could satisfy both it and this License would be to refrain +entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +**9.** The Free Software Foundation may publish revised and/or new versions of +the General Public License from time to time. Such new versions will be similar +in spirit to the present version, but may differ in detail to address new +problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + + +No Warranty +----------- + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/modules/custom-images-grifus/composer.json b/modules/custom-images-grifus/composer.json new file mode 100644 index 0000000..83549e7 --- /dev/null +++ b/modules/custom-images-grifus/composer.json @@ -0,0 +1,48 @@ +{ + "name": "josantonius/custom-images-grifus", + "version": "1.0.1", + "description": "Save external IMDB images to your WordPress site.", + "type": "eliasis-module", + "keywords": [ + "Wordpress", + "Plugin", + "Grifus", + "Grifus Extension", + "Image", + "Replace images", + "Images" + ], + "license": "GPL-2.0+", + "authors": [ + { + "name": "Josantonius", + "email": "hello@josantonius.com", + "homepage": "https://josantonius.com", + "role": "Developer" + } + ], + "config": { + "vendor-dir": "lib/vendor", + "preferred-install": "dist" + }, + "minimum-stability": "dev", + "support": { + "issues": "https://github.com/Josantonius/custom-images-grifus/issues", + "forum": "http://stackoverflow.com/tags/custom-images-grifus", + "source": "https://github.com/Josantonius/custom-images-grifus" + }, + "require": { + "php": "^5.3 || ^7.0", + "eliasis-framework/eliasis" : "^1.1.0", + "eliasis-framework/module" : "^1.0.7", + "Josantonius/WP_Register" : "^1.0.3", + "Josantonius/WP_Menu" : "^1.0.3", + "Josantonius/WP_Image" : "^1.0.1", + "composer/installers" : "^1.4.0" + }, + "autoload": { + "psr-4": { + "ExtensionsForGrifus\\Modules\\CustomImagesGrifus\\" : "src/" + } + } +} diff --git a/modules/custom-images-grifus/config/add-urls.php b/modules/custom-images-grifus/config/add-urls.php new file mode 100644 index 0000000..8df2811 --- /dev/null +++ b/modules/custom-images-grifus/config/add-urls.php @@ -0,0 +1,25 @@ +get('folder'); + +return [ + + 'url' => [ + + 'css' => $url . 'public/css/', + 'js' => $url . 'public/js/', + 'images' => $url . 'public/images/', + ], +]; diff --git a/modules/custom-images-grifus/config/assets.php b/modules/custom-images-grifus/config/assets.php new file mode 100644 index 0000000..5432241 --- /dev/null +++ b/modules/custom-images-grifus/config/assets.php @@ -0,0 +1,46 @@ +get('url', 'css'); +$js = Module::CustomImagesGrifus()->get('url', 'js'); + +return [ + + 'assets' => [ + + 'js' => [ + 'customImagesGrifusAdmin' => [ + 'name' => 'customImagesGrifusAdmin', + 'url' => $js . 'custom-images-grifus-admin.js', + 'place' => 'admin', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => true, + 'params' => [ + 'ajax_url' => admin_url('admin-ajax.php'), + ], + ], + ], + + 'css' => [ + 'customImagesGrifusAdmin' => [ + 'name' => 'customImagesGrifusAdmin', + 'url' => $css . 'custom-images-grifus-admin.css', + 'place' => 'admin', + 'deps' => [], + 'version' => '1.0.0', + 'media' => '', + ], + ], + ], +]; diff --git a/modules/custom-images-grifus/config/menu.php b/modules/custom-images-grifus/config/menu.php new file mode 100644 index 0000000..c5b3c13 --- /dev/null +++ b/modules/custom-images-grifus/config/menu.php @@ -0,0 +1,24 @@ + [ + 'custom-images-grifus' => [ + 'parent' => 'extensions-for-grifus', + 'title' => __('Custom Images', 'extensions-for-grifus-images'), + 'name' => __('Custom Images', 'extensions-for-grifus-images'), + 'capability' => 'manage_options', + 'slug' => 'extensions-for-grifus-images', + 'function' => '', + ], + ], +]; diff --git a/modules/custom-images-grifus/config/namespaces.php b/modules/custom-images-grifus/config/namespaces.php new file mode 100644 index 0000000..0852b3d --- /dev/null +++ b/modules/custom-images-grifus/config/namespaces.php @@ -0,0 +1,26 @@ +get('namespaces', 'modules'); + +$module = 'CustomImagesGrifus'; + +return [ + + 'namespaces' => [ + + 'controller' => $namespace . $module . '\\Controller\\', + 'admin' => $namespace . $module . '\\Controller\\Admin\\', + 'admin-page' => $namespace . $module . '\\Controller\\Admin\\Page\\', + ], +]; diff --git a/modules/custom-images-grifus/config/pages.php b/modules/custom-images-grifus/config/pages.php new file mode 100644 index 0000000..3816877 --- /dev/null +++ b/modules/custom-images-grifus/config/pages.php @@ -0,0 +1,15 @@ + ['CustomImages'], +]; diff --git a/modules/custom-images-grifus/config/paths.php b/modules/custom-images-grifus/config/paths.php new file mode 100644 index 0000000..f255d5a --- /dev/null +++ b/modules/custom-images-grifus/config/paths.php @@ -0,0 +1,26 @@ +get('path', 'root'); + +return [ + + 'path' => [ + + 'page' => $ROOT.'src'.$DS.'template'.$DS.'page'.$DS, + 'languages' => $ROOT.'languages'.$DS, + ], +]; diff --git a/modules/custom-images-grifus/config/set-hooks.php b/modules/custom-images-grifus/config/set-hooks.php new file mode 100644 index 0000000..d00b2f6 --- /dev/null +++ b/modules/custom-images-grifus/config/set-hooks.php @@ -0,0 +1,22 @@ +get('namespaces', 'controller'); + +return [ + + 'hooks' => [ + + ['launch-modules', [$namespace.'Launcher\\Launcher', 'init'], 8, 0], + ] +]; diff --git a/modules/custom-images-grifus/custom-images-grifus.php b/modules/custom-images-grifus/custom-images-grifus.php index f5133e5..4eaf75c 100644 --- a/modules/custom-images-grifus/custom-images-grifus.php +++ b/modules/custom-images-grifus/custom-images-grifus.php @@ -13,7 +13,7 @@ 'id' => 'CustomImagesGrifus', 'name' => 'Custom Images', - 'version' => '1.0.0', + 'version' => '1.0.1', 'description' => __('Save external IMDB images to your WordPress site.', 'extensions-for-grifus'), 'state' => 'uninstalled', 'category' => 'wp-plugin-extension', diff --git a/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES-backup-201708110046150.po~ b/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES-backup-201708110046150.po~ new file mode 100644 index 0000000..0a1a51d --- /dev/null +++ b/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES-backup-201708110046150.po~ @@ -0,0 +1,76 @@ +msgid "" +msgstr "" +"Project-Id-Version: Extensions For Grifus\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-11 00:44+0000\n" +"PO-Revision-Date: 2017-08-11 00:44+0000\n" +"Last-Translator: Josantonius \n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:29 +msgid "Replace images when adding a new movie" +msgstr "Reemplazar imágenes al agregar una nueva película" + +#: modules/custom-images-grifus/config/menu.php:17 +#: modules/custom-images-grifus/config/menu.php:18 +#: modules/custom-images-grifus/src/template/page/custom-images.php:22 +msgid "Custom Images" +msgstr "Custom Images" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:32 +msgid "Replace all current images" +msgstr "Reemplazar imágenes" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:35 +msgid "" +"This will replace all external IMDB images and saves them to your WordPress " +"site" +msgstr "" +"Esto reemplazará todas las imágenes externas de IMDB y las guardará en tu " +"sitio de WordPress" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:42 +msgid "Reviewing posts..." +msgstr "Revisando publicaciones..." + +#: modules/custom-images-grifus/src/template/page/custom-images.php:46 +msgid "Images were replaced" +msgstr "Imágenes fueron reemplazadas" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:51 +msgid "Replace all" +msgstr "Reemplazar todo" + +#: modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php:89 +msgid "All post have already been reviewed" +msgstr "Las publicaciones ya fueron revisadas" + +#: modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php:93 +msgid "Posts were modified" +msgstr "Publicaciones fueron modificadas" + +#. Name of the plugin +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.mo b/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.mo new file mode 100644 index 0000000000000000000000000000000000000000..2061d08ff0cee647c4f3ab43ee9282f4389b1b1d GIT binary patch literal 1563 zcmbW1-HIGV6vtahKqgrNQ9*)+lZc{7%|}>t>11P)%_NNM;;@4BS2b1D zJ5C_id4T8x>{YJ3(MQ;8#Rm{CeFHBA|1~`yyJ2s%q4{-novL%rzw6(BUOx9@g6k6Q zcX9s^2e>Z2w&weI+`xDP?168CpMx>}G58kfzzg7W@J;Z=V*C=kg7Gilhv0AEW$d@B@qo=bF40jCr4dSHTzHd*IJt%=X@({?+JECA|W@|@ZTbBHbWXTVZ%Uj|O;Mz{Bw=x&K#kGkD-bMuofE(D4wPfT%k+^0?4 zuJl2SoHSm`U|mWlJ|W$ju-5j@E4|-t?MhSBI5=X&vP|hwC5`eE`Unroe7u@YiM{AQ zY7KSmq!u_?rBBH~BMklajhoawZX3F`O}*CMV6VT{rPuDZcC3MpC~#Jx(*RYWFml|a zY$BcKu>E-SKy0n!Vk2XAqHi*sIa8#xb)Z7)8}X10yQafkn^_XH{Ic3+QY+8x1NF3% zKo6?w1FbTdK|7p|nWS;e&Nk-pGME0pxd(ex(#gg+3vWgL93K@Z%CC3l63soGCphsH zlHsXx7PT~%%I3lQyjbaQigOEJtj21Y<;<5b2g$;5Asv~T4<%KskAKQ)E$8NfnR9zu zj%czzejV`FGRg5#ObgvK?p4C2={)7!_--~2z`=33bXWvahdR1U*%-4j-pX39oV)+& Gxqks+v*WV> literal 0 HcmV?d00001 diff --git a/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.po b/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.po new file mode 100644 index 0000000..10bb610 --- /dev/null +++ b/modules/custom-images-grifus/languages/extensions-for-grifus-images-es_ES.po @@ -0,0 +1,76 @@ +msgid "" +msgstr "" +"Project-Id-Version: Extensions For Grifus\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-11 00:44+0000\n" +"PO-Revision-Date: 2017-08-11 00:46+0000\n" +"Last-Translator: Josantonius \n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:29 +msgid "Replace images when adding a new movie" +msgstr "Reemplazar imágenes al agregar nueva película" + +#: modules/custom-images-grifus/config/menu.php:17 +#: modules/custom-images-grifus/config/menu.php:18 +#: modules/custom-images-grifus/src/template/page/custom-images.php:22 +msgid "Custom Images" +msgstr "Custom Images" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:32 +msgid "Replace all current images" +msgstr "Reemplazar imágenes" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:35 +msgid "" +"This will replace all external IMDB images and saves them to your WordPress " +"site" +msgstr "" +"Esto reemplazará todas las imágenes externas de IMDB y las guardará en tu " +"sitio de WordPress" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:42 +msgid "Reviewing posts..." +msgstr "Revisando publicaciones..." + +#: modules/custom-images-grifus/src/template/page/custom-images.php:46 +msgid "Images were replaced" +msgstr "Imágenes fueron reemplazadas" + +#: modules/custom-images-grifus/src/template/page/custom-images.php:51 +msgid "Replace all" +msgstr "Reemplazar todo" + +#: modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php:89 +msgid "All post have already been reviewed" +msgstr "Las publicaciones ya fueron revisadas" + +#: modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php:93 +msgid "Posts were modified" +msgstr "Publicaciones fueron modificadas" + +#. Name of the plugin +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/custom-images-grifus/public/css/custom-images-grifus-admin.css b/modules/custom-images-grifus/public/css/custom-images-grifus-admin.css new file mode 100644 index 0000000..fe09242 --- /dev/null +++ b/modules/custom-images-grifus/public/css/custom-images-grifus-admin.css @@ -0,0 +1,73 @@ +@charset "UTF-8"; +/** + * Custom Images Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Images-Grifus.git + * @since 1.0.0 + */ +#custom-images-grifus-form { + width: 100% !important; } + +#process { + display: none; } + +#film-title, #film-images { + display: flex; + align-items: center; + font-size: 16px; + margin: 15px 0px 26px 0px; } + +.film-revised, .film-counter { + font-size: 18px; + margin: 6px 4px 4px 6px; } + +#film-images-badge { + margin-left: 1.5px; } + +#spinner-grifus { + display: none; + float: right; } + +.grifus-span { + margin-left: 8px; } + +.movie-icon { + color: #D91E18; } + +.info-icon { + color: #dc143c; + vertical-align: middle; + font-size: 20px; } + +.picture-icon { + color: #446CB3; } + +.success-icon { + color: #50b344; } + +.g-icons { + font-size: 35px !important; } + +.mdl-card__supporting-text { + font-size: 1.1rem !important; } + +.jst-card-title { + margin-right: 10px !important; } + +.replace-button { + margin-top: 10px; } + +.mdl-checkbox { + display: inline-table; } + +@media (min-width: 840px) { + .jst-card { + max-width: 429px; } } +@media (max-width: 370px) { + .jst-card-subtitle { + font-size: 16px !important; } } + +/*# sourceMappingURL=custom-images-grifus-admin.css.map */ diff --git a/modules/custom-images-grifus/public/js/custom-images-grifus-admin.js b/modules/custom-images-grifus/public/js/custom-images-grifus-admin.js new file mode 100644 index 0000000..16a5099 --- /dev/null +++ b/modules/custom-images-grifus/public/js/custom-images-grifus-admin.js @@ -0,0 +1,146 @@ +/** + * Custom Images Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Images-Grifus.git + * @since 1.0.0 + */ + +(function ($) { + + $(document).ready(function () { + + /** + * Replace images. + * + * @since 1.0.0 + */ + function ajaxReplace() { + + $.ajax({ + url: customImagesGrifusAdmin.ajax_url, + type: "post", + data: { + action: 'replaceOldImages', + custom_nonce : customImagesGrifusAdmin.custom_nonce + }, + success:function(data) { + + var response = JSON.parse(data); + + if (!response) { return; } + + //console.log(response); + + /** Get initial counters */ + var revised = new Number($("#film-title-badge").attr("data-badge")); + revised = revised.toFixed(); + + if (response.post_id !== 0) { + + revised++; + + var imagesAdded = new Number($("#film-images-badge").attr("data-badge")); + imagesAdded = imagesAdded.toFixed(); + imagesAdded = parseInt(imagesAdded) + parseInt(response.images_added); + + /** Show actual title film */ + $(".actual-title").text(response.post_title); + + /** Set new counters */ + $("#film-title-badge").attr("data-badge", revised); + + $("#film-images-badge").attr("data-badge", imagesAdded); + + ajaxReplace(); + + } else { + + if (revised > 0) { + + var revisedText = customImagesGrifusAdmin.added_text; + + } else { + + var revisedText = customImagesGrifusAdmin.revised_text; + } + + /** Set films reviewed */ + $(".actual-title").text(revisedText); + + /** Change color icons */ + $("#film-title-badge").addClass("success-icon").removeClass("movie-icon"); + $("#film-images-badge").addClass("success-icon").removeClass("picture-icon"); + + /** Hide spinner */ + $("#spinner-grifus").hide(); + } + }, + error: function(errorThrown){ + //console.log(errorThrown); + } + + }); + + } + + /** + * Replace images when add a post. + * + * @since 1.0.1 + */ + function replaceWhenAdd(state) { + + $.ajax({ + url: customImagesGrifusAdmin.ajax_url, + type: "post", + data: { + action: 'replaceWhenAdd', + state: state, + custom_nonce: customImagesGrifusAdmin.custom_nonce + }, + success:function(data) { + + var response = JSON.parse(data); + + console.log(response); + + }, + error: function(errorThrown){ + //console.log(JSON.stringify(errorThrown)); + } + + }); + + } + + $("#replace-grifus-images").click(function(e) { + + e.preventDefault(); + + /** Disable button */ + $(this).prop("disabled", true); + + /** Show icons */ + $("#process").slideDown(); + + /** Show spinner */ + $("#spinner-grifus").show(); + + ajaxReplace(); + + }); + + $("#checkbox-images").click(function(e) { + + var state = ($(this).is(':checked')) ? 1 : 0; + + replaceWhenAdd(state); + + }); + + }); + +})(jQuery); diff --git a/modules/custom-images-grifus/src/Controller/Admin/Image/Image.php b/modules/custom-images-grifus/src/Controller/Admin/Image/Image.php new file mode 100644 index 0000000..0c96f6a --- /dev/null +++ b/modules/custom-images-grifus/src/Controller/Admin/Image/Image.php @@ -0,0 +1,122 @@ +get('replace-when-add')) { + + $isInsertPost = App::main()->isAfterInsertPost($post, $update); + $isUpdatePost = App::main()->isAfterUpdatePost($post, $update); + + if ($isInsertPost || $isUpdatePost) { + + $this->model->setImages($postID); + } + } + } + + /** + * Search post not edited previously and replace images. + * + * @since 1.0.0 + * + * @return json + */ + public function replaceOldImages() { + + $nonce = isset($_POST['custom_nonce']) ? $_POST['custom_nonce'] : ''; + + if (!wp_verify_nonce($nonce, 'customImagesGrifusAdmin')) { + + die('Busted!'); + } + + $this->model->setPostsToReview(); + + $response = $this->model->replaceOldImages(); + + echo json_encode($response); + + die(); + } + + /** + * Replace image when added a movie. + * + * @since 1.0.1 + * + * @return void + */ + public function replaceWhenAdd() { + + $state = isset($_POST['state']) ? $_POST['state'] : null; + + $nonce = wp_verify_nonce( + + isset($_POST['custom_nonce']) ? $_POST['custom_nonce'] : false, + 'customImagesGrifusAdmin' + ); + + if (!$nonce || is_null($state)) { die; } + + App::id('ExtensionsForGrifus'); + + $slug = Module::CustomImagesGrifus()->get('slug'); + + $this->model->setReplaceWhenAdd($slug, $state); + + $response = ['replace-when-add' => $state]; + + echo json_encode($response); + + die(); + } + + /** + * Delete attached images. + * + * @since 1.0.1 + * + * @param int $postID → post ID + * + * @return int → attachments deleted + */ + public function deleteAttachedImages($postID) { + + return $this->model->deleteAttachedImages($postID); + } +} diff --git a/modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php b/modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php new file mode 100644 index 0000000..107d925 --- /dev/null +++ b/modules/custom-images-grifus/src/Controller/Admin/Page/CustomImages/CustomImages.php @@ -0,0 +1,153 @@ +runAjax(); + } + + /** + * Add submenu for this page. + * + * @since 1.0.0 + */ + public function setSubmenu() { + + WP_Menu::add( + 'submenu', + Module::CustomImagesGrifus()->get( + 'submenu', + 'custom-images-grifus' + ), + [$this, 'render'], + 'addStyles', + 'addScripts' + ); + } + + /** + * Load scripts. + * + * @since 1.0.0 + */ + public function addScripts() { + + $scripts = [ + 'eliasisMaterial', + 'extensionsForGrifusAdmin' + ]; + + $js = App::ExtensionsForGrifus()->get('assets', 'js'); + + foreach ($scripts as $script) { + + WP_Register::add('script', $js[$script]); + } + + $js = Module::CustomImagesGrifus()->get('assets', 'js'); + + $js = $js['customImagesGrifusAdmin']; + + $params = [ + 'revised_text' => __( + 'All post have already been reviewed', + 'extensions-for-grifus-images' + ), + 'added_text' => __( + 'Posts were modified', + 'extensions-for-grifus-images' + ), + 'custom_nonce' => wp_create_nonce('customImagesGrifusAdmin') + ]; + + $js['params'] = array_merge($js['params'], $params); + + WP_Register::add('script', $js); + } + + /** + * Load styles. + * + * @since 1.0.0 + */ + public function addStyles() { + + $css = App::ExtensionsForGrifus()->get('assets', 'css'); + + WP_Register::add('style', $css['extensionsForGrifusAdmin']); + + $css = Module::CustomImagesGrifus()->get('assets', 'css'); + + WP_Register::add('style', $css['customImagesGrifusAdmin']); + } + + /** + * Renderizate admin page. + * + * @since 1.0.0 + */ + public function render() { + + $layout = App::ExtensionsForGrifus()->get('path', 'layout'); + + $page = Module::CustomImagesGrifus()->get('path','page'); + + $replace = Module::CustomImagesGrifus()->get('replace-when-add'); + + $data = ['replace-when-add' => $replace]; + + $this->view->renderizate($layout, 'header'); + $this->view->renderizate($page, 'custom-images', $data); + $this->view->renderizate($layout, 'footer'); + } + + /** + * Run ajax in panel admin. + * + * @since 1.0.0 + */ + public function runAjax() { + + $Image = Module::CustomImagesGrifus()->instance('Image'); + + add_action('wp_ajax_replaceOldImages', [$Image, 'replaceOldImages']); + add_action('wp_ajax_replaceWhenAdd', [$Image, 'replaceWhenAdd']); + } +} diff --git a/modules/custom-images-grifus/src/Controller/Launcher/Launcher.php b/modules/custom-images-grifus/src/Controller/Launcher/Launcher.php new file mode 100644 index 0000000..7042788 --- /dev/null +++ b/modules/custom-images-grifus/src/Controller/Launcher/Launcher.php @@ -0,0 +1,139 @@ +get('state'); + + if ($state === 'active' || $state === 'outdated') { + + if (is_admin()) { + + App::id('ExtensionsForGrifus'); + + $this->admin(); + } + } + } + + /** + * Module activation hook. Executed when module is activated. + * + * @since 1.0.1 + * + * @return void + */ + public function activation() { + + $this->model->addOptions(); + } + + /** + * Module uninstallation hook. Executed when module is uninstalled. + * + * @since 1.0.0 + * + * @return void + */ + public function uninstallation() { + + $this->model->deletePostMeta(); + + $this->model->deleteOptions(); + } + + /** + * Admin initializer method. + * + * @since 1.0.0 + * + * @uses add_action() → hooks a function on to a specific action + * + * @return void + */ + public function admin() { + + $this->setOptions(); + + add_action('init', [$this, 'setLanguage']); + + $namespace = Module::CustomImagesGrifus()->get('namespaces'); + + $pages = Module::CustomImagesGrifus()->get('pages'); + + App::main()->setMenus($pages, $namespace['admin-page']); + + $Image = Module::CustomImagesGrifus()->instance('Image'); + + add_action('wp_insert_post', [$Image, 'setImages'], 10, 3); + + add_action('before_delete_post', [$Image,'deleteAttachedImages'], 10, 1); + } + + /** + * Set database module options. + * + * @since 1.0.1 + * + * @return void + */ + public function setOptions() { + + $slug = Module::CustomImagesGrifus()->get('slug'); + + $options = $this->model->getOptions(); + + foreach ($options as $option => $value) { + + Module::CustomImagesGrifus()->set($option, $value); + } + } + + /** + * Set plugin textdomain. + * + * @since 1.0.0 + * + * @return void + */ + public function setLanguage() { + + $DS = App::DS; + + $pSlug = App::ExtensionsForGrifus()->get('slug'); + + $mSlug = Module::CustomImagesGrifus()->get('slug'); + + $path = $pSlug . $DS .'modules' .$DS. $mSlug .$DS. 'languages' . $DS; + + load_plugin_textdomain($pSlug . '-images', false, $path); + } +} diff --git a/modules/custom-images-grifus/src/Model/Admin/Image/Image.php b/modules/custom-images-grifus/src/Model/Admin/Image/Image.php new file mode 100644 index 0000000..9e59f7d --- /dev/null +++ b/modules/custom-images-grifus/src/Model/Admin/Image/Image.php @@ -0,0 +1,208 @@ + 0, + 'post_title' => '', + 'images_added' => 0, + ]; + + $postTable = $wpdb->prefix . "posts"; + + $postmetaTable = $wpdb->prefix . "postmeta"; + + $query = " + SELECT ID, post_title + FROM $postTable + INNER JOIN $postmetaTable + ON $postTable.ID = $postmetaTable.post_id + WHERE $postTable.post_type = 'post' + AND $postTable.post_status = 'publish' + AND $postmetaTable.meta_key = 'custom_images_grifus' + AND $postmetaTable.meta_value = 'false' + ORDER BY $postTable.ID ASC + "; + + $post = $wpdb->get_row($query); + + if (!is_null($post) && isset($post->ID) && isset($post->post_title)) { + + $postID = $post->ID; + + $imagesAdded = $this->setImages($post->ID); + + $response = [ + + 'post_id' => $post->ID, + 'post_title' => $post->post_title, + 'images_added' => $imagesAdded, + ]; + } + + return $response; + } + + /** + * Set posts to review. + * + * @since 1.0.0 + * + * @return void + */ + public function setPostsToReview() { + + $totalPosts = wp_count_posts(); + + $totalPosts = isset($totalPosts->publish) ? $totalPosts->publish : 0; + + $posts = get_posts([ + + 'post_type' => 'post', + 'numberposts' => $totalPosts, + 'post_status' => 'publish' + ]); + + foreach ($posts as $post) { + + if (isset($post->ID)) { + + add_post_meta( + $post->ID, + 'custom_images_grifus', + 'false', + true + ); + } + } + } + + /** + * Set state for replace images when added a movie. + * + * @since 1.0.1 + * + * @param string $slug → module slug + * @param boolean $state → restart when added a movie + * + * @return void + */ + public function setReplaceWhenAdd($slug, $state) { + + update_option($slug . '-replace-when-add', $state); + } + + /** + * Delete attached images. + * + * @since 1.0.1 + * + * @param int $postID → post ID + * + * @return int → attachments deleted + */ + public function deleteAttachedImages($postID) { + + return WP_Image::deleteAttachedImages($postID); + } +} diff --git a/modules/custom-images-grifus/src/Model/Launcher/Launcher.php b/modules/custom-images-grifus/src/Model/Launcher/Launcher.php new file mode 100644 index 0000000..7dfd7a1 --- /dev/null +++ b/modules/custom-images-grifus/src/Model/Launcher/Launcher.php @@ -0,0 +1,83 @@ +get('slug'); + + if (!get_option($slug . '-replace-when-add')) { + + add_option($slug . '-replace-when-add', 1); + } + } + + /** + * Get database module options. + * + * @since 1.0.1 + * + * @uses get_option() + * + * @return array + */ + public function getOptions() { + + $slug = Module::CustomImagesGrifus()->get('slug'); + + return [ + + 'replace-when-add' => get_option($slug . '-replace-when-add') + ]; + } + + /** + * Delete database module options. + * + * @since 1.0.1 + * + * @return void + */ + public function deleteOptions() { + + $slug = Module::CustomImagesGrifus()->get('slug'); + + delete_option($slug . '-replace-when-add', true); + } +} diff --git a/modules/custom-images-grifus/src/template/page/custom-images.php b/modules/custom-images-grifus/src/template/page/custom-images.php new file mode 100644 index 0000000..aac648e --- /dev/null +++ b/modules/custom-images-grifus/src/template/page/custom-images.php @@ -0,0 +1,59 @@ + + +
+
+
+
+

+ +

+
+
+
+

+
+ +
info_outline
+
+ +
+
+
+
+
+
movie_filter
+
+
+
+
panorama
+
+
+
+
+ +
+
+
+
+
+
+
diff --git a/modules/custom-rating-grifus/LICENSE b/modules/custom-rating-grifus/LICENSE new file mode 100644 index 0000000..b017086 --- /dev/null +++ b/modules/custom-rating-grifus/LICENSE @@ -0,0 +1,264 @@ +The GNU General Public License, Version 2, June 1991 (GPLv2) +============================================================ + +> Copyright (C) 1989, 1991 Free Software Foundation, Inc. +> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies of this license +document, but changing it is not allowed. + + +Preamble +-------- + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification +follow. + + +Terms And Conditions For Copying, Distribution And Modification +--------------------------------------------------------------- + +**0.** This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's source code +as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the Program +a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +**2.** You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you also +meet all of these conditions: + +* **a)** You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + +* **b)** You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, to + be licensed as a whole at no charge to all third parties under the terms of + this License. + +* **c)** If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +**3.** You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you also do one of the following: + +* **a)** Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above on + a medium customarily used for software interchange; or, + +* **b)** Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + +* **c)** Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only for + noncommercial distribution and only if you received the program in object + code or executable form with such an offer, in accord with Subsection b + above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not signed +it. However, nothing else grants you permission to modify or distribute the +Program or its derivative works. These actions are prohibited by law if you do +not accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these terms and +conditions. You may not impose any further restrictions on the recipients' +exercise of the rights granted herein. You are not responsible for enforcing +compliance by third parties to this License. + +**7.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution of +the Program by all those who receive copies directly or indirectly through you, +then the only way you could satisfy both it and this License would be to refrain +entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +**9.** The Free Software Foundation may publish revised and/or new versions of +the General Public License from time to time. Such new versions will be similar +in spirit to the present version, but may differ in detail to address new +problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + + +No Warranty +----------- + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM +"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/modules/custom-rating-grifus/composer.json b/modules/custom-rating-grifus/composer.json new file mode 100644 index 0000000..253e332 --- /dev/null +++ b/modules/custom-rating-grifus/composer.json @@ -0,0 +1,47 @@ +{ + "name": "josantonius/custom-rating-grifus", + "version": "1.0.1", + "description": "Replaces IMDB rating by your own rating system in Grifus theme.", + "type": "eliasis-module", + "keywords": [ + "Wordpress", + "Plugin", + "Grifus", + "Grifus Extension", + "Image", + "Replace images", + "Images" + ], + "license": "GPL-2.0+", + "authors": [ + { + "name": "Josantonius", + "email": "hello@josantonius.com", + "homepage": "https://josantonius.com", + "role": "Developer" + } + ], + "config": { + "vendor-dir": "lib/vendor", + "preferred-install": "dist" + }, + "minimum-stability": "dev", + "support": { + "issues": "https://github.com/Josantonius/custom-rating-grifus/issues", + "forum": "http://stackoverflow.com/tags/custom-rating-grifus", + "source": "https://github.com/Josantonius/custom-rating-grifus" + }, + "require": { + "php": "^5.3 || ^7.0", + "eliasis-framework/eliasis" : "^1.1.0", + "eliasis-framework/module" : "^1.0.7", + "Josantonius/WP_Register" : "^1.0.3", + "Josantonius/WP_Menu" : "^1.0.3", + "composer/installers" : "^1.4.0" + }, + "autoload": { + "psr-4": { + "ExtensionsForGrifus\\Modules\\CustomRatingGrifus\\" : "src/" + } + } +} diff --git a/modules/custom-rating-grifus/config/add-urls.php b/modules/custom-rating-grifus/config/add-urls.php new file mode 100644 index 0000000..84b638a --- /dev/null +++ b/modules/custom-rating-grifus/config/add-urls.php @@ -0,0 +1,25 @@ +get('folder'); + +return [ + + 'url' => [ + + 'css' => $url . 'public/css/', + 'js' => $url . 'public/js/', + 'images' => $url . 'public/images/', + ], +]; diff --git a/modules/custom-rating-grifus/config/assets.php b/modules/custom-rating-grifus/config/assets.php new file mode 100644 index 0000000..2f80078 --- /dev/null +++ b/modules/custom-rating-grifus/config/assets.php @@ -0,0 +1,73 @@ +get('url')['css']; +$js = Module::CustomRatingGrifus()->get('url')['js']; + +return [ + + 'assets' => [ + + 'js' => [ + 'customRatingGrifus' => [ + 'name' => 'customRatingGrifus', + 'url' => $js . 'custom-rating-grifus.js', + 'place' => 'front', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => false, + 'params' => [ + 'ajax_url' => admin_url('admin-ajax.php'), + ], + ], + 'customRatingGrifusHome' => [ + 'name' => 'customRatingGrifusHome', + 'url' => $js . 'custom-rating-grifus-home.js', + 'place' => 'front', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => false, + 'params' => [], + ], + 'customRatingGrifusAdmin' => [ + 'name' => 'customRatingGrifusAdmin', + 'url' => $js . 'custom-rating-grifus-admin.js', + 'place' => 'admin', + 'deps' => ['jquery'], + 'version' => '1.0.0', + 'footer' => true, + 'params' => [ + 'ajax_url' => admin_url('admin-ajax.php'), + ], + ], + ], + 'css' => [ + 'customRatingGrifus' => [ + 'name' => 'customRatingGrifus', + 'url' => $css . 'custom-rating-grifus.css', + 'place' => 'front', + 'deps' => [], + 'version' => '1.0.0', + 'media' => '', + ], + 'customRatingGrifusAdmin' => [ + 'name' => 'customRatingGrifusAdmin', + 'url' => $css . 'custom-rating-grifus-admin.css', + 'place' => 'admin', + 'deps' => [], + 'version' => '1.0.0', + 'media' => '', + ], + ], + ], +]; diff --git a/modules/custom-rating-grifus/config/menu.php b/modules/custom-rating-grifus/config/menu.php new file mode 100644 index 0000000..e0e5019 --- /dev/null +++ b/modules/custom-rating-grifus/config/menu.php @@ -0,0 +1,24 @@ + [ + 'custom-rating-grifus' => [ + 'parent' => 'extensions-for-grifus', + 'title' => __('Custom Rating', 'extensions-for-grifus-rating'), + 'name' => __('Custom Rating', 'extensions-for-grifus-rating'), + 'capability' => 'manage_options', + 'slug' => 'extensions-for-grifus-rating', + 'function' => '', + ], + ], +]; diff --git a/modules/custom-rating-grifus/config/namespaces.php b/modules/custom-rating-grifus/config/namespaces.php new file mode 100644 index 0000000..2bd8b4f --- /dev/null +++ b/modules/custom-rating-grifus/config/namespaces.php @@ -0,0 +1,26 @@ +get('namespaces', 'modules'); + +$module = 'CustomRatingGrifus'; + +return [ + + 'namespaces' => [ + + 'controller' => $namespace . $module . '\\Controller\\', + 'admin-controller' => $namespace . $module . '\\Controller\\Admin\\', + 'admin-page' => $namespace . $module . '\\Controller\\Admin\\Page\\', + ], +]; diff --git a/modules/custom-rating-grifus/config/pages.php b/modules/custom-rating-grifus/config/pages.php new file mode 100644 index 0000000..23bbad2 --- /dev/null +++ b/modules/custom-rating-grifus/config/pages.php @@ -0,0 +1,15 @@ + ['CustomRating'], +]; diff --git a/modules/custom-rating-grifus/config/paths.php b/modules/custom-rating-grifus/config/paths.php new file mode 100644 index 0000000..7446d17 --- /dev/null +++ b/modules/custom-rating-grifus/config/paths.php @@ -0,0 +1,27 @@ +get('path', 'root'); + +return [ + + 'path' => [ + + 'page' => $ROOT.'src'.$DS.'template'.$DS.'page'.$DS, + 'languages' => $ROOT.'languages'.$DS, + 'meta-boxes' => $ROOT.'src'.$DS.'template'.$DS.'meta-boxes'.$DS, + ], +]; diff --git a/modules/custom-rating-grifus/config/set-hooks.php b/modules/custom-rating-grifus/config/set-hooks.php new file mode 100644 index 0000000..b9a5132 --- /dev/null +++ b/modules/custom-rating-grifus/config/set-hooks.php @@ -0,0 +1,22 @@ +get('namespaces', 'controller'); + +return [ + + 'hooks' => [ + + ['launch-modules', [$namespace.'Launcher\\Launcher', 'init'], 8, 0], + ] +]; \ No newline at end of file diff --git a/modules/custom-rating-grifus/custom-rating-grifus.php b/modules/custom-rating-grifus/custom-rating-grifus.php index b710f01..78ed65d 100644 --- a/modules/custom-rating-grifus/custom-rating-grifus.php +++ b/modules/custom-rating-grifus/custom-rating-grifus.php @@ -13,7 +13,7 @@ 'id' => 'CustomRatingGrifus', 'name' => 'Custom Rating', - 'version' => '1.0.0', + 'version' => '1.0.1', 'description' => __('Replaces IMDB rating by your own rating system.', 'extensions-for-grifus'), 'state' => 'uninstalled', 'category' => 'wp-plugin-extension', diff --git a/modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES-backup-201708110042230.po~ b/modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES-backup-201708110042230.po~ new file mode 100644 index 0000000..a24beef --- /dev/null +++ b/modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES-backup-201708110042230.po~ @@ -0,0 +1,76 @@ +msgid "" +msgstr "" +"Project-Id-Version: Extensions For Grifus\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-08-10 13:46+0000\n" +"PO-Revision-Date: 2017-08-10 13:49+0000\n" +"Last-Translator: Josantonius \n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:29 +msgid "Restart rating when adding a new movie" +msgstr "Reiniciar calificación al agregar una nueva película" + +#: modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php:44 +msgid "TOTAL" +msgstr "TOTAL" + +#: modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php:386 +msgid "Extensions For Grifus - Custom rating" +msgstr "Extensions For Grifus - Clasificación personalizada" + +#: modules/custom-rating-grifus/config/menu.php:17 +#: modules/custom-rating-grifus/config/menu.php:18 +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:22 +msgid "Custom Rating" +msgstr "Custom Rating" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:32 +msgid "Restart all IMDB ratings" +msgstr "Reiniciar las valoraciones" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:35 +msgid "This will reset all IMDB ratings to zero" +msgstr "Esto restablecerá todas las valoraciones de IMDB a cero" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:42 +msgid "Rating were restarted" +msgstr "valoraciones reiniciadas" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:43 +msgid "All ratings had already been reset" +msgstr "Las valoraciones ya se habían reiniciado" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:48 +msgid "Reset all ratings" +msgstr "Reiniciar valoraciones" + +#: modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php:86 +msgid "Films were reviewed" +msgstr "Películas fueron revisadas" + +#. Name of the plugin +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES.mo b/modules/custom-rating-grifus/languages/extensions-for-grifus-rating-es_ES.mo new file mode 100644 index 0000000000000000000000000000000000000000..e3fc243ad4ca01e10cbda7cd39f34a11ee2c0a7b GIT binary patch literal 1585 zcmb`HO^+Kz5QZlxNXQ7phmcSRs6Yw|3hj?2fz^aXNjBbS(e7sD7{m#wJX0Qb7SU?5@!y1+xCu~WN$FC{Y-aN_ghunH1 z6@1U)`(qs7IeTi!_wf2Q#xH?az&F4>@En+faozXe>)=E1MetWJ`uzsJ3jP7U3H}Yf z55DkRk~|N#!1LfGFxtNcFM?C>K74-$Kg4+N^j!ZtFz$O7{0O`Uz61Uaz6JgRM*Wwu z`5EvG827yd#yI!DkHK$1e3A$FNx`4M==T>G_5Y2=t7S=!gEoby5$D9E6V4B4AY#ag zmym2$KG-q!W?o76+aShkYdmdPM>m`vR{rE!QnXk*S6KBL)@vz@WGu~OOP6C$Q*i>_ zJ6fiaC!br-CRn2(G1otK@PS=`M=yqmsOv1^Otj7Bws)^zJ5H}Q%!8rn2pMvoBXwdj zGNrMFY|_8kzq*t3M;gKCxNohnx*G*chvIB93Sr{YR_pdM)MjSKt=cfPE}vi%-?Xl1 zP0Fg!#PvC4%qg8%@kUQ3)&;fe3!STLRpC|NrqtNK z*;ku5!hogfItNKYOPg`2y)*~u9k+UQJkZvR{B)FMZ}7@FWVSc9oU&Ux8LP@k~lc@Hg`v6<{kdGsi& zN`yMBa7klKIBKl)Pqfr#EiucZ4jgX1MH23*WLFGv`zI^0Vq6+x^js1bP6~EZ88llZ pcNi%xqFl6G7k@Lc+X4?t$;2JqN0T9BdRB;Xp;\n" +"Language-Team: Spanish (Spain)\n" +"Language: es-ES\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco - https://localise.biz/" + +#: modules/custom-rating-grifus/config/menu.php:17 +#: modules/custom-rating-grifus/config/menu.php:18 +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:22 +msgid "Custom Rating" +msgstr "Custom Rating" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:29 +msgid "Restart rating when adding a new movie" +msgstr "Reiniciar calificación al agregar una nueva película" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:32 +msgid "Restart all IMDB ratings" +msgstr "Reiniciar las calificaciones" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:35 +msgid "This will reset all IMDB ratings to zero" +msgstr "Esto restablecerá todas las calificaciones de IMDB a cero" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:42 +msgid "Rating were restarted" +msgstr "Calificaciones reiniciadas" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:43 +msgid "All ratings had already been reset" +msgstr "Las calificaciones ya se habían reiniciado" + +#: modules/custom-rating-grifus/src/template/page/custom-rating.php:48 +msgid "Reset all ratings" +msgstr "Reiniciar calificaciones" + +#: modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php:44 +msgid "TOTAL" +msgstr "TOTAL" + +#: modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php:384 +msgid "Extensions For Grifus - Custom rating" +msgstr "Extensions For Grifus - Calificación personalizada" + +#: modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php:86 +msgid "Films were reviewed" +msgstr "Películas fueron revisadas" + +#. Name of the plugin +msgid "Extensions For Grifus" +msgstr "Extensions For Grifus" + +#. Description of the plugin +msgid "Extensions for Grifus theme." +msgstr "Extensiones para theme Grifus." + +#. URI of the plugin +msgid "https://wordpress.org/plugins/extensions-for-grifus/" +msgstr "https://wordpress.org/plugins/extensions-for-grifus/" + +#. Author of the plugin +msgid "Josantonius" +msgstr "Josantonius" + +#. Author URI of the plugin +msgid "https://josantonius.com/" +msgstr "https://josantonius.com/" diff --git a/modules/custom-rating-grifus/public/css/custom-rating-grifus-admin.css b/modules/custom-rating-grifus/public/css/custom-rating-grifus-admin.css new file mode 100644 index 0000000..a10883a --- /dev/null +++ b/modules/custom-rating-grifus/public/css/custom-rating-grifus-admin.css @@ -0,0 +1,79 @@ +@charset "UTF-8"; +/** + * Custom Rating Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Rating-Grifus.git + * @since 1.0.0 + */ +.was-done, .nothing-was-done { + display: none; } + +.jst-card-title { + margin-right: 10px !important; } + +#custom-rating-grifus-form { + width: 100% !important; } + +#process { + display: none; } + +#film-title, #film-rating { + display: flex; + align-items: center; + font-size: 16px; + margin: 15px 0px 26px 0px; } + +.film-revised, .film-counter { + font-size: 18px; + margin: 6px 4px 4px 6px; } + +#film-rating-badge { + margin-left: 1.5px; } + +#spinner-grifus { + display: none; + float: right; } + +.grifus-span { + margin-left: 8px; } + +.movie-icon { + color: #D91E18; } + +.info-icon { + color: #dc143c; + vertical-align: middle; + font-size: 20px; } + +.picture-icon { + color: #446CB3; } + +.success-icon { + color: #50b344; } + +.g-icons { + font-size: 35px !important; } + +.mdl-card__supporting-text { + font-size: 1.1rem !important; } + +.replace-button { + margin-top: 10px; } + +.mdl-checkbox { + display: inline-table; } + +@media (min-width: 840px) { + .jst-card { + max-width: 429px !important; } } +@media (max-width: 370px) { + .jst-card-subtitle { + font-size: 16px !important; } } +@media (max-width: 455px) { + .grifus-span { + font-size: 15px; } } + +/*# sourceMappingURL=custom-rating-grifus-admin.css.map */ diff --git a/modules/custom-rating-grifus/public/css/custom-rating-grifus.css b/modules/custom-rating-grifus/public/css/custom-rating-grifus.css new file mode 100644 index 0000000..977f632 --- /dev/null +++ b/modules/custom-rating-grifus/public/css/custom-rating-grifus.css @@ -0,0 +1,70 @@ +@charset "UTF-8"; +/** + * Custom Rating Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Rating-Grifus.git + * @since 1.0.0 + */ +fieldset, label { + margin: 0; + padding: 0; } + +.rating { + border: none; + margin-left: 46px; + margin-top: -4px; + margin-bottom: -4px; + float: left; } + .rating > input { + display: none; } + .rating > label:before { + margin: 5px; + font-size: 1.25em; + font-family: FontAwesome; + display: inline-block; + content: "★"; } + .rating > .half:before { + content: "★"; + position: absolute; } + .rating > label { + float: right; + font-size: 17.5px; + cursor: pointer; + width: 17.5px; } + +.bar, .dato, .rating { + opacity: 0; + transition: opacity 0.4s linear; } + +.dark > label { + color: #000; } + +.white > label { + color: #cccccc; } + +.dark > input:checked ~ label { + color: #00a0ff; } +.dark:not(:checked) > label:hover { + color: #00a0ff; } + .dark:not(:checked) > label:hover ~ label { + color: #00a0ff; } +.dark > input:checked + label:hover, .dark > input:checked ~ label:hover { + color: #FFED85; } +.dark > label:hover ~ input:checked ~ label, .dark > input:checked ~ label:hover ~ label { + color: #FFED85; } + +.white > input:checked ~ label { + color: #ffcc00; } +.white:not(:checked) > label:hover { + color: #ffcc00; } + .white:not(:checked) > label:hover ~ label { + color: #ffcc00; } +.white > input:checked + label:hover, .white > input:checked ~ label:hover { + color: #FFED85; } +.white > label:hover ~ input:checked ~ label, .white > input:checked ~ label:hover ~ label { + color: #FFED85; } + +/*# sourceMappingURL=custom-rating-grifus.css.map */ diff --git a/modules/custom-rating-grifus/public/js/custom-rating-grifus-admin.js b/modules/custom-rating-grifus/public/js/custom-rating-grifus-admin.js new file mode 100644 index 0000000..bacaf05 --- /dev/null +++ b/modules/custom-rating-grifus/public/js/custom-rating-grifus-admin.js @@ -0,0 +1,118 @@ +/** + * Custom Rating Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Rating-Grifus.git + * @since 1.0.0 + */ + +(function ($) { + + $(document).ready(function () { + + /** + * Restart all ratings. + * + * @since 1.0.0 + */ + function restartAllRatings() { + + $.ajax({ + url: customRatingGrifusAdmin.ajax_url, + type: "post", + data: { + action: 'restartAllRatings', + custom_nonce: customRatingGrifusAdmin.custom_nonce + }, + success:function(data) { + + var response = JSON.parse(data); + + if (!response) { return; } + + //console.log(response); + + if (response.ratings_restarted !== 0) { + + $(".was-done").show(); + + $("#film-rating-badge").attr("data-badge", response.ratings_restarted); + + } else { + + $(".nothing-was-done").show(); + } + + $("#film-rating-badge").addClass("success-icon").removeClass("picture-icon"); + + $("#spinner-grifus").hide(); + + }, + error: function(errorThrown){ + //console.log(JSON.stringify(errorThrown)); + } + + }); + + } + + /** + * Restart when add a post. + * + * @since 1.0.1 + */ + function restartWhenAdd(state) { + + $.ajax({ + url: customRatingGrifusAdmin.ajax_url, + type: "post", + data: { + action: 'restartWhenAdd', + state: state, + custom_nonce: customRatingGrifusAdmin.custom_nonce + }, + success:function(data) { + + var response = JSON.parse(data); + + //console.log(response); + + }, + error: function(errorThrown){ + //console.log(JSON.stringify(errorThrown)); + } + + }); + + } + + $("#restart-all-ratings").click(function(e) { + + e.preventDefault(); + + /** Disable button */ + $(this).prop("disabled", true); + + /** Show icons */ + $("#process").slideDown(); + + /** Show spinner */ + $("#spinner-grifus").show(); + + restartAllRatings(); + + }); + + $("#checkbox-rating").click(function(e) { + + var state = ($(this).is(':checked')) ? 1 : 0; + + restartWhenAdd(state); + + }); + + }); + +})(jQuery); diff --git a/modules/custom-rating-grifus/public/js/custom-rating-grifus-home.js b/modules/custom-rating-grifus/public/js/custom-rating-grifus-home.js new file mode 100644 index 0000000..7283350 --- /dev/null +++ b/modules/custom-rating-grifus/public/js/custom-rating-grifus-home.js @@ -0,0 +1,27 @@ +/** + * Custom Rating Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Rating-Grifus.git + * @since 1.0.0 + */ + + jQuery(document).ready( function($) { + + function changeIMDBsingleName() { + + $(".dato").each(function() { + var text = $(this).text(); + text = text.replace("IMDB", customRatingGrifusHome.imdb_button); + $(this).text(text); + }); + } + + if ($(".dato").length) { + + changeIMDBsingleName(); + } + +}); diff --git a/modules/custom-rating-grifus/public/js/custom-rating-grifus.js b/modules/custom-rating-grifus/public/js/custom-rating-grifus.js new file mode 100644 index 0000000..eda7d66 --- /dev/null +++ b/modules/custom-rating-grifus/public/js/custom-rating-grifus.js @@ -0,0 +1,126 @@ +/** + * Custom Rating Grifus · Extensions For Grifus + * + * @author Josantonius - hello@josantonius.com + * @copyright Copyright (c) 2017 + * @license GPL-2.0+ + * @link https://github.com/Josantonius/Custom-Rating-Grifus.git + * @since 1.0.0 + */ + + jQuery(document).ready( function($) { + + function selectRating() { + + /** + * Styles. + */ + var colorThemeClass = ' white'; + + if (customRatingGrifus.dark === "true") { + + colorThemeClass = ' dark'; + } + + /** + * Get movie rating, remove links and select star rating. + */ + var value = new Number($("span[itemprop=ratingValue]").text()); + + $(".bar").remove(); + + $(".imdb_r").prepend( + '
' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + ''+ + '
' + ); + + $(".rating, .dato").css('opacity', '1'); + + $('#star' + value.toFixed()).click(); + } + + function changeIMDBsingleName() { + + $(".imdb_r a:first, .dato a:first").attr("href", "#"); + + $(".imdb_r a:first, .dato a:first").click(function(e) { + e.preventDefault(); + }); + + $(".dato a").each(function() { + var text = $(this).text(); + text = text.replace("IMDB", customRatingGrifus.imdb_button); + $(this).text(text); + }); + } + + function ajaxRating() { + + $("input[name=rating]").click(function(){ + + var vote = $(this).val(); + + $.ajax({ + url: customRatingGrifus.ajax_url, + type: "post", + data: { + action: 'addMovieRating', + custom_nonce: customRatingGrifus.custom_nonce, + postID: customRatingGrifus.postID, + vote: vote + }, + success:function(data){ + + var response = JSON.parse(data); + + //console.log(response); + + if (!response) { return; } + + $("b[itemprop=ratingCount]").text(response.total); + $("span[itemprop=ratingValue]").text(response.rating); + $('.dato b:first').text(response.rating + '/'); + }, + error: function(errorThrown){ + //console.log(errorThrown); + } + }); + }); + } + + if($(".imdb_r a:first, .dato a:first").length) { + + if (customRatingGrifus.is_active) { + + changeIMDBsingleName(); + + selectRating(); + + ajaxRating(); + + } else { + + $(".bar, .dato").css('opacity', '1'); + } + } +}); diff --git a/modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php b/modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php new file mode 100644 index 0000000..0604781 --- /dev/null +++ b/modules/custom-rating-grifus/src/Controller/Admin/Page/CustomRating/CustomRating.php @@ -0,0 +1,152 @@ +runAjax(); + } + + /** + * Add submenu for this page. + * + * @since 1.0.0 + * + * @uses add_submenu_page() → add a submenu page + */ + public function setSubmenu() { + + $submenu = Module::CustomRatingGrifus()->get('submenu'); + + WP_Menu::add( + 'submenu', + $submenu['custom-rating-grifus'], + [$this, 'render'] + ); + } + + /** + * Load scripts. + * + * @since 1.0.0 + */ + public function addScripts() { + + $js = App::ExtensionsForGrifus()->get('assets', 'js'); + + WP_Register::add( + 'script', + $js['eliasisMaterial'] + ); + + WP_Register::add( + 'script', + $js['extensionsForGrifusAdmin'] + ); + + $js = Module::CustomRatingGrifus()->get('assets', 'js'); + + $settings = $js['customRatingGrifusAdmin']; + + $params = [ + 'revised_text' => __( + 'Films were reviewed', + 'extensions-for-grifus-rating' + ), + 'custom_nonce' => wp_create_nonce('customRatingGrifusAdmin'), + ]; + + $settings['params'] = array_merge($settings['params'], $params); + + WP_Register::add('script', $settings); + } + + /** + * Load styles. + * + * @since 1.0.0 + */ + public function addStyles() { + + $css = App::ExtensionsForGrifus()->get('assets', 'css'); + + WP_Register::add( + 'style', + $css['extensionsForGrifusAdmin'] + ); + + WP_Register::add( + 'style', + Module::CustomRatingGrifus()->get( + 'assets', 'css', 'customRatingGrifusAdmin' + ) + ); + } + + /** + * Renderizate admin page. + * + * @since 1.0.0 + */ + public function render() { + + $layout = App::ExtensionsForGrifus()->get('path', 'layout'); + + $page = Module::CustomRatingGrifus()->get('path','page'); + + $restart = Module::CustomRatingGrifus()->get('restart-when-add'); + + $data = ['restart-when-add' => $restart]; + + $this->view->renderizate($layout, 'header'); + $this->view->renderizate($page, 'custom-rating', $data); + $this->view->renderizate($layout, 'footer'); + } + + /** + * Run ajax when change the rating. + * + * @since 1.0.0 + */ + public function runAjax() { + + $Rating = Module::CustomRatingGrifus()->instance('Rating'); + + add_action('wp_ajax_restartAllRatings',[$Rating, 'restartAllRatings']); + add_action('wp_ajax_restartWhenAdd',[$Rating, 'restartWhenAdd']); + } +} diff --git a/modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php b/modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php new file mode 100644 index 0000000..006ef4f --- /dev/null +++ b/modules/custom-rating-grifus/src/Controller/Admin/Rating/Rating.php @@ -0,0 +1,415 @@ +getRatingState($postID); + + $options = $this->model->getThemeOptions(); + + $params = [ + + 'postID' => $postID, + 'dark' => $options['enable-dark'], + 'imdb_button' => __('TOTAL', 'extensions-for-grifus-rating'), + 'is_active' => $isActive, + 'custom_nonce' => wp_create_nonce('customRatingGrifus'), + ]; + + return $params; + } + + /** + * Get rating state. + * + * @since 1.0.1 + * + * @param string $postID → post id + * + * @return boolean → movie rating state + */ + public function getRatingState($postID) { + + return (!$this->model->getMovieVotes($postID)) ? false : true; + } + + /** + * Add movie rating. + * + * @since 1.0.1 + * + * @return array → rating and total votes ['rating', 'total'] + */ + public function addMovieRating() { + + $nonce = isset($_POST['custom_nonce']) ? $_POST['custom_nonce'] : ''; + + $nonce = wp_verify_nonce($nonce, 'customRatingGrifus'); + + if (!$nonce || !isset($_POST['postID'], $_POST['vote'])) { die; } + + $ip = $this->getIp(); + + $vote = $_POST['vote']; + + $postID = $_POST['postID']; + + $this->clearCache($postID); + + $votes = $this->model->getMovieVotes($postID); + + $votes = $this->model->setUserVote($postID, $votes, $vote, $ip); + + $response = $this->setRatingAndVotes($postID, $votes); + + echo json_encode($response, true); + + die(); + } + + /** + * Get Ip. + * + * @since 1.0.1 + * + * @return string → ip + */ + public function getIp() { + + return getenv('HTTP_CLIENT_IP')?: + getenv('HTTP_X_FORWARDED_FOR')?: + getenv('HTTP_X_FORWARDED')?: + getenv('HTTP_FORWARDED_FOR')?: + getenv('HTTP_FORWARDED')?: + getenv('REMOTE_ADDR'); + } + + /** + * Clear cache when updating rating. + * + * @since 1.0.1 + * + * @param string $postID → post id + * + * @return void + */ + public function clearCache($postID) { + + /** + * WP Super Cache + */ + if (function_exists('wp_cache_post_change')) { + + wp_cache_post_change($postID); + } + } + + /** + * Calculate rating. + * + * @since 1.0.1 + * + * @param array $votes → votes number + * + * @return int|float|string → rating + */ + public function getMovieRating($votes) { + + $votations = []; + + foreach ($votes as $key => $value) { + + for ($i=0; $i < $value; $i++) { + + $votations[] = $key; + } + } + + if (count($votations)) { + + $rating = array_sum($votations) / count($votations); + + return round($rating, 1); + } + + return 'N/A'; + } + + /** + * Get total votes. + * + * @since 1.0.1 + * + * @param array $votes → votes + * + * @return int|string → total votes + */ + public function getTotalVotes($votes = null) { + + return (array_sum(array_values($votes))); + } + + /** + * Restart rating when added or edited post if not done previously. + * + * @since 1.0.0 + * + * @param int $postID → post ID + * @param object $post → (WP_Post) post object + * @param boolean $update → true if update post + * + * @return void + */ + public function restartRating($postID, $post, $update) { + + App::id('ExtensionsForGrifus'); + + if (Module::CustomRatingGrifus()->get('restart-when-add')) { + + # Prevent overwriting the rating when inserting or updating post + unset($_POST['imdbRating'], $_POST['imdbVotes']); + + if (App::main()->isAfterInsertPost($post, $update)) { + + $votes = $this->model->getMovieVotes($postID); + + if (!$votes) { + + $votes = [ + '1' => 0, + '2' => 0, + '3' => 0, + '4' => 0, + '5' => 0, + '6' => 0, + '7' => 0, + '8' => 0, + '9' => 0, + '10' => 0, + ]; + + $this->setRatingAndVotes($postID, $votes); + + return true; + } + } + } + + return false; + } + + /** + * Restart all ratings. + * + * @since 1.0.0 + * + * @return void + */ + public function restartAllRatings() { + + $nonce = isset($_POST['custom_nonce']) ? $_POST['custom_nonce'] : ''; + + if (!wp_verify_nonce( $nonce, 'customRatingGrifusAdmin')) { + + die('Busted!'); + } + + $response['ratings_restarted'] = 0; + + $posts = $this->model->getPosts(); + + foreach ($posts as $post) { + + if (isset($post->ID)) { + + if ($this->restartRating($post->ID)) { + + $response['ratings_restarted']++; + } + } + } + + echo json_encode($response); + + die(); + } + + /** + * Update rating if the movie editing page is updated. + * + * @since 1.0.1 + * + * @param int $postID → post ID + * @param object $post → (WP_Post) post object + * @param boolean $update → true if update post + * + * @return boolean + */ + public function updateRating($postID, $post, $update) { + + App::id('ExtensionsForGrifus'); + + if (App::main()->isAfterUpdatePost($post, $update)) { + + if (isset($_POST['efg-update-rating'])) { + + for ($i=1; $i <= 10; $i++) { + + if (!isset($_POST["efg-rating-$i"])) { + + return false; + } + + $votes["$i"] = (int) $_POST["efg-rating-$i"]; + } + + $this->setRatingAndVotes($postID, $votes); + } + } + + return true; + } + + /** + * Restart when added a movie. + * + * @since 1.0.1 + * + * @return void + */ + public function restartWhenAdd() { + + $state = isset($_POST['state']) ? $_POST['state'] : null; + + $nonce = wp_verify_nonce( + + isset($_POST['custom_nonce']) ? $_POST['custom_nonce'] : false, + 'customRatingGrifusAdmin' + ); + + if (!$nonce || is_null($state)) { die; } + + App::id('ExtensionsForGrifus'); + + $slug = Module::CustomRatingGrifus()->get('slug'); + + $this->model->setRestartWhenAdd($slug, $state); + + $response = ['restart-when-add' => $state]; + + echo json_encode($response); + + die(); + } + + /** + * Add movie rating. + * + * @since 1.0.1 + * + * @param string $postID → post id + * @param array $votes → votes + * + * @return array → rating and total votes + */ + public function setRatingAndVotes($postID, $votes) { + + $totalVotes = $this->getTotalVotes($votes); + + $this->model->setMovieVotes($postID, $totalVotes); + + $this->model->setTotalVotes($postID, $votes); + + $rating = $this->getMovieRating($votes); + + $this->model->setMovieRating($postID, $rating); + + return [ + + 'rating' => $rating, + 'total' => $totalVotes, + ]; + } + + /** + * Add meta boxes. + * + * @since 1.0.1 + * + * @param string $postType → post type + * @param object $post → (WP_Post) post object + * + * @return void + */ + public function addMetaBoxes($postType, $post) { + + App::id('ExtensionsForGrifus'); + + $isActive = $this->getRatingState($post->ID); + + if (App::main()->isPublishPost($post) && $isActive) { + + add_meta_box( + 'info_movie-rating-movie', + __('Extensions For Grifus - Custom rating', + 'extensions-for-grifus-rating'), + [$this, 'renderMetaBoxes'], + $postType, + 'advanced', + 'default' + ); + } + } + + /** + * Renderizate post meta boxes. + * + * @since 1.0.1 + * + * @param object $post → (WP_Post) post object + * + * @return void + */ + public function renderMetaBoxes($post) { + + App::id('ExtensionsForGrifus'); + + wp_nonce_field('_rating_movie_nonce', 'rating_movie_nonce'); + + $metaBoxes = Module::CustomRatingGrifus()->get('path','meta-boxes'); + + $data = ['votes' => $this->model->getMovieVotes($post->ID)]; + + $this->view->renderizate($metaBoxes, 'wp-insert-post', $data); + } +} diff --git a/modules/custom-rating-grifus/src/Controller/Launcher/Launcher.php b/modules/custom-rating-grifus/src/Controller/Launcher/Launcher.php new file mode 100644 index 0000000..3078a9e --- /dev/null +++ b/modules/custom-rating-grifus/src/Controller/Launcher/Launcher.php @@ -0,0 +1,237 @@ +get('state'); + + if ($state === 'active' || $state === 'outdated') { + + App::id('ExtensionsForGrifus'); + + $this->Rating = Module::CustomRatingGrifus()->instance('Rating'); + + add_action('init', [$this, 'setLanguage']); + + $this->runAjax(); + + if (is_admin()) { + + return $this->admin(); + } + + $this->front(); + } + } + + /** + * Module activation hook. Executed when module is activated. + * + * @since 1.0.0 + * + * @return void + */ + public function activation() { + + $this->model->addOptions(); + + $this->model->createTables(); + } + + /** + * Module uninstallation hook. Executed when module is uninstalled. + * + * @since 1.0.0 + * + * @return void + */ + public function uninstallation() { + + $this->model->deletePostMeta(); + + $this->model->deleteOptions(); + + $this->model->removeTables(); + } + + /** + * Set plugin textdomain. + * + * @since 1.0.0 + * + * @return void + */ + public function setLanguage() { + + $DS = App::DS; + + $pSlug = App::ExtensionsForGrifus()->get('slug'); + + $mSlug = Module::CustomRatingGrifus()->get('slug'); + + $path = $pSlug . $DS .'modules' .$DS. $mSlug .$DS. 'languages' . $DS; + + load_plugin_textdomain($pSlug . '-rating', false, $path); + } + + /** + * Run ajax when change the rating. + * + * @since 1.0.0 + * + * @return void + */ + public function runAjax() { + + $method = [$this->Rating, 'addMovieRating']; + + add_action('wp_ajax_addMovieRating', $method); + add_action('wp_ajax_nopriv_addMovieRating', $method); + } + + /** + * Admin initializer method. + * + * @since 1.0.0 + * + * @uses add_action() → hooks a function on to a specific action + * + * @return void + */ + public function admin() { + + $this->setOptions(); + + $namespace = Module::CustomRatingGrifus()->get('namespaces'); + + $modulePages = Module::CustomRatingGrifus()->get('pages'); + + App::main()->setMenus($modulePages ,$namespace['admin-page']); + + add_action('add_meta_boxes', [$this->Rating, 'addMetaBoxes'], 10, 2); + + add_action('save_post', [$this->Rating, 'restartRating'], 1, 3); + + add_action('save_post', [$this->Rating, 'updateRating'], 10, 3); + } + + /** + * Set database module options. + * + * @since 1.0.1 + * + * @return void + */ + public function setOptions() { + + $slug = Module::CustomRatingGrifus()->get('slug'); + + $options = $this->model->getOptions(); + + foreach ($options as $option => $value) { + + Module::CustomRatingGrifus()->set($option, $value); + } + } + + /** + * Front initializer method. + * + * @since 1.0.0 + * + * @return void + */ + public function front() { + + add_action('wp', function() { + + App::id('ExtensionsForGrifus'); + + if (App::main()->isSingle()) { + + $this->addScripts('customRatingGrifus'); + + $this->addStyles(); + + } else if (is_home() || is_category()) { + + $this->addScripts('customRatingGrifusHome'); + } + }); + } + + /** + * Add scripts. + * + * @since 1.0.0 + * + * @param string $name → script name + * + * @return void + */ + protected function addScripts($name) { + + $params = $this->Rating->setMovieParams(); + + $settings = Module::CustomRatingGrifus()->get('assets', 'js',$name); + + $settings['params'] = array_merge($settings['params'], $params); + + WP_Register::add('script', $settings); + } + + /** + * Add styles. + * + * @since 1.0.0 + * + * @return void + */ + protected function addStyles() { + + $css = Module::CustomRatingGrifus()->get('assets', 'css'); + + WP_Register::add( + 'style', + $css['customRatingGrifus'] + ); + } +} diff --git a/modules/custom-rating-grifus/src/Model/Admin/Rating/Rating.php b/modules/custom-rating-grifus/src/Model/Admin/Rating/Rating.php new file mode 100644 index 0000000..f7aa438 --- /dev/null +++ b/modules/custom-rating-grifus/src/Model/Admin/Rating/Rating.php @@ -0,0 +1,208 @@ + get_option('activar-dark'), + ]; + } + + /** + * Get movie votes. + * + * @since 1.0.1 + * + * @param string $postID → post id + * + * @return array|false → votes + */ + public function getMovieVotes($postID) { + + $votes = get_post_meta($postID, 'imdbTotalVotes', true); + + if (!empty($votes)) { + + return json_decode($votes, true); + } + + return false; + } + + /** + * Set movie votes. + * + * @since 1.0.1 + * + * @param string $postID → post id + * @param int $totalVotes → number of total votes + * + * @return void + */ + public function setMovieVotes($postID, $totalVotes) { + + $totalVotes = $totalVotes ?: 'N/B'; + + if (!add_post_meta($postID, 'imdbVotes', $totalVotes, true)) { + + update_post_meta($postID, 'imdbVotes', $totalVotes); + } + } + + /** + * Set total votes. + * + * @since 1.0.1 + * + * @param string $postID → post id + * @param array $votes → votes + * + * @return void + */ + public function setTotalVotes($postID, $votes) { + + $votes = json_encode($votes, true); + + if (!add_post_meta($postID, 'imdbTotalVotes', $votes, true)) { + + update_post_meta($postID, 'imdbTotalVotes', $votes); + } + } + + /** + * Set movie rating. + * + * @since 1.0.0 + * + * @param string $postID → post id + * @param int|float $rating → movie rating + * + * @return void + */ + public function setMovieRating($postID, $rating) { + + if (!add_post_meta($postID, 'imdbRating', $rating, true)) { + + update_post_meta($postID, 'imdbRating', $rating); + } + } + + /** + * Add or update vote and associate to an IP address. + * + * @since 1.0.1 + * + * @param string $postID → post id + * @param array $votes → votes + * @param array $vote → vote + * @param array $ip → ip + * + * @return array → movie votes + */ + public function setUserVote($postID, $votes, $vote, $ip) { + + global $wpdb; + + $tableName = $wpdb->prefix . 'efg_custom_rating'; + + $result = $wpdb->get_row(" + SELECT id, vote + FROM $tableName + WHERE ip = '$ip' + AND post_id = $postID + "); + + if (!isset($result->id) && !isset($result->vote)) { + + $wpdb->insert( + $tableName, + ['post_id' => $postID, 'ip' => $ip, 'vote' => $vote], + ['%d', '%s', '%d'] + ); + + $votes[$vote]++; + + } else { + + if ($result->vote != $vote) { + + $wpdb->update( + $tableName, + ['post_id' => $postID, 'ip' => $ip, 'vote' => $vote], + ['id' => $result->id], + ['%d', '%s', '%d'], + ['%d'] + ); + + $votes[$result->vote]--; + + $votes[$vote]++; + } + } + + return $votes; + } + + /** + * Get publish posts. + * + * @since 1.0.1 + * + * @return array → posts + */ + public function getPosts() { + + $totalPosts = wp_count_posts(); + + $totalPosts = isset($totalPosts->publish) ? $totalPosts->publish : 0; + + return get_posts([ + + 'post_type' => 'post', + 'numberposts' => $totalPosts, + 'post_status' => 'publish' + ]); + } + + /** + * Set state for restart when added a movie. + * + * @since 1.0.1 + * + * @param string $slug → module slug + * @param boolean $state → restart when added a movie + * + * @return void + */ + public function setRestartWhenAdd($slug, $state) { + + update_option($slug . '-restart-when-add', $state); + } +} diff --git a/modules/custom-rating-grifus/src/Model/Launcher/Launcher.php b/modules/custom-rating-grifus/src/Model/Launcher/Launcher.php new file mode 100644 index 0000000..1dde541 --- /dev/null +++ b/modules/custom-rating-grifus/src/Model/Launcher/Launcher.php @@ -0,0 +1,129 @@ +get_charset_collate(); + + $tableName = $wpdb->prefix . 'efg_custom_rating'; + + $sql = "CREATE TABLE IF NOT EXISTS $tableName ( + id mediumint(9) NOT NULL AUTO_INCREMENT, + post_id mediumint(9) NOT NULL, + ip varchar(45) NOT NULL, + vote int(2) NOT NULL, + PRIMARY KEY (id) + ) $charset_collate;"; + + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + + dbDelta($sql); + } + + /** + * Set database module options. + * + * @since 1.0.1 + * + * @return void + */ + public function addOptions() { + + $slug = Module::CustomRatingGrifus()->get('slug'); + + if (!get_option($slug . '-restart-when-add')) { + + add_option($slug . '-restart-when-add', 1); + } + } + + /** + * Get database module options. + * + * @since 1.0.1 + * + * @uses get_option() + * + * @return array + */ + public function getOptions() { + + $slug = Module::CustomRatingGrifus()->get('slug'); + + return [ + + 'restart-when-add' => get_option($slug . '-restart-when-add') + ]; + } + + /** + * Delete database module options. + * + * @since 1.0.1 + * + * @return void + */ + public function deleteOptions() { + + $slug = Module::CustomRatingGrifus()->get('slug'); + + delete_option($slug . '-restart-when-add', true); + } + + /** + * Remove database tables. + * + * @since 1.0.0 + * + * @return void + */ + public function removeTables() { + + global $wpdb; + + $tableName = $wpdb->prefix . 'efg_custom_rating'; + + $wpdb->query("DROP TABLE IF EXISTS $tableName"); + } + + /** + * Delete post meta by key. + * + * @since 1.0.0 + * + * @return void + */ + public function deletePostMeta() { + + delete_post_meta_by_key('imdbTotalVotes'); + } +} diff --git a/modules/custom-rating-grifus/src/template/meta-boxes/wp-insert-post.php b/modules/custom-rating-grifus/src/template/meta-boxes/wp-insert-post.php new file mode 100644 index 0000000..0d1678e --- /dev/null +++ b/modules/custom-rating-grifus/src/template/meta-boxes/wp-insert-post.php @@ -0,0 +1,31 @@ +"; + +foreach ($data['votes'] as $number => $votes): ?> + + +
+ +

+ + + + diff --git a/modules/custom-rating-grifus/src/template/page/custom-rating.php b/modules/custom-rating-grifus/src/template/page/custom-rating.php new file mode 100644 index 0000000..d8db958 --- /dev/null +++ b/modules/custom-rating-grifus/src/template/page/custom-rating.php @@ -0,0 +1,56 @@ + + +
+
+
+
+

+ +

+
+
+
+

+
+ +
info_outline
+
+ +
+
+
+
+
+
movie_filter
+ +
+
+
+
+ +
+
+
+
+
+
+
diff --git a/modules/wp_plugin-info/src/Controller/Admin/Info/Info.php b/modules/wp_plugin-info/src/Controller/Admin/Info/Info.php index 8de2a89..e7da2b3 100644 --- a/modules/wp_plugin-info/src/Controller/Admin/Info/Info.php +++ b/modules/wp_plugin-info/src/Controller/Admin/Info/Info.php @@ -11,7 +11,6 @@ namespace Eliasis\Modules\WP_Plugin_Info\Controller\Admin\Info; - use Eliasis\Module\Module, Eliasis\Controller\Controller; diff --git a/modules/wp_plugin-info/src/Model/Admin/Info/Info.php b/modules/wp_plugin-info/src/Model/Admin/Info/Info.php index b434e21..4d462f8 100644 --- a/modules/wp_plugin-info/src/Model/Admin/Info/Info.php +++ b/modules/wp_plugin-info/src/Model/Admin/Info/Info.php @@ -11,7 +11,6 @@ namespace Eliasis\Modules\WP_Plugin_Info\Model\Admin\Info; - use Josantonius\Json\Json, Eliasis\Module\Module, Eliasis\Model\Model; diff --git a/readme.txt b/readme.txt index 9cc01ff..61a0f39 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://paypal.me/Josantonius Tags: Grifus, Grifus-theme, Custom-images, Custom-Rating, Grifus-Extensions, Grifus-modules Requires at least: 3.5 Tested up to: 4.8 -Stable tag: 1.0.1 +Stable tag: 1.0.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -51,7 +51,7 @@ Replaces IMDB rating by your own rating system in Grifus theme. Replaces the sta = Does it work with the latest version of the Grifus theme? = -Yes, this plugin was tested with 4.0.3 version of Grifus theme. +Yes, this plugin was tested with 4.0.2.6 and 4.0.3 versions of Grifus theme. = Is it compatible with HipHop Virtual Machine (HHVM)? = @@ -74,6 +74,14 @@ Extensions For Grifus is available in english and spanish language. == Changelog == += 1.0.2 Extensions For Grifus = + +* The `Custom Rating Grifus module` was updated to version 1.0.2. + +* [Custom Rating Grifus module] Fixed bug on archive or search pages, now will also replace the IMDB legend by TOTAL. + +* [Custom Rating Grifus module] Now when manipulate it the rating of the movie from the administration panel will show the total number of votes and the rating in real time. + = 1.0.1 Extensions For Grifus = * Bug fix in the Josantonius\WP_Register library. @@ -205,3 +213,6 @@ Extensions For Grifus is available in english and spanish language. * The `Custom Rating Grifus module` was updated to version 1.0.1. * The `Custom Images Grifus module` was updated to version 1.0.1. + += 1.0.2 = +* The `Custom Rating Grifus module` was updated to version 1.0.2.