Title: Peter Hudson's Replies | WordPress.org

---

# Peter Hudson

  [  ](https://wordpress.org/support/users/kingtutter/)

 *   [Profile](https://wordpress.org/support/users/kingtutter/)
 *   [Topics Started](https://wordpress.org/support/users/kingtutter/topics/)
 *   [Replies Created](https://wordpress.org/support/users/kingtutter/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/kingtutter/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/kingtutter/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/kingtutter/engagements/)
 *   [Favorites](https://wordpress.org/support/users/kingtutter/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/kingtutter/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/kingtutter/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Theme My Login] Theme my Login breaks Simple Local Avatars plugin](https://wordpress.org/support/topic/theme-my-login-breaks-simple-local-avatars-plugin/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/theme-my-login-breaks-simple-local-avatars-plugin/page/2/#post-3754408)
 * [@brikou](https://wordpress.org/support/users/brikou/)
 * Just wanted to say thanks so much for your solution – it worked perfectly.
 * I’ve been puzzling over that for days – and the solution was so simple.
 * Thank you for putting your solution up for everyone – really VERY greatful!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Exclude certain users types from achievements](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/#post-4359752)
 * Very clever :). Thanks ever so much – that’s blooming marvellous!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Exclude certain users types from achievements](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/#post-4359732)
 * Or thanks even…
 * I’ve only just spotted I could have edited the last post instead of posting again….
   sorry.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Exclude certain users types from achievements](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/exclude-certain-users-types-from-achievements/#post-4359731)
 * Hi Paul,
 * Thamks for getting back. I’ve stored the role in usermeta. I’ve added an extra
   field/meta key called usertype.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Link to achievements?](https://wordpress.org/support/topic/link-to-achievements/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/link-to-achievements/#post-3925018)
 * Glad it sorted that problem for a few people. I keep looking at teensummerchallenge…
   it’s a brilliant set up, my efforts are somewhat poor in comparison. It’s an 
   excellent example of how tweaks to templates and css can create a whole unique
   experience.
 * For me, and as Paul says, there will always need to be tweaks here and there 
   if we need it to work for some specific feature of our site.
 * Achievements makes most sense with Buddypress, but the site I’m developing is
   for quite young children. I have used Buddypress on a couple of sites, but for
   several reasons found I didn’t want it for my current one. The fact that Achievements
   now runs without it is a huge plus for me.
 * The system itself is so well designed and extendable by Paul, that it seems he
   has anticipated the need for many things already. The link above for example 
   taps into a function already provided by the plugin.
 * Also I have received the best support from any free plugin ever from him.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Link to achievements?](https://wordpress.org/support/topic/link-to-achievements/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/link-to-achievements/#post-3925001)
 * Hi amoldejong,
 * I hope Paul doesn’t mind me chopping in again. Maybe there is an easier way which
   I couldn’t figure out but for anyone looking to do this, and **has a little knowledge
   of php**…
 * I have knocked up a little solution to this problem , although it does require
   a small edit to your wordpress files (Coding..). You should read up on editing
   your functions.php file before doing this!!!!!!
 * To get the link for the currently logged in user – so for example I have added
   a link to the users profile page you could use the following function and shortcode:
 *     ```
       function get_user_achievement_page ($user_id) {
       $user_profile_url = dpa_get_user_avatar_link( array(
       		'type'    => 'url',
       		'user_id' => get_current_user_id(),
       	) );
       return $user_profile_url;
       }
   
       add_shortcode ('get_user_ach_link','get_user_achievement_page');
       ```
   
 * My use of this was rather unique for me. I created a ‘Home Page’ for logged in
   users which contained links to things like the articles a user has written, their
   profile etc. This shortcode allowed me add to that page a link to their achievements
   as well.
    So I used this shortcode on the page of links I created… edit as text,
   not visual editor, so as an example:
 * `<a href="[get_user_ach_link]">Click to view all of your achievements</a>`
 * I have used an image link instead of text, but you get the idea.
 * A more sensible way to use this is to return the link for any user. You could
   then put it on the users profile page or author page. Using the function you 
   just need to pass the user ID to it, which would be done in php. So for example
   on my authors page I have put a link at the top of the page to view the listed
   authors achievements, like this…
 *     ```
       <?php $userID =  get_the_author_meta('ID');
       $author = get_the_author_meta('display_name');
       echo '<div id="ach_link"><a href="'.get_user_achievement_page ($userID).'">See '.$author.'\'s achievements</a></div>';?>
       ```
   
 * None of this is endorsed I’m sure by Paul, but it might help someone?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Achievement Popup Spam](https://wordpress.org/support/topic/achievement-popup-spam/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/achievement-popup-spam/#post-3938384)
 * Hi edsmontreal,
 * I’m sure Paul will jump in here, but I just spotted this whilst looking for something
   else. This has been mentioned a couple of times.
    It’s not spam – I would call
   it a persistant pop-up.
 * This is actually intended behaviour, your users need to click the button on the
   achivement which says, if I remember ‘view ‘users’ achievements.
 * I know that Paul has mentioned he maybe doing something that will change that
   behaviour as it seems some aren’t so keen.
 * For now I have changed the text on the pop up button to say ‘Click to accept 
   this achievement’
 * The file you need is – feedback-achievement-unlocked.php
 * Move that file into your themes folder. I altered the text after php_e as follows:
 * `<p><a class="dpa-notification-cta" href="<?php echo esc_url( $user_profile_url);?
   >"><?php _e( 'Click to accept this achievement', 'dpa' ); ?></a></p>`
 * don’t know if that helps at all?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Adding more actions](https://wordpress.org/support/topic/adding-more-actions/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-more-actions/#post-3891196)
 * Just an update, deserialised in the Database and all is working fine now – actions
   have been updated and are available.
 * Very happy!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Adding more actions](https://wordpress.org/support/topic/adding-more-actions/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-more-actions/#post-3891195)
 * Thanks for getting back Paul, I actually figured that might be the case. It makes
   the most sense really when thinking about how extensions might be added.
 * The ability to add extensions in this way is such a massive bonus and has been
   so well thought out by yourself, then a little ‘quirk’ like that is a small price
   to pay.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Adding more actions](https://wordpress.org/support/topic/adding-more-actions/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/adding-more-actions/#post-3891151)
 * Hi Paul,
 * Maybe its something I’m doing wrong I guess.
 * I’ve posted the code here… hopefully it looks okay when I post because I’ve never
   posted any before. The code is to support the Love It Pro plugin by Pippin (hope
   he doesn’t mind..).
 *     ```
       <?php
   
       /**
        * Extension for Love It Pro Extension
        *
        * This file extends Achievements to support actions from Love It
        *
        * @package Achievements
        * @subpackage ExtensionLoveIt
        */
   
       // Exit if accessed directly
       if ( ! defined( 'ABSPATH' ) ) exit;
   
       /**
        * Extends Achievements to support actions from Love It.
        *
        * @since Achievements (3.0)
        */
       function dpa_init_loveit_extension() {
       	achievements()->extensions->love_it_pro = new DPA_Love_It_Extension;
       	// Tell the world that the Love It extension is ready
       	do_action( 'dpa_init_loveit_extension' );
       }
       add_action( 'dpa_ready', 'dpa_init_loveit_extension' );
   
       /**
        * Extension to add Love It support to Achievements
        *
        * @since Achievements (3.0)
        */
       class DPA_Love_It_Extension extends DPA_Extension {
       	/**
       	 * Constructor
       	 *
       	 * Sets up extension properties. See class phpdoc for details.
       	 *
       	 * @since Achievements (3.0)
       	 */
       	public function __construct() {
       		$this->actions = array(
       			'like_process_ach'		 => __( 'A user likes a story.', 'dpa' ),
       			'like_for_author'		 => __( 'Author has story liked.', 'dpa' ),
       		);
   
       		$this->contributors = array(
       			array(
       				'name'         => 'Pippin',
       				//'gravatar_url' => 'http://www.gravatar.com/avatar/9cf7c4541a582729a5fc7ae484786c0c',
       				'profile_url'  => 'http://profiles.wordpress.org/mordauk/',
       			),
       		);
   
       		$this->description     = __( "Allows users to like posts.", 'dpa' );
       		$this->id              = 'love-it-pro';
       		$this->image_url       = trailingslashit( achievements()->includes_url ) . 'admin/images/loveit.jpg';
       		$this->name            = __( 'Love It', 'dpa' );
       		$this->rss_url         = 'http://pippinsplugins.com/feed/';
       		$this->small_image_url = trailingslashit( achievements()->includes_url ) . 'admin/images/loveit.jpg';
       		$this->version         = 1;
       		$this->wporg_url       = 'http://pippinsplugins.com/love-it-pro/';
   
       	}
   
       }
       ```
   
 * Then in my themes functions files I put:
 *     ```
       //add support for love it pro to achivements
       function love_it_ach_init() {
       require 'Achievements-love-it/love-it-ach.php';
       }
       add_action( 'dpa_init', 'love_it_ach_init' );
       ```
   
 * the require specifies the folder and file for my extension.
 * It is not showing the second action in my Database – so in:
 * wp_terms ….. I see term_id: (199) name:like_process_ach etc
 * wp_term_taxonomy …… I see term_taxonomy_id: (217) term_id: (199) taxonomy: dpa_event
   description: A user likes a story
 * I see all the other terms/taxonomies added by the original extensions also, but
   not the second in my code.
 * wp_term_relationship …… I see the relationship between the above term taxonomy
   and the post that I created (object_id: 3674 (my post id) and term_taxonomy_id:
   217
 * It’s quite possible I’ve been stupid here as this is my first proper attempt.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Question about achievement progress](https://wordpress.org/support/topic/question-about-achievement-progress/)
 *  Thread Starter [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/question-about-achievement-progress/#post-3854326)
 * Thanks for the reply Paul, I figured as much. That’s a shame. It does mean you
   need to anticipate a lot right from the sites inception (which you would have
   to anyway but it makes it difficult to extend if needed).
 * A database sync would be a very good solution – it would mean that things could
   be added later at least.
 * Thinking about my other post I envisioned sort of ‘stacking’ badges if this was
   the case – so achieve 10 posts, then the achieve 20 posts would be has achieved
   10 posts and then posted another 10, if you get the idea. This would mean if 
   you’d topped out achievements at 100 posts, but then a user reaches that figure
   when you hadnt anticipated it, you could add another achievement which is achieved
   100 posts and then added another 50.
 * Anyway, many thanks for taking my questions. Keep up the excellent work.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Achievements for WordPress] Using Achievements to 'Promote' user role](https://wordpress.org/support/topic/using-achievements-to-promote-user-role/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/using-achievements-to-promote-user-role/#post-3693335)
 * Hi I know this is closed but I too have think that awards based on karma points
   would be very very useful. Not having delved into it AT ALL, would it not be 
   possible to run a check to see if a user qualifies for an award when the points
   are increased?
 * I know its me thinking much too simply 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BadgeOS] Any shortcodes for display of available badges?](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/#post-3760199)
 * Hi, thanks for your reply.
 * I noticed the comments on Github before posting on here, thought I’d have a look
   see if I could find something similar in my theme (although I couldn’t) but maybe
   looking in the wrong place.
 * I can obviously work around the problem (not really a problem as such, because
   it does work) by passing the parameter but it would be nice if it was possible
   to query all.
 * Keep up the good work.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BadgeOS] Any shortcodes for display of available badges?](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/#post-3760194)
 * Okay, so it works if I put in a ‘type’ parameter. Is that default behavior or
   is it possible to list all achievement types together?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BadgeOS] Any shortcodes for display of available badges?](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/)
 *  [Peter Hudson](https://wordpress.org/support/users/kingtutter/)
 * (@kingtutter)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/any-shortcodes-for-display-of-available-badges/#post-3760193)
 * Got the same here. Created achievement, can award etc, but the shortcode does
   not display anything.
 * Using the standard shortcode with no parameters.
 * Am I missing something?

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/users/kingtutter/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/kingtutter/replies/page/2/?output_format=md)