Menu

#33 Different image directories in phpwscontacts

v._0.9.0
open
None
7
2005-09-28
2005-09-28
mvvelzen82
No

> When a member uploads his image, the mod puts it in
the dir
> 'images/contacts/'. Problem with this is that all the
other
> members can use, or worse, delete this image. What
I'd like
> is that the contacts mod creates a different folder in
> 'images/contacts/' for each user and it would be great if
> the name of that folder is the username or the name
of that
> user.

Discussion

  • Don Seiler

    Don Seiler - 2005-09-28

    Logged In: YES
    user_id=61900

    This actually would be a rather easy change and has nothing
    to do with core. What would need to happen is that, for
    each contact, a subdirectory of images/contacts/ would be
    created, probably named by phpwscontact ID, so like
    images/contacts/3 or something. That contact's images are
    stored in there.

    Just need to make sure to create the directory when the
    contact is added, and delete the directory if the contact is
    removed.

    Importing old images during upgrade shouldn't be TOO hard,
    we'll know which image a particular contact is using, and
    can move it accordingly and update the contact image
    location in the database.

     
  • Don Seiler

    Don Seiler - 2005-09-28
    • priority: 5 --> 7
    • assigned_to: nobody --> rizzo
     
  • mvvelzen82

    mvvelzen82 - 2005-10-05

    Logged In: YES
    user_id=1334325

    Thanks for your quick responds.. I already tried some things
    before I posted this RFE in het contacts.php file so that,
    when uploading an image, it would be placed in a specified
    folder, but i didn't succed. My knowlige of php is just not
    good enough.
    If it's a rather easy change, I hope you can help me....this
    would help me al lot!

    By the way, is it also possible to put a maximum to the
    folder and/or image size and/or /width/hight?

    Thanks

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.