sanjayojha
Forum Replies Created
-
Forum: Reviews
In reply to: [EWWW Image Optimizer] Free version is just a showcase[ Personal comment redacted ]
I got nothing by using your plugin, It does not solve any of my problem.- This reply was modified 7 years, 1 month ago by Jan Dembowski.
Forum: Plugins
In reply to: [VS Contact Form] Loading of CSS and JSHello @lurie,
Yes I used the above for not to load the css on every page. You have to edit the plugin main filevscf.php
like this// enqueues plugin scripts function vscf_scripts() { if(!is_admin() && is_page('contact-us')) { wp_enqueue_style('vscf_style', plugins_url('/css/vscf-style.css',__FILE__)); } }
where
contact-us
is slug of your page where you want to show the contact form.
One drawback with this approach is, when you will update the plugin you have to do it again.Forum: Plugins
In reply to: [VS Contact Form] SMTP?Hi Guido,
Saw the latest update (6.6). You have done wonderful job by adding auto reply functionality, ??
I want to add 2 things here
1. There is little typo in description of plugin page, where you describe about SMTPbut when using SMTP there’s less change your form submissions are being marked as spam.
I think it should be chance (not change)
2. I saw that now by default you are using [email protected] (where yourdomain.com is domain of website using your plugin). I think you should not use this because by default WordPress add this when there is no
From:
header in $headers variable passed to thewp_mail()
function
See this code from wordpress at line 318.
Since wordpress is doing it by default there is no need to repeat the same thing in your code.
Hope this helpForum: Plugins
In reply to: [VS Contact Form] Loading of CSS and JSHi Guido,
I read the documentation of loadCSS and it is really nice solution, but it is for loading css in asynchronous manner. That mean your css file will be still on every pages, though it will not effect page speed loading time. What you need is conditional loading of css.If your short code is being used on pages and post only, we could have a solution, but for widget and page template it is not possible.
Forum: Plugins
In reply to: [VS Contact Form] Loading of CSS and JSHi Guido,
I think there is no good solution for adding style, since it required to be loaded in<head>
and short code is displayed after page is loaded fully. So above methods are good with JS only.Using your previous solution is also not very efficient.
To achieve, this you have to use lots of nuts and bolts and I don’t think it is good practice.Forum: Plugins
In reply to: [VS Contact Form] SMTP?Guido
I don’t want to create a settingspage for this (my form should stay very simple) so I’m thinking about creating a new shortcode attribute. So user can add a custom “From” header in shortcode.
I can understand your concern, your main selling point is simplicity, but providing simple setting pages is not a huge task and it does not make the plugin complicated. Settings are used to define constant thing that probably will remain same for entire site, whereas shortcode parameters are used to control the current instance of your plugin. This is design principle.
Since formfrom
email address will remain same for most of the users for all forms they will use, so it is good candidate to be a setting, while messages can be different for different form so it is good candidate to be shortcode attributes. Suppose a user changes its domain in future, now he/she has to manually edit your shortcode at every place where it is present. But if it has a setting then he can easliy change it from there.
In short, I am telling you to understand the importance of where to use settings and where to shortcode attributes. Hope you will consider it in future, if not this timeBut until now most form submissions where being deliverd so there was no need to change it.
Hosting companies are getting stricter now, specially the good one. So you have to prepare yourself ??
I’m trying to build a function that load plugin styleheet only when form is being displayed. Almost there
That’s fantastic news, You know now days everyone is getting optimization freak, people want to optimize every bit, since google has said that fast loading pages will be preferred. You will be amazed that people are checking every possibilities in google pagespeed tool, GTmaterix and Pingdom. Surprisingly lot of plugin popped in recent days which are related to optimization.
When you achieved that, please do not forget to mention it on your plugin main page, believe me people will prefer it over other for only this reason.
John,
I think CF7 is still a very good plugin, if you want customization, control and want to make some complex form. Every aspect can be controlled. But in case you need a very simple form Guido has very simple solution indeed.
Sorry for my bad english I am not native of english speaking country ??- This reply was modified 7 years, 4 months ago by sanjayojha.
Forum: Plugins
In reply to: [VS Contact Form] SMTP?Guido,
John is right about contact form 7.
And thank you for mentioning me in update of your pluginForum: Plugins
In reply to: [VS Contact Form] SMTP?Hello Guido,
Nice work in updating plugin, I think its good approach. However, I suggest to provide a setting in admin area for this in your future updates, becasue not everyone wants to use their admin email.
Forum: Plugins
In reply to: [VS Contact Form] SMTP?I am glad its clear for you now,
Here is my best explanation of your 2 questions
1. Its anotherheader
of the form, known asReply-To
. Most of the good plugin like Contact Form 7 and Guido plugin add this in their script along withFrom
header I explained above. WhenReply-To
is present in header of received email then replying to it will go to theReply-To
email address, when it is not present it will take email fromFROM
header.
Hope the magic is clear now ??2. In most of the cases it is not required. But I have encountered some server which demand it. So if your server is very strict than chances are you need to make that email address. But to my coding life, I have encountered only 2 occasions where it was necessary.
Forum: Plugins
In reply to: [VS Contact Form] SMTP?Also, any plugin that uses PHPMailer() instead of mail() should work for you.
PHPMailer is popular for sending emails via SMTP methods, not its default mailer function (Which wp_mail uses). So your host think that if a plugin is using PHPMailer() that mean it is using SMTP.
I Think, the problem is with the form
headers
. Different plugins set it different. As I suggested in the first post of this thread, try to change the header value ofFrom
in Guido plugin code ( it should be an email from your domain, something like, [email protected], where yourwebsite is your domain name )
See this code on line number 129 in vscf-form.php,$headers .= "From: ".$form_data['form_name']." <".$form_data['form_email'].">" . "\r\n";
Change it to something like this
$headers .= "From: noreply <[email protected]>" . "\r\n";
Though, I am not 100% sure if this is going to solve your problem.
Forum: Plugins
In reply to: [VS Contact Form] SMTP?Hello John,
Guido is correct
I will try to explain ( though I am not better in it ?? )1. PHP’s
mail()
feature(sendmail) is a basic feature in built in PHP. So anyone who knows PHP can write simple php script to send emails. If server (hosting) does not disable it than any PHP script having this function can send email by just writing simple line of codes.2. PHPMailer() is a class or (small library) written in PHP (Link) Which allow you to send emails more efficiently. It also uses the same PHP built in function mentioned above to send emails by default. But it has also very powerful SMTP methods to send emails. So basically it has multiple methods of sending emails and more efficiently.
3.
wp_mail
is wordpress function which is built on the top ofPHPMailer()
class to send emails. So basicallywp_mail
usesPHPMailer
which in its core usesmail
(sendmail) function of built in PHP function as one of its option.wp_mail
uses PHPMailer default, which ismail()
function as I said above.If your server has disabled the
mail()
function of PHP, than neither PHPMailer() class norwp_mail
function can send emails. You have to use SMTP in that case.- This reply was modified 7 years, 4 months ago by sanjayojha.
Forum: Plugins
In reply to: [VS Contact Form] Loading of CSS and JSUse
Reply-To
for visitor email, admin will be able to reply him/her.From
should always an email of sender domainForum: Plugins
In reply to: [VS Contact Form] SMTP?It was also not working for me. In my case I change the
From
header with a email of my domain and its start working.Forum: Plugins
In reply to: [VS Contact Form] Loading of CSS and JSThank you!
I have little tweaked it, Since I am using it on my contact page only, therefore I putis_page('slug')
along withis_admin()
check. So it is working now.Though, one possible solution is, first register the style (or js) wp_register_style wp_register_script
Next you can load the script/style on demand. For example when you render a shortcode with
wp_enqueue_style("style-id")
andwp_enqueue_script("script-id")
.Check this thread – enqueue-scripts-styles-when-shortcode-is-present
Also, the header of wp_mail is creating problem in some server. I saw that you are using the email of form submitter as
From
header. It should be an email from your domain.- This reply was modified 7 years, 4 months ago by sanjayojha.