vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Links Directory > vBa Links Directory v1.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2004, 11:45 AM
ataraxia ataraxia is offline
Junior Member
 
Join Date: Oct 2004
Posts: 21
Default HOW DO I: "hide" a field from all except a certain usergroup?

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
Reply With Quote
  #2  
Old 10-22-2004, 05:44 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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>
(Replace X with the usergroupid, and Y with the fieldid)

Haven't tested that, but it should work.
Reply With Quote
  #3  
Old 10-22-2004, 06:04 PM
ataraxia ataraxia is offline
Junior Member
 
Join Date: Oct 2004
Posts: 21
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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.
Reply With Quote
  #4  
Old 10-27-2004, 08:42 PM
Damas Damas is offline
Member
 
Join Date: Oct 2004
Posts: 37
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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
Reply With Quote
  #5  
Old 10-28-2004, 03:07 PM
ataraxia ataraxia is offline
Junior Member
 
Join Date: Oct 2004
Posts: 21
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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.
Reply With Quote
  #6  
Old 10-28-2004, 04:52 PM
Damas Damas is offline
Member
 
Join Date: Oct 2004
Posts: 37
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

I find usergroup id

But How to find field id ??
Reply With Quote
  #7  
Old 10-28-2004, 06:29 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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.
Reply With Quote
  #8  
Old 10-29-2004, 04:11 PM
Damas Damas is offline
Member
 
Join Date: Oct 2004
Posts: 37
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

Tanks for reply

But i mean that field in attchments

Its not in Custom Fields
Attached Images
File Type: gif fild25.gif (11.4 KB, 8 views)
Reply With Quote
  #9  
Old 10-29-2004, 04:16 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

Edit your 'ADV_LINKS_SHOWLINK' template and add a condition around that table row.
Reply With Quote
  #10  
Old 10-29-2004, 05:21 PM
Damas Damas is offline
Member
 
Join Date: Oct 2004
Posts: 37
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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.
Reply With Quote
  #11  
Old 12-24-2004, 11:11 AM
rascal rascal is offline
Junior Member
 
Join Date: Mar 2004
Posts: 10
Default Re: HOW DO I: "hide" a field from all except a certain usergroup?

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:
<if condition="!is_member_of($bbuserinfo, 6) AND $field['fieldid'] == 3">
<if 
condition="!is_member_of($bbuserinfo, 6) AND $field['fieldid'] == 4">
<else />
<
tr class="$bgclass">
    <
td>$field[title]:</td>
    <
td>$field[value]</td>
</
tr>
</if> 
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -4. The time now is 10:16 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.