Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author donmik

    (@atallos)

    Hi,

    I think we can’t do this in the plugin. We can achieve what you want modifying the template edit.php profile.

    Go to your theme and search edit.php in members/single/profile folder. At line 136 you can see this:
    <?php do_action( 'bp_custom_profile_edit_fields' ); ?>

    This the function which renders the plugin’s new files. Cut this line and paste at line 115. The code will look like this:

    <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
    
    				<?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    					<p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    						<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></a>
    					</p>
    
    					<div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    						<fieldset>
    							<legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
    
    							<?php bp_profile_visibility_radio_buttons() ?>
    
    						</fieldset>
    						<a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
    					</div>
    				<?php else : ?>
    					<div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    						<?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
    					</div>
    				<?php endif ?>

    To me it seems like this should be the default functionality of the plugin.

    Is the only way to make this work is to edit a core file?

    Plugin Author donmik

    (@atallos)

    The problem is in the theme. It shows the profile fields after showing “Change visibility”. The plugin can’t do anything here about this, I think. I don’t think we can change the order without modifying code. It’s not a core file, it’s a file of your theme. Maybe you can achieve this with css but I believe this way is easier.

    @atallos

    Same problem to me and you’re right. It has to do with the theme buddypress is using.

    I use WP 3.5 and BP 1.6.3 with huddle theme. May it possible that your plugin is integrated in BP? I ask because before I installed your plugin the entry Users > Profile Fields was still there. However I installed your plugin and changed in the huddle theme the code you mentioned above. After it I saw it works but all entries showed open for public view though I switched before installation to friend view. After changing this in the front end profile now it works. After this I deinstalled your plugin and everything works the same way like before. This is the thought why I ask if your plugin is part of BP.

    Now my problem is that the way I see the radiobuttons in front end profile is not how I want to see it. In another theme for BP named BuddyBoss, I see something that could work with Ajax because there is only one button after each field and the options open after clicking the button. But in the huddle theme each radiobutton is under each field with three possibilities to choose.

    So what to do now? Is it better to keep your plugin installed or not?

    Thanks for support and your great plugin!!

    Regards
    Thorsten

    Plugin Author donmik

    (@atallos)

    This plugin is not part of BP. It extends xprofile functions of BP. This plugin add new field’s type for xprofile fields. Before you install this plugin you already haver Profile Fields. When you go to create a new field or edit one, in the select Field type, you can choose: Text box, Multi-line text box, Date selector, Radio buttons, Drop down select box, Checkboxes. Those fields come with Buddypress.

    This plugin add: Birthdate, Email, Website, Datepicker, Custom post type selector, Custom post type multiselector.

    The “change visibility” come from Buddypress, this plugin don’t change anything about this.

    This plugin is only useful if you need to add a birthdate field, email, website, datepicker, … If the original field’s type are enough for you, I think you don’t need this plugin.

    I hope I have clarified something…

    @atallos
    Thanks for your fast response and your explanation. Now I understand your plugin and I installed it again. Great plugin!!

    I did the German translation for it and I can send it to you if you want. But in your pot file I miss the lines for the following English words:

    a) Show age (hide birthdate)
    Check this if you want to show age instead of birthdate:

    b) Custom Post Type Selector
    c) Custom Post Type Multiselector

    The ‘Datepicker’ exists in BP. So with your plugin we’ve it twice. I named it in the translation ‘Datumsauswahl 2’

    If I get a new pot file I can translate the rest of the words I mentioned above.

    Regards
    Thorsten

    Plugin Author donmik

    (@atallos)

    Great! Thank you!

    I have just uploaded a new pot file. Send the german translation to [email protected] and I will upload it in next version.

    @atallos

    I did it. Please take a look into your Email account.

    Regards,
    Thorsten

    Plugin Author donmik

    (@atallos)

    1.4.8 include your German translation.

    Thanks again!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Field Visibility’ is closed to new replies.