Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • in reply to: SSL mixed content #206858
     tulipwork
    Participant

    Hi,

    I’m absolutely sorry for the wrong URL. Here is the real error messages that I wanted to refer:

    COPY CODE
    Mixed Content: The page at 'https://hawalove.com/' was loaded over HTTPS, but requested an insecure image 'http://seventhqueen.com/demo/sweetdatewp-blank/wp-content/uploads/2013/06/gray_pattern.gif'. This content should also be served over HTTPS.
    (index):1 Mixed Content: The page at 'https://hawalove.com/' was loaded over HTTPS, but requested an insecure image 'http://hawalove.com/wp-content/uploads/2018/08/gray_pattern.gif'. This content should also be served over HTTPS.
    (index):1 Mixed Content: The page at 'https://hawalove.com/' was loaded over HTTPS, but requested an insecure image 'http://hawalove.com/wp-content/uploads/2018/08/map-bg.png'. This content should also be served over HTTPS.
    VM69:1 carouFredSel: Set a width for the items!

    I finally removed the plugin because my host provider fixed the media https issue on their side in order to let you fix the mixed content issue. Now all pictures have “https” on url.

    in reply to: Prevent users to see the same gender #205502
     tulipwork
    Participant

    Thanks for your help!

    Here is the code:

    COPY CODE
    add_filter ('bp_ajax_querystring', 'modify_members_loop', 20, 2);
    function modify_members_loop ($qs=false, $object=false)
    {
    global $wpdb;
    if ($object != 'members') return $qs;
    
    // figure out if the logged-in user is male or female
    $gender = xprofile_get_field_data (2, bp_loggedin_user_id ());
    
    if ($gender == 'Male')
    $query = "SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 2 AND value = 'Female'";
    else
    $query = "SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 2 AND value = 'Male'";
    
    $custom_ids = $wpdb->get_col ($query);
    
    $args = wp_parse_args ($qs);
    $args['include'] = implode (',', $custom_ids);
    $qs = build_query ($args);
    
    return $qs;
    }
    in reply to: Sweet Date membership registration process #205356
     tulipwork
    Participant

    It’s absolutely perfect !

    If someone needs this snippet, I changed yours to that in order to be more efficient:

    COPY CODE
    function sqr_prevent_search_guest_user() {
        if ( class_exists( 'BuddyPress' ) ) {
            if (!is_user_logged_in() && (bp_is_directory() || bp_is_user())) {
                wp_redirect(home_url() . '/register/');
                exit;
            }
        }
    }
    add_action('template_redirect', 'sqr_prevent_search_guest_user');
Viewing 3 posts - 1 through 3 (of 3 total)

Log in with your credentials

Forgot your details?