Webmastersite.net
Register Log In

deleting unused Avatars and Images
budget host restrictions

Comments on deleting unused Avatars and Images

knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
Posted May 05, 2005 - 7:23 AM:

OK, here's what I'm trying to do. I want a specific image to show as their headshot/profile image. I came up with the (maybe) clever idea of customizing & using the Avatar field for this. I have uploaded several avatars for the same profile and noticed that the old avatar's remain in the folder.

Here's my first concern: I am on a budget host that has decent restrictions ( 5gb storage, 15,000 individual files) but, I have a database of 4,000 members. These avatars will start piling up if they aren't deleted by new uploads.

and the second: seems avatars are being CHMODed to 600 upon upload (can't view them). I searched and searched the control panel but, I cannot figure out how to change this to a readily viewable #. I got into edit.php to see if could easily make something out but, I don't want to start changing code (never dealt with php-ing file permissions).

Thanks!
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 05, 2005 - 5:49 PM:

1) See 'unused attachments' in the admin panel (though when you're talking about 5 GB, even supposing every avatar were 100 KB and every member had one it'd take 50,000 members).

2) They're whatever the default is, but they're probably not owned by your FTP user. See 'CHMOD Utility' in the admin panel to chmod them.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
Posted May 05, 2005 - 7:26 PM:

question on question 2.

All of the images I upload into member albums are automatically viewable (I tried to make everything uploaded automatically viewable in the control panel). How is it that my images upload at 666 (into the same folder) but, the avatars upload as 600? They are using seperate upload functions, from what I can see. Are these different functions affecting the CHMODing?

The CHMOD Itility looks very useful (I've used it in trying to figure out what was going on with the Avatars). But, I need these avatars to be automatically viewable for my members (otherwise, they'll think the upload failed). Seems that I would have to use the utility each time to change the file permissions, right? Maybe I could Cron job it???

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 06, 2005 - 10:01 PM:

There are no such issues with any server I've been on, but I guess somehow you've got a default value that makes it invisible.

The images are chmoded by WSN Gallery I believe in order to work around such matters. To make avatars do the same try replacing
  if (move_uploaded_file($upload_temp, $target_file))
{
$uploaded = $upload_file;
}

with
  if (move_uploaded_file($upload_temp, $target_file))
{
$uploaded = $upload_file;
@chmod($target_file, 0666);
}


in commonfuncs.php.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
Posted May 07, 2005 - 8:21 AM:

Yep, that worked.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
Posted May 09, 2005 - 12:38 PM:

How easy would it be to use the same image resizing function for Avatars so they could be used as member profile pictures (with different limitations on X Y)?

I got into suggest.php and commonfunctions; it looks very similiar but, there are so many calls to diffent variables and functions, I don't know if it is feasable on my end. How challenging would it be to create this? Could I just cut and paste the existing resizing code and apply a static variable, say 300px by 300px?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 09, 2005 - 2:05 PM:

You mean thumbnails of avatars? That'd require a lot of changes and I don't think I'm ever going to do it since it'd just be increasing the load with the extra thumbnails and it's more practical for 99% of people to make a profile picture be a distinct file field.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
Posted May 09, 2005 - 2:51 PM:

You know, maybe I'm just creating more hassle trying to use avatars. Would it be possible to resize images uploaded to a 'profile image' field at an X Y resize smaller than the general image resizes? I have a 300x500 cell space that I want to use for displaying headshots/ close-ups of members and, my general images resize at 500x700.

I'm not really concerned with thumbnails (though it would be handy at times). The important part is having a specific uploaded image at a set size for my member profiles.

Thanks!
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 10, 2005 - 6:48 PM:

Not presently possible.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
#10 - Quote - Permalink
Posted May 10, 2005 - 8:28 PM:

So, what if I just wanted to resize Avatars that were larger than a set X/Y, say no greater than 300 by 300. I don't need thumbnails or anything like that, just a way to keep them under a certain size that would break my layout. Could this be done in a way that uses the existing imagemagik functions?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#11 - Quote - Permalink
Posted May 11, 2005 - 9:31 PM:

Resizing of avatars is in WSN Forum and (like everything else applicable from WSN Forum) will be in Gallery 2.20, but it can't be done in the current version.
knotworking
Experienced

Usergroup: Customer
Joined: Mar 31, 2004

Total Topics: 20
Total Comments: 83
#12 - Quote - Permalink
Posted May 11, 2005 - 9:46 PM:

So, when is 2.20 going to be released? (no pressure wink ...)
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.