mkstebbins
Forum Replies Created
-
Thanks @champsupertramp for the affirmation and for the example as well. I’ll implement over the weekend.
Thanks @champsupertramp and very nice to add the code example.
That did the trick and it works well now.
I scanned the documentation and release notes for an answer before posting here. Is there a better place I can find changes like this for future updates?
Thanks again,
-Michael
I face a similar problem with a textarea where the content of the textarea does not trigger for appearance of other fields. All other field types I’ve tried work fine (I haven’t tried images though) and I haven’t yet found a solution.
Perhaps textarea and image fields are not supported for conditional logic by design?
-M
Answering this myself:
Using UM 2.0.43 It appears that merely updating wordpress user meta is enough and no UM functions are needed up set or update values of UM fields.
update_user_meta("3848", 'name_of_field','its_value');
- This reply was modified 5 years, 2 months ago by mkstebbins.
@champsupertramp It seems that setting the primary role (UM role) to have a value of 100 solved each of the problems when using PHP 7.0.
I’m curious how you knew to look at role priority and that it behaves differently from PHP 5 to PHP 7, but I’ll take it now that it works!
Thank you.
-Michael
Hi @champsupertramp, That is great news.
Just for fun, I upgraded from UM 2.0.43 to UM 2.1.1 on a working site under PHP 5.6. After clearing a few typical items (re-update visibility of fields, and tabs in the admin UI) it appeared I had the site working pretty well with PHP 5.6.
Then, switching the working UM 2.1.1 site from PHP 5.6 to PHP 7.0, three things are observed in my instance:
- Users are not presented with the option to edit their own profiles. E.g., the gear icon only presents “My Account”, “Logout”, and “Cancel” and is missing “Edit Profile” under PHP 7.0. Attempts to access site.org/user/userfirst-last/?profiletab=main&um_action=edit are redirected to site.org/user/userfirst-last/?profiletab=main
- The main member directory no longer lists any of the 2,000+ members as it does when PHP 5.6 is used. Instead the page has no listings at all.
- On the site.org/account/ PHP 7.0 removes the “Delete Account” option whereas php 5.6 presents the “Delete Account” option.
Perhaps there is a checklist I’ve missed or some documentation to go over. Let me know and thanks,
-Michael
- This reply was modified 5 years, 4 months ago by mkstebbins.
- This reply was modified 5 years, 4 months ago by mkstebbins.
- This reply was modified 5 years, 4 months ago by mkstebbins.
Thanks @mansurahamed. That did the trick.
Key difference being that we rename the um_profile_content_mycustomtab_default action and also add the ‘custom’ => true,
Thanks for the insights.
-Michael
Sure, Thanks. I take the example code from github etc, and change what we hope are the relevant names as such. And now… it works ??
The thread on Github suggested to change *all* occurrences of “mycustomtab” but it appears that um_ actions that contain that cannot change.
/* extend main profile tabs for certification_status */ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs[certification_status] = array( 'name' => Certification Status, 'icon' => 'um-faicon-comments', ); return $tabs; } /* Then add content to that tab */ add_action('um_profile_content_mycustomtab_default','um_profile_content_certification_status_default'); function um_profile_content_certification_status_default( $args ) { echo 'Hello Certification Status!'; }
Good to see that detail on creating custom tabs for the profile.
Are we still stuck with ?profiletab=mycustomtab it seems trying any other name just doesn’t work. for example…
$tabs[‘certification_status’] = array(…
simply breaks. Ideas?
Thanks!
-Michael
Figured it out. Hope this helps others:
insert into wp_usermeta (user_id , meta_key, meta_value)
VALUES (user_id,”profile_photo”, “profile_photo.jpg”)It was a mistake to assume that all Ultimate Member usermeta fields contained um_.
-Michael
Forum: Plugins
In reply to: [Members List Plugin] Change member path from /author/ to /member/If it helps others, this can be modified with the plugin “Edit Author Slug”. Using this tool can change the slug of the author profiles shown by Members List Plugin.
Borisv, That is the key. Thank you. So what is now clear is this:
1. There can only be one page where users can edit profile.
2. That page can have multiple short codes related to custom profile forms, where each custom profile form is restricted (only view/edit) by a specific user type
3. More than one form can be displayed in sequence and using custom templates is a great way to control the look and flow.WIth a few tweaks it looks like we can use Ultimate Member and get the results we are looking for.
Thanks again for your help.
-Michael
Thanks Borisv, There does seem to be a lot to discover in this plugin. The conditional logic is one of the primary reasons it appeals for what we need.
We could definitely ask at the top of every form, “Are you a Beer person or a Scotch person?” and then use branching and logic from there, but the dichotomy was for example only. There are eight+ different types of members on our site, each requiring different sets of fields.
It looks as if Ultimate Member doesn’t support multiple custom profile forms that allow editing.The “Edit” option under the gear always funnels to one instance of profile edit.
Unless we learn otherwise, we’ll go the conditional branching route.
-Michael
P.S. It’s really good of you to document the plugin. Thank you in advance.
Hi Borisv – Good observation, that cog. When choosing “Edit Profile” the cog submenu, the system seems to default to only one edit form. The same one for editing, no matter how many custom profile forms I create.
So there still seems some work for me to do to present several different custom forms for the end user member to edit a subset of his or her profile fields.
To create a use case:
IF a user clicks on a link… “Manage My Beer Tasting Certification Requirements” he should see four fields: Name, Email, and “Beer tasting experience years” and “upload Beer Tasting Certificate”.
If a user needs to “Manage my Scotch Tasting Certification Requirements” she should see four fields, two of which are different than the Beer taster: Name, Email and “Number of years living in Islay Scotland” and “Upload Distiller’s Certificate”
Presenting Scotch fields to Beer tasters… well we all know those don’t mix well.
So in the end, we want to present more than one custom form for the end user member to edit a special and unique subset of his or her profile fields–ostensibly defined by a customer profile form.
Do you think we’re going about it the wrong way?
-Michael
- This reply was modified 8 years, 4 months ago by mkstebbins.
- This reply was modified 8 years, 4 months ago by mkstebbins.
Borisv, you are kind to answer, thank you.
My goal is to present several custom forms for the end user member to edit a subset of his or her profile fields.
To test this, using your answers, I’ve set every field on the form to “user editable” and changed the User Page to the new user page, and then to the account page and several others to see if any of these would open up edit capabilities on the form.
It seems that the Ultimate Member default use of a “Profile Form” is to display information rather than allow the user to use a form to edit it.
If that is true, then we may be trying to get the plugin to do something it is not designed to do. If the intent for the “Profile Form” if to allow the end-user (member) to use a form to edit some fields from his profile, then I wonder what remains to use this functionality.
Thank you for your help, and let me know when we might hire you for this help rather than ask here.
-Michael