Please or Register to create posts and topics.

Frontend Utilities Addon

Quote from Ole on May 23, 2020, 10:26 am

@ukbestrong

Now you need this page with shortcode anymore. The Profil edit is now an Ajax overlay.

I use the shortcode in a membership site dashboard. Is it not possible for this to work via a shortcode too?

I use the shortcode in a membership site dashboard. Is it not possible for this to work via a shortcode too?

@ukbestrong try this in functions.php and the old shortcode should work. - But without the Profile Header! Its the simple editor form.

function affu_edit_profile_shortcode () {
	ob_start();
	
	?><script>jQuery(document).ready(function($) {
	$('#affu-edit-profile').show();
	});
	</script>
	<div id="af-wrapper"><?php
	$process_messages = '';
	if (isset($_POST['affu_profile_editor_submit'])) {
			$affrontutils = AFFrontUtils::get_instance();
			$process_messages = $affrontutils->process_edit_profile($_POST, $_FILES);
		if (is_array($process_messages)) {
			foreach ($process_messages as $error){
				?><div class="error-message"><p><?php echo $error; ?></p></div><?php
			}
		} else {
			?><div class="success-message"><p><?php echo $process_messages; ?></p></div><?php
		}
	}
	
		global $asgarosforum, $current_user, $wp;
	
	$data = array(
			'asgarosforum'		=>	$asgarosforum,
			'user_id'			=>	$user_id      = get_current_user_id(),
			'userData'			=>	$userData	  = $asgarosforum->profile->get_user_data($user_id),
			'first_name'		=>	$first_name   = get_user_meta($user_id, 'first_name', true),
			'last_name'			=>	$last_name    = get_user_meta($user_id, 'last_name', true),
			'biography'			=>	$biography    = get_user_meta($user_id, 'description', true),
			'signature'			=>	$signature    = get_user_meta($user_id, 'asgarosforum_signature', true),
			'nickname'			=>	$nickname     = get_user_meta($user_id, 'nickname', true),
			'display_name'		=>	$display_name = $current_user->display_name,
			'process_messages'	=>	$process_messages,
			'current_user'		=>	$current_user,
			'wp'				=>	$wp
			);
	
	AfFrontUtils::exec_template('edit-profile', $data);
	?></div><?php
	
	$display = ob_get_clean();
    return $display;
}
add_shortcode('af-edit-profile', 'affu_edit_profile_shortcode');

 

Works absolutely perfectly!! Thanks so much @quenso

Some images uploaded via my iPhone appear upside down.

I believe this was fixed in the media uploader in WP 5.3.

Is there anything that could be done with this in your brilliant plugin? πŸ™ πŸ‘

Quote from ukbestrong on May 24, 2020, 9:07 am

Some images uploaded via my iPhone appear upside down.

I believe this was fixed in the media uploader in WP 5.3.

Is there anything that could be done with this in your brilliant plugin? πŸ™ πŸ‘

I've found the issue and fixed it. Comes with the next update.

Amazing support πŸ‘πŸ‘πŸ‘

@quensoΒ would it be possible to have a shortcode just for the Profile Photo Upload field? It would be really useful to include in a membership dashboard.

Thanks for all your hard work on this brilliant plugin!

@ukbestrong

Possible is nearly everything, but i don't think it's necessary for the most cases. Most people didn't combine this addon with other profile/membership plugins as these plugins normally include their own avatar function.

Quote from Quenso on May 28, 2020, 2:12 pm

@ukbestrong

Possible is nearly everything, but i don't think it's necessary for the most cases. Most people didn't combine this addon with other profile/membership plugins as these plugins normally include their own avatar function.

Thanks @quenso

I don’t have a membership plugin at all. I just created my own dashboard with various shortcode from different elements of the site 😊

Love this plugin πŸ‘

Quote from Quenso on May 24, 2020, 3:50 pm
Quote from ukbestrong on May 24, 2020, 9:07 am

Some images uploaded via my iPhone appear upside down.

I believe this was fixed in the media uploader in WP 5.3.

Is there anything that could be done with this in your brilliant plugin? πŸ™ πŸ‘

I've found the issue and fixed it. Comes with the next update.

Hi @quenso

I know you’re running this project in your spare time 😊

Would you have an idea when the next update would be released?

Best wishes

Rick