Viewing 10 replies - 1 through 10 (of 10 total)
  • Same here.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Does it work on the front page when using one of the default themes?

    Doesn’t work in 2015.

    I find the front-end feature/bury links are good for testing out formatting alternatives, but that’s about it. (Also, on that note, giving them the class “featured” means that formatting applied to the comment will get applied to them – which isn’t really desirable.)

    (I meant, doesn’t work with theme “2015” – for all I know it also doesn’t work in the year 2015, but I haven’t been playing with it all year ?? )

    Plugin Contributor Pippin Williamson

    (@mordauk)

    i’ll take a look at this next week and see if I can resolve it.

    I look forward to it. At some point I might also like to discuss whether you would like to consider a set of enhancements to the plug-in that I am working on, or would just as well have me fork your work as a new plug-in acknowledging and building on what you and predecessors have done.

    hmmm: Just on the small chance of any confusion: The feature/bury links don’t work on the “front end.” They wouldn’t appear at all on the “front page” of a typical installation.

    I take it no progress on this problem?

    Am now looking to putting up an “Extraordinary Comments” widget that will add excerpts, a randomized selection feature, and an archive to Featured Comments. Would be great if FC actually worked fully. The other alternative would be to try to solve the problem myself (despite my inferior Java/Ajax skills), or to release a fork of FC that didn’t offer it, but included these features as well as other tweaks. Do you have an available copy of an earlier/was surely working version, or are front-end featuring features unchanged in all respects over numerous in-use versions?

    I think the problem with the front page not saving was some mistake in implementation of the nonce.

    The following simple change to feature-comments.php, beginning at line 175, did the trick, and now “front end featuring/burying” is working:

    /*
    			if( ! wp_verify_nonce( $_POST['nonce'], 'featured_comments' ) ) {
    				die;
    			}
    */

    While I was at it, I also changed the add_comment_meta’s and delete_comment_meta’s to update_comment_metas, though I don’t think it had anything to do with making the above change work.

    When I have some more time, I’ll look into properly implementing the nonce. I’m not sure it’s really necessary for a command available only to logged-in/qualified users. I also am planning sooner or later to make a version including the features mentioned above, and others, available in some form or fashion.

    After some more thorough testing, will be updating a fix that preserves the nonce as a pull request on GitHub. Also, I realized that the above change working depends on some other edits I’d made earlier.

    As the moment I have the following changes:

    First at line 214: https://github.com/pippinsplugins/Featured-Comments/commit/6d1ba5706d2796587aa6d8b7ce37f89629ab788b

    replace

    $output .= "<a class='feature-comments {$current_status} {$action}' data-do='{$action}' {$data_id} title='{$label}'>{$label}</a> ";

    with

    {
    $output .= "<a class='feature-comments {$current_status} {$action}' data-do='{$action}' {$data_id} data-nonce='" . wp_create_nonce( "featured_comments" ) . "' title='{$label}'>{$label}</a> ";
    }

    (the closing and ending brackets were added later, and aren’t strictly necessary)

    and replace lines 179 – 191 as shown here:

    https://github.com/pippinsplugins/Featured-Comments/commit/6c2a5a8206c002ba58e52ecba8d1099a10b7b60b

    As noted, not 100% tested – i.e., for effects of all changes on widgets and other particulars that maybe haven’t occurred to me yet and maybe someone else will turn up – but the above seems to solve the not saving “featured”/”unfeatured” and “buried”/”unburied” “meta” from front end, and also preserve the nonce functionality (although I’m not sure about utility of remaining die(wp_create_nonce…) code on line 194 – I THINK it maybe be irrelevant.

    It also makes it possible to both feature and bury the same comment. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Not working in frontpage’ is closed to new replies.