How to upload/display avatar user

amorino 05 Nov, 2010
Hello,
in the right column of my site I want to make just a simple thing.
The user could upload his avatar (or photo) via an upload field and change it or delete it when he wants.

When he has not a picture a "non_picture.jpeg" will be display there.

So when he upload a picture he will see it whenever he connects

(like the avatar of community builder)

Any help please?
Best regards
Amorino
GreyHead 06 Nov, 2010
Hi Amorino,

You need two forms.

One just shows the image and you can put that in the ChronoForms module. You need code in the Form HTML to look up the user's image and show it if there is one - or else to show a non_picture.jpeg

The second form can be an ordinary ChronoForm that will let the user add or change their image. You can use the Image Resize plug-in to help with the uploads.

Bob
amorino 06 Nov, 2010
Hello and thanks a lot for your help,
Could you please give me some code to pu in the forms?
How to make the second one replace the image?
How to make the first one show only the replaced image?
I'm not so good at coding php
Best regards
Amorino
GreyHead 06 Nov, 2010
Hi Amorino,

Sorry, but no I can't write form code for everyone who wants it. I spend too much time here anyhow.

If you have a go yourself then we may be able to spot bugs for you. If not you'll need to find someone who has the PHP and HTML skills.

Bob
amorino 06 Nov, 2010
You are right bob and I would thank you very much for your help across this forum your posts saved my life so many time when I read your answers ..πŸ™‚
If I buy the book will I find this tutorial in it?

Best regards
Amorino
GreyHead 06 Nov, 2010
Hi Amorino,

The answer to this specific project - no I'm afraid not. Lots of useful code that might help with this project - yes, sure.

The publishers have let me post some extracts from the book on my website. Go here and look for the [read here] links against some of the article names.

Bob
amorino 06 Nov, 2010
Thank you Bob,
Could you help with one form and I'll try to find by my self the second one?πŸ˜€

I'm really blocked hereπŸ™‚
This topic is locked and no more replies can be posted.