RonaldS
Forum Replies Created
-
I use Polylang with the mentioned 5 languages.
I also use [newsletter form=”1″] and each lang does get the right form number.
Maybe you can take a look if so then please send me an email then I can send you the credentials for admin.Is there a possibility that you give me a solution.
I have change the shortcode on Newsletter page into:
[newsletter form=”4″]
Now the submit button and email input field are correct.
But the rest of the translation is still in English.I do not get it anymore!
In Subscription Configuration – Subscription page I declared this:
<p class="textwhite fontbigger"><b> Inscrivez-vous aujourd'hui.</b></p> <p class="textwhite">S'il vous pla?t remplir votre adresse e-mail.</p> <p class="textwhite">Je peux me désinscrire à tout moment.</p> <p class="textwhite">{subscription_form}</p>
English text and French button. What is the solution. Already the second day finding my way through the plugin. Should be easier.
- This reply was modified 6 years, 2 months ago by RonaldS.
Please give me a code example. Makes it easier to understand. My age (>60) needs it.
- This reply was modified 6 years, 2 months ago by RonaldS.
In Custom Forms I have add this code as Form=1:
<div class="tnp tnp-subscription"> <form method="post" action="https://mysite.com/en/newsletter?na=s" onsubmit="return newsletter_check(this)"> <input type="hidden" name="nlang" value="en"> <div class="tnp-field tnp-field-email"><input class="tnp-input-field" type="email" placeholder="Email" name="ne" required></div> <br /> <div class="tnp-field tnp-field-button"><input class="fusion-button button-flat button-round button-large button-green" type="submit" value="Sing up for free"> </div> </form> </div>
I call it with this shortcodes:
[newsletter] [newsletter_form form="1"] [/newsletter]
No results.
But it does not appear on screen. Still get the default label and no placeholder text.Ok. got it working. function wpse27856_set_content_type() is overdone here when already using $headers .= “Content-type:text/html;
Thanks for your wonderful plugin.Hi, I found a solution, but it works till sending the email. When receiving I get an empty email.
Here what I done so far:
function email_template($message){ $lang = ''; $lang = pll_current_language(); $tmpl = 'newsletter_subscription_template_'.$lang; $options_template = get_option($tmpl); if($options_template) { $template = implode($options_template); } else { $template = '{message}'; } $message = str_replace('{message}', $message, $template); return $message; } add_action( 'email_template', 'email_template' );
In the code I call the function:
$headers = "MIME-Version: 1.0" . "\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\n"; $template = email_template($message); $mail = wp_mail($to, $subject, $template, $headers);
When echo wp_mail($to, $subject, $template, $headers); the correct template is loaded including the text instead of {message}.
But when running the code I get empty email.It seems that you have to declare a function to tell WP the content type.
But it still does not work.function wpse27856_set_content_type(){ return "text/html"; } add_filter( 'wp_mail_content_type','wpse27856_set_content_type' );
Any idea how to solve this?
Regards,
RonaldThat works. Thanks
Yes that is why I mention the plugin including the url to it. See first text above. By default I get a perfect template for ALL emails. The template creates a perfect header – footer – body for all WP emails.
When I start your Newsletter and do a test with a new newsletter template, your template is included within my default template. Means I get 2x header – 2x footer.
That is the issue. Try it by yourself.I can rewrite code of both plugins but that is not a solution. When updating plugins I loose it all. Somehow Newsletter needs to check or disable other email templates if active. You know the way how to.
Ronald
I am not an mediator. Therefor I add his address so you can discuss it with them.
If you want to see the result of your code within the default email template then send me an email so I can send the html file to you.
Now newsletter plugin disturbs the default template.- This reply was modified 6 years, 5 months ago by RonaldS.
Ok thanks. Maybe something for next version/update. The space for the h1 + header is far to high.
Regardssolved
Issue solved:
edited functions.php and deleted this lines;
add_filter(‘mailtpl/customizer_template’, function(){
return get_stylesheet_directory() . ‘/admin/templates/default.php’;
});Now it is working without warnings.
Forum: Plugins
In reply to: [Payment Button for PayPal] Missing orders in adminHi, I have set a new test button [wp_paypal button=”buynow” name=”Verified” currency=”EUR” amount=”10.00″ target=”_blank”]. The order is accepted by Paypal.
The log report seems to be okay. Dont see any error.
Now I get the order in the /wp-admin/edit.php?post_type=wp_paypal_order listing.So it works now.
- This reply was modified 6 years, 7 months ago by RonaldS.
I run a cron script everry night to inform me about an update that I do then.
It runs already a year.
When activating your plugin this week I get the error message.Here the script without credentials:
if (!isset($_SERVER[‘HTTPS’]) || $_SERVER[‘HTTPS’] != ‘on’) {
$full_url = ‘https://’.$_SERVER[‘HTTP_HOST’];
} else {
$full_url = ‘https://’.$_SERVER[‘HTTP_HOST’];
}global $wpdb;
date_default_timezone_set(‘Europe/Amsterdam’);
$timestamp = time()+date(“Z”);// echo gmdate(“Y-m-d H:i”,$timestamp);
mysqli_query($conn, “UPDATE wp_agent_adds SET date_added = CURDATE() WHERE user_id <= 1273 AND right(user_id, 1) in (1,3,7,9)” );
$to = get_option(‘admin_email’);
$subject = ‘cronjob: ‘.gmdate(“Y-m-d H:i”,$timestamp);
$sender = get_option(‘admin_email’);
$currentDomain = preg_replace(‘/www\./i’, ”, $_SERVER[‘SERVER_NAME’]);
$headers = ‘FROM ME’;$mail = wp_mail( $to, $subject, ”, $headers );