PDA

View Full Version : Mod/ S. Mod and Admin Only Profile Fields


bensonfactor
09-16-2002, 01:54 AM
Could anyone do it?

Logician
09-16-2002, 11:42 AM
1- Install Advanced Templates (https://vborg.vbsupport.ru/showthread.php?s=&threadid=43325)
2- Create an admin only field in your Admin CP and note its field number.
3- Edit your postbit template and add there (to relevant place):

[[($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==7)]]
$post[fieldX]
[[/($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==7)]]

Replace X with the id of your field.

This will display this field to your Admins/Mods and S.Mods in postbit..

Enjoy.

bensonfactor
09-16-2002, 12:39 PM
Thank you very much, worked like a charm.

I needed in order to display the name color fields correctly; they are only for mods, super mods, and admins but since I want them to be able to edit the fields themselves, just anyone could do it. This way no matter what regs put in the fields it won't display. :D

Logician
09-16-2002, 03:53 PM
Originally posted by bensonfactor
Thank you very much, worked like a charm.

I needed in order to display the name color fields correctly; they are only for mods, super mods, and admins but since I want them to be able to edit the fields themselves, just anyone could do it. This way no matter what regs put in the fields it won't display. :D
The code I gave you makes sures that the admin only profile field of the user is visible to Mods/S.Mods and Admins. If this is already what you want, well it's great but I get the impression from that message that you ask something else like making a field visible to eveybody if poster is a mod/s.mod or admin. This hack does not do it as you may have already noticed..

bensonfactor
09-16-2002, 04:38 PM
Yes, I noticed it didn't do quite what I wanted... hmm

Logician
09-16-2002, 05:00 PM
Originally posted by bensonfactor
Yes, I noticed it didn't do quite what I wanted... hmm
ok try this conditional: (after you installed advanced templates)


[[($post[usergroupid]==6 OR $post[usergroupid]==5 OR $post[usergroupid]==7)]]
$post[fieldX]
[[/($post[usergroupid]==6 OR $post[usergroupid]==5 OR $post[usergroupid]==7)]]


It displays the fieldx if poster is admin/s.mod or mod.. I guess this is now what you want... ;)

bensonfactor
09-16-2002, 06:03 PM
I need it so it displays in the edit profile area, only to admins etc.

Logician
09-17-2002, 07:31 AM
Originally posted by bensonfactor
I need it so it displays in the edit profile area, only to admins etc.
Edit template register_customfields and just in the begining add:

[[(($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5) OR ($profilefieldname!="fieldX"))]]

and at the end:

[[/(($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7 OR $bbuserinfo[usergroupid]==5) OR ($profilefieldname!="fieldX"))]]

Dont forget to replace "X" with your field id. This change will display this field to only S.Mods, Mods and Admins while editing user profile fields and since the others cant see it, they cant set any info there..

bensonfactor
09-17-2002, 09:42 AM
In which template and where exactly?

Logician
09-17-2002, 09:51 AM
template register_customfields add as FIRST and LAST line

bensonfactor
09-17-2002, 10:17 PM
This works for profiles, after the person signs up?

Logician
09-18-2002, 07:30 AM
Originally posted by bensonfactor
This works for profiles, after the person signs up?
This works for editing profiles after user signed up and very likely also for register screen while they sign up..

bensonfactor
09-18-2002, 11:16 PM
It is now working, thank you very much.