Why can’t I just copy&past change-avatar.php to a custom template page
Really this makes no sense to me.
I created a custom template for a page im working on and copied over the change.avatars.php to the custom page..
Should work in theory, at least I thought.But the upload or crop didnt work.
The dotted box wasn’t even there.
So I ended up creating a index-action-change-avatar.php file and placed it in the BuddyPress/members/single directory and copied the change.avatars.php code over.
And also added general-after-wrap and general-before-wrap to the file.
Then back to my custom.php template file I added
<meta http-equiv="refresh" content="0; url=<?php echo bp_loggedin_user_domain();?>profile/change-avatar/" />
So now my custom page template looks like this before it gets redirected.
Then after the redirect the page looks like this.
I wanted my custom page to look like the 2nd pic.
Now if I remove the index-action-change-avatar.php file it would just redirect me to the normal user profile page to upload the Avatar.
But I didn’t want that for this custom page I am doing.
So now that I added the index-action-change-avatar.php file it will just override the default change-avatar.php as its expected to do but unfortunately that means when a user clicks on his profile settings and selects upload avatar it would direct them to the index-action-change-avatar.php file that has some changed settings I’ve added.
This is what I was trying to do.
Step 1-user registers on homepage.
Step 2-user is redirected to the check email for activation page.
Step 3-user clicks activation link within their email.
Step 4-user is redirected to my custom page notifying account is activated.
Now on step 4 I was going to add the option to upload their avatar or just continue.
Now what I could do is just add a href link that would redirect them to their profile to upload but it would defeat the purpose of what I was aiming for.
Another option i might just do is after activation have them auto logged in and redirected to the activity page then from there I’ll add a tour of the website.
- You must be logged in to reply to this topic.