WordPress.org

Forums

Achievements for WordPress
[resolved] Medal image (9 posts)

  1. dragonl
    Member
    Posted 1 year ago #

    Hello wanted to ask one thing.

    I have this next to the BuddyPress plugin. When I go to the section "My Achievements", the medals that I have no icon appears, but. Would be great to appear the icon next to the name, as I show below

    http://postimg.org/image/3s9n79pcz/

    Where I put the red circle would appear ideal image of the coin is that possible?

    Thank You!

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

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Oh, display the graphic you set on the achievement in that table, right?

  3. dragonl
    Member
    Posted 1 year ago #

    Yeah! thank! ^^

  4. halleg
    Member
    Posted 1 year ago #

    +1 - good idea. If you follow it, you can have there presented the last achievements in each category (if category of achievement exists):

    e.g. a medal as recognition, a level achievement, a special prize...

    It can give a whole new dimension to the leaderboard.

    H

  5. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    1) Copy /plugins/achievements/templates/achievements/achievements/loop-achievements.php and /loop-single-achievement.php into /themes/YOUR_THEME/achievements/.
    2) Those two files should now be copied to /themes/YOUR_THEME/achievements/loop-achievements.php and /themes/YOUR_THEME/achievements/loop-single-achievement.php. Open these in a text editor.
    3) You might want to add a new column to the table for the picture. Regardless, use the following code in the template to add the picture:

    <?php dpa_achievement_image();

  6. Apokh
    Member
    Posted 1 year ago #

    Hey, I also want to realize a more beautiful Achivement list. I managed to display the image but somehow I dont get the table done.

    Can you please specify which files I have to edit?

  7. Apokh
    Member
    Posted 1 year ago #

    By now i edited loop-achievements.php like

    <table class="dpa-archive-achievements">
    	<caption class="screen-reader-text"><?php _e( 'All of the available achievements with the name, avatar, and karma points for each.', 'dpa' ); ?></caption>
    
    	<thead>
    		<tr>
    			<th id="dpa-archive-achievements-image" scope="col"><?php _ex( 'Bild', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-name" scope="col"><?php _ex( 'Achievement Name', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-karma" scope="col"><?php _ex( 'Karma', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-excerpt" scope="col"><?php _ex( 'Beschreibung', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</thead>
    
    	<tfoot>
    		<tr>
    			<th scope="col"><?php _ex( 'Achievement Image', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th scope="col"><?php _ex( 'Achievement Name', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th scope="col"><?php _ex( 'Karma', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th scope="col"><?php _ex( 'Beschreibungn', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</tfoot>

    and the single-achievements.php like

    <td headers="dpa-archive-achievements-image">
    		<?php do_action( 'dpa_template_before_achievement_image' ); ?>
    
    		<?php dpa_achievement_image();?>
    
    		<?php do_action( 'dpa_template_after_achievement_image' ); ?>
    	</td>

    Next question would be, where I can rename the table headers ;)

  8. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Table headers are in loop-achievements.php in the <th> blocks? If you're editing these templates, you may as well rename the headings here -- it's just as easy.

  9. Apokh
    Member
    Posted 1 year ago #

    Found it. Thanks^^
    How can I now Order the Achievements, lets say by Karma asc.?
    Or better how to Order them within the category?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Achievements for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.