WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
[resolved] A couple things. Tags and values on buy cred (18 posts)

  1. dambacher
    Member
    Posted 1 year ago #

    Hi Gabriel, just noticed a couple things.

    It looks like the tags are not being parsed.

    e.g. When I am not logged in, I get the log in to purchase link. When I click the link, the url looks like this:

    test-my-cred/%login_url_here%

    Then when I do log in, the page says this:
    You do not have enough %plural% to buy access to this Post.

    It seems the code for the tags is not being run.

    Also, the Buycred minimum points value not being saved

    Thanks

    http://wordpress.org/extend/plugins/mycred/

  2. dambacher
    Member
    Posted 1 year ago #

    Actually it looks like none of the settings are being saved in the buyCRED settings.

  3. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Really appreciate you taking the time to report this. I see where I went wrong in my line of thought. 1.0.2 is up and fixes this (and some other things I found myself).

  4. dambacher
    Member
    Posted 1 year ago #

    No problem, glad to help.

    It looks like the buyCRED setting are now being saved, but I'm still getting:

    "You do not have enough %plural% to buy access to this Post."

    i.e. it still seems like the tags are not being parsed.

    Thanks

  5. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Ah thats the Sell Content Add-on, let me have a look

  6. dambacher
    Member
    Posted 1 year ago #

    Ah, yes indeed.

    Odd, it looks like the %post_type% tag is being parsed fine because I get the correct language on the page, in this instance "Post"

  7. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah the problem is that I forgot to include to parse the general template tags. It was only parsing the post.

  8. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    I will wait a few before updating to 1.0.3, just in case some more bugs are found.

  9. dambacher
    Member
    Posted 1 year ago #

    Is there a quick fix to this?

    Thanks

  10. dambacher
    Member
    Posted 1 year ago #

    They were not added in mycred-funtions.php template_tags_post function?

    Thanks

  11. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    In mycred/addons/sell-content/myCRED-addon-sell-content.php insert the following:
    $template = $this->core->template_tags_general( $template );

    On line 563 after: $template = str_replace( '%price%', $this->core->format_creds( $prefs['price'] ), $template ); and
    on line 575 after: $template = $this->get_button( $template, $GLOBALS['post'] );
    and on line 591 after $template = str_replace( '%price%', $this->core->format_creds( $prefs['price'] ), $template );

  12. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Missed your message while typing. You are correct, it would be far more logical to just include it there.

  13. dambacher
    Member
    Posted 1 year ago #

    Ok, I'll look for the update when it's ready. :-)

    Thanks for your help.

  14. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    done

  15. dambacher
    Member
    Posted 1 year ago #

    I see. I was about to start adding them to the mycred-funtions but you're too fast :-)

    Thanks man, looks great!

  16. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Im trying to be as fast as I can but I will admit this is my first WordPress hosted plugin and I am new to the SVN thingy.

  17. dambacher
    Member
    Posted 1 year ago #

    Well, you're doing an amazing job Gabriel. Reading your docs now.

  18. dambacher
    Member
    Posted 1 year ago #

    Perfect

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.