Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
  #1  
Old 06-03-2007, 04:48 PM
txsbmw txsbmw is offline
 
Join Date: May 2006
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Profile ReDesign - Add private fields?

I am redoing my memberinfo template. Started from scratch (but saved my original as this is my first time to do this with vb). Anyway I have the design and almost all info that I want all nice and sorted out. The only snag I am running into is instead of using the $customfields (because I want each field sorted out and placed elsewhere) I am placing each one (field) where they need to go. All the ones that are viewable to all (not private) are working like a charm. But I cannot get the private ones to work. So my question is how go I get my private fields to show to those who have permission to view them (such as me the admin) and be hidden from those not allowed to view them?

For example, I have one that is titled First Name with a field8

Running 3.6.7 PL1

Also the template_hooks that are in the original template. Do I need to add those to this? Honestly I am not even sure I understand that whole part.

Thanks in advance for any help!
Reply With Quote
  #2  
Old 06-04-2007, 02:48 AM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should add the template hooks as they are needed for the upcoming official products and may be needed for some modifications.

To hide the private fields, you will need to wrap them in a conditional to stop users who are not in the usergroups that have permission to view them from seeing them. This will be in the form of <if condition="is_member_of($userinfo, x,y,z)"> where x,y,z are the usergroup id numbers of the groups you wish to be able to see the private fields. Apart from this conditional, the rest of the adding them is as normal.
Reply With Quote
  #3  
Old 06-04-2007, 08:43 PM
txsbmw txsbmw is offline
 
Join Date: May 2006
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks I got the private fields covered doing exactly just that. I thought it was something like that but for the life of me could not remember (probably due to already working on it for 8 hours straight, lol).

About the template hooks, where should they be added or does it matter?

For example $template_hook[memberinfo_pos1] that went right after the main info, avatar, profile pic, etc. comment in the default one. But now I have the avatar and profile pic completely split up as well as some of the other information. Is there any place that can tell me what template hook is for what item? So i know where to place them all?
Reply With Quote
  #4  
Old 06-05-2007, 09:15 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have a look at where they were originally placed. That will give you an idea of where to place them in your new template.
Reply With Quote
Reply

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


All times are GMT. The time now is 01:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06750 seconds
  • Memory Usage 2,177KB
  • 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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete