Start ::
Community ::
Feedback & Suggestions ::
Profile module - new field type
Moderated by: Support Team
-
- rank:
-
pnFreshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 14
Is any way to add a new field type to Profile module. I would like to add image upload field, similar to that one in Pagesetter. That users can easily add their own photo.
-----
rgfdgafgaf -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 13324
Please add a feature request (or if you code it yourself, a patch) to the tracker on noc.postnuke.com/projects/postnuke.
I'm afraid that what's in the module at the moment is all that's available, but that can change in the future.
-----
Regards,
Simon
itbegins.co.uk - PostNuke Consulting
Please read the Support Guide -
- rank:
-
pnProfessional
- registered:
- September 2004
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 720
There are several modules to do that - pnAvatar, Avatar (1.1 for .764, 2.0 for .800) and pnUserPictures.
Try them and see which work for you.
pnAvatar and Avatar both use the standard avatar field, just allow users to upload personal avatars. Avatar allows you to set the upload directory, so that if you disable the editing of the avatar field in the user profile, users can then just upload their own and not accidentally (or intentionally) use someone else's. -
- rank:
-
pnFreshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 14
Yes, I know about Avatar module but unfortunately version 2.0 for .8 not support personal avatar's... maybe only don't want for me :(
Anyway I want to have avatars and user pictures. I thought about copy and rename all avatar module to User Pictures module
and install as User Pictures but since personal avatars are not personal any more it's not a good solution.
I have already add, a image upload type to select option and add, a template to view it but I have problem to do the upload... I don't know how to execute upload function inside a Profile form and pass back uploaded image path into input field so it can be saved... I have tried use Ajax but it seems I'm not enough smart
I'm still thinking about that avatar module I have to look into it...
I want to make a friends page where instead of avatars in last seen or on-line block will be picture and other stuff it's going to be some kind of dating service
Spring is coming... love is in the air
-----
rgfdgafgaf -
- rank:
-
pnProfessional
- registered:
- September 2004
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 720
Take a look at the Avatar 2.0 upload, it uses a few PN classes to perform it, do some checks, and such.
So you want to have an avatar AND a picture?
I have Avatar 2.0 working on a few .8 sites, but I had to adjust 1 thing in the code (I'll have to look up what I did), and make sure it pointed to a writable folder.
NCM -
- rank:
-
Steering Committee
- registered:
- January 2003
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 802
Please add this to the tracker at the NOC project if it is a general problem with Avatar 2.0.
Can you explain this please? If it is a bug, it should be fixed.
-----
"He is not dangerous, he just wants to play...." -
- rank:
-
pnFreshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 14
Yes, a want to have avatar AND picture.
User's are able to load their own avatar and it is saved correctly with pers_uid so folder is writeable. Problem is because in the main view user's can see all avatars including private also they can choose other users avatars.
I think this problem have been reported already...
-----
rgfdgafgaf -
- rank:
-
pnFreshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 14
Sorry for double posting
Ok I found it and make a fix it's a simple fix but is working...
old avatars pnuserapi.php functions with bug's
My bug's fix
hmm...
edited by: Kaik, Mar 18, 2008 - 03:35 PM
-----
rgfdgafgaf -
- rank:
-
pnProfessional
- registered:
- September 2004
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 720
Landseer,
the forumdir gave me trouble, so I changed it to:
Avatar_admin_modifyconfighandler.class.php line 74 in 2.0 RC1:
So, if no forumdir was set, the lang. define wouldn't need to be set either and possible throw an error on null. I didn't investigate further.
Also, on my system I kept getting the type returned as "jpeg" . I followed the code, and at no point could I see where it would return jpeg instead of jpg as the filetype.
I fiddled for a while, but finally just added jpeg to the end of the allowed filetypes.
Seems image_type_to_extension function would return jpg:
But I would always get back jpeg....how, I have no idea! It boggled me as its just a simple switch and jpeg cannot be returned anywhere. The night grew late, so I just gave up and added jpeg in the admin settings and all worked fine.
NCM
UHEweb / SwitchBit -
- rank:
-
pnProfessional
- registered:
- September 2004
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 720
As for being able to choose other's avatars, I just disable the field in the User admin.
Then, they are forced to use the avatar module to manage their avatar.
Don't delete the field, just disable it. The Avatar will still add to the DB correctly, and as far as I've seen, PN will still fetch and display the avatar correctly everywhere.
NCM -
- rank:
-
pnFreshman
- registered:
- December 2006
- Status:
- offline
- last visit:
- 09.05.08
- Posts:
- 14
I have found another small bug in Users/pnuser.pnp line 337
is
should be
I will add this to the tracker at the NOC project I'm waiting for registration email
The other thing is that when you add/edit dud field in Profile should be option to add default value for that field, which is set during registration.
Similar to blank.gif like in avatar but not hardcoded as it's above.
-----
rgfdgafgaf -
- rank:
-
Steering Committee
- registered:
- January 2003
- Status:
- offline
- last visit:
- 25.04.08
- Posts:
- 802
@Kaik: Thanks, the code fixed a bug I was chasing for a longer time. This avoids avatar images being hijacked by others in 2.0, I am not sure if I will fix this in the code used here.
@uheweb: image_type_to_extension() in PHP5 returns jpeg in case of a .jpg file, I changed the upgrade function in Avatar to add jpeg to the extension list if jpg is found.
Both changes will be committed to the Avatar-SVN today. Please do not post bugs here at all as we do not look into the forums to find them, please always use the bug tracker on NOC.
-----
"He is not dangerous, he just wants to play...."
Start ::
Community ::
Feedback & Suggestions ::
Profile module - new field type
