WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Activity Plus
Auto-Rename Uploaded Pictures (2 posts)

  1. JagoKwan
    Member
    Posted 2 years ago #

    How do I get a picture to auto-rename to a better naming convention? Currently all the pictures are renamed as numbers (E.g., 3 0.009389890345[name-of-file].jpg). Also how do I auto-rename the thumbnails to something else? (E.g., They all end with "-bpfp.jpg")

    Thanks,
    JagoKwan

    http://wordpress.org/extend/plugins/buddypress-activity-plus/

  2. Intervik
    Member
    Posted 1 year ago #

    There is a way to go in the core file files_upload.php in lib folder

    $filename = sanitize_file_name($filename);

    I replaced this $filename = "my-prefix-".mt_rand(1, 999)."-ID".bp_get_activity_user_id();

    This is to remove the users own filename so it get more private community. (eg No Holliday with Karl and sofie Ericsson at Paris)

    But all the numbers added, sholud be in this func as well.

    / hop it help a little

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic