Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding a function for new image thumbnail sizes

  • Avatar of jordashtalon
    JordashTalon
    Member

    @jordashtalon

    I can see there is 3 functions for three different URL image sizes:

    function bp_album_picture_original_url()
    function bp_album_picture_middle_url()
    function bp_album_picture_thumb_url()

    If I wanted to make a new function to get the image in a different size (for example I want to get the image in a 300 pixel size in addition to the 600 pixel size that is already provided.

    Is that possible?

    Thanks for any help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of jordashtalon
    JordashTalon
    Member

    @jordashtalon

    Anyway to do this?

    Avatar of foxly
    foxly
    Participant

    @foxly

    @JordashTalon

    For version 0.1.7, it would require over 4 hours of work. You would have to modify the media item DB table, image resizing functions, template tags, and admin panel functions. Basically, its not something you’d want to do. That’s why we decided to use a different strategy in 0.1.9.

    For version 0.1.9 …

    1) Create your new size in the cache configuration screen.
    2) Wherever you want to use the image, pass the size name as an arg to the cache function.

    For a detailed example, take a look at “Example #3″ in the documentation wiki article on the featured content loop. This demonstrates both using a cache size and dynamic image resizing.

    http://code.google.com/p/buddypress-media/wiki/UsingTheFeaturedContentLoop

    Thanks!

    ^F^

    Avatar of jordashtalon
    JordashTalon
    Member

    @jordashtalon

    @foxly Ok sweet, I guess i’ll just wait for the latest release, i’ll just make do with 0.1.7 cause I’m using it on a production site. Once the next release comes out it should add a ton of functionality.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.