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

  1. JagoKwan
    Posted 4 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")



  2. Intervik
    Posted 3 years 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

  • BuddyPress Activity Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic