WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] Image size for achievements loop (7 posts)

  1. retronerd
    Member
    Posted 6 months ago #

    Hi, I used the following code to add achievement images into the loop PHP

    <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( 'Description', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</thead>

    However, the image is showing up huge in the box, whereas the actual image for the achievement is only a very small 32x32 px.

    How can I stop it from auto scaling the image up?

    Cheers!

    https://wordpress.org/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 6 months ago #

    Hi,

    Do you happen to be this person who tweeted at me, or just coincidence? :)

    https://twitter.com/tivnet/status/439764667997507585

  3. retronerd
    Member
    Posted 5 months ago #

    Nope, wasnt me!

    Please can you explain what you mean here? I still have no idea what to do to fix this... could you give me code example?

    Thanks :)

  4. retronerd
    Member
    Posted 5 months ago #

    Please can someone give me the code that I need to enter to stop the images from auto sizing? I cant figure this out at all from the code in the twitter link, where am I supposed to put that based on the code I have used here:

    This is my loop-achievements.php

    <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( 'Description', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</thead>

    And this is my loop-single-achievement.php

    <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>
  5. manakio2k
    Member
    Posted 5 months ago #

    is this the same as wpachievements on codecanyon?

  6. jonioscm
    Member
    Posted 5 months ago #

    If the uploaded image is actually 32px x 32px - you should be able to target the image via css to force the size. Something like (assuming the table is classed the same) maybe;

    .dpa-archive-achievements img {
    	height:32px;
    	width:32px;
    }
  7. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 5 months ago #

    If you can drop a link to your website with the problem on, I can take a look and give you some CSS to sort the image sizing out. @jonioscm's CSS might well do the job just fine, too.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.