bcanr2d2
Forum Replies Created
-
Forum: Plugins
In reply to: [BP xProfile Location] Force user to autoselectI got my request around the wrong way!
I was trying to make sure the user selects a place from the drop down, and can’t submit the profile details until they have successfully used an autocomplete address
A quick guess at the code would be:
var has_geocode = document.getElementById(‘pp_<?php bp_the_profile_field_id(); ?>_geocode’).value
if (has_geocode==”) {
return false;
}or along that line, I am not that good with JS and getting it to do what I need it to do
What about when I need to send emails from user A to user B, where the email headers need to have User A’s email addresses as the from/sender?
Perfect, thanks for that.
Only thing is that instead of $slide->ID, I had to use $slide[“id”] to get the value from the arrayForum: Plugins
In reply to: [BP xProfile Location] Force Autocomplete to only allow addressesI think I may have got it all mixed up. I know you can specify the type street-addresses for what is returned by the Google Maps API.
https://developers.google.com/maps/documentation/javascript/places-autocompleteallows you to set the options to address. If I knew your Google Maps Places API code, I could change myself. But I want to know if I can hook into it instead.
Forum: Plugins
In reply to: [BP xProfile Location] Force Autocomplete to only allow addressesI am making sure to tell users to select an item from the drop down. Perhaps I didn’t make myself clear enough. What I am after is limiting my results to show addresses, is there any way to hook into your code to make a different request to the Google Maps/Places API to force it to return results that are addresses.
IE I don’t want people to be able to select Somewhereville, SomeState, SomeCountry. But to select 123 Some Street, Somewhereville, SomeState, SomeCountry.
I had a quick read through and someone else has managed to make this change, I am not sure how to acheive it.
Forum: Plugins
In reply to: [Postman SMTP Mailer/Email Log] Get Sender and From matching in emailsAnyone got a fix for this, as I believe it is causing my emails to be seen as spam, as the Sender and From email addresses do not match.
Forum: Plugins
In reply to: [BP xProfile Location] geocoding a prefilled locationFair enough, will just have to make sure the users interact with the dropdown.
Forum: Plugins
In reply to: [WP Private Content Plus] allowed_meta_keys not workingI hadn’t looked at the documentation correctly, and was using the incorrect shortcode, I should have been using:
[wppcp_private_content allowed_meta_keys=”mandatory_set” allowed_meta_values=”1″]
Now it looks to be happening to the month field instead!!
Thank you for that fix. Works fine now.
This function is looking at an Xprofile Field, that is updated automatically as a user enters values into their profile.
When they first login to edit their profile, Popup Maker is used to display a message about completing required fields, when that is saved, then it asks users to kindly fill out any optional fields, to assist them getting the attention they seek.When a user is considered to have completed their profile, there is no need to ask them to complete.
Below is the condition I added to Popup Maker, along with the function I used to look at an XProfile Field in BuddyPress.The conditions of my popup were
BP:Is Current Action = Edit
And then used the below, set to Not equal (! highlighted)This had the popup display when the user was editing in BuddyPress and when it was NOT complete
add_filter( 'pum_get_conditions', 'pum_profile_complete_conditions' ); function pum_profile_complete_conditions( $conditions ) { return array_merge( $conditions, array( 'password_page_unlocked' => array( 'group' => __( 'Pages' ), // Can match any existing group. 'name' => __( 'Profile Stage: Complete' ), // Label to identify it in the list 'callback' => 'profile_stage_complete', // Where the magic happens ), ) ); } function profile_stage_complete(){ //This is where we check to see if the profile stage is complete for a user // $profile_stage = xprofile_get_field_data('Profile Stage'); if ('complete' == $profile_stage){ //Return True if profile is complete return TRUE; } else { //Return False if not complete, so member gets popup advising to complete profile fields return FALSE; } }
- This reply was modified 8 years ago by bcanr2d2. Reason: Coding typo
Thanks for the push in the right direction. Just needed to do a simple lookup for the value of my BuddyPress Xprofile field value, and return TRUE or FALSE, depending on what value it found.
Worked as expected!
Thanks, I think I have some understanding, just need to code the right conditions.