The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Is it possible that a user profile field only be editable by select usergroups?
I don't want anybody other than these select groups to be able to edit this profile field. |
#2
|
||||
|
||||
![]()
Not with the default vbulletin code, no. You would have to write some code to do that and I'm not really sure how complicated (or perhaps easy) it may be.
|
#3
|
||||
|
||||
![]()
Hey, buddy, you're in luck.
I recently made something so that our "GFX Crew" usergroup can "class" a user (which changes their "field25" value) in a form at the top of a thread within a specific forum. I'll post the code here and let you peruse it at your leisure. Plugin 1: "Display Classing Form in Classification Forum" Hook Location: "showthread_post_start" Plugin Code: PHP Code:
![]() Note the "$forumid == 156" bit--that's because that's the only forum I wanted to allow them to do this in. ![]() Note the "is_member_of()" bit. "6" is Admin, and "44" is the usergroup in question (our GFX Crew). Plugin 2: "Class User and Move thread" Hook Location: "showthread_start" Plugin Code: PHP Code:
![]() Note the "is_member_of()" bit. "6" is Admin, and "44" is the usergroup in question (our GFX Crew). Field 25 is the field in question on the userfield table. The "switch($gfx_class)" bit was only for assigning a specific icon to the thread, and you'll likely not need to worry about it (i.e., you can get rid of it). The bit under "// Class User" creates a User datamanager, and saves field25's new value. The bit under "// Move Thread" creates a Thread datamanager and moves the thread appropriately. The rest just redirects. ![]() If you've got questions, ask. Oh, and here's the template I called for the form, if you wanted to take a gander... HTML Code:
<!-- gfx_classing_poll :: GFX Classing system, written for Tess by Sarteck --> <form method="post"> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <input type="hidden" name="gfx_class" value="1" /> <input type="hidden" name="gfx_userid" value="$thread[postuserid]" /> <div class="tborder" style="padding: 4px;"> <div style="width: 100%;"> <div style="float: left; width: 50%; text-align: right;"> <span style="font-variant: small-caps; margin-right: 20px;">Tess Classing System</span> </div> <div style="float: left; width: 25%;"> <select name="field25" style="width: 90%; margin-left: auto; margin-right: auto; text-align: center;"> <option value="6"<if condition="$classed_user['field25'] == 'Terribad!'"> selected="selected"</if>>Terribad!'</option> <option value="1"<if condition="$classed_user['field25'] == 'Beginner'"> selected="selected"</if>>Beginner</option> <option value="2"<if condition="$classed_user['field25'] == 'Amateur'"> selected="selected"</if>>Amateur</option> <option value="3"<if condition="$classed_user['field25'] == 'Experienced'"> selected="selected"</if>>Experienced</option> <option value="4"<if condition="$classed_user['field25'] == 'Advanced'"> selected="selected"</if>>Advanced</option> <option value="5"<if condition="$classed_user['field25'] == 'Professional'"> selected="selected"</if>>Professional</option> </select> </div> <div style="float: left; width: 25%;"> <input type="submit" value="Class this user" style="width: 90%; margin-left: auto; margin-right: auto; text-align: center;" /> </div> <div style="clear: both;"> </div> </div> </div> </form> Yar, I think that was all of it. (And no, I am not Tess, I wrote it for Tess. xP) |
#4
|
|||
|
|||
![]()
You're a life-saver. Thanks a lot for the help.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|