MrsAngelD
Forum Replies Created
-
Forum: Plugins
In reply to: [Code Snippets] My site crash after update!I had this same problem, so I went Here: https://www.ads-software.com/plugins/code-snippets/advanced/ and at the bottom of the page downloaded the old version.
I suppose it’s a temporary fix until the dev fixes whatever this issue is.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0I agree, but thank you very much for all your help Andres ??
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0yes I did put them in proper location, it’s odd because this is a fresh website. I haven’t done anything besides install wordpress with buddypress & Buddypress Xprofile Custom Fields Type
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0Ok here’s what I did. I downloaded the test files and placed it in my buddypress folder. I still received the error. so I restored the orginal buddypress files in xprofile and the data saves but incorrectly.
for example I pick the month november, but when viewing the profile it shows may.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0Hi again Andres, just want to clarify, So I put the tests folder inside the buddypress folder?
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0@andres thank you for the files I have done what you said. While there is no longer a double field the entered information doesn’t save.
I enter a birthday and his save I receive this error
“There was a problem updating some of your profile information, please try again.”
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0Ok I’m looking at the patch but I can’t figure out where or how to apply it. Forgive me for not being that adept at patching.
Would it be possible to get a bit more detailed instructions on how to apply this patch.
Thank you very much donmik ??
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Problem with birthdate since BP 2.0I’m having this issue as well. I hope we hear something soon.
But I deactivated all the other plugins and activated each one one at a time this one is the only one where I get the error.
Nevermind, I installed the php text widget plugin and was able to use custom code along with the S8 provided shortcode to make a great looking sidebar login ??
Thank you so much, I’m still learning code, but this helps, and yeah I saw that I had forgotten to close the href tag after I posted this, silly me.
You have been so very helpful I truly appreciate it.
Hi Atallos,
I’m running into another issue I have added some custom code to my buddypress templates profile header
if ( $twitter_name = xprofile_get_field_data('Twitter') ) { echo '<a href="https://www.twitter.com/' . $twitter_name . '" target="_blank"><img src="'. get_bloginfo('template_url') .'/images/social_icons/twitter_icon.png">?'; }
The problem is as long as the code you gave me for the function is in my functions.php file the code above doesn’t display properly.
If this exists in functions.php
function custom_field_formats($value_to_return, $type, $id, $value) { if ($type == 'textbox') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Twitter') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://www.twitter.com/%s" target="_blank">%s</a>', $value, $value); } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; }
I get this in my profile header
https://i.imgur.com/07L2DvI.pngWithout it My profile header looks like this
Ohh I figured it out ?? YAY ME :D…lol. I realized they all needed to be apart of the same function, it’s working properly now for all my fields ??
add_filter( 'bxcft_show_field_value', 'twitter_field', 15, 4); function twitter_field($value_to_return, $type, $id, $value) { if ($type == 'textbox') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Twitter') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://www.twitter.com/%s" target="_blank">%s</a>', $value, $value); } elseif ($field->name == 'Google Plus ID') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://plus.google.com/%s" target="_blank">%s</a>', $value, $value); } elseif ($field->name == 'Facebook') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://www.facebook.com/%s" target="_blank">%s</a>', $value, $value); } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; }
Thank you so much, that actually does help immensely. Except I have a new problem. When I try to use the same example you gave me for multiple fields but change the names, only the first field actually links properly. The rest just append the user information to my own websites URL. Am I doing something wrong? is there a better way to format multiple fields?
add_filter( 'bxcft_show_field_value', 'facebook_field', 15, 4); function facebook_field($value_to_return, $type, $id, $value) { if ($type == 'textbox') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Facebook') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://www.facebook.com/%s" target="_blank">%s</a>', $value, $value); } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; } add_filter( 'bxcft_show_field_value', 'google_plus_field', 15, 4); function google_plus_field($value_to_return, $type, $id, $value) { if ($type == 'textbox') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Google Plus ID') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://plus.google.com/%s" target="_blank">%s</a>', $value, $value); } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; } add_filter( 'bxcft_show_field_value', 'twitter_field', 15, 4); function twitter_field($value_to_return, $type, $id, $value) { if ($type == 'textbox') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); if ($field->name == 'Twitter') { $value = trim(strip_tags($value)); $new_value = sprintf('<a href="https://www.twitter.com/%s" target="_blank">%s</a>', $value, $value); } else { $new_value = $value; } return '<p>'.$new_value.'</p>'; } return $value_to_return; }
OMG sleepy typos, let me try again…lol
all I want is to be able to format a field so that my users only have to enter their facebook name instead of the whole address, and then it will show a link to their facebook profiles. Can someone please show me how can I do this?
Angel