PDA

View Full Version : Profile Field Privacy on POSTBIT


ThorstenA
07-27-2009, 03:35 PM
I want to display the profile field $post['field10'] but only if the user does not want to have it choosen as private on profile.php?do=privacy. How can I check the privacy of $post['field10'] in postbit? Thank you very much!

--------------- Added 1248709199 at 1248709199 ---------------

This checks for registered and unregistered privacy settings on postbit - you need to know your profile field number and the according database category name:

hook: showthread_query

$hook_query_fields .= ', IF(userfield.field10 AND requirement <' . iif(in_array($vbulletin->userinfo['usergroupid'], array(1)),'1','2') . ',userfield.field10,0) AS field10';

$hook_query_joins .= 'LEFT JOIN ' . TABLE_PREFIX . 'profileblockprivacy ON (profileblockprivacy.userid=post.userid AND profileblockprivacy.blockid="profile_cat1")';