Forum Replies Created

Viewing 10 replies - 16 through 25 (of 25 total)
  • Plugin Author lienann

    (@lienann)

    Strangely… the changes did not affect the options page.

    Do you have any errors or warnings?

    Is plugin active after update?
    Can you remove the plugin and install it again (if you want to save data – first remove file uninstall.php from plugin’s folder)?

    Plugin Author lienann

    (@lienann)

    The problem in ACF SRF, that uses admin_enqueue_scripts action to setup cookes.

    _wp_admin_html_begin() (in template.php) send http headers (if output buffering is not working).
    All cookies must be set before the HTML header is sent, but
    admin_enqueue_scripts action called after _wp_admin_html_begin(),
    that is why warning appears.

    I fixed it in 1.0.1 version. Please, check update, when you’ll have time.

    Plugin Author lienann

    (@lienann)

    Thanks, you too!

    Plugin Author lienann

    (@lienann)

    Thank you for help!
    In the plugin I’m using the standard WP jQuery library, activating it through wp_enqueue_script
    (https://github.com/lienann/acf-starrating/blob/master/acf-starrating.php line 121).
    Am I right think, that you use non standart version of jQuery in the theme, due to which there is a library conflict?
    Could you write me theme name (if it available in the internet) or used jQuery library version? I would like to test my plugin compatibility more detail (other users may have same problem(( ).
    My e-mail: lienann@yandex.ru

    Plugin Author lienann

    (@lienann)

    Do you have a time to investigate the problem? Can we discuss the problem via skype, e-mail or other way?

    Plugin Author lienann

    (@lienann)

    Can I ask you to change FIELD_NAME to FIELD_KEY, and test a results?
    Like this: <?php the_field('FIELD_KEY', $post->ID); ?>
    I would really like to understand a problem.

    Plugin Author lienann

    (@lienann)

    Hi, mgris

    Thank you for your feedback.

    1) Can show the code used for Star “Rating Field” in your site template ?

    2) Do you use http or https on your site ?

    Plugin Author lienann

    (@lienann)

    Thank you.
    If you have any more ideas or suggestions on how to improve the work of the plugin, please do not hesitate to write about them. I will try to include them in the next releases.

    Plugin Author lienann

    (@lienann)

    Honestly when I created the plugin, I had not thought about sorting (I forgot about it and I didn’t want to create a lot of fields) ((. In the next release, I planned to think about adding fields in the “meta” tables.
    Now there are two ways to sort the data (they both are not good):
    1. Sort the data array after loading from the database.
    2. The use of the filter posts_order (with MYSQL string functions). Example:

    <?php
    // WP_Query:
    $args = array(
        'post_type'     => 'ideas',
        'meta_key'      => 'ideas_rating',
        'numberposts'   => '-1'
        );
    
    add_filter( 'posts_orderby', 'filter_rating_query');
    $query      = new WP_Query;
    $my_posts   = $query->query($args);
    remove_filter( 'posts_orderby', 'filter_rating_query');
    
    foreach( $my_posts as $my_post ){
    
        print $my_post->post_title;
        the_field( 'ideas_rating', $my_post->ID );
    
    }
    
    // Filter function:
    function filter_rating_query( $query ) {
    
        global $wpdb;
        $query = ' SUBSTRING_INDEX(SUBSTRING_INDEX(REPLACE(' . $wpdb->postmeta . '.meta_value, \'\"\', \'\'), \';s:5:votes\', 1), \':\', -1) DESC';
        return $query;
    
    }
    ?>

    Plugin Author lienann

    (@lienann)

    Yes, you’re right.
    Administrator access level and default post access level = 100.
    You can set access level for user/post from 1 to 100.

    Guest access level = 0.
    At this time there is a limitation, due to which it is impossible to provide access for unauthorized users.
    I did not discribe it in readme. Sorry. I will fix it.
    In next release I can add the possibility to set “Guest access level” = 1, to make public access to some post possible.

    Now in plugin settings you can select types of posts, access control by level for which will be applied.
    For example, you can control access by level for pages, but posts to make available to all.

    This plugin is useful in special case, when role security model is difficult to use(awkward?) and “access by level” is preferred.
    I wrote it for private school where access to learning materials provided not at once, but only after completing the previous lessons. Step by step, lesson by lesson, teacher controls the ability to download next learning materials by increment the user level.

Viewing 10 replies - 16 through 25 (of 25 total)