• Resolved eferwebscencia

    (@eferwebscencia)


    Hello,
    I am new to this, and hardly anything of php. Management with wordpress and I just made my first online community for which I used mycred. Complies great everything I need. Mycred is an amazing plugin. Congratulations.

    The only thing I need is a page that displays the score and rank ordered form of the top 100 ranking.

    Is to be inserted on the page the shortcode [mycred_leaderboard] and set its parameters.

    But first I have to include:

    MyCRED_Query_Rankings code: $ ranking = new myCRED_Query_Rankings ($ args);
    $ Ranking-> get_rankings ();
    $ Ranking-> result;
    and
    MYCRED_RANKINGS code: $ rankings = new myCRED_Rankings ($ args, $ result);
    echo $ rankings-> get_leaderboard ();

    I’ve done ye entered these codes in the last line of my theme functions.php. But it is dropped and the site does not work.

    My question is,

    Can you could explain me, step by step, where and how introduce myCRED_Query_Rankings and MYCRED_RANKINGS codes in wordpress?

    https://www.ads-software.com/plugins/mycred/

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

    (@designbymerovingi)

    Hey.

    Not sure if I am misunderstanding you but to show a leaderboard, you just need to use the mycred_leaderboard shortcode. To show top 100, you would need to add some attributes to the shortcode (just like any other shortcode).

    Your example would look like this:

    [mycred_leaderboard number="100"]

    Thats it. That shortcode should now return the top 100.

    There is no need to include any classes unless you are creating your own shortcode for some custom layout or functionalities. If that is the case, please let me know what you are actually trying to accomplish and I can help you further.

    Thread Starter eferwebscencia

    (@eferwebscencia)

    Thank you very much Gabriel. I find it amazing how you can respond so quickly and so well. Congratulations.

    Now I’ve followed your instructions but when I put the shortcode on a page get an error with the following message:
    — SoundManager 2 failed to load (security/load error) —
    soundManager.disable(): Shutting down
    soundManager: Failed to initialise.
    soundManager: Verify that ./soundmanager2_debug.swf is a valid path.
    soundManager: No Flash response within expected time. Likely causes: Loading soundmanager2_debug.swf may have failed (and/or Flash 8+ not present?), Flash blocked or JS-Flash security error.
    soundManager: Getting impatient, still waiting for Flash…
    soundManager::initMovie(): Waiting for ExternalInterface call from Flash..
    soundManager::initMovie(): Got EMBED element (created via JS)
    soundManager::createMovie(): Trying to load ./soundmanager2_debug.swf
    — SoundManager 2 V2.97a.20110123 (AS2/Flash 8), normal polling —

    Thread Starter eferwebscencia

    (@eferwebscencia)

    I have achieved my goal using the plugin Widgets On Pages that make me a shortcode to put on a page widget mycred Leaderboard.

    But I tested the shortcode [mycred_leaderboard] and it has been what I say in the previous post. I’ll inform you if you detect something that serves to improve.

    I do not require further assistance. Many, thank you very much.

    Plugin Author myCred

    (@designbymerovingi)

    Hi.

    I am not sure what those error messages are from but it is not myCRED related. Does your website support WordPress shortcodes? Do you get the same error with other shortcodes as well?

    myCRED has no flash elements which the errors seem to be pointing at.

    Thread Starter eferwebscencia

    (@eferwebscencia)

    Hello,

    My wordpress installation supports shortcodes. But I think it is a fault with the Theme I’m working.

    Thank you very much Gabriel. If I find something I tell you.

    You can close this topic.

    Plugin Author myCred

    (@designbymerovingi)

    The error messages are flash based so I am assuming your theme is flash based? If it is, then that is the issue as myCRED shortcodes will not work with flash based themes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘where and how introduce mycred_query_rankings and mycred_rankings codes in wp’ is closed to new replies.