![]() |
|
#1
|
|||
|
|||
|
Is there a way to, say, modify the SHOWLINK or other templates so that only members of a specific user group can see a particular Links or Custom field? If so, how?
I am wondering if you could use some logic something like this: "IF user's usergroup = Moderator OR usergroup = Administrator THEN display the field ELSE do not display the field". How would you code that? Thanks |
|
#2
|
||||
|
||||
|
Edit your 'adv_links_showlink_custombits' and change it to something like this:
Code:
<if condition="!is_member_of($bbuserinfo, X) AND $field['fieldid'] == Y"> <else /> <tr class="$bgclass"> <td>$field[title]:</td> <td>$field[value]</td> </tr> </if> Haven't tested that, but it should work.
|
|
#3
|
|||
|
|||
|
Hey! It works!!!!
Note the Brian refers to X and Y as the ID numbers above, not the names. You can find the ID number for the Usergroup by going to AdminCP-->UserGroups-->UserGroup manager. It is displayed there. The custom field ID# is found by going to AdminCp --> VB Links Directory--> Custom fields --> then rightclicking on the "Edit" link for the custom field in question to load it into a new browser window. You will find the fieldID# in the URL. (There is probably a more direct way to do this!) This appears to be a fairly simple way to "hide" a custom field! Thanks, Brian! :-) Last edited by ataraxia; 10-22-2004 at 06:36 PM. |
|
#4
|
|||
|
|||
|
very Good idea
But How i can find field id of this one in links/showlink.php View Link Details >> URL: http://xxxxx.com/xxxx.rar I do not want all usergroup to see orignal links any help please |
|
#5
|
|||
|
|||
|
You can find the ID #'s for user groups by going to your UserGroup Manager and looking in the little dropdown menu to the right of the group name you want. You'll see it says "Edit usergroup (ID:x)". "x" is the # you want.
|
|
#6
|
|||
|
|||
|
I find usergroup id
But How to find field id ?? |
|
#7
|
||||
|
||||
|
Admin CP => vBa Links Directory => Custom Fields
Hold your mouse over the [Edit] link and you will see the field id for that field at the end of the link in your browser's status bar. |
|
#8
|
|||
|
|||
|
Tanks for reply
But i mean that field in attchments Its not in Custom Fields |
|
#9
|
||||
|
||||
|
Edit your 'ADV_LINKS_SHOWLINK' template and add a condition around that table row.
|
|
#10
|
|||
|
|||
|
I am sorry brian
I try but no chance Please can you add that condition for template "ADV_LINKS_SHOWLINK" attatched usergroup ID is 58 Thanks Last edited by Brian; 12-25-2004 at 10:38 PM. |
|
#11
|
|||
|
|||
|
Any clues on how to add second custom field which is only viewable by certain usergroup.
Tried adding the code below but came out with an error. Any assistance appreciated. PHP Code:
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to exclude a usergroup from seeing the sidebar? | vorphalack | Troubleshooting / "How do I..." Questions | 11 | 11-12-2004 09:39 AM |
| After adding a new Usergroup this one can´t use CMPS | redlabour | Troubleshooting / "How do I..." Questions | 3 | 07-16-2004 09:00 AM |