-
AuthorPosts
-
September 27, 2018 at 7:46 pm #1015483
I had 2 questions.
How can I get rid of the black bars that appear above and below video screen
(see link below)
Also, Can I personalize the Auto Response message generated by the Contact Form that comes with Enfold? (with info from the form)
Such as
Dear {First Name}
Or do I need a Plug In Form to do that
Thanks,
DCSeptember 29, 2018 at 9:26 am #1015999Hey dcarlsondesign,
1) Unfortunately you can’t remove the black bars by adjusting the theme settings or code. The black bars appear because the video uploaded by the users may include horizontal black bars at the bottom and top of the video player to fit an aspect ratio which is different from the screen aspect ratio or video player aspect ratio. For example if you upload videos with a 4:3 aspect ratio the YouTube video player adds vertical black bars because the player uses a 16:9 aspect ratio. You can try tools like: https://filmora.wondershare.com/youtube-video-editing/remove-youtube-videos-black-bars.html to convert your videos to the right ratio, but even then the aspect ratio can vary from screen to screen.
2) You can use the avf_form_custom_autoresponder filter to customize the autoresponder message with your child theme.
Please add this code to your child theme functions.php:add_filter('avf_form_custom_autoresponder', 'avia_custom_autoresponder', 10, 4); function avia_custom_autoresponder($autoresponder, $message, $class, $new_post) { $name = urldecode($new_post['1_1']); $message = "<strong>" . __('Dear ','avia_framework') . $name . " </strong>"; foreach($class->form_elements as $key => $element) { if(isset($element['id'])) $key = $element['id']; $key = avia_backend_safe_string($key, '_', true); if(empty($key) || !empty($class->form_params['numeric_names']) ) { $iterations++; $key = $iterations; } // substract 5 characters from the string length because we removed the avia_ prefix with 5 characters at the beginning of the send() function $key = avia_backend_truncate($key, $class->length - 5, "_", "", false, '', false); $key .= $class->id_sufix; if(!empty($new_post[$key])) { if($element['type'] != 'hidden' && $element['type'] != 'decoy') { if($element['type'] == 'textarea') $message .= " "; $field_value = apply_filters( "avf_form_mail_field_values", nl2br(urldecode($new_post[$key])), $new_post, $class->form_elements, $class->form_params, $element, $key ); $message .= $element['label'].": ".$field_value." "; if($element['type'] == 'textarea') $message .= " "; } } } $message .= 'FINAL TEXT'; $autoresponder = $message; return $autoresponder; }
You can replace the text strings “FINAL TEXT” with some custom text (i.e. “Kind regards….”). In the first line of the function you might need to adjust 1_1 with the field value of your name field. I.e. if it’s the second field use 2_1, the third field 3_1, etc.
Best regards,
PeterSeptember 29, 2018 at 4:30 pm #1016074Well Enfold does it realy good with their video alb element.
If there are no bars in the film there will be very small in the embedded one of enfold.If you like to insert your films via iframe there might be methods to calculate the correct aspect ratio – with the additional advantage to insert all good youtube parameters which set the advertisements to a minimum ( video on pause and on the end) etc.
see here a A/B comparison left with recalculation and right the enfold one.
https://webers-testseite.de/weber/youtube-test/PS on the right side there is that borlabs cookie plugin working to double opt-in on youtube videos.
October 1, 2018 at 4:17 pm #1016673Thanks very much for your replies to my questions. Yes, I have tried different iFrame settings for width and height and that can help with the presentation on larger screens.
Peter- 1 more question on the Functions Code to customize the message
In the First line of code ‘1_1’ would correspond to the first name…(the first form field)?
Does this code then apply universally to all forms? If you had 2 forms … – 1) Request Info and 2) Contact Us….would there be additional code to distinguish the 2 forms?
Many thanks again for your great support.
DCOctober 3, 2018 at 7:41 am #1017381Hi,
Check for the formID value inside the $class parameter.
if($class->formID == 1) { // this is the first contact form } if($class->formID == 2) { // this is the second contact form }
If that is not working, try this:
if($class->form_params['avia_formID'] == 1) { // this is the first contact form } if($class->form_params['avia_formID'] == 2) { // this is the second contact form }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.