WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] Explanation of Karma? (7 posts)

  1. allmyleagues
    Member
    Posted 1 year ago #

    First of all, I want to extend my thanks and appreciation for all of Paul Gibbs' hard work on the Achievements plugin. The versatility of this plugin is immense! I recall a while ago that Paul was considering adding premium features for this plugin if people were interested; consider me interested!

    After exploring this plugin and tinkering a little, I've got a few questions about Karma for Paul (or whoever is familiar with the plugin). Here's what I've gathered on 'Karma' so far:

    1) Users earn Karma by unlocking achievements
    2) There doesn't seem to be an easy way to view someone's Karma
    3) There doesn't seem to be a way to change the name 'Karma' to something that fits a website's theme more appropriately.

    Can anyone clarify how you can view someone's Karma, or how you can change the name 'Karma' to something else? It would be much appreciated.

    Mark

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

  2. pickingforgod
    Member
    Posted 1 year ago #

    I too am looking for a way to quickly change "karma" to "points". Is it a variable I can quickly change?

  3. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Hey there, thanks for the feedback.

    1. True.
    2. Also true, but will improve in future. The achievement page for each user doesn't show points yet: e.g. http://example.com/archives/author/admin/achievements
    3. I suggest something like this for now, until I get produce more documentation about custom templates (and the consequences of): http://blog.ftwr.co.uk/archives/2010/01/02/mangling-strings-for-fun-and-profit/

  4. pickingforgod
    Member
    Posted 1 year ago #

    Paul,
    Thank you very much for that. However I couldn't get that plugin to work.

    <?php
    /*
     Plugin Name: PJW Translation Mangler
     Plugin URI: http://blog.ftwr.co.uk/#
     Description: Example of how to mangle translated strings.
     Author: Peter Westwood
     Version: 0.01
     Author URI: http://blog.ftwr.co.uk/
     */
    
    class PJW_Translation_Mangler {
     /**
     * Filter the translation string before it is displayed.
     *
     * @param $translation The current translation
     * @param $text The text being translated
     * @param $context The context for the translation
     * @param $domain The domain for the translation
     * @return string The translated / filtered text.
     */
     function filter_gettext($translation, $text, $domain) {
      $translations = &get_translations_for_domain( $domain );
      if ( $text == 'karma' ) {
       return $translations->translate( 'points' );
      }
      return $translation;
     }
    }
    add_filter('gettext', array('PJW_Translation_Mangler', 'filter_gettext'), 10, 4);
    ?>

    Are there more parameters i need to specify or something?

  5. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    o-O

    Ok, that's pretty odd. Made a bug report https://github.com/paulgibbs/achievements/issues/69

    It's probably going to be several weeks before I can look at this.

  6. pickingforgod
    Member
    Posted 1 year ago #

    Thank you very much :) Looking forward to updates and the revamp of Version 3. Loving how it relies more on WordPress' core.

  7. VegasKev88
    Member
    Posted 1 year ago #

    Paul,

    Curious as to the status of this. I see by the bug report, that it hasn't been tackled yet, and I'm simply curious as to when you plan on looking into this more. I'd like to change the name of 'Achievements' and 'Karma'. I thought about creating a faux translation file that only 'translates' those two keywords, however, I've never created translation files and I'm still not sure which of the two methods are better for this instance. Thanks in advance for the update on this bug report and any advice.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.