Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

refresh button

i want to add refresh button. only to renew the last post. please help me.

Comments

  • hgtonighthgtonight ∞ · New Moderator

    Thanks for trying my addon!

    The module in the panel should refresh itself on a set interval. Is this not happening?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight i want button, click and refresh

  • hgtonighthgtonight ∞ · New Moderator

    There is one included, but it looks different on each platform to fit in with the native look and feel. On my platform it looks like this:

    If you really want a button on the panel, add your markup and then add a handler to call the GetLatestPosts function in JS.

    Sample Markup:

    // Replaces lines 74-79 of `/plugins/LatestPostList/modules/class.latestpostlistmodule.php`
    if($this->_Link) {
      echo Wrap(Anchor(T('Latest Posts'), $this->_Link) . '<a class="RefreshButton Hidden" href="#">↻</a>', 'h4');
    }
    else {
      echo Wrap(T('Latest Posts') . ' <a class="RefreshButton Hidden" href="#">↻</a>', 'h4');
    }
    

    Sample JS:

    // Placed right before the last `});` in `/plugins/LatestPostList/js/latestpostlist.js`
    $('.RefreshButton').removeClass('Hidden');
    $('.RefreshButton').click(GetLatestPosts);
    

    Feel free to style .RefreshButton how ever you would like with your custom.css sheet.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight thank you soo muchh

Sign In or Register to comment.