Plugin Directory

Changeset 848470


Ignore:
Timestamp:
01/30/2014 08:03:59 PM (12 years ago)
Author:
shauno
Message:

2.7.1 - added code to flush the NGG displayed gallery cache when a vote is saved

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

Legend:

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

    r827445 r848470  
    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
     6Version: 2.7.1
    77Author: Shaun Alberts
    88Author URI: http://shauno.co.za
    99*/
    1010/*
    11 Copyright 2013  Shaun Alberts  (email : [email protected])
     11Copyright 2014  Shaun Alberts  (email : [email protected])
    1212
    1313This program is free software; you can redistribute it and/or modify
     
    701701                    //TODO 2.0, consider using wpdb insert methods
    702702                    if($wpdb->query('INSERT INTO '.$wpdb->prefix.'nggv_votes (id, pid, gid, vote, user_id, ip, proxy, dateadded) VALUES (null, 0, "'.$wpdb->escape($config['gid']).'", "'.$wpdb->escape($config['vote']).'", "'.$current_user->ID.'", "'.$ip['ip'].'", "'.$ip['proxy'].'", "'.date('Y-m-d H:i:s', time()).'")')) {
     703                        C_Photocrati_Cache::flush('displayed_gallery_rendering'); //clear the entire 'displayed_gallery_rendering' cache (cache implemented from ngg 2.0.40). todo, try figure out the transient id, and clear the specific one
    703704                        return true;
    704705                    }else{
     
    744745                    $ip = $this->getUserIp();
    745746                    if($wpdb->query("INSERT INTO ".$wpdb->prefix."nggv_votes (id, gid, pid, criteria_id, vote, user_id, ip, proxy, dateadded) VALUES (null, 0, '".$wpdb->escape($config["pid"])."', '".$wpdb->escape($criteriaId)."', '".$wpdb->escape($config["vote"])."', '".$current_user->ID."', '".$ip["ip"]."', '".$ip["proxy"]."', '".date("Y-m-d H:i:s", time())."')")) {
     747                        C_Photocrati_Cache::flush('displayed_gallery_rendering'); //clear the entire 'displayed_gallery_rendering' cache (cache implemented from ngg 2.0.40). todo, try figure out the transient id, and clear the specific one
    746748                        return true;
    747749                    }else{
  • nextgen-gallery-voting/trunk/readme.txt

    r827445 r848470  
    44Tags: nextgen-gallery, nextgen, gallery, voting, rating, ratings, nextgen-gallery-voting
    55Requires at least: 2.9.1
    6 Tested up to: 3.8
    7 Stable tag: 2.7
     6Tested up to: 3.8.1
     7Stable tag: 2.7.1
    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.1 =
     81* Patch to flush the NextGEN Gallery display template cache when vote is saved, so vote shows on next page refresh
    7982
    8083= 2.7 =
     
    215218== Upgrade Notice ==
    216219
     220= 2.7.1 =
     221Added code to flush the NextGEN Gallery display template cache when vote is saved, so vote shows on next page refresh
     222
    217223= 2.7 =
    218224Fixed gallery voting on NGG v2.x. Also added code to make NGG Voting work with NGG Public Uploader
Note: See TracChangeset for help on using the changeset viewer.