qbey
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Off-domain STMP address in the “from” field.So there is no native solution that doesn’t break the entire validation?
Is the developer doesn’t know that SMTP exist?Forum: Plugins
In reply to: [Contact Form 7] Off-domain STMP address in the “from” field.Wouldn’t this disable the entire validation, not just the useless warning mentioned?
Forum: Plugins
In reply to: [ACF Galerie 4] Gallery miniatures disappeared after saving the postTemporary solution if anyone needs it:
to functions.php:
add_action('admin_enqueue_scripts', 'adminpanel_styles_and_scripts');
function adminpanel_styles_and_scripts() {
wp_register_script('admin-custom-js', get_template_directory_uri() . '/js/admin.js', ['jquery']);
wp_localize_script('admin-custom-js', 'wp_localize_data', ['ajax_url' => admin_url('admin-ajax.php')]);
wp_enqueue_script('admin-custom-js');
}add_action('wp_ajax_acfgalerie4_imgs_ids', 'acfgalerie4_imgs_ids_func');
add_action('wp_ajax_nopriv_acfgalerie4_imgs_ids', 'acfgalerie4_imgs_ids_func');
function acfgalerie4_imgs_ids_func() {
$images_ids = explode(',', $_POST['images_ids']);
$images_urls = array_map(function($image_id) {
$image_url_medium = wp_get_attachment_image_url($image_id, 'medium');
return $image_url_medium ?: wp_get_attachment_image_url($image_id, 'full');
}, $images_ids);
echo json_encode($images_urls);
die;
}to custom admin.js:
document.addEventListener('DOMContentLoaded', function() {
acfgalerie4_thumbnails_fix();
});
function acfgalerie4_thumbnails_fix() {
return new Promise((resolve, reject) => {
let gallery_container = document.querySelector('.acf-galerie-4-container');
if(!gallery_container) return;
let images_containers = [...gallery_container.querySelectorAll('.attachment-thumbnail-container')];
let images_ids = images_containers.map(container => container.dataset.id).join(',');
let prepared_data = {
action: 'acfgalerie4_imgs_ids',
images_ids: images_ids
}
let data = new FormData();
Object.entries(prepared_data).forEach(([key, value]) => data.append(key, value));
fetch(wp_localize_data.ajax_url, {
method: 'POST',
body: data,
headers: {
'Cache-Control': 'no-cache',
}
}).then(responce => {
if(responce.ok) {
responce.json().then(data => {
let images_elems = images_containers.map(container => container.querySelector(':scope > img'));
if(!images_elems || !Array.isArray(data)) return;
images_elems.forEach((img_elem, index) => {
if(!data[index]) return;
img_elem.setAttribute('src', data[index]);
});
});
}
else {
console.log('responce: NOPE');
}
}).catch(error => {
console.log('ERROR: ' + error);
});
});
}Forum: Plugins
In reply to: [Input Masks for Contact Form 7] PlaceholderDid you test this before deploying?
- default variant, generated by plugin itself (still splits by words, still broken):
https://i.imgur.com/Mm66uyg.png - manually edited variant with single default:’phone number*’ (still broken):
https://i.imgur.com/IJEYRF8.png - also tried without the required mark, just in case (still broken):
https://i.imgur.com/lvi6f7j.png
Forum: Plugins
In reply to: [Input Masks for Contact Form 7] PlaceholderWell… it doesn’t really look like it’s fixed.
- multi-word placeholder weirdly splits by words
screenshot: https://i.imgur.com/zysXxmC.png - shows only the first word
screenshot: https://i.imgur.com/IVpMatW.png - and completely breaks if used cyrillic characters
screenshot: https://i.imgur.com/rCfQkZh.png
Forum: Plugins
In reply to: [ACF Galerie 4] ACF Photo Gallery Field CodeThe topic already marked as resolved, but how about this small change in your code:
function bricks_acf_gallery($field_name){
//Get the ID of the portfolio item currently in loop
$portfolio_id = get_the_ID();
//Get the image array that is attached to this portfolio item
$portfolio_gallery = get_field($field_name, $portfolio_id);
//Get only IDs of these images as this is what Carousel and Gallery elements expect to get
$gallery_img_ids = array_map(function($gallery_item) {
return $gallery_item['attachment']->ID;
}, $portfolio_gallery);
return $gallery_img_ids;
}Forum: Plugins
In reply to: [ACF Galerie 4] Not possible to completely clear the galleryThanks for clarification here too.
But one more question.
Are there any plans to add a button to flush the entire gallery in a single click?Forum: Plugins
In reply to: [ACF Galerie 4] Unable to save any images in the galleryOh, so the field just behaves differently inside a group. Ok, thanks for clarification.
Forum: Plugins
In reply to: [ACF Galerie 4] Unable to save any images in the galleryWas wrong about this issue relation to RU-version of WordPress. Tested it on the fresh pure EN-version just now. Still can’t save anything in the gallery. So, in its current state, the plugin is simply not functional at all.
The demonstration:
https://www.youtube.com/watch?v=XrV_8vzq-B0Forum: Plugins
In reply to: [ACF Galerie 4] Not possible to completely clear the galleryWas wrong about the problem’s relation to WordPress RU-version. Tested it on the fresh pure EN-version now. Same problem.
These icons to remove images from the gallery just don’t appear.The demonstration (also demonstrate the problem with saving):
https://www.youtube.com/watch?v=XrV_8vzq-B0Forum: Plugins
In reply to: [ACF Galerie 4] Not possible to completely clear the gallerySuch icon simply wasn’t appear for me for some reason.
The problem may have something to do with the local version of WordPress. I discovered that in the russian version I can’t save the gallery at all.
Link to the new topic about it: https://ww.wp.xz.cn/support/topic/unable-to-save-any-images-in-the-gallery/Forum: Reviews
In reply to: [ACF Photo Gallery Field] Too buggySo, why native ACF get_fileds() function works fine with your gallery field on the pages but fails in AJAX?
Your custom acf_photo_gallery() looks really poor optimized, simply unacceptably poor for the pages with lots of separated galleries.
https://i.ibb.co/vkJVcyL/screenshot-03.pngForum: Reviews
In reply to: [ACF Photo Gallery Field] Too buggyI tried to give this plugin another chance, but… it’s even worse than I thought before.
It seams more or less ok when field data called on the page itself. But when it processed inside AJAX responce, for some reason this field’s data given as string instead of array.
called on the page: https://i.ibb.co/Wsywv7z/screenshot-01.png
called by AJAX: https://i.ibb.co/Vjb2sGd/screenshot-02.pngFirefox 91.1.0esr (64-bit) is installed here.
Switched to the unmodified default WordPress theme.
Disabled all plugins except Ninja Forms and WP Mail Logging.
Сhecked the selected email format.
Sent a message via Ninja forms.
Additionally activated WP Mail SMTP.
Sent a test message via WP Mail SMTP tools.Got exactly the same result, the email generated by Ninja Forms lost its wrapper tags when the test one was generated correctly.
Additional info.
Email generated by Ninja Forms lost not only the <html> tag, but also the head and body tags.Screenshots:
Ninja Forms email contents
WP Mail SMTP test email contents - default variant, generated by plugin itself (still splits by words, still broken):