Custom mycred_link functionality?

Home Forums How-to Questions Custom mycred_link functionality?

This topic contains 3 replies, has 3 voices, and was last updated by  rpetitto 1 week, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #33058

    rpetitto
    Senior Member

    I’d love a way to have a “mycred_buttom”…like a link styled like a button that deducts points and triggers a custom php function. Any way to achieve this?

    #33066

    Explodingmule2
    Newbie

    You would need to use the log api http://codex.mycred.me/chapter-v/log-api/ im trying to work out something similar myself. Or use php sql and change the log that way, but I found it hard to grab the userid that way, so assume I need to use the api.

    #33078

    M
    Member

    Hi @rpetitto,

    You can either use the style attribute and style it as a button or quite symply wrap the shortcode around a button like so:
    [mycred_link href="http://www.merovingi.com"]<button>View portfolio</button>[/mycred_link]

    Cordially, M.

    #33082

    rpetitto
    Senior Member

    Thanks you two…my dilemma is that I want my button to also trigger a phone function. I think I have to use ajax? Not sure…have never done it before.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Last edited September 13, 2017