Plugin Directory

Changeset 883545


Ignore:
Timestamp:
03/28/2014 01:32:00 PM (12 years ago)
Author:
shauno
Message:

Change NGG template cache invalidation to use built in NGG methods, not hack of disabling the class used from 2.7.2

Location:
nextgen-gallery-voting
Files:
34 added
2 edited

Legend:

Unmodified
Added
Removed
  • nextgen-gallery-voting/trunk/ngg-voting.php

    r883525 r883545  
    44Plugin URI: http://shauno.co.za/wordpress/nextgen-gallery-voting/
    55Description: This plugin allows you to add user voting and rating to NextGEN Galleries and Images
    6 Version: 2.7.3
     6Version: 2.7.4
    77Author: Shaun Alberts
    88Author URI: http://shauno.co.za
     
    123123        */
    124124       
    125         add_action('load_nextgen_gallery_modules', array(&$this, 'nggLoadModules'));
     125        //add_action('load_nextgen_gallery_modules', array(&$this, 'nggLoadModules'));
     126        add_filter('ngg_displayed_gallery_cache_params', array(&$this, 'set_voting_cache_params'));
    126127       
    127128        add_action('init', array(&$this, 'wpInit'));
     
    814815       
    815816        //remove NGG's caching, as we are adding user's dynamic content to the gallery templates
     817        //deprecated
    816818        function nggLoadModules($registry) {
    817819            if(class_exists('C_Photocrati_Cache')) {
     
    819821            }
    820822        }
    821     // }
     823       
     824        //invalidate the cache every mirco second. Too many variables about serving the cache to try worry about it for now
     825        function set_voting_cache_params($arr) {
     826            $arr['nggvoting_time'] = microtime(); //will invalidate the cache every request
     827           
     828            return $arr;
     829        }
     830  // }
    822831   
    823832    // Admin Functions {
  • nextgen-gallery-voting/trunk/readme.txt

    r883525 r883545  
    55Requires at least: 2.9.1
    66Tested up to: 3.8.1
    7 Stable tag: 2.7.3
     7Stable tag: 2.7.4
    88
    99Adds the ability for users to vote and rate your NextGEN Images. Simple options give you the ability to limit who can vote on what.
     
    7777
    7878== Changelog ==
     79
     80= 2.7.4 =
     81* Quick hack to invalidate the NGG template cache using the built in NGG functions.
    7982
    8083= 2.7.3 =
     
    224227== Upgrade Notice ==
    225228
     229= 2.7.4 =
     230Changed NGG template cache invalidation to use built in NGG method instead of massive hack used in 2.7.2
     231
    226232= 2.7.3 =
    227233Voting options have been restored in "Manage Gallery" screens in NGG >= 2.0.57.
Note: See TracChangeset for help on using the changeset viewer.