• Resolved 3ring

    (@3ring)


    We’ve got two installation of the myCRED plugin, one for dev, and the other live.

    We’ve got identical pages for the leaderboard, with this shortcode for the template:

    [mycred_leaderboard number=”100″ template=”<span class=”leaderlist”> <span class=”leadername”><b>%display_name%</b></span> <span class=”leaderlink”>%user_name%</span> <span class=”leadercred”>$%cred_f%</span></span>”]

    Everything works on the dev site, but on the live site the html tags are getting stripped out, and the %user_name% variable is not getting displayed?

    We’re using WP 3.5.1.

    On the dev site we are running myCRED 1.0.9.3, but on the live site we upgrade to myCRED 1.1.1, BUT, when we saw this problem, we downgraded to 1.0.9.3, but still had the issue.

    Any suggestions?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hi 3ring.

    You can not pass HTML in the template variable! If you want to use HTML then wrap the shortcode around your template. (this way you can use shortcodes inside your template as well. Example:

    [mycred_leaderboard number="100"]
    <span class="leaderlist"> <span class="leadername"><b>%display_name%</b></span> <span class="leaderlink">%user_name%</span> <span class="leadercred">$%cred_f%</span></span>
    [/mycred_leaderboard]

    Now your site might work with sending html in shortcode variables but myCRED does not support this in any version.

    Plugin Author myCred

    (@designbymerovingi)

    Also, if you want to insert a link to a users profile, you could use the user_profile_link template tag.

    Thread Starter 3ring

    (@3ring)

    Thanks Gabriel! This works sweet. What’s really weird is that on our dev site the html DID work inside template??!

    Paul (muuver) 😉

    Plugin Author myCred

    (@designbymerovingi)

    Yeah, I had the same issue when building the shortcodes, hence why I decided to use the above solution instead. I think you can pass on HTML elements as long as you dont have any id=”” or class=”” in the element. Once you do, the parser could have issues differentiating between where the shortcode argument starts and ends.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘myCRED Leaderboard template stripping out html?’ is closed to new replies.