Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-16-2002, 01:54 AM
bensonfactor bensonfactor is offline
 
Join Date: May 2002
Location: Mass, USA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mod/ S. Mod and Admin Only Profile Fields

Could anyone do it?
Reply With Quote
  #2  
Old 09-16-2002, 11:42 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1- Install Advanced Templates
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):
PHP Code:
[[($bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==7)]]
$post[fieldX]
[[/(
$bbuserinfo[usergroupid]==OR $bbuserinfo[usergroupid]==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.
Reply With Quote
  #3  
Old 09-16-2002, 12:39 PM
bensonfactor bensonfactor is offline
 
Join Date: May 2002
Location: Mass, USA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-16-2002, 03:53 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
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..
Reply With Quote
  #5  
Old 09-16-2002, 04:38 PM
bensonfactor bensonfactor is offline
 
Join Date: May 2002
Location: Mass, USA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, I noticed it didn't do quite what I wanted... hmm
Reply With Quote
  #6  
Old 09-16-2002, 05:00 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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)

PHP Code:
[[($post[usergroupid]==OR $post[usergroupid]==OR $post[usergroupid]==7)]]
$post[fieldX]
[[/(
$post[usergroupid]==OR $post[usergroupid]==OR $post[usergroupid]==7)]] 
It displays the fieldx if poster is admin/s.mod or mod.. I guess this is now what you want...
Reply With Quote
  #7  
Old 09-16-2002, 06:03 PM
bensonfactor bensonfactor is offline
 
Join Date: May 2002
Location: Mass, USA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need it so it displays in the edit profile area, only to admins etc.
Reply With Quote
  #8  
Old 09-17-2002, 07:31 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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..
Reply With Quote
  #9  
Old 09-17-2002, 09:42 AM
bensonfactor bensonfactor is offline
 
Join Date: May 2002
Location: Mass, USA
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In which template and where exactly?
Reply With Quote
  #10  
Old 09-17-2002, 09:51 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

template register_customfields add as FIRST and LAST line
Reply With Quote
Reply


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


All times are GMT. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04729 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete