show field to Special group

Please only post questions about mods, extensions, themes, languages and tutorials. for other technical question please use vldPersonals forum instead.

show field to Special group

Postby johnwh » September 27th, 2010, 7:13 pm

hi
i want create field in member profile That if member group id = 13 then show this field to member and member can edit this field else do not show this field for other group how i can create this ?
johnwh
 
Posts: 17
Joined: 31 Aug 2010
Knowledge: 1
Vld Version: 2.5.3

Re: show field to Special group

Postby fatlizard » October 5th, 2010, 2:34 pm

It is worthwhile checking the official vldpersonals documentation.

Although it is limited, it does provide some useful information like session and member variables that are available for use.

Member Variables

This tells us that {session.group_id} is the current group id.

You could then use that in a template something like :
<!-- IF {session.group_id} == 13 -->
show the field
<!-- ENDIF -->

You may have to try a few combinations to see if the number, 13, needs to be quoted ("13") or not, and to get it working.

It's good to have a plain template kept unmodified, like webby2, for simple testing such as this, rather than your production site.
User avatar
fatlizard
 
Posts: 14
Joined: 14 Aug 2010
Knowledge: 1
Vld Version: 2.5.7

Re: show field to Special group

Postby johnwh » October 20th, 2010, 1:52 pm

hi thx
but this is not my mean i want To run this for account profile
for example
in account profile we have picture field i want if member group id = 13 then member can edit this field else do not show this for member
plz help me
johnwh
 
Posts: 17
Joined: 31 Aug 2010
Knowledge: 1
Vld Version: 2.5.3

Re: show field to Special group

Postby db3204 » January 17th, 2011, 9:40 pm

If I understand, you are looking at this in the wrong way.

You can create custom groups in the CP and assign permissions to that group. For example, I created a group that gave members permission to upload and approve their own images while the other groups can not.

There are plenty of tutors on vldForum on this, but let me summarize.

1. In the CP I create a group called "edit" and assign permissions.

2. All member I want to give these permissions I move them to the edit group (you make this change in the CP).

Pretty simple.
db3204
 
Posts: 5
Joined: 03 Oct 2010
Knowledge: 1
Vld Version: 2.5.3
Vld Site: http://www.filipinaeyes.com


Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron