xoops forums

fdeconiac

Quite a regular
Posted on: 2012/7/4 8:28
fdeconiac
fdeconiac (Show more)
Quite a regular
Posts: 278
Since: 2008/11/29
#1

Profile module : make a field visible but not editable ?

Hi all,

1/
I'm looking to create a field visible by each member, but not editable... I tried many permissions, but it's look like i can just make a field visble or hide it...

In fact, i need to communicate a personnal information for each of my members so i would like to deliver it to them in their profile... but or they see it and they can edit it (i don't want them to edit), or i hide it...

Is there an option that i didn't know ?

2/
I also would like to hide following fileds :
- timezone
- member since
- rank
- last login
But it didn't work...

Thanks for your help :)

black_beard

Just popping in
Posted on: 2012/7/4 8:54
black_beard
black_beard (Show more)
Just popping in
Posts: 59
Since: 2012/6/24
#2

Re: Profile module : make a field visible but not editable ?

Hello,

Quote:

I'm looking to create a field visible by each member, but not editable... I tried many permissions, but it's look like i can just make a field visble or hide it...

In fact, i need to communicate a personnal information for each of my members so i would like to deliver it to them in their profile... but or they see it and they can edit it (i don't want them to edit), or i hide it...

Is there an option that i didn't know ?


I just fix this bug, look here

For the second point, I look and I hold you informed

fdeconiac

Quite a regular
Posted on: 2012/7/4 9:26
fdeconiac
fdeconiac (Show more)
Quite a regular
Posts: 278
Since: 2008/11/29
#3

Re: Profile module : make a field visible but not editable ?

Thank you black_beard for your answer.

First, i need to precise that i'm using xoops 2.5.4 (didn't have time yet to update), and that i'm not speaking abour user management in system module, but i'm speaking of "Profile module version 1.62".

1/ For the first point, i look to your post, but it hink i do not have problem with recording. My problem is more about the fact to be able to choose following options for profile fields :
=> Show/hide a field (just show - not editing)
: is it the same as the permission "make users able to look for this field" ? i don't think...
=> Edit a field : Ok with this one : it show the field... but unfortunately user can edit it...

2/ I found a solution in the table profile_visible : i deleted all lines about the fields id corresponding to the fields i didn't want to show (but if i want to come back, it will certainly be more complicated :))

Peekay

XOOPS is my life!
Posted on: 2012/7/4 10:35
Peekay
Peekay (Show more)
XOOPS is my life!
Posts: 2335
Since: 2004/11/20
#4

Re: Profile module : make a field visible but not editable ?

<input type="text" value="n" readonly="readonly" />


You can also give the field a class to make it greyed-out for example. I guess you would need to pass a variable to the Smarty template to set a field as readonly based on the logged-in user ID or a module pref.

fdeconiac

Quite a regular
Posted on: 2012/7/4 11:42
fdeconiac
fdeconiac (Show more)
Quite a regular
Posts: 278
Since: 2008/11/29
#5

Re: Profile module : make a field visible but not editable ?

Maybe too complicated for me... Is there any way already existing to just show a field without allowing editing it ?

Like the field "last connection on..." : it is visible but can not be edited...