1
fdeconiac
Profile module : make a field visible but not editable ?
  • 2012/7/4 8:28

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


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 :)

2
black_beard
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

3
fdeconiac
Re: Profile module : make a field visible but not editable ?
  • 2012/7/4 9:26

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


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 :))

4
Peekay
Re: Profile module : make a field visible but not editable ?
  • 2012/7/4 10:35

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


<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.

5
fdeconiac
Re: Profile module : make a field visible but not editable ?
  • 2012/7/4 11:42

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


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...

Login

Who's Online

193 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 193


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits