=== GDY Modular Content === Contributors: Grandy, fouadvollmer Plugin Name: GDY Modular Content Plugin URI: https://wordpress.org/plugins/gdy-modular-content/ Tags: frontend editing, modular content, html modules, content management, content editable Author: Fouad Vollmer Author URI: http://fouadvollmer.de/ Copyright: Johannes Grandy Text Domain: gdy-modular-content Domain Path: /languages License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Requires at least: 3.6 Tested up to: 4.6 Stable tag: 0.8.2 Transform WordPress into a real CMS: Create and edit modular content from the frontent of your site. == Description == = Overview = This plugin allows you to create modular contents and to edit them with a intuitive user interface from the frontent of your site. [youtube https://www.youtube.com/watch?v=4uJsUo4reWw] Main philosophy of the plugin is it to make it easy for all of you. That means easy handling for editors, fast and flexible implementation for programmers and good control over your layouts for designers. One example is image size: The programmer can exactly define the image size that the designer want as easy as ``. The editor than can't place images other than the defined size. If he chooses a bigger image he gets automatically a crop dialog with all parameters set by the plugin automatically. = Current Content Types = Text, Image, Gallery, Table = Compatibility with other plugins = The plugin should run in most enviroments because it uses the native WordPress architecture to save contents (postmeta, attachments). So far no problems with any other plugins are reported. == Installation == Here's how to install the plugin: 1. Upload 'gdy-modular-content' to the '/wp-content/plugins/' directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Create a module area with `` or the `[gdymc_area]` shortcode (example template in the plugin folder) 1. Create a 'modules' folder in your theme directory 1. Create your modules (example modules in the plugin folder) 1. Start editing your site Note: In the plugins folder is a folder named `example-theme-files` with an example template and some modules. You can just copy that files - as basic implementation - into your theme folder and create a page with that GDYMC Template to make it editable from the frontend. If you're using not your own theme consider using a child theme. Otherwise your modules folder can be lost on a update of the theme. Here's how to create modules: 1. For creating a module place a folder named like 'my_example_module' in your themes modules folder. The folder name is simultaneously your module type so you can name it like 'simple_image' or 'contact_form'. 1. Then place a index.php in that folder with your modules markup (functions.php and thumb.svg are optional) 1. Create editable contents in your index.php like `` or `` (The first parameter is your content id within the current module or page) == Frequently Asked Questions == = Are there no preinstalled modules = No. Goal of the plugin is it to enable great workflows. This includes individually programmed content modules tailored to your needs and not preinstalled modules that have to be bent into shape. In the plugins folder is a folder named `example-theme-files` with some example modules to help you get started. = The plugin seems to be broken = Make sure you use ``, `` and ``. Also make sure all your WordPress Loops are properly closed (``, `` and that stuff). = Contents are not saved properly = The problem - in most cases - is that the plugin gathers the wrong page or post id. Check that your Wordpress Loops are properly closed (``, `` …). = The plugin styles look weird = Frontend editing is great but it has some downsides. One of them is that all your theme styles can impact the plugin layout because those elements are integrated directly in your page. We try to make the styles for the plugin pretty robust so that it works as expected in most themes. But sometime that is really hard. Try to avoid selecting a element directly like `ul li { outline: #0f0; }`. Better would be `#content ul li { outline: #0f0; }`. = Where is my WordPress adminbar = The Plugin disables the native frontend adminbar and sets up a new one. = The plugin makes my website slower = In administration mode the plugin loads quite a few javascripts into the frontend of your site. That can slow down the load time. But for regular visitors the load the should be pretty much the same because no additional resources are loaded. = Is it possible to create editable contents outside of modules = Yes. You can use the content functions directly in your template. = Is it possible to create multiple areas = No we discarded this for a simpler handling. = Is it possible to translate module titles = Yes. Use the `gdymc_moduletitle_{$moduleType}` filter. = Can i prevent the plugin from creating picture tags for images = Yes. Set the `gdymc_responsive_image_allowed` filter to `false`. = Can i prevent image sizes from being rendered as responsive image size = Yes. Just push the size to excude into the array delivered via the `gdymc_responsive_image_ignore_sizes` filter. The Thumbnail-Size is ignored by default. = Is it possible to use a different module folder = Yes. Just change the name of the module folder via the `gdymc_theme_modules_folder` filter. = Can i hide the support button = Yes. Just use the `gdymc_support` filter and return 0 = Do shortcodes work in gdymc contents = Not natively because they would be applied on every save and could mess up the editable fields. But you can enable them via the `gdymc_contentfilter` and a condition so that the only are applied in preview or for visitors. = Some parts of my website are shifted when im logged = This happens mainly to fixed elements. You can adjust your styling with the conditional classes gdymc adds to the body. In most cases it helps to add 40px (height of the gdymc admin bar) via css like `.gdymc_logged .my_element { top: 40px; }` == Screenshots == 1. Place content modules like never before 1. Edit most contents directly in the frontend 1. Easily place images in the right size 1. Customize your modules with additional options 1. Concentrate on your work with an error resistant UI == Changelog == = 0.8.2 = * Styling adjustments * Changed to the WP 4.6 default fonts * Fixed a bug were the error window appears twice on deleting a module type * Added option to change the module type of deleted modules * Added the functions `gdymc_has_modules` and `gdymc_get_modules` * Added function to change the module type in the module options * Added a extra container around editable texts to prevent some weird behaviours occuring in some tags like h1 etc. * Changed some module options from disabled to readonly to allow text selection * Added the `gdymc_module_attributes` filter for customizing module attributes * Removed the `gdymc_moduleinner_class` filter (Use gdymc_module_class and the parent container instead. This container is only for making invisible modules transparent in editing mode and may be changed or removed in the future) * Bugfix for preview modes on login = 0.8.1 = * Styling fixes * Changed the way `_gdymc_image_width` and `_gdymc_image_height` are saved to a much more robust way. It's now bound to the hook `gdymc_transfer_attachment_image_size` that is placed right before the frontend media manager is loaded * Changed the `gdymc_set_all_attachment_image_sizes` function to `gdymc_transfer_attachment_image_sizes` according to the name of the new hook * Fixed a bug in the way how the image is received for the crop dialog in the frontend media manager * Changed `gdymc_object_id` back to the more robust `get_queried_object_id`. For this the module functions are included on different hooks depending on if it is a AJAX call or not * Plugin cookies are now based on the WordPress variables `COOKIEPATH` and `COOKIE_DOMAIN` * Fixed a bug where textareas in module options were submitted on enter * Fixed a bug where HTML attributes in tables contents destroy the table field * URLs inserted with the frontend text editor are now correctly encoded * Fixed a bug that disabled the show all format options button * Fixed a bug were the frontend media manager skips the first page * Added the information how many additional images are available in the frontend media manager = 0.8.0 = * Some style adjustments for button states * Added the hooks `gdymc_modulelist_before` and `gdymc_modulelist_after` * Added the jQuery events `gdymc_disable_softpreview` and `gdymc_enable_softpreview` * Added the `gdymc_get_module_path()` and `gdymc_get_module_url()` to return path/url in module files (child-theme ready) * Added the hooks `gdymc_image_before` and `gdymc_image_after` * Some hook optimizations * The `picturefill.js` is now minified * Added the hooks `gdymc_plugin_activation`, `gdymc_plugin_deactivation`, `gdymc_plugin_uninstall`, and `gdymc_plugin_upgrade` * Attachment meta `_gdymc_image_width` and `_gdymc_image_height` are now also available via post meta for queries by image dimensions * Fixed a bug where module options overlay doesn't appear after fast preview * Added a permalink information in the module default options to link modules directly from external pages * Option fields support now saving on enter key * Changed the way the frontend media manager loads images * Full module option support for input type `hidden` and `password` * Basic module option support for the following html5 input types `number`, `date`, `color`, `range`, `month`, `week`, `time`, `email`, `search`, `tel`, `url` * Module functions are now included at `after_setup_theme`. For this the gdymc_object_id function was changed * On AJAX all module functions are included now (allowing to process AJAX calls from within module functions) * New functions `gdymc_get_all_module_types` and `gdymc_get_placed_module_types` * Added `gdymc_area` shortcode to create a module area within the regular post content * The gdymc_text container is a div again because there were some weird behaviours * Added the filters `gdymc_error_adminbar_nomodulefolder`, `gdymc_error_adminbar_nomodules`, `gdymc_error_adminbar_noarea` and `gdymc_error_area_nomodules` = 0.7.9 = * Styling fixes * Fixed a bug with gallery placeholders where images with auto sizes caused an error * The use images button in the gallery overlay shows now the number of selected images * Added version parameter (the GDYMC version number) to plugin scripts and styles to avoid cache problems after plugin updates * Updated the cookie library to cookies js v 2.1.1 * Fixed a bug with cookie paths where duplicate cookies are generated from js and php * Placing the preview cookies (soft and hard) on unload to maintain the current state even with multiple tabs or windows are open * Removed the soft preview when leaving the hard preview so users always come back to edit mode when they exit hard preview even if soft preview was enabled before they entered * Better behaviour and animations für adminbar dropdowns * Hover and focus styles for module option inputs * Fixed a bug with the adminbar format buttons when selecting modules on smaller screens * Changed the conditions for the plugin body classes * The gdymc_text container is now a span (for valid placement in h and a tags) and not longer positioned * Changed the way how module thumbs are fetched to a more compatible solution * Some syntactic changes for better keyboard support * Revised frontend media uploader (Uploads are now handled directly via `media_handle_upload()` allowing all filetypes that are supported by wordpress itself). Also the uploader styles are much more polished * Fixed a bug where the frontend media manager isn't rendered completely = 0.7.8 = * Styling fixes * Categories have now an own tab in the link window * The media manager now dissapears when new uploads are dropped * Added the js function `gdymc.editor.addclass( classname, attributes )` for custom editor buttons * In hard preview user capabilities are cropped and the WordPress `is-logged` class is removed * The hard preview button is now a real link (the unsaved content warning now appears and you can open it as new tab) * On fresh user login the hard and soft preview are deactivated * The preview button now indicates on top level if fast preview is active of not * Fixed a bug with the naming of the superscript and subscript buttons * The customizer button is back in the 'to backend' submenu * Deleted the profile button in the 'to backend' submenu * Fixed a bug with the enter preview error (when you click on format buttons but the fast preview is active) * Removed a undefined index warning caused by the hard preview * Optimized the priority of the adminbar and modulebar button hooks * Enabled and optimized batch editing for modules * Updated delete module function to support deletion of multiple modules at once * Fixed a bug where some fields are saved unintentionally as module options * It is now possible to copy and move modules between posts via the batch window * Added more hooks * Module hooks get now only the module object (`$module`) as parameter (This may cause errors with old modules … Check the module functions!) * Changed necessary capability to `edit pages` * Added a `gdymc_timed` class to check if the module has a active timer * Added filters for the classes of the module containers: `gdymc_module_class`, `gdymc_moduleinner_class` * Added the `gdymc_area_class` filter which is filtering the module area classes * Removed `$gdymc_active_area`. Check `$gdymc_module` instead * Added `GDYMC_BASE_PATH` pointing to the plugin directory * Added `gdymc_support` filter (replacing $gdymc_support) * Added support for child themes * Fixed a bug wich allows to open image overlays from softpreview * Fixed a bug where soft preview stays active after adding a module * Fixed a bug that occurs when removing the last image from selection * Editable table bugfixes: Buttons, Preview * Added the shortcut `CMD+Shift+E` to enable hard preview * Tables are now saved as JSON (old contents are converted) = 0.7.7 = * Styling hotfixes * Plural support for german language file * Better keyboard support * Added a shortcut for the format unlink button * Added a hard preview mode (where nearly the whole system behaves like you are a visitor) * Fixed a tooltip bug with tooltips on the right side rendered wrong * Optimized source area in the insert link window * Added message for empty module search * Support popup doesn't show up autmatically now * Added progress cursor for several ajax actions for better visual feedback = 0.7.6 = * Fixed a saving bug where empty images are saved as null and not a empty string = 0.7.5 = * Gallery hotfix = 0.7.4 = * Added a popup asking for user support that is showed once per user 6 months after the plugin installation * Changed the `gdymc_time_ago` function for better translation * Changed and unified how image and gallery editables are saved in the database * Removed the noarea hooks and changed the place of the error message * Added loading animation for the crop window * Added error message for images that are too small * Fixed the module option label style for text options * Removed the editable option due unfinished integration * Fixed some remaining hash reload errors = 0.7.3 = * Added i18n support for GlotPress on wordpress.org * Added a `module option example` plugin to the `example theme files` folder = 0.7.2 = * Better adminbar behavior for different screen sizes * Better format button order in the adminbar * Added the JS functions `gdymc.selection.parent()` and `gdymc.selection.inside()` * Format buttons no always try to restore saved selections * Some adjuments for the link window to support the format buttons overlay * New module option tab "defaults" that shows IDs and module type * Scroll gradient for module list * It is now possible to open links in edit mode with metakey+click * Better styles for not existing module actions * Fixed style for module list with no modules * Added support for updates from 0.6.3 so that all existing versions should be updateable without destroying the contents = 0.7.1 = * Styling Hotfixes = 0.7.0 = * CSS style reset for plugin elements with `.gdymc_inside * { all: initial; }` * CSS improvements so that the plugin is displayed correctly in more themes * Added example theme files * Added POT file to the language folder * Removed select module buttons till the batch actions are finished = 0.6.9 = * Style improvements * Removed module position tab * Added options for not existing modules: delete this module, delete this module type * Added the filter `gdymc_loginout_redirect` to disable login or logout redirects * Fixed a bug with editable image size rendering in admin mode * Fixed a bug with reload actions when a hash is applied * Changed the not existing module options so that they are only showed for admins * Added placeholders for empty editable images so that they are showed in the correct size * Fixed a bug were placeholder images are shown in preview-mode * Added actions for galleries. Changed the caption as hook * Removed translation div. Translations are now added via `wp_localize_script()` * Gallery container is now also available in unlogged mode * Galleries no support a custom rendering function as third parameter * The `li` tag in galleries has now the image id in the `data-image` attribute * The image info labels are no only triggered in edit mode * Removed buggy placeholder images for image auto sizes (autoxauto, 100xauto, autox100) * Adjusted scripts for module labels so that first and last is showed completely and no kinetic problems appear * The `.gdymc_text` container is now also added in visitor mode = 0.6.8 = * Prefixed postmeta keys with `_` that they no longer show up on the post edit page * Changed postmeta key `gdymc_Content_` to `gdymc_singlecontent_` * Changed postmeta key `_gdymc_object_content` to `_gdymc_object_contents` * Changed postmeta `_gdymc_list` to `_gdymc_modulelist` * Styling fix for swap contents button * Added content type gallery * Removed double click to insert in media manager * Added thumb for active images besides the insert image button * Changes in image handling for gallery * Added captions to gallery * Small styling bugfixes * Changed how url are set in adminbar.php and builder.php now some module thumb problems should disappear * Changed names of javascripts * Additional error messages when not in edit mode * Styling updates for media uploader * Changed the way thumbs of selected images were created in the media manager * Better cropping for media manager * Added jqueryui sorting for slider elements * The Plugin adds now admin bar classes on body * Changed a bug in `gdymc_logged()` with user roles * Added link to directly jump to customizer * Improved gallery classes * Added picture tags for responsive images * Added public javascript picturefill.js for browser-support of picture tags * Fixed a bug with `gdymc_responsive_image()` when invalid image ID is submitted * Fixed saving bug * Added sorting for responsive image sizes so that it behaves correctly * Added filters to disable image sizes and change rendering type (responsive or not) * Fixed a sizing bug with regular images * Cleanup * Added filter to change module names * Added filter to change themes modules folder name * Style now supports (and displays) long module names * Visual feedback for the AJAX when adding modules = 0.6.7 = * Fixed a undefined variable * Styling for warning if module folder doesn't exist * Warning if there are no modules (aka folders in module folder) * Fixed a initialisation problem with jcrop when images take too long to load * Added build number for better version control * Added soft user role support for gdymc (edit_pages, upload_files) * Added visual feedback for uploads * Small bugfixes for the uploader * Changed upload response (cause wordpress can't generate thumbnails of very big files and so the upload can be incomplete) * Changed frontend media manager loop to a more stable version (same problem as above) * Added support for new option types: textarea, editable * Fixed bug with undefined variables in link window * Better styling for module options text editor * New hooks for modulebars * Better identification for module option fields * Added versioning system for trigger actions on older systems * Changed `wp_postmeta` to `$wpdb->postmeta` in WPDB query = 0.6.6 = * Better styling for editable table UI * Image overlay is now infinite scrolling * Smaller image thumbs * Better ajax loading feedback * Integrated a search function for images * Fixed bug with wrong editable style in preview mode * Fixed bug with SVG files causing problems in image window * The plugin now supports contents outside the module area * `contentCheck()` supports now an array of IDs as parameter * Contents are now swappable via button * Fixed some IE bugs * Visual feedback for image search * Support for timed visibility switch * Fixed CSS heights for option inputs * Moved javascripts into page footer for faster loading * Fixed batch window formatting * Added check if object exists on moving modules * Changed the way the plugin gets the post/page id so it works with uncommon url rewrites * Changed the hook for gathering module functions because of the changed get_object_id * New terminology: `$gdymc_PageID` is now $gdymc_object_id * New terminology: `gdymcObjectID()` is now `gdymc_object_id()` * New terminology: `gdymc_timeAgo()` is now `gdymc_time_ago()` * New terminology: `gdymc_moduleArray()` is now `` function to check if there is content for unlogged users (to hide certain elements e.g. empty containers) == Upgrade Notice == = 0.6.4 = * There is no backward compatibility for older module options. The old module options will be still supported but there is a new system that replaces the old one. For the best user experience it is strongly recommended to migrate the old option system to the new one. = 0.7.8 = * Module hooks get now only the module object as parameter. Make sure your modules are ready for that. Especially module options are going to make problems with that new structure.