Forum Replies Created
-
AuthorPosts
-
September 13, 2018 at 9:16 am in reply to: Get variable of the url and attach it on subject of content form mail #1009282
Hi,
I use the contact form of enfold and on forms pages, I need to get a variable that I put for Get in the url from Google Adwords
The question is: is the variable already set when the user comes to the contact form page?
If the page url of the contact form page contains the variable – i.e. like https://mywebsite.com/contact/?myvariable=4356754
you can use this code:
add_filter('avf_sc_contact_form_elements', 'avf_shortcode_sc_contact_form_elements', 10, 4); function avf_shortcode_sc_contact_form_elements($form_fields, $atts) { $data = ''; $googlevariable = 'myvariable'; if(!empty($_REQUEST[$googlevariable])) { $data = htmlspecialchars($_REQUEST[$googlevariable]); } if($data) { $form_fields[$googlevariable] = array('label' => '', 'type' => 'text', 'value' => $data); } return $form_fields; }
to dynamically generate a new form field based on the variable (must be a php variable). You can replace myvariable with any other variable name.
The e-mail which is then send out will contain the variable value. You can also use the filters I posted here: https://kriesi.at/support/topic/formating-the-email-sent-via-contact-form/#post-1009256 to modify the message. If you want to alter the subject you can use this code
add_filter('avf_form_subject','avia_change_mail_subject', 10, 3); function avia_change_mail_subject($subject, $new_post, $form_params) { $subject .= urldecode($new_post['4_1']); return $subject; }
and replace 4_1 with the field id of the field which contains the variable information.
Best regards,
PeterHi,
Ok :)
Best regards,
PeterHey Asrada,
I added this code to the quick css field:
#top .avia-image-container:hover, #top .avia-image-container img:hover, #top .slide-entry .slide-image:hover { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); filter: grayscale(100%); transition: all 0.5s ease; } #top .avia-image-container, #top .avia-image-container img, #top .slide-entry .slide-image{ -webkit-filter: grayscale(0%); -moz-filter: grayscale(0%); filter: grayscale(0%); } #top a:hover .image-overlay .image-overlay-inside, #top a:hover .image-overlay { display: none !important; }
as a starting point. It changes the effect of the content slider and “MIT DAMPF FÜR KLIMA UND UNTERNEHMEN” image.
Best regards,
PeterHi,
These warnings will be fixed with the next theme update. If you want to get rid of them you can download and install the developer build (see link in private content). You can use ftp to install the update ( https://kriesi.at/documentation/enfold/how-to-install-enfold-theme/#ftp-install ).
Best regards,
PeterHey Andreas_BS,
It depends on which animation you’re using. The default values are set in enfold/css/shortcodes.css:
#top.avia_transform .avia_start_delayed_animation.fade-in { -webkit-animation: avia-fadein 1.5s 1 ease-out; /* Safari 4+ */ animation: avia-fadein 1.5s 1 ease-out; /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.pop-up { -webkit-animation: avia_image_appear 0.5s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* Safari 4+ */ animation: avia_image_appear 0.5s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.top-to-bottom { -webkit-animation: avia-ttb 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* Safari 4+ */ animation: avia-ttb 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.bottom-to-top { -webkit-animation: avia-btt 0.8s 1 cubic-bezier(0.165, 0.840, 0.440, 1.000); /* Safari 4+ */ animation: avia-btt 0.8s 1 cubic-bezier(0.165, 0.840, 0.440, 1.000); /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.left-to-right { -webkit-animation: avia-ltr 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* Safari 4+ */ animation: avia-ltr 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.right-to-left { -webkit-animation: avia-rtl 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* Safari 4+ */ animation: avia-rtl 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); /* IE 10+ */ opacity: 1; } #top.avia_transform .avia_start_delayed_animation.av-rotateIn { -webkit-animation: avia-rotateIn 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); animation: avia-rotateIn 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); opacity: 1; } #top.avia_transform .avia_start_delayed_animation.av-rotateInUpLeft { -webkit-animation: avia-rotateInUpLeft 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); animation: avia-rotateInUpLeft 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); opacity: 1; } #top.avia_transform .avia_start_delayed_animation.av-rotateInUpRight { -webkit-animation: avia-rotateInUpRight 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); animation: avia-rotateInUpRight 0.8s 1 cubic-bezier(0.175, 0.885, 0.320, 1.275); opacity: 1; }
Basically you can copy this code to your child theme and then replace the “s” values (i.e. 1.5s or 0.8s) in the code with different values. s stands for seconds – i.e. 0,8s translates to 800 milliseconds.
Best regards,
PeterHey tebitrongmbh,
1) Please add this code to your child theme functions.php to remove the “false” replies.
add_filter('avf_form_mail_form_field', 'avia_change_checkbox_form_values', 10, 7); function avia_change_checkbox_form_values($form_field, $new_post, $form_elements, $form_params, $element, $key, $field_value) { if($field_value == 'false') $form_field = ''; return $form_field; }
You also need to patch the enfold/framework/php/class-form-generator.php with a new filter – the modified code can be found here: https://pastebin.com/raw/k4KiZK0z . Simply delete the code in enfold/framework/php/class-form-generator.php and copy the code from https://pastebin.com/raw/k4KiZK0z into the file.
The next theme update should include the patched class-form-generator.php and the child theme code will also work with future updates.
2) You can use this code to replace “true” with “yes”:
add_filter('avf_form_mail_field_values', 'avia_change_checkbox_return_values', 10, 4); function avia_change_checkbox_return_values($value, $new_post, $form_elements, $form_params){ if($value == 'true') $value = 'Yes'; return $value; }
3) These filters should help you adjust the datepicker format.
add_filter('avf_datepicker_dateformat', 'new_date_format'); function new_date_format() { $date_format = "mm / dd / yy"; return $date_format; } add_filter('avf_datepicker_date_placeholder', 'new_date_placeholder'); function new_date_placeholder() { $placeholder = "MM/DD/YY"; return $placeholder; }
You can use the default php date placeholders ( http://php.net/manual/de/function.date.php ) to change the format.
4) To modify the message (i.e. to add line breaks, etc.) you can use this code for the autoresponder e-mail:
function avf_form_autorespondermessage_mod($message) { // modify the content of the $message variable here. i.e. use str_replace() $message = str_replace('TEXT TO BE REPLACED', 'TEXT TO INSERT', $message); return $message; } add_filter('avf_form_autorespondermessage', 'avf_form_autorespondermessage_mod', 10, 1);
and this code for the message you get from the contact form:
add_filter('avf_form_message', 'avf_form_message_mod_checkbox', 10, 3); function avf_form_message_mod_checkbox($message, $new_post, $form_params) { // modify the content of the $message variable here. i.e. use str_replace() $message = str_replace('TEXT TO BE REPLACED', 'TEXT TO INSERT', $message); return $message; }
Best regards,
PeterSeptember 12, 2018 at 9:41 pm in reply to: Get specific meta data of an image via shortcode #1009076Hi!
Great, glad I could help you :)
Best regards,
PeterHi!
Great, glad you found a solution :)Cheers!
PeterHey!
I made a basic implementation of the script. I had to replace a small part in the javascript:canvas.width = wt; canvas.height = ht;
with
//canvas.width = wt; canvas.width = 1000; //canvas.height = ht; canvas.height = 120;
too limit the effect to the header area. The css code (quick css) now looks like
canvas#c{ position:fixed; z-index:9999; top: 0; left: 0; }
This is a very basic implementation and I didn’t test it on mobile devices. Also to be honest I drop the ball at this point because the “fine tuning” and optimization of the script for mobile devices is a time intensive task and not covered by our support forum.
Cheers!
PeterSeptember 12, 2018 at 5:56 pm in reply to: Password-Protect Page Not Working in Google Chrome #1009040Hey!
I noticed an “insecure content warning” in Google Chrome (which means resources are loaded over http:// urls and not secure https:// urls). I fixed this warning by replacing the http:// favicon url (Enfold > Theme Options) with a https:// url. Please check if this solved the password protection issue too.Cheers!
PeterHi!
I tried to log in but I got the error “ERROR: Invalid username. Lost your password?”.
Cheers!
PeterHey!
Yes I changed the code for you – basically I just replaced the value 14787 in the code above with 14746 (attachment id of the other slide image).
Regards,
PeterHey!
Please deactivate all plugins (except the og meta plugin) and check your website again. If this doesn’t help please talk to the server administrator / host and ask if Linkedin is blocked on your server. I tried my website (which also runs Enfold and Yoast SEO) and the inspector could read all og meta values (see link in private data).Cheers!
PeterHi!
Thank you for the hint. You can try other plugins like: https://wordpress.org/plugins/theme-editor/
Regards,
PeterHey jellyfish007,
I’d recommend to use the code I posted in the private area to load the effect on your page – you can add it to the child theme functions.php. Then add the canvas element
<canvas id="c" class="lineItUp">no canvas support</canvas>
to the header.php and style it with css (i.e. set the width to 100%, set the position to absolute, the z-index to 10 etc.)
Best regards,
PeterHi,
I modified the search page for you – I had to add this code to the child theme functions.php file:
add_action('ava_after_main_title', 'ava_after_main_title_mod', 10, 1); function ava_after_main_title_mod() { if(!is_search()) return; echo do_shortcode("[av_slideshow_full size='featured' min_height='0px' stretch='' animation='slide' conditional_play='' autoplay='false' interval='5' control_layout='av-control-default' src='' attachment='' attachment_size='' position='top left' repeat='no-repeat' attach='scroll' av_uid='av-jjm0kbb6'] [av_slide_full id='14787' av_uid='av-4pbdy1'][/av_slide_full] [/av_slideshow_full] [av_submenu which_menu='' menu='660' position='center' color='alternate_color' mobile='active' mobile_submenu='aviaTBmobile_submenu' av_uid='av-jjm0iu4w'] [av_submenu_item title='Menu Item 1' link='' linktarget='no' button_style='' av_uid='av-5ahrxl'] [av_submenu_item title='Menu Item 2' link='' linktarget='no' button_style='' av_uid='av-4og3eh'] [/av_submenu]"); }
You can test it here: https://www.barrelracingtips.com/?s=horse
Best regards,
PeterHi,
I added a video widget (with a vimeo video) to the “displayed everywhere” widget area. You can see the video i.e. here: https://staging.h105244.server08.campusspeicher.de/shop/hut-rohlinge/ (right sidebar). I applied the fix to the child theme functions.php.
Best regards,
PeterHi,
We recommend Yoast SEO https://wordpress.org/plugins/wordpress-seo/
Enfold is optimized for this plugin and we’re in contact with the the plugin developers.
Best regards,
PeterSeptember 12, 2018 at 2:46 pm in reply to: Enfold 4.4.1 – still don't load css background images with CSS file merging #1008948Hi,
To fix this issue please open up enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php and replace line 500:
if( ( false !== stripos( $match[1], 'http://' ) ) || ( false !== stripos( $match[1], 'https://' ) ) || ( false !== stripos( $match[0], $base_url ) ) )
with
if( ( false !== stripos( $match[1], 'http://' ) ) || ( false !== stripos( $match[1], 'https://' ) ) || ( false !== stripos( $match[0], $base_url ) ) || ( false !== stripos( $match[0], '/wp-content/' ) ) )
Best regards,
DudeSeptember 12, 2018 at 1:40 pm in reply to: Can not update to ENFOLD 4.4.1 ( on all our websites ) #1008903Hi,
Please create me an admin account and I’ll look into it.
Best regards,
PeterHi,
1)
I added this code to the quick css field to solve the different white issue:/* Remove opacity from animated numbers */ #top #wrap_all .avia-no-number { opacity: 1; }
2) I solved the translation issue with “RANNÉ CVIČENIE”. See https://dominicandreamtour.com/sk/workshopy/ . I cloned the old page, translated the text (which worked) and trashed the old entry.
3) I can’t reproduce the issue on the themes options page. I tried to change the logo several times, removed the logo, added it, etc. but the fonts (and the other settings) were not affected. Maybe a browser extension causes this issue.
Best regards,
PeterHi,
The browser console didn’t give me any javascript errors. Please ask the server administrator/host if the php error log contains errors. I suspect this might be a file reading issue because the font elements use the icon font files to generate the icon selector.
Best regards,
DudeHey mike,
You can find the guidelines for a refund here: https://themeforest.net/page/customer_refund_policy
Best regards,
PeterHi,
Please try to add this code to the child theme functions.php:
add_filter('avf_load_google_map_api_prohibited', 'avia_block_theme_google_maps', 10, 1); function avia_block_theme_google_maps($block) { global $post; if(is_admin() && !empty($post->ID) && ($post->ID == 10007)) $block = true; return $block; }
It should block the google maps api loaded by enfold on the page you gave us.
Best regards,
PeterHi,
You can use a plugin like https://wordpress.org/plugins/search-and-replace/ to replace all occurrences of the http:// url with https:// urls in the database. This should fix the insecure source errors
Best regards,
PeterHi,
Did you try to inspect your website with the linkedin inspector: https://www.linkedin.com/post-inspector/ – do you get any errors?
Best regards,
PeterSeptember 12, 2018 at 10:06 am in reply to: Applying shortcode css changes in child theme and autoclose submenu on mobile #1008814Hey jells2,
1) You can add this code to your child theme to remove the default menu.css:
function avia_remove_menu_css() { wp_dequeue_style( 'avia-module-menu' ); } add_action( 'wp_print_styles', 'avia_remove_menu_css', 100 );
Then add the (modified) css code of menu.css to your child theme styling code.
2) I added this code to the child theme functions.php to automatically close the menu on click:
add_action('wp_footer', 'avia_auto_close_mobile_menu', 10); function avia_auto_close_mobile_menu() { ?> <script> (function($) { $('#av-custom-submenu-1 a').on( "click", function() { $('.mobile_menu_toggle').trigger('click'); }); })(jQuery); </script> <?php }
Best regards,
PeterHi,
Please try to generate a new api key here: https://console.developers.google.com/apis/credentials
and cklick on the pencil icon. Make sure no restrictions (domain restriction, etc.) are activated. Then try to activate the new api key with Enfold.Best regards,
PeterSeptember 12, 2018 at 9:13 am in reply to: Google API – With the second Google map the problem begins. #1008797Hi,
I get following error message:
You have exceeded your request quota for this API. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors
The error indicates a self-imposed daily limit has been exceeded or no billing account is set up. Please go to this page: https://console.developers.google.com/google/maps-apis/apis/maps-backend.googleapis.com/quotas and check your quotas. The contingent per day must be set to a reasonable value (i.e. 500).
Best regards,
PeterHey Kyle,
Maybe the issue is caused by serialized data in the database. Please try use a script like: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to replace all occurrences of http://yourlivedomain.com with http://yourstagingdomain.com
Best regards,
Peter -
AuthorPosts