WordPress.org

Ready to get started?Download WordPress

Forums

myCRED
Plugin Hook Request for future (9 posts)

  1. mucus
    Member
    Posted 4 months ago #

    Hi, in the future sometime could you maybe have a look into creating hooks for WP Pro Quiz plugin? (would be really cool!)

    Things like extra points for getting 100%, deduct points for under 50%, bonus points for completion of a string of quizzes (in the plugin you can set the quiz to only be taken if they have completed previous quizzes) etc

    http://wordpress.org/plugins/wp-pro-quiz/

    https://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Hey!

    Good news! This has already been asked for and there is a custom hook available for you to download in the myCRED Support forum.

  3. mucus
    Member
    Posted 4 months ago #

    Gabriel you are AMAZING mate!

  4. mucus
    Member
    Posted 4 months ago #

    I've tried to install the hook on my test site, I downloaded the zip, uploaded it to my BuddyPress (corporate by WPMUDEV) theme folder, added the 'include_once( get_stylesheet_directory() . '/mycred-wp-pro-quiz-hook.php' );' to the functions.php file... then I get a white screen.

    How do I enable WP_DEBUG mode?

  5. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    Are you using a child theme?

  6. mucus
    Member
    Posted 4 months ago #

    I'm using WPMUDEV BuddyPress Corporate theme. Here's the mycred error message:

    Declaration of myCRED_Hook_Click_Links::has_entry() should be compatible with myCRED_Hook::has_entry($action = '', $ref_id = '', $user_id = '', $data = '', $type = '') in /var/www/.../plugins/mycred/modules/mycred-module-hooks.php on line 1118 Warning: include_once(/var/www/.../themes/bp-corporate/mycred-wp-pro-quiz-hook.php): failed to open stream: No such file or directory in /var/www/.../themes/bp-corporate/functions.php on line 5 Warning: include_once(): Failed opening '/var/www/.../themes/bp-corporate/mycred-wp-pro-quiz-hook.php' for inclusion (include_path='.:') in /var/www/.../themes/bp-corporate/functions.php on line 5 Notice: wp_enqueue_script was called incorrectly

  7. Gabriel
    Member
    Plugin Author

    Posted 4 months ago #

    The code in the forum assumes you use a child theme hence the use of get_stylesheet_directory. Change:

    include_once( get_stylesheet_directory() . '/mycred-wp-pro-quiz-hook.php' );

    to:

    include_once( get_template_directory() . '/mycred-wp-pro-quiz-hook.php' );

    The issue is that WordPress can not find the file in the child theme folder (because there is none) causing an error.

  8. mucus
    Member
    Posted 4 months ago #

    I tried this and all I'm getting is a white screen and 404 message ( 'The requested URL /wordpress/wp-login.php was not found on this server.'), every time I remove the site andall a fresh copy of WP, I just get the same thing, nothing being found on server so can't get into the admin panel in WP.

    This is installed on a subdomain, not my main site

  9. mucus
    Member
    Posted 4 months ago #

    All sorted, Once again thank you so much Gabriel!!

    Keep up the good work!

Reply

You must log in to post.

About this Plugin

About this Topic