Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)
  • Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Hi Michael, this is really close. I have it set up and and I’m able to retrieve submission IDs tied to particular achievements. However, it’s not tied to particular users. Here’s an example:

    I have an achievement (ID=344) and 2 subscribers, userA and userB. userA has submitted an submission to achievement 344 but userB has not. Using the function above, when logged in as userA and I’m able to retrieve submission data as expected. However, userB is seeing the same data, even though they haven’t submitted anything to achievement 344 yet.

    Is there a way to constrain this such that the submission ID returned is only for the logged in user’s ID?

    Thanks!

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Hi Michael, I’m very comfortable with custom functions. I regularly break into plugins and spin off custom versions of functions and shortcodes to better suit my needs. Let me know how I can help, your efforts are most appreciated.

    Once wrapped up I’ll share this with the community, along with the ACF custom data tie-in I have set up, as there are some really powerful things you can do with this setup (for this example we’ve set up a grading scale for submissions, tied to a custom “assignment” achievement type, which is really useful for academic purposes).

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Hi Michael, thanks for the note. I have a small number of achievements, 8, that I have displayed manually on a page. Under each, I want to present the user some of the custom data that I’m using ACF to store with their submission. To retrieve this for a particular user, I need to be able to return the ID of the submission for that user tied to that achievement. In wp-admin, when viewing submissions, I see the ID for the achievement that the submission is tied to, I need to be able to do the opposite in my front-end template.

    In this case, I’m not currently returning any of the default submission data, I just want the ID of the user’s submission tied to a particular achievement so I can use ACF to query the custom data.

    Does that help clarify?

    Excellent, that works. Many thanks!

    Is there a resolution to this issue? I’m experiencing it as well. Additionally, each time the achievement post is saved, any ampersands in the special character codes get rewritten and you start to get things like this:

    '

    Separate but related, does your “Congratulations” add-on offer a workaround for this or is the text sanitized the same way?

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    keesiemeijer, thanks so much, this is very close. It’s toggling the navigation properly and moving between posts and “pages”. The only odd thing is, when it hits a paginated post, it begins with the final “page”, backtracks to the first one, then on to the next post:

    post 1 > post 2 page 3 > post 2 page 2 > post 2 page 1, post 3…

    Can that piece of functionality be reversed to “next” go through the pages 1-n instead?

    Otherwise, this is fantastic!

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    I did not get this to work but I did get a workaround in place. I was able to set up has_term in my single template to determine whether the current post contained one of the terms I was looking to isolate and work that into a conditional statement to serve up code if so.

    Using my example case above, here’s some code that checks if the post contains the term “whitepaper” from my “resource_types” taxonomy:

    <?php if( has_term( 'whitepaper', 'resource_types' ) ) {
    echo 'some code here';
    } else {
    echo 'some other code here';
    } ?>
    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Hi Peter, it’s not working, neither with or without the function I referenced above.

    The link you provided applies to the taxonomy templates, these work as expected but apply to aggregate pages (archive listings of various posts assigned to terms). I’m looking to isolate a post by it’s term and apply a custom “single” template.

    The post is inheriting the single template for the post type (using the example above, a whitepaper is pulling single-resources.php) but variations of adding the term slug to the single template are not working.

    This isn’t supported by WordPress’s template hierarchy out of the box but I’m hoping a function can be put together to do so. I see several posts of folks looking to do the same and am happy to help devise a solution.

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    I ran this by my server host and it appears to have been an issue with ModSecurity blocking some plugins due to a pattern match (specifically an issue with jQuery’s Touch UI). I’m not entirely sure how or why this would have affected options-permalinks.php, but having them whitelist the specific IDs that were blocked has fixed the problem.

    I’ll post any follow up information to this thread, but to anyone else having this problem you may want to contact your server host/admin as it may not be something you can fix via WordPress or FTP.

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    I am, both off-the-shelf and custom. Are there any known conflicts or things I can check for?

    Where is your MySQL database hosted? I’d check that first to ensure it’s up and running. You should also verify the path and credentials to your MySQL database in your wp-config.php file. If it worked before then something has changed…

    If you can access your database, and the settings are correct in wp-config, then you can try reinstalling WordPress but I suspect this is a database, not WordPress, issue.

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Chip, thanks! This make sense and appears to be a solid solution to this problem. I’ve added the necessary code to my .htaccess file and will continue to monitor the situation.

    There is a more recent thread where a solution to this issue is evolving:

    http://wordpress.org/support/topic/spam-bypassing-comment-registration?replies=4#post-2111714

    Thread Starter Paul Whitener Jr.

    (@pwhitene)

    Hello, thanks for the reply but that’s not the issue. These are not spam bots that are registering, I’m monitoring my registrations closely and am using a double-opt in email verification to keep bots from gaining access.

    This issue is that bots are able to post comments without registering, which they should not be able to do since I’ve set it up in Settings > Discussion “User must be registered and logged in to comment.” How are they bypassing this? Thoughts? Bug?

    webaver’s fix worked for me as well. Are there any ramifications for implementing this patch?

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