Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 24 replies - 26 through 49 (of 49 total)
  • @johnywhy

    Participant

    the OP wants to hide a group, but i’m not seeing the groups at all. How to make them show?
    thx

    @johnywhy

    Participant

    i’m not seeing groups on the user profile front-end editor at all, with or without the above plugin.

    @johnywhy

    Participant

    @johnywhy

    Participant

    the basic php filter code was share with me, needed for this. Now i’m investigating how to put a ‘Rich Text’ checkbox on the fields editor.

    Feel free to help over here
    https://wordpress.org/support/topic/how-to-add-textarea-field-to-buddypress-xprofile-custom-fields-type

    thx!

    @johnywhy

    Participant

    thank you very much!

    your solution is slightly different from this other one, which helps me learn.
    https://wordpress.org/support/topic/how-to-add-textarea-field-to-buddypress-xprofile-custom-fields-type?replies=5#post-8009134

    thx!

    @johnywhy

    Participant

    In case anyone is wondering why we would want a plaintext field:

    We don’t want our members formatting their bios with bold text, big fonts, colors, etc etc. We want our CSS to control presentation.

    @johnywhy

    Participant

    note, i also edited the .po file, and generated a new .mo from that

    you can download my zip here:
    https://www.dropbox.com/s/nx0ox3weg5khlpi/buddypress-xprofile-custom-fields-type-JW-TEXTAREA.zip?dl=0

    i noticed modernizr.js mentions ‘textarea’. Not sure what it’s doing, but i don’t think this is the cause:
    ‘ var c = a.html5 || {},
    d = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,
    e = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,
    f, g = “_html5shiv”,
    h = 0,
    i = {},
    j;
    (function() {
    try {
    var a = b.createElement(“a”);
    a.innerHTML = “<xyz></xyz>”, f = “hidden” in a, j = a.childNodes.length == 1 || function() {
    b.createElement(“a”);
    var a = b.createDocumentFragment();
    return typeof a.cloneNode == “undefined” || typeof a.createDocumentFragment == “undefined” || typeof a.createElement == “undefined”
    }()
    } catch (c) {
    f = !0, j = !0
    }’

    @johnywhy

    Participant

    hmm, ok, taking a different approach. i’m inspecting donmik’s files in ‘buddypress-xprofile-custom-fields-type’. Hope that’s ok, donmik!

    i found ‘datepicker’ in:

    bp-xprofile-custom-fields-type.php
    classes\Bxcft_Field_Type_Datepicker.php
    lang\buddypress-xprofile-custom-fields-type.pot
    lang\en_US.mo
    lang\en_US.po

    (ignoring the non-english files for the moment).

    i simply duplicated all the ‘datepicker’ code-chunks in these files, and replaced ‘datepicker’ with ‘textarea’.

    also duplicated the file ‘classes\Bxcft_Field_Type_Datepicker.php’, renamed it ‘Bxcft_Field_Type_Textarea.php’, and removed any date-specific code i found there.

    and so on and so forth.

    then i zipped it, uploaded to wordpress, activate, and added my new Textarea field to a form.

    i actually got no errors, and actually got a text field on my registration form!

    unfortunately, it’s only a one-line textbox, not a multiline textarea.

    hrm. In inspector, the displayed field is:

    <input type="string">

    so something in donmik’s code, or BP, or WP, is causing this to render as an <input> rather than <textarea>

    ….

    @johnywhy

    Participant

    i found ‘multiselectbox’ in the following files:

    buddypress.pot
    buddypress.pot
    buddypress.pot
    buddypress.pot
    bp-members\admin\css\admin-rtl.css
    bp-members\admin\css\admin-rtl.min.css
    bp-members\admin\css\admin.css
    bp-members\admin\css\admin.min.css
    bp-themes\bp-default\functions.php
    bp-themes\bp-default\functions.php
    bp-themes\bp-default\functions.php
    bp-themes\bp-default\functions.php
    bp-themes\bp-default\members\single\profile\edit.php
    bp-themes\bp-default\registration\register.php
    bp-xprofile\bp-xprofile-classes.php
    bp-xprofile\bp-xprofile-functions.php
    bp-xprofile\bp-xprofile-template.php
    bp-xprofile\bp-xprofile-template.php
    bp-xprofile\admin\js\admin.js
    bp-xprofile\admin\js\admin.min.js
    bp-xprofile\classes\class-bp-xprofile-field-type-multiselectbox.php
    bp-xprofile\classes\class-bp-xprofile-field-type-multiselectbox.php
    bp-xprofile\classes\class-bp-xprofile-field-type-multiselectbox.php
    bp-xprofile\classes\class-bp-xprofile-field-type-multiselectbox.php
    bp-xprofile\classes\class-bp-xprofile-field-type.php
    bp-xprofile\classes\class-bp-xprofile-field-type.php
    bp-xprofile\classes\class-bp-xprofile-field-type.php

    i welcome any suggestions on which of these i actually need to edit, at minimum, to create a new field-type.

    thx!

    @johnywhy

    Participant

    thx for that! css will be our quick-and-dirty fallback. But not a long-term solution.

    it would be cool to develop a proper control. i’m guessing this is part of the recipe for displaying on the user-profile page:

    bp_profile_field_data()

    but would be awesome if someone can share the full recipe to develop a custom field.

    i’m looking here for clues-

    Profile Fields Loop

    and also searching the buddypress install for ‘multiselectbox’– just to see how that one gets handled 🙂

    thx!

    @johnywhy

    Participant

    hi, thx for reply.

    enter in user registration form, and display in user front-end profile.

    want to be able to use it like any other field in “user fields” editor.

    thx!

    @johnywhy

    Participant

    Solved.

    It’s this plugin:

    Introducing Conditional Profile Fields for BuddyPress plugin


    really appreciate the awesome developer who built this!

    not this one. Unfortunately doesn’t work on WP 4.4.2
    https://wordpress.org/plugins/buddypress-conditional-profile-field/

    @johnywhy

    Participant

    @johnywhy

    Participant

    i found the groups conditionals, it’s in a different screen. but still cannot find field conditionals.

    appreciate any help.

    thx!

    In reply to: Unable to post

    @johnywhy

    Participant

    there was no error message, the post simply did not show up. I got around it by breaking my post up into several smaller posts. But it wasn’t that big to begin with, so i think it might be something else. Possibly leading spaces on some of the lines in the CODE section?

    @johnywhy

    Participant

    update, i tried bp_core_redirect without any params– still does not work. I suspect maybe it only works when a user is logged in?

    @johnywhy

    Participant

    this thread says bp_core_signup_user does not work:
    https://wordpress.org/support/topic/how-to-hook-into-add-new-member-in-buddypress

    the weird thing is, it’s doing something (because it goes to the login page with the hack, and to the activation page without the hack).

    So i think bp_core_signup_user is working. The issue appears to be bp_core_redirect.

    Paul Gibbs, Keymaster, suggests bp_core_redirect might get called in the wrong place– “too high up in the stack”. The OP also mentions that wp_redirect works, and in fact wp_redirect works for me.

    So, unless there’s some special reason why i should not use wp_redirect, that’s my fix.

    why does bp_core_redirect even exist, if wp_redirect is available? I assume it has some special function that wp_redirect cannot do. right?

    any ideas why it doesn’t work in this scenario? Maybe something wrong with those parameters i’m passing it, 100 and 1? What are those params? Where can i find documentation for bp_core_redirect? can’t find…..

    many thx

    @johnywhy

    Participant
    function bp_redirect($user) {
        $redirect_url = 'http://www.mysite.com/yeah';
        bp_core_redirect($redirect_url);
    }
    
    add_action('bp_core_signup_user', 'bp_redirect', 100, 1);
    
    ?>

    @johnywhy

    Participant
    <?php
    /*
    Plugin Name:       Redirect After Register
    Plugin URI:        http://laptopacademy.net
    Description:       Redirect after user registration. 
    Version:           1.0.0
    Author:            John Weiss
    Author URI:        http://laptopacademy.net/wordpress/instructor
    License:           GPL-2.0+
    License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    Text Domain:       redirect-after-register
    Domain Path:       /languages
    */

    @johnywhy

    Participant

    will try to post this bit by bit.

    this code is in “plugins\my-redirect.php”. The plugin is activated.

    @johnywhy

    Participant

    i’m trying to post the code, but i cannot see my posts here

    @johnywhy

    Participant

    Update: i put the code into bp-custom.php. Not quite working.

    It is getting redirected– but i’m not getting the page i entered into bp-custom.php. I’m getting redirected to the WP login screen.

    So the code is doing something. But not redirecting right.

    Any ideas?

    (you can forget about plugin question, just want to make the code work).

    thx!

    @johnywhy

    Participant

    or, if this was a plugin, where would i place this code?

    activate_redirect_after_register
    or
    run_redirect_after_register
    ?

    i’m guessing this part should go in the ‘activate’ function
    add_action(‘bp_core_signup_user’, ‘bp_redirect’, 100, 1);

    and everything should go in the ‘run’ section. Correct?

    thx!

    @johnywhy

    Participant

    Fantastic. Thx!

    How/when does WP execute it?

Viewing 24 replies - 26 through 49 (of 49 total)
Skip to toolbar