arclab-io / ALwordpressGridPlus

GNU General Public License v3.0
0 stars 0 forks source link

Maintainence Docs

Modal Logic

Modal logic includes the html logic, content and styling of the modals. It is completely built upon the light gallery code of the original plugin by changing an image being displayed to an html modal.
It is in the assets/lib/light-gallery directory. Please see these commits for the inital changes and changes locations for modal logic.

Ajax Logic

The post data is stored this way:

  1. Post Name: Title of post
  2. Post Content: First block in description of post
  3. Post Learner URL: Custom field 'moduleLearnerURL' of individual post
  4. Post Editor URL: Custom field 'moduleEditorURL' of individual post
  5. Post Image: Featured image of post. Backup URL is stored in the custom field of 'moduleImageURL' of individual post
  6. Remix/Click Counter: Custom field 'remixCounter' of individual post

The calls to get data for each post are built by changing the original plugin's ajax calls to get the light gallery's image data to an GET request to WordPress's REST API to get post data and then render that data in the modal instead.

The GET request for a post's data upon opening its modal is in the assets/js/frontend directory. Please see these commits for the initial changes and changes locations for modal logic. Please see the WordPress REST API docs for more information on the requests being used.

Remix Counter

For remix counter logic, remix count from the GET request of opening up a modal is used to display the count. However, another GET request to get the count is made again when the remix button is actually clicked (to prevent miscount if others remixed the same module at the same time). Then, a POST request to the php backend triggered a WordPress function that increments the module/post's remixCounter custom field. See this commit for the original implementation.

Grid Styling

Grid styling logic is in the assets/css directory. Please see these commits for the initial changes and changes locations for grid styling logic.

WordPress Plugin Options

For the marketing/business team's convenience , significant changes to the plugin should be reflected in the WordPress plugin options if possible. For example, changing a certain template to fit our use case should also have its template preview and name changed, and made visible in the plugin's WordPress options/settings to minimise potential confusion.
This logic is in the assets/js/backend directory, the grid-plus.php file and other locations. Please see these commits for the initial changes and changes locations for WordPress plugin options logic.

Other things to note

Deploying to WordPress

Zip the repo into a single folder named 'grid-plus.9.9.9' and add it to WordPress as a new plugin. Alternatively, for minor changes/ changes to only a few files, you can change the plugin code on WordPress directly through 'Plugins -> 'Plugin Editor'.







Start of original plugin docs

Plugin Docs

=== Grid Plus - Unlimited grid layout === Contributors: g5theme Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2CPAKYLULL2KG Tags: gallery, grid layout, masonry layout, metro layout, carousel layout, woocommerce, ecommerce, custom post type Requires at least: 4.5 Tested up to: 5.5.0 Stable tag: 9.9.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html

Grid Plus is a WordPress plugin which allows you create unlimited layout and display all post types in a fully customizable.

== Description ==

Main Site | Demo | Docs | Premium Version

Create unlimited layout and display all post types.

Grid Plus is a WordPress grid plugin which allows you create unlimited layout and display all post types in a fully customizable and responsive grid system. It is perfectly suited for displaying your blog, portfolio, e-commerce or any kind of Wordpress post type.

[youtube https://www.youtube.com/watch?v=CUOywQAadzU]

Grid Plus features

Demo

Video how to

  1. How to create grid layout. [youtube https://www.youtube.com/watch?v=tj7sgE8jBOw]
  2. How to create masonry layout. [youtube https://www.youtube.com/watch?v=L0eMag7j9z8]
  3. How to create carousel layout. [youtube https://www.youtube.com/watch?v=nhUbzv7CAvw]
  4. How to create metro layout. (Pro Feature) [youtube https://www.youtube.com/watch?v=CUOywQAadzU]
  5. How to import & export layout. (Pro Feature) [youtube https://www.youtube.com/watch?v=VF62jDNKnp0]
  6. How to manage image and video. [youtube https://www.youtube.com/watch?v=O0vDi5lYuI0]

Become a Premium user

Grid Plus has a Premium version which comes with several additional benefits.

  • Import & Export: You can export grid layout from another site and import to new site easy
  • Unlimited Layout: include layout builder for Metro layout

  • More item skin

View more Premium features

== Installation ==

Installing the plugin

  1. In your WordPress admin panel, go to Plugins > New Plugin, search for Grid Plus and click "Install now"
  2. Alternatively, download the plugin and upload the contents of grid-plus.zip to your plugins directory, which usually is /wp-content/plugins/.
  3. Activate the plugin

[youtube https://www.youtube.com/watch?v=jfVihKHTX9o]

== Frequently Asked Questions ==

More documentation

More detailed documentation can be found in the Grid Plus knowledge base.

== Screenshots ==

  1. Grid Plus: Manage grid layout.
  2. Grid Plus: Grid config in add grid layout screen.
  3. Grid Plus: Choice data source in add grid layout screen.
  4. Grid Plus: Choice pagination type in add grid layout screen.
  5. Grid Plus: Choice animation effect in add grid layout screen.
  6. Grid Plus: Choice item skin in add grid layout screen.
  7. Grid Plus: Choice color and add custom css in add grid layout screen.
  8. Grid Plus: Layout builder in add grid layout screen.

== Changelog ==

1.3.2 - November 22, 2020

** Fix error page not found when preview page

1.3.1 - October 22, 2020

** Fix meta box with WordPress 5.5

1.3.0 - August 28, 2020

** Fix color picker alpha with WordPress 5.5

1.2.9 - November 09, 2019

**Fix display excerpt for html format

1.2.8 - Oct 18, 2019

Add: View video for attachment

1.2.7 - Oct 14, 2019

Add: Options to decide load image with thumbnail or full

1.2.6 - Oct 07, 2019

Fixed error loading Grid Stack

1.2.5 - May 18, 2019

Fixed error conflict script clipboard with wordpress 5.0

1.2.4 - November 24, 2018

Fixed Loading Information do not stop when Edit Grid Plus Shortcode

1.2.3 - November 21, 2018

Fixed conflict js library between Underscore and Lodash Fixed Color picker on "Color & CSS" tab

1.2.2 - September 07, 2018

Updated: Allow Choose media items on Data Source tab Fixed and Updated: Some css and js file Fixed Show all on Data Source tab

1.2.1 - June 04, 2018

Updated: Allow Choose Page as post type in Data Source tab Updated: Allow Choose exact posts in Data Source tab

1.2.0 - February 08, 2018

Fixed color picker on Wordpress newest version 4.9.4

1.1.9 - September 29, 2017

Updated: Fixed some warning when check in validator.w3.org

1.1.8 - June 24, 2017

Updated: Compatible with Wordpress 4.8 Updated: Allow download image in lightbox popup Fixed: Some css attributes

1.1.7 - June 02, 2017

Fixed: Fix category filter Fixed: Fix re-generate layout error

1.1.6 - May 06, 2017

Fixed: Fix "orderby" error

1.1.5 - May 04, 2017

Fixed: Fix "Show all" error Fixed: Fix Import Grid

1.1.4 - April 25, 2017

Fixed: Fix conflicts with tabs, accordions Added: Allow select show category filter multi line

1.1.3 - April 20, 2017

Fixed: View image on click icon gallery

1.1.2 - April 14, 2017

Fixed: Calculate the image size on mobile

1.1.1 - April 12, 2017

Fixed: Crop image size Remove "boostrap" from lib Fixed: Expanded category filter

1.1.0 - April 10, 2017

Added: Allow "disable link" to item detail Added: Add "Thumnail Only" for Skins Fixed: Gutter layout masonry

1.0.9 - April 01, 2017

Added: View gallery attachment by item index Fixed: Fix pagination, category filter on mobile, tablet

1.0.8 - March 31, 2017

Added: Add "None" for item animation option Added: Save when pressing "ctrl + s" Fixed: Tooltip error in woocommerce Fixed: Re-style for woocommerce skin Fixed: for selecting total item show all Update: optimized js Added: maintain the "active element" status while running ajax Fixed: Handling "owl-carousel" conflict between plugin and theme Added: Allow to select grid from editor

1.0.7 - March 31, 2017

Update & Fixed: Allow crop image by size Added: Add some color attributes in Back-end Added: Allow link to item detail on thumbnail click Update: Re-style some css attributes Fixed: Re-init paging navigation after click on Category filter item Update: Auto-narrow category when too long Update: Change style for dots, nav in Carousel layout

1.0.6 - March 23, 2017

Update order category filter

1.0.5 - March 06, 2017

Fix filter category for post-type media Add skin for woocommerce Add dynamic crop image size

1.0.4 - March 04, 2017

Fix warning post format-ui when theme not define post-format

1.0.3 - February 27, 2017

Add woocommerce skin

1.0.2 - February 21, 2017

Add media skin

1.0.1 - February 20, 2017

update function gf_enqueue_custom_css

1.0.0 - February 17, 2017

Initial version