arabtornado
Forum Replies Created
-
Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the label@moshensky Thanks allot, seems to be working very good for me so far and the pipe and placeholder issues are no longer exist now.
Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the labelThanks @moshensky , i would love to help but unfortuinatly i still not good enough in PHP and regex to be able to read and fully understand your code.
but by looking on your code i became curious about the reason you tried to get the fields from the post_meta and filter it using Regex instead of just capture the posted data in an array using WPCF7_Submission class as shown above.Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the labelOr maybe to avoid filters priority issues/conflict with other plugins it might be better to use WPCF7_Submission class instead like the following, and that method too solves the pipe issues by itself
add_action( 'wpcf7_before_send_mail', 'your_wpcf7_function' ); function your_wpcf7_function( $contact_form ) { $id = $contact_form->id; $submission = WPCF7_Submission::get_instance(); if ( $submission ) { $posted_data = $submission->get_posted_data(); } $data_string = json_encode($title); $ch = curl_init('https://webhook.site/d15e1662-a1ca-4fe5-beff-13f8c7350c91'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); }
Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the labelHi @moshensky
actually what i meant is that you can use the builtin CF7 classes or filters to get the data, for instance using wpcf7_posted_data filter you can capture the posted data. the code example below can capture the posted data in a form of an array with the real value even if the pipe was used and then you can do whatever you want with that data, on my exaple i posted it to https://webhook.site using cURl, and the posted data includes also the form id.add_filter( 'wpcf7_posted_data', function( $data ) { $data_string = json_encode($data); $ch = curl_init('https://webhook.site/d15e1662-a1ca-4fe5-beff-13f8c7350c91'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); return $data; } );
- This reply was modified 4 years, 9 months ago by arabtornado.
Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the label@moshensky Thank you for the update, But unfortuinatly i discovered a major bug on that update so i suggest to unpublish that update till it got fixed.
If a placeholder is used on a text field (maybe also on other types of fields) that cause the placeholder text to be sent to the google sheet instead of the user input value.I noticed that you are using a way to get the posted input fields that may uses Regex which im not sure that i understand but i guess this might be the reason for that issue.
Honestly i belive that there are a cleaner ways to do that which mentioned here
https://stackoverflow.com/questions/42807833/how-to-capture-post-data-with-contact-form7and i think that CF7 by default use the field value after pipe so it should not be a proplem and to get the value before pipe you need to [_raw_{field name}]
https://contactform7.com/selectable-recipient-with-pipes/Forum: Plugins
In reply to: [CF7 Spreadsheets] Send the field value to the sheet instead of the labelThank so much ??
Forum: Plugins
In reply to: [LiteSpeed Cache] Litespeed not working with WPML secondary domainGreat, thanks so much ??
btw i left a review too a few days ago ??Forum: Reviews
In reply to: [LiteSpeed Cache] Works great with shared hostingA2Hosting shared hosting has Litespeed servers
Forum: Plugins
In reply to: [LiteSpeed Cache] Litespeed not working with WPML secondary domainThanks so much that solved the issue.
I also really appriciate considering adding mult domain cloudflare support on the upcoming versions.- This reply was modified 5 years, 9 months ago by arabtornado.
Forum: Plugins
In reply to: [LiteSpeed Cache] Litespeed not working with WPML secondary domainI apology for confusion, I just noticed that the page caching is working fine for the second domain but minifying/compining works only on the main domain.
- This reply was modified 5 years, 9 months ago by arabtornado.
Forum: Plugins
In reply to: [LiteSpeed Cache] Litespeed not working with WPML secondary domainHere you are the report no.
YXHADWIK- This reply was modified 5 years, 9 months ago by arabtornado.
Forum: Plugins
In reply to: [LiteSpeed Cache] Litespeed not working with WPML secondary domainThanks for your reply, Please note that my question was consisting of 2 parts, the first part is that i have 2 domain example.net and example.de and im assigning a specific language for each domain using WPML.Caching and minify work fine for my main domain example.de however it doesnt work for my other domain example.net.
The second part is about adding both domains to the CDN tab taking in consedration that im using Cloudflare CDN which doesnt use a specific domain or subdomain for the contents served by the cdn…. in other words Cloudflare use this format for links example.net/image.jpg not cdn.example.net/image.jpg
I tried what you advised with Cloudflare API option enabled and disabled but that didnt solve anything for me actually, attached a screenshot showing my settings
- This reply was modified 5 years, 9 months ago by arabtornado.
Forum: Plugins
In reply to: [LiteSpeed Cache] Create custom ESI block without using shortcodeThanks so much for your reply
Forum: Plugins
In reply to: [LiteSpeed Cache] Create custom ESI block without using shortcodeThank you, I tried the first “Time” example but as you can see here
https://bonstato.net
the time is cached however the ESI TTL on the plugin settings is set to 0, also please note that i see a different time when i login as administrator or not however all user roles on ESI tab has 0 TTLForum: Plugins
In reply to: [LiteSpeed Cache] Create custom ESI block without using shortcodeThanks again for the quick response ??
I read the documentation but still having a hard time to understand it… maybe because im still new to programing and the lack of examples on the documentation.Anyway here is what i still dont understand hope you can clear it up for me..
——————————
1- To make it very simple lets use this example to output the time into the wp_head hook using ESIHere is the non-ESI code
add_action( 'wp_head', 'esi_time' ); function esi_time() { echo date("h:i:sa"); }
So im wondering how to implement the sample code above with the following ESI function? LiteSpeed_Cache_API::hook_tpl_esi($block, $hook)
————————————-
2- I read the documentation and what i understood is that i have to add vary value to the http header in htaccess using code like this
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC] RewriteRule .* – [E=Cache-Control:vary=ismobile]So please correct me if im wong, my guess for how to use LiteSpeed_Cache_API::vary() function is like that..
add_action( 'wp_head', 'esi_device' ); function esi_device() { LiteSpeed_Cache_API::vary('ismobile', 'This is mobile' , 'This is a PC') }
Also im wondering what if i needed to create more than 1 variation. for exammple if i have 5 countries and i wanna do a different variation for each country.
Im sorry for the too many questions im just trying to understand the LS functions.
Thanks