I invite you to listen to this episode 0 of the FoodyHacking Podcast where I explain the concept behind FoodyHacking. You can also learn more about Mike and me on the About us page.
(adsbygoogle = window.adsbygoogle || []).push({}); Why FoodyHacking?A few months ago, I realized one crucial thing: the success of many recipes lies a lot on the unwritten tips and tricks that the recipe author assumes you know. More often than not, a least in my personal case, I do not know the subtleties, the techniques or the tricks that make or break a recipe.
That why we, Michael and me, decided to launch FoodyHacking. We want to focus only on those cooking tips, tricks and secrets that will make you a better cook. We want chefs, producers, food professionals and bloggers share their experience with you so you'll improve your skills in the kitchen.
What is FoodyHacking?Meet the pros - Video Interviews and demonstrationsWe visit, camera and microphone in hand, chefs, producers and other food professionals and we ask them to share their cooking secrets. We produce videos, podcasts and written articles inspired directly from those visits.
Please subscribe to our Channel on YouTube where we post our video content.
Let's talk about food - The FoodyHacking PodcastYou can learn very specific techniques and tricks by listening to the FoodyHacking Podcast where we interview bloggers and home-cooks like you. Again, we ask them to share their experience and to reveal actionable tips and secrets.
You can find all the podcast episode by clicking here.
Bringing it all together on FoodyHacking.comThe "home base" of FoodyHacking is our website www.foodyhacking.com. We work hard to produce top quality and relevant content, again, to help you in the kitchen. We also curate high quality content from other websites and blogs.
Subscribe to our weekly newsletter to receive the latest new cooking tips, tricks and secrets.
Please subscribe to the weekly FoodyHacking Newsletter
$ymce = jQuery.noConflict(); jQuery(document).ready(function($ymce){
/ Blank Field Check / function blankFieldCheck(formID) { err = 0; msg = '';
if ($ymce('#35-01dd2321ba-email').val() == ''){ msg += '
} return (err > 0 ? false : true); }
/ Added event listener to form submission @since v5.2 / $ymce( 'body' ).on( 'submit' , '#yks-mailchimp-form_35-01dd2321ba' , function(e) {
var singleOptinMessage = 'Thank You for subscribing!
\n'; var doubleOptinMessage = 'Thank you for subscribing! Check your email for the confirmation message.
\n'; var optinValue = 'true';
e.preventDefault();
// Make sure the api key exists if( blankFieldCheck( "35-01dd2321ba" ) ) {
// append pre-loader to submit button for some feedback $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input[type="submit"]' ).after( '' );
var form_data = $ymce(this).serialize();
// disable all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input' ).each(function() { $ymce(this).attr('disabled','disabled').css('opacity','.8'); }); // disable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).attr('disabled','disabled').css('opacity','.8'); });
$ymce('#ykfmc-submit_35-01dd2321ba').attr('disabled', 'disabled'); $ymce('#yks-status-35-01dd2321ba').fadeOut('fast'); $ymce('#yks_form_error_message').fadeOut(); $ymce('.preloader-confirmation-box').remove();
$ymce.ajax({ type: 'POST', url: 'http://www.foodyhacking.com/wp-admin/admin-ajax.php', data: { action: 'yks_mailchimp_form_submit', form_action: 'frontend_submit_form', form_data: form_data }, dataType: 'json', success: function(MAILCHIMP) { if( MAILCHIMP == 1 ) {
// remove the preloader jQuery( '.yks-mc-submit-preloader' ).remove();
// re-enable all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').children().each(function() { $ymce(this).not('#wrapper').removeAttr( 'disabled' ).css( 'opacity' , '1' ); });
// re-enable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).removeAttr('disabled').css('opacity','1'); });
// custom message based on opt-in settings value // single opt-in if ( optinValue == 'false' ) { $ymce('#yks-status-35-01dd2321ba').html(''+singleOptinMessage+'
'); } else { // double opt-in $ymce('#yks-status-35-01dd2321ba').html(''+doubleOptinMessage+'
'); }
/ Header Call Out Submission / if ( $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').hasClass( 'header-callout-form' ) ) {
var container_height = $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( '#wrapper' ).css( 'height' ); var container_width = $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( '#wrapper' ).css( 'width' ); var top_margin_confirmation = ( container_height.replace( 'px' , '' , container_height ) - 25 ) / 2;
$ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( '#wrapper' ).css( 'height' , container_height ).css( 'width' , container_width ); $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( '#wrapper' ).children().each(function() { $ymce(this).fadeOut('fast'); }).promise().done( function() { var confirmation_message = $ymce('#yks-status-35-01dd2321ba'); $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( '#wrapper' ).html( confirmation_message ); $ymce( confirmation_message ).removeClass('yks-status').fadeIn('fast').attr( 'style' , 'text-align:center;vertical-align:middle;margin-top:19%;'); });
} else {
// remove the preloader jQuery( '.yks-mc-submit-preloader' ).remove();
// re-enable all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find('input').each(function() { $ymce(this).not('#wrapper').removeAttr( 'disabled' ).css( 'opacity' , '1' ); });
// re-enable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).removeAttr('disabled').css('opacity','1'); });
/ reset the form, append the confirmation before the form / $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input[type="text"]', 'textarea' ).val( '' ); $ymce('#yks-status-35-01dd2321ba').fadeIn('fast');
}
} else {
// bundle the MailChimp returned error // with our yks mc error messages $ymce('#yks_form_error_message').fadeOut('fast', function() { jQuery(this).remove(); });
$ymce('#ykfmc-submit_35-01dd2321ba').removeAttr('disabled');
if( MAILCHIMP.errorResponse.toLowerCase().indexOf( "is already subscribed to the list." ) >= 0 ) {
$ymce('#yks-mailchimp-form_35-01dd2321ba').prepend(''+MAILCHIMP.errorResponse+' Click Here to send an email to update your profile.').delay(1000).queue(function(next){ // remove the preloader jQuery( '.yks-mc-submit-preloader' ).remove();
// remove disable from all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input' ).each(function() { $ymce(this).removeAttr( 'disabled' ).css('opacity','1'); }); // re-enable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).removeAttr('disabled').css('opacity','1'); });
jQuery('#yks_form_error_message').fadeIn(); var offset_top = jQuery('#yks-mailchimpFormContainerInner_35-01dd2321ba').offset().top; jQuery("html, body").animate({ scrollTop: offset_top - 50 }, 500 ); next(); });
} else {
$ymce('#yks-mailchimp-form_35-01dd2321ba').prepend(''+MAILCHIMP.errorResponse+'').delay(1000).queue(function(next){ // remove the preloader jQuery( '.yks-mc-submit-preloader' ).remove();
// remove disable from all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input' ).each(function() { $ymce(this).removeAttr( 'disabled' ).css('opacity','1'); }); // re-enable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).removeAttr('disabled').css('opacity','1'); });
jQuery('#yks_form_error_message').fadeIn(); var offset_top = jQuery('#yks-mailchimpFormContainerInner_35-01dd2321ba').offset().top; jQuery("html, body").animate({ scrollTop: offset_top - 50 }, 500 ); next(); });
}
} }, // append our error up above, much like the others! error: function(error) { jQuery( '#yks_form_error_message' ).remove(); jQuery( '.yks-mc-submit-preloader' ).remove(); jQuery( '.ykfmc-submit' ).removeAttr( 'disabled' ); jQuery('#yks_form_error_message').fadeIn(); jQuery('#yks-mailchimp-form_35-01dd2321ba').prepend(''+error.responseText+'').delay(1000).queue(function(next){ // remove the preloader jQuery( '.yks-mc-submit-preloader' ).remove();
// remove disable from all input fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'input' ).each(function() { $ymce(this).removeAttr( 'disabled' ).css('opacity','1'); });
// re-enable all select fields while the data send... $ymce('#yks-mailchimpFormContainerInner_35-01dd2321ba').find( 'select' ).each(function() { $ymce(this).removeAttr('disabled').css('opacity','1'); });
jQuery('#yks_form_error_message').fadeIn(); var offset_top = jQuery('#yks-mailchimpFormContainerInner_35-01dd2321ba').offset().top; jQuery("html, body").animate({ scrollTop: offset_top - 50 }, 500 ); next(); }); console.log( error ); } }); } return false; });
jQuery( 'body' ).on( 'click' , '.update-email-profile-link' , function() { jQuery( '.preloader-confirmation-box' ).remove(); var user_email = jQuery(this).attr('alt'); var list_id = jQuery(this).parents('form').attr('rel'); var list_id_split = list_id.split( '-' ); var list_id_final = list_id_split[1]; jQuery( '#yks_form_error_message' ).after( '' ); $ymce.ajax({ type: 'POST', url: 'http://www.foodyhacking.com/wp-admin/admin-ajax.php', data: { action: 'yks_mailchimp_form_submit', form_action: 'send_update_email', user_email: user_email, list_id : list_id_final }, dataType: 'html', success: function(response) { jQuery( '.preloader-confirmation-box' ).html( response ); console.log('success' + response); }, error: function(errorResponse) { jQuery( '.preloader-confirmation-box' ).html( errorResponse ); console.log(errorResponse); } }); return false; });
});
function extractEmails(text) { return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+.[a-zA-Z0-9._-]+)/gi); }
Email Address *
First Name
Last Name
Country
Are you ?
Professional chef
Amateur chef
(adsbygoogle = window.adsbygoogle || []).push({});