1
Peekay
How can I create read-only fields in user profile?
  • 2007/1/15 1:36

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I have a site where users are added by the site admin. They don't mind users logging in and changing some profile details, but they don't want them changing their 'real' name field (in the same way that they can't change their email address).

I am struggling with 'edituser.php' to make the real name field read-only to all but webmasters... and I'm stuck.

Any pointers from experienced profile-hackers would be welcome.
A thread is for life. Not just for Christmas.

2
fragttdg
Re: How can I create read-only fields in user profile?
  • 2007/1/16 4:19

  • fragttdg

  • Just popping in

  • Posts: 34

  • Since: 2004/6/13


in XOOPS 2.2.x, this is managed by profile params in xoops_version.php,

for example:

$modversion['profile']['field'][] = array(
'name' => 'vip',
'title' => 'USER VIP',
'description' => '',
'type' => 'textbox',
'valuetype' => XOBJ_DTYPE_INT,
'maxlength' => 3,
'default' => 0,
'show' => 1,
'edit' => 0,
'required' => 0,
'config' => 1,
);
Xoops Based site - http://www.xiubei.com

3
Peekay
Re: How can I create read-only fields in user profile?
  • 2007/1/16 10:47

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@fragttdg

Many thx for that. Forgot to mention however the site is using XOOPS 2.0.13.2. I think the whole profile thing is different in 2.2.x.
A thread is for life. Not just for Christmas.

4
Shine
Re: How can I create read-only fields in user profile?
  • 2007/1/16 11:29

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


Think I can help you out.
You need to edit the template: system_userinfo.html and or also userinfo.php
Make an if/else statement!

Login

Who's Online

276 user(s) are online (199 user(s) are browsing Support Forums)


Members: 0


Guests: 276


more...

Donat-O-Meter

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

Latest GitHub Commits