Maknib Posted January 7, 2011 Share Posted January 7, 2011 Hi guys, im just trying to work out an app in my head and on paper. im just wondering.. when a user registers they can choose an Avatar 100px by 100px jpg, when they upload one would i then grab the file and store all Avatars in a avatar image folder and rename it to something like.. avatar[user_id].jpg and keep them all in the same folder. or would i crate a folder called users, each user gets their own folder with files like avatar.jpg and it finds the [user_id] folder and pulls the avatar out from that, or is there a more prefered method? cheers Quote Link to comment https://forums.phpfreaks.com/topic/223642-users-avatar/ Share on other sites More sharing options...
QuickOldCar Posted January 7, 2011 Share Posted January 7, 2011 Make a field in a database for the user,save the path/image name into the field. Make a central folder for avatar images. So when the user uploads their image you can then delete the old image if wanted, maybe let them use external links if wanted. Quote Link to comment https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156069 Share on other sites More sharing options...
Maknib Posted January 7, 2011 Author Share Posted January 7, 2011 ah i see thanks. yes i was going to use extrnal links or upload images (with a max size of course) just playing around trying to get it all working getting my head around PHP. so much fun. one i have it working i'm going to try to convert it into a MVC structure. Quote Link to comment https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156072 Share on other sites More sharing options...
QuickOldCar Posted January 7, 2011 Share Posted January 7, 2011 Yeah is always so many ways to do something. For my site I let them upload any image they want and I created a thumbnailer and also bmp converter. I show them in a max determined size of width to height of what I set the display I want. Can see a few results here: http://get.blogdns.com/dynaindex/thumb-create.php?size=200&rotate=0&text=Quick&textsize=6&textcolor=aqua&crop=1.1&bordermargin=0&borderwidth=2&bordercolor=silver&imgsource=http://get.blogdns.com/dynaindex/images/1292136471-lightningquick200a.gif or http://get.blogdns.com/dynaindex/thumb-create.php?size=200&rotate=0&text=Quickie&textsize=6&textcolor=aqua&crop=1.1&bordermargin=0&borderwidth=2&bordercolor=silver&imgsource=http://get.blogdns.com/dynaindex/images/1292137389-quickswingeddemon.jpg Quote Link to comment https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156075 Share on other sites More sharing options...
Maknib Posted January 7, 2011 Author Share Posted January 7, 2011 Yeah is always so many ways to do something. For my site I let them upload any image they want and I created a thumbnailer and also bmp converter. I show them in a max determined size of width to height of what I set the display I want. Can see a few results here: http://get.blogdns.com/dynaindex/thumb-create.php?size=200&rotate=0&text=Quick&textsize=6&textcolor=aqua&crop=1.1&bordermargin=0&borderwidth=2&bordercolor=silver&imgsource=http://get.blogdns.com/dynaindex/images/1292136471-lightningquick200a.gif or http://get.blogdns.com/dynaindex/thumb-create.php?size=200&rotate=0&text=Quickie&textsize=6&textcolor=aqua&crop=1.1&bordermargin=0&borderwidth=2&bordercolor=silver&imgsource=http://get.blogdns.com/dynaindex/images/1292137389-quickswingeddemon.jpg sounds difficult haha, i think i'll just stick to upload image must be under thisMany/kb and then just resize to 100px 100px i'm guessing i could use CSS to say image must be 100 x 100 (or say image will resize to Quote Link to comment https://forums.phpfreaks.com/topic/223642-users-avatar/#findComment-1156079 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.