donmik
Forum Replies Created
-
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Limit uploaded file size and scaleThanks! I will add this tip to the faq in next update. 🙂
Why do you think the error is in the code you write?
Like I say before, Alterna is a premium theme so I can’t help you. Try to activate default buddypress theme to see if the error is still here. Many themes are not well coded, they have many mistakes and don’t use the latest hooks from buddypress so maybe you need to contact the support of Alterna Theme.
Hi,
First, please, don’t expect anyone answers you in less than one hour… You’re lucky because I check my email now and I have time to read this thread, but sometimes I have no time to answer immediately…
About your error, check if you have latest versions of wordpress, buddypress and my plugin. If not, update.
Then, try to use buddypress default theme, if the error disappear. This issue is related with your theme, if it’s a free theme, write here what theme you are using and when I have time I can check what is happening with your theme. If it’s a premium theme, contact with the support of your theme, maybe they can help, you pay for it…
You can also try to deactivate all other plugins (not buddypress and mine) and see if the error is still here or not. Maybe another plugin is not working well with my plugin. If you find what plugin is causing this, write here the name of the plugin and if the plugin is free I will try it.
Hi,
You cannot take the datebox field as an example because datebox is a type from buddypress, it has custom code to save its values.
You can check the function to save profile data in bp-xprofile/bp-xprofile-screens.php:
xprofile_screen_edit_profile.
Here, buddypress saves the value of fields:if ( !xprofile_set_field_data( $field_id, bp_displayed_user_id(), $value, $is_required[$field_id] ) ) { $errors = true; } else { do_action( 'xprofile_profile_field_data_updated', $field_id, $value ); }The only way to make your idea work is maybe concat values and saving all values with the same field_id.
The problem is there is no hook you can use when editing profile, so I don’t think you can do it but maybe I’m wrong.
I believe, a few weeks ago, someone ask me if there is a way to do this or something simliar and I answer the best way will be doing with javascript. Make only one field input text with Xprofile. Then write some javascript to hide this field and create the dropdown boxes you need, when the user select options in dropdown boxes, get it with javascript and write it on the hidden input field. Then buddypress will save it right in the database.
If you have 1.5.7.5, update to version 1.5.7.6. I made a mistake solving a bug. Now it is solved and the fields will show.
Thank you!
You’re right, I solve it in last version 1.5.7.5.Yes.
You can force the wordpress admin role using a hook. Buddypress has various hook in signup, I’m pretty sure you can use one of this.
If you define 5 roles like this: “role1”, “role2”, “role3”, “role4” and “role5”. You can map each role with a wordpress role like:
“role1” => “Administrator”
“role2” => “Subscriber”
“role3” => “Editor”
“role4” => “Author”
“role5” => “Contributor”.Then you can use the Xprofile ACL Plugin.
There is another way also. You can modify your templates and check what role is the user and what group you are going to display.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Add video field?Sorry, I’ve not created a field for videos, so for now, it is not possible with my plugin. Maybe in the future, I don’t know.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Add video field?If you only need the link, you can use website type or a textbox and then use the filter I provide ‘bxcft_show_field_value’ to show a youtube or vimeo player if you need.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Age not clickable??Ok, it’s because buddypress is looking for the age inside the database, but in database my plugin have recorded the birthdate in mysql format and not the age.
So, I think there is no easy solution to solve this, if you need to search inside your members I recommend you use BP Profile Search plugin.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Age not clickable??It’s because I removed the filter that is adding the links in my plugin. It was causing errors with my plugin. If you want it back you can filter the values returned by my plugin. This is a sample code:
function my_show_field_value($value_to_return, $type, $id, $value) { $field = new BP_XProfile_Field($id); if ($type == 'birthdate') { // Get children. $childs = $field->get_children(); $show_age = false; if (isset($childs) && $childs && count($childs) > 0 && is_object($childs[0])) { if ($childs[0]->name == 'show_age') $show_age = true; } if ($value != '') { if ($show_age) { $new_value = floor((time() - strtotime($value))/31556926); } else { $new_value = date_i18n(get_option('date_format') ,strtotime($value) ); } $new_value = xprofile_filter_link_profile_data($new_value, $type); $value_to_return = '<p>'.$new_value.'</p>'; } } return $value_to_return; } add_filter('bxcft_show_field_value', 'my_show_field_value', 10, 4);If you add this filter in your functions.php of your theme. The age will be a clickable field too.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] White description field – White fontHi,
I’m sorry, but I don’t think this is due to my plugin. My plugin is not modifying any css. Try to deactivate it, and I believe you will see the same output…
For now, you can use css to display the image the way you need. There is no way to fix a max width. I have this in mind for future releases, but I’m a bit busy these weeks…
It must be another thing. I repeat this is not an error. It’s a notice. You can search this function in my plugin. You will not find this function in it. Si I can’t believe my plugin is the only activated… Some info is missing here, I think… Sorry.