Forum Replies Created

Viewing 15 replies - 1 through 15 (of 26 total)
  • Thread Starter Loc Pham

    (@phamdacloc)

    Actually it already exist in posts-pages.php

    do_action(“vortex_post_dislike”,’+likes’,’nothing’,$current_user_id,$post_id);

    Thread Starter Loc Pham

    (@phamdacloc)

    Thank you Justin. Your support is very much appreciated.

    Thread Starter Loc Pham

    (@phamdacloc)

    Jason, Can you think of any other places where token expiration may get set? refresh_token_lifetime doesn’t seem to work when I tested.
    Thanks.

    Thread Starter Loc Pham

    (@phamdacloc)

    Hi Justin,
    I upgraded to 3.1.9 and see no difference on the expiration of access_token. I had to login again after it expire to continue using my application.

    Thread Starter Loc Pham

    (@phamdacloc)

    Hey Justin,
    No, I was at 3.1.8 but let me upgrade to 3.1.9 and run for a few hours to see if my token expires. I’ll keep you posted.

    Thanks

    Thread Starter Loc Pham

    (@phamdacloc)

    Humm, I think we’re missing some other variables because I changed the above to 'refresh_token_lifetime' => 99999999 inside class-wo-api.php and my token still expires.

    Thread Starter Loc Pham

    (@phamdacloc)

    Hi Justin,
    I set access_lifetime to 999999999 in both AccessToken.php and Server.php but my token still expires after an hour. Can you think of any other places I must make changes to?

    Thanks

    Thread Starter Loc Pham

    (@phamdacloc)

    This is fabulous. I saw there are two places where access_lifetime was set (AccessToken.php and Server.php). I went ahead and set access_lifetime in AccessToken.php to a very large number 999999999. Is this the only place I need to make the change?

    Thread Starter Loc Pham

    (@phamdacloc)

    It works great. Thank you very much.

    There’s no option to “unvote” with the current version that I see. So even if the user hide dislike button, there’s no way for the user to undo their decision.

    It’d would be great if this plugin allows us to choose to display the number of likes and dislikes just like YouTube. For example: Likes (10K) Dislike (2k)

    Thread Starter Loc Pham

    (@phamdacloc)

    Fantastic, looking to see your update. Thanks.

    Thread Starter Loc Pham

    (@phamdacloc)

    Will you include a fix in your next version and do you have a rough estimate of when it’d be available? Thanks.

    Thread Starter Loc Pham

    (@phamdacloc)

    Many thanks. I got it working now. ??

    The code doesn’t work as expected. I’m getting posts instead of topics in returned. I created a new REST endpoint using the following code and received the unexpected results as below:

    add_action( 'rest_api_init', function () {
        register_rest_route( 'bbpress_ext/v1', '/test1', array(
            'methods' => 'GET',
            'callback' => 'ldp_test1',
        ) );
    } );
    
    function ldp_test1( $request ) {
    	$best_rated_topics_args = array(
    	  'post_type'       => bbp_topic_post_type(), //or 'topic'
    	  'posts_per_page'  => 5,
    	  'vote_sort'       => 'score_desc' //plugin
    	);
    
    	$best_rated_topics = new WP_Query( $best_rated_topics_args );
    
    	return $best_rated_topics;
    }

    Executing the endpoint yielded "post_type": "post" instead of "post_type": "topic"

    {
      "query": {
        "post_type": null,
        "posts_per_page": 5,
        "vote_sort": "score_desc"
      },
      "query_vars": {
        "post_type": "",
        "posts_per_page": 5,
        "vote_sort": "score_desc",
        "error": "",
        "m": "",
        "p": 0,
        "post_parent": "",
        "subpost": "",
        "subpost_id": "",
        "attachment": "",
        "attachment_id": 0,
        "name": "",
        "static": "",
        "pagename": "",
        "page_id": 0,
        "second": "",
        "minute": "",
        "hour": "",
        "day": 0,
        "monthnum": 0,
        "year": 0,
        "w": 0,
        "category_name": "",
        "tag": "",
        "cat": "",
        "tag_id": "",
        "author": "",
        "author_name": "",
        "feed": "",
        "tb": "",
        "paged": 0,
        "comments_popup": "",
        "meta_key": "",
        "meta_value": "",
        "preview": "",
        "s": "",
        "sentence": "",
        "fields": "",
        "menu_order": "",
        "category__in": [],
        "category__not_in": [],
        "category__and": [],
        "post__in": [],
        "post__not_in": [],
        "tag__in": [],
        "tag__not_in": [],
        "tag__and": [],
        "tag_slug__in": [],
        "tag_slug__and": [],
        "post_parent__in": [],
        "post_parent__not_in": [],
        "author__in": [],
        "author__not_in": [],
        "ignore_sticky_posts": false,
        "suppress_filters": false,
        "cache_results": true,
        "update_post_term_cache": true,
        "update_post_meta_cache": true,
        "nopaging": false,
        "comments_per_page": "50",
        "no_found_rows": false,
        "order": "DESC"
      },
      "tax_query": {
        "queries": [],
        "relation": "AND",
        "queried_terms": [],
        "primary_table": "wp_posts",
        "primary_id_column": "ID"
      },
      "meta_query": {
        "queries": [],
        "relation": null,
        "meta_table": null,
        "meta_id_column": null,
        "primary_table": null,
        "primary_id_column": null
      },
      "date_query": false,
      "request": "SELECT SQL_CALC_FOUND_ROWS  wp_posts.ID FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'closed')  ORDER BY wp_posts.post_date DESC LIMIT 0, 5",
      "posts": [
        {
          "ID": 37,
          "post_author": "1",
          "post_date": "2008-09-11 22:20:17",
          "post_date_gmt": "2008-09-12 03:20:17",
          "post_content": "Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo. Fusce in est. Sed nec diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque semper nibh eget nibh. Sed tempor. Fusce erat.\n\n<h3>An Ordered List</h3>\n\n<ol>\n<li>Vestibulum in mauris semper tortor interdum ultrices.</li>\n<li>Sed vel lorem et justo laoreet bibendum. Donec dictum.</li>\n<li>Etiam massa libero, lacinia at, commodo in, tincidunt a, purus.</li>\n<li>Praesent volutpat eros quis enim blandit tincidunt.</li>\n<li>Aenean eu libero nec lectus ultricies laoreet. Donec rutrum, nisi vel egestas ultrices, ipsum urna sagittis libero, vitae vestibulum dui dolor vel velit.</li>\n</ol>",
          "post_title": "A Post With an Ordered List",
          "post_excerpt": "",
          "post_status": "publish",
          "comment_status": "open",
          "ping_status": "open",
          "post_password": "",
          "post_name": "a-post-with-an-ordered-list",
          "to_ping": "",
          "pinged": "",
          "post_modified": "2008-09-11 22:20:17",
          "post_modified_gmt": "2008-09-12 03:20:17",
          "post_content_filtered": "",
          "post_parent": 0,
          "guid": "https://dev.danphilibin.com/wordpress/?p=55",
          "menu_order": 0,
          "post_type": "post",
          "post_mime_type": "",
          "comment_count": "1",
          "filter": "raw"
        },
        {
          "ID": 5,
          "post_author": "1",
          "post_date": "2008-08-02 19:52:26",
          "post_date_gmt": "2008-08-03 00:52:26",
          "post_content": "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed eleifend urna eu sapien. Quisque posuere nunc eu massa. Praesent bibendum lorem non leo. Morbi volutpat, urna eu fermentum rutrum, ligula lacus interdum mauris, ac pulvinar libero pede a enim. Etiam commodo malesuada ante. Donec nec ligula. Curabitur mollis semper diam. <!--more-->\n\nDuis viverra nibh a felis condimentum pretium. Nullam tristique lacus non purus. Donec vel felis. Etiam et sapien. Pellentesque nec quam a justo tincidunt laoreet. Aenean id enim. Donec lorem arcu, eleifend venenatis, rhoncus mollis, semper at, dui. Praesent velit tellus, adipiscing et, blandit convallis, dictum at, dui. Integer suscipit tortor in orci. Phasellus consequat. Quisque dictum convallis pede.\n\nMauris viverra scelerisque mauris. Nulla facilisis, elit malesuada pretium egestas, dolor arcu commodo est, at egestas massa tortor ut ante. Etiam eget libero. Aenean pretium, tellus sed sodales semper, turpis purus aliquet orci, pulvinar ornare odio tortor sit amet dui.\n\nAenean id orci. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus magna. Mauris tincidunt iaculis enim. Duis a mi vitae sapien dapibus tincidunt. Proin metus.\n\nProin cursus, libero non auctor faucibus, urna mi vestibulum orci, sit amet fermentum nibh purus eget enim. Aenean aliquet ligula nec nulla. Praesent sit amet lorem vitae massa hendrerit auctor. Sed sit amet urna. Aenean sapien nunc, imperdiet a, pharetra in, consequat eu, neque. Phasellus vel sem gravida augue consequat tempor. Curabitur eget mauris at pede varius facilisis.\n\nMorbi ut sapien. Morbi arcu mauris, suscipit congue, placerat sit amet, suscipit a, ante. Donec aliquet dui ac nunc. Mauris magna quam, aliquet quis, viverra eu, fringilla eget, purus. Donec tristique pretium sem.",
          "post_title": "A Simple Post with Text",
          "post_excerpt": "",
          "post_status": "publish",
          "comment_status": "open",
          "ping_status": "open",
          "post_password": "",
          "post_name": "a-simple-post-with-text",
          "to_ping": "",
          "pinged": "",
          "post_modified": "2008-08-02 19:52:26",
          "post_modified_gmt": "2008-08-03 00:52:26",
          "post_content_filtered": "",
          "post_parent": 0,
          "guid": "https://dev.danphilibin.com/wordpress/?p=22",
          "menu_order": 0,
          "post_type": "post",
          "post_mime_type": "",
          "comment_count": "0",
          "filter": "raw"
        }
      ],
      "post_count": 2,
      "current_post": -1,
      "in_the_loop": false,
      "post": {
        "ID": 37,
        "post_author": "1",
        "post_date": "2008-09-11 22:20:17",
        "post_date_gmt": "2008-09-12 03:20:17",
        "post_content": "Nulla sagittis convallis arcu. Sed sed nunc. Curabitur consequat. Quisque metus enim, venenatis fermentum, mollis in, porta et, nibh. Duis vulputate elit in elit. Mauris dictum libero id justo. Fusce in est. Sed nec diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque semper nibh eget nibh. Sed tempor. Fusce erat.\n\n<h3>An Ordered List</h3>\n\n<ol>\n<li>Vestibulum in mauris semper tortor interdum ultrices.</li>\n<li>Sed vel lorem et justo laoreet bibendum. Donec dictum.</li>\n<li>Etiam massa libero, lacinia at, commodo in, tincidunt a, purus.</li>\n<li>Praesent volutpat eros quis enim blandit tincidunt.</li>\n<li>Aenean eu libero nec lectus ultricies laoreet. Donec rutrum, nisi vel egestas ultrices, ipsum urna sagittis libero, vitae vestibulum dui dolor vel velit.</li>\n</ol>",
        "post_title": "A Post With an Ordered List",
        "post_excerpt": "",
        "post_status": "publish",
        "comment_status": "open",
        "ping_status": "open",
        "post_password": "",
        "post_name": "a-post-with-an-ordered-list",
        "to_ping": "",
        "pinged": "",
        "post_modified": "2008-09-11 22:20:17",
        "post_modified_gmt": "2008-09-12 03:20:17",
        "post_content_filtered": "",
        "post_parent": 0,
        "guid": "https://dev.danphilibin.com/wordpress/?p=55",
        "menu_order": 0,
        "post_type": "post",
        "post_mime_type": "",
        "comment_count": "1",
        "filter": "raw"
      },
      "comment_count": 0,
      "current_comment": -1,
      "found_posts": "2",
      "max_num_pages": 1,
      "max_num_comment_pages": 0,
      "is_single": false,
      "is_preview": false,
      "is_page": false,
      "is_archive": false,
      "is_date": false,
      "is_year": false,
      "is_month": false,
      "is_day": false,
      "is_time": false,
      "is_author": false,
      "is_category": false,
      "is_tag": false,
      "is_tax": false,
      "is_search": false,
      "is_feed": false,
      "is_comment_feed": false,
      "is_trackback": false,
      "is_home": true,
      "is_404": false,
      "is_comments_popup": false,
      "is_paged": false,
      "is_admin": false,
      "is_attachment": false,
      "is_singular": false,
      "is_robots": false,
      "is_posts_page": false,
      "is_post_type_archive": false,
      "thumbnails_cached": false
    }

    I have the exact same problem using bbPress. When I click on the topic, all the replies also got ‘liked’ after page reload. It’d be great to know if there’s a workaround in the interim before there’s a solution.

    Thanks.

Viewing 15 replies - 1 through 15 (of 26 total)