grigriouaibdesign
Forum Replies Created
-
Forum: Plugins
In reply to: [ALO EasyMail Newsletter] subscribe page break with no effect with 2.7.0 ?@eventualo
1) WORKS !!!
thank you for your answer, i correct my mistake and all works fine !
🙂2) IMPROVE
i would like improve a little bit your fantastic plugin :
could you add something like this to enhanced the graphic view in subscriber page
for best view, adding style class :alo-easymail-subscr-page.php
line 42
echo "<p>".__("Error during activation. Please check the activation link.", "alo-easymail")."</p>";
with
echo "<p class='msg_error'>".__("Error during activation. Please check the activation link.", "alo-easymail")."</p>";line 44
echo "<p>".__("Your subscription was successfully activated. You will receive the next newsletter. Thank you.", "alo-easymail")."</p>";
with
echo “<p class=’msg_ok’>”.__(“Your subscription was successfully activated. You will receive the next newsletter. Thank you.”, “alo-easymail”).”</p>”;line 100
echo “<p>”.__(“Your subscription was successfully deleted. Bye bye.”, “alo-easymail”).”</p>”;
with
echo “<p class=’msg_ok’>”.__(“Your subscription was successfully deleted. Bye bye.”, “alo-easymail”).”</p>”;line 139
echo “<p>” . __(“Your subscription to mailing lists successfully updated”, “alo-easymail”) . “.</p>”;
with
echo “<p class=’msg_ok’>” . __(“Your subscription to mailing lists successfully updated”, “alo-easymail”) . “.</p>”;i found !!!
i have a key in redirection settings… i delete it and the bug disappear 🙂
so sorry
thanks for our fantastic plugin@danieliser,
hello, sorry for the wait. I will try to explain how to reproduce the bug:Settings in polylang menu:
/options-general.php?page=mlang&tab=settings
a) radio button : language is define by name of directory in permalink
b) check box is checked : hide information of language in url for default language
c) radio button : remove /language/ in permalink (mywebsite.com/en)
d) check box is checked : homepage url contains language code instead of name of page (mywebsite.com/) instead of (mywebsite.com/accueil)Create popup from popupmaker menus:
a create 1 popup in 2 languages. So we have 2 popups with same settings
in FRENCH
– mypopfr
in ENGLISH
– mypopenCreate pages:
in FRENCH
– http://mywebsite.com/ (here is the page “accueil”)
– http://mywebsite.com/nouscontacter/
in ENGLISH
– http://mywebsite.com/en/ (here is the page “home”)
– http://mywebsite.com/en/contactus/Now we are ready to test !
1) from
http://mywebsite.com/nouscontacter/
the popup mypopfr appear !
if i clic on language switcher (http://mywebsite.com/en/contactus/ show in statusbar)
the landing page is correct = http://mywebsite.com/en/contactus/
the popup mypopen appear !
the rewriting works fine = OK
the popup works fine the good language popup appears = OK2) from
http://mywebsite.com/
the popup mypopfr appear !
if i clic on language switcher (http://mywebsite.com/en/ show in statusbar)
the landing page is incorrect = http://mywebsite.com/en/popup/mypopen/
the rewriting works bad = BUGif i change the settings in polylang with the check box d) unchecked
(mywebsite.com/accueil) instead of (mywebsite.com/) it’s works fine = OK
but i don’t want to use http://mywebsite.com/en/home/ i would like to use http://mywebsite.com/en/ i would like to hide the name of my homepage just have the language code according the settings in polylanghere is the bug,
what going wrong ???Forum: Plugins
In reply to: [ALO EasyMail Newsletter] subscribe page break with no effect with 2.7.0 ?hi eventualo
thanks to you that’s works !
the link of confirmation do the correct view for the confirm page
🙂i remove my code to create a captcha just under and it work,
the bug is here, but i don’t see where what’s wrong here ????/** * Add an anti-spam question to Easymail newsletter subscription form */ function easymail_add_antispam ( $fields ) { $captcha_question_valeurs = array("what color of an orange ?", "what color of sky ?"); $captcha_question_aleatoire = array_rand($captcha_question_valeurs); $captcha_question_aleatoire_resultat = $captcha_question_valeurs[$captcha_question_aleatoire]; // Custom field: Captcha $fields['cf_captcha'] = array( 'humans_name' => __("".$captcha_question_aleatoire_resultat."", "alo-easymail"), 'sql_attr' => "VARCHAR(1) NOT NULL", 'input_type' => "text", 'input_mandatory' => true, 'input_validation' => 'easymail_validate_antispam', 'input_attr' => ' maxlength="20" ', 'truc' => "truc" ); return $fields; } add_filter ( 'alo_easymail_newsletter_set_custom_fields', 'easymail_add_antispam' ); /** * Validate input of antispam question */ function easymail_validate_antispam ($data) { $text = strtolower($data); if (($text == 'orange') || ($text == 'blue')) return true; else return false; }do you see something wrong ?
@danieliser,
i’m glad to read your answer and hope the 100% compatibility in fews weeks ?first i would say to you that your plugin is very useful, with plenty of parameters, theme and so on thanks for this big work !
1) it’s work,
the 2 plugins ‘popup maker’ and ‘polylang’ works together, there is mistake in my database with the options tables with polylang config fields missing argument, i correct it. i don’t use all the functions with tag and other, but i can make 2 popups in 2 different language and the right popup appear only on the right language 🙂2) but,
i’ve got a bug :
if there no translation for a page, when i clic on the language switcher for example in a menu, there is a incorrect redirect !
example
a) from a page in french :
http://domain/blog/mypage (the french is my default language with hidden the language prefix)
b) the link on a hover is correct :
http://domain/blog/en/
c) i clic and the final url landing :
http://domain/blog/en/popup/nameofpopupwithfisrttimeinaccordingtothesettingsofpopupmaker
and of course is a 404 page ! 🙁if the clic on language switcher from a page with translation, no problem. the redirect is ok…
what’s wrong ???
did you test popup maker v1.3.9 with polylang v1.8.1 (the latest version available) ?
Forum: Plugins
In reply to: [ALO EasyMail Newsletter] subscribe page break with no effect with 2.7.0 ?hi eventualo, thanks for your response 🙂
1) ok,
there is another bug :
i do the correction with double quote
'humans_name' => __("Activité", "alo-easymail"),
and now the e-mail is send but i have the link inside
http://MYDOMAIN/?lang=fr&emact=bWFuY2hlYWFpckBnbWFpbC5jb218YjhmZW…
and when i clic it a blank page white in the browser appear it’s not the correct ending in the process i havent the confirm page with my parameters add in alo-easymail_custom-fields.php with no adding subscriber in
edit.php?post_type=newsletter&page=alo-easymail%2Fpages%2Falo-easymail-admin-subscribers.phpwhat’s wrong ?
2) another question :
how to internationalise the alo-easymail_custom-fields.php ?
what the right syntax to use ?i put
$champ_activite = _e('Activité', 'epaule-toulouse');
and
'humans_name' => __($champ_activite, "alo-easymail"),
but it’s not correct ?the complete code :
$champ_activite = _e('Activité', 'epaule-toulouse'); // Custom field: Activité david 201310 201410 201602 $fields['activite'] = array( 'humans_name' => __($champ_activite, "alo-easymail"), 'sql_attr' => "VARCHAR(100) DEFAULT NULL", 'sql_key' => true, 'input_type' => "select", 'input_options' => array( "" => '', "medecin" => __("médecin", "alo-easymail"), "chirurgien" => __("chirurgien", "alo-easymail"), "kine" => __("kiné", "alo-easymail"), "patient" => __("patient", "alo-easymail"), "infirmiere" => __("infirmière", "alo-easymail"), "para_autre" => __("para-médical autre", "alo-easymail") ), 'input_mandatory' => true, // obligatoire si oui = true si non = false 'input_validation' => false, //'input_attr' => "style=\"color: #f00\"" );Forum: Plugins
In reply to: [ALO EasyMail Newsletter] subscribe page break with no effect with 2.7.0 ?ok i found where is the bug :
in the folder “mu-plugins” i put “alo-easymail_custom-fields.php” with this code :function custom_easymail_set_my_custom_fields ( $fields ) {
// DEBUT ————————————————————–
// david
// Custom field: Prénom david 201310 201410
$fields[‘prenom’] = array(
//’humans_name’ => __(utf8_encode(“Prénom”), “alo-easymail”),
‘humans_name’ => __(“Prénom”, “alo-easymail”),
//’sql_attr’ => “VARCHAR(100) NOT NULL AFTERe-mail“,
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false,
‘input_attr’ => “maxlength=\”100\””
);// Custom field: Nom david 201310 201410
$fields[‘nom’] = array(
//’humans_name’ => __(utf8_encode(“Nom”), “alo-easymail”),
‘humans_name’ => __(“Nom”, “alo-easymail”),
//’sql_attr’ => “VARCHAR(100) NOT NULL AFTERname“,
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false,
‘input_attr’ => “maxlength=\”100\””
);// Custom field: Activité david 201310 201410
$fields[‘activite’] = array(
//’humans_name’ => __(utf8_encode(“Activité”), “alo-easymail”),
‘humans_name’ => __(Activité, “alo-easymail”),
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “select”,
‘input_options’ => array(
“” => ”,
//”medecin” => __(utf8_encode(“médecin”), “alo-easymail”),
//”chirurgien” => __(utf8_encode(“chirurgien”), “alo-easymail”),
//”kine” => __(utf8_encode(“kiné”), “alo-easymail”),
//”patient” => __(utf8_encode(“patient”), “alo-easymail”),
//”infirmiere” => __(utf8_encode(“infirmière”), “alo-easymail”),
//”para_autre” => __(utf8_encode(“para-médical autre”), “alo-easymail”)
“medecin” => __(“médecin”, “alo-easymail”),
“chirurgien” => __(“chirurgien”, “alo-easymail”),
“kine” => __(“kiné”, “alo-easymail”),
“patient” => __(“patient”, “alo-easymail”),
“infirmiere” => __(“infirmière”, “alo-easymail”),
“para_autre” => __(“para-médical autre”, “alo-easymail”)
),
‘input_mandatory’ => true, // obligatoire si oui = true si non = false
‘input_validation’ => false,
//’input_attr’ => “style=\”color: #f00\””
);
// FIN ————————————————————–/*
// Text Custom field: Company
$fields[‘cf_company’] = array(
‘humans_name’ => __(“Company”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(200) NOT NULL AFTERname“,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false
);
*//*
// Select Custom field: Fovourite music
$fields[‘cf_music’] = array(
‘humans_name’ => __(“Favourite music”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “select”,
‘input_options’ => array(
“” => ”,
“rock” => __(“Rock / Metal”, “alo-easymail”),
“jazz” => __(“Jazz”, “alo-easymail”),
“classic” => __(“Classic”, “alo-easymail”),
“country” => __(“Country / Folk”, “alo-easymail”),
“other” => __(“Other”, “alo-easymail”)
),
‘input_mandatory’ => false,
‘input_validation’ => false,
‘input_attr’ => “style=\”color: #f00\””
);
*//*
// Checkbox Custom field: Privacy checkbox
$fields[‘cf_privacy’] = array(
‘humans_name’ => __(“Privacy”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(1) NOT NULL”,
‘input_type’ => “checkbox”,
‘input_mandatory’ => true,
);
*/return $fields;
}
add_filter ( ‘alo_easymail_newsletter_set_custom_fields’, ‘custom_easymail_set_my_custom_fields’ );it works with no problem with older version of ALO EasyMail Newsletter plugin
these code also break the admin adding user in wordpress admin users page
if i remove the “alo-easymail_custom-fields.php” in the folder “mu-plugins”
and i have just e-mail in the subscribe page ?what’s going wrong ?
Forum: Plugins
In reply to: [ALO EasyMail Newsletter] subscribe page break with no effect with 2.7.0 ?ok i found where is the bug :
in the folder “mu-plugins” i put “alo-easymail_custom-fields.php” with this code :function custom_easymail_set_my_custom_fields ( $fields ) {
// DEBUT ————————————————————–
// david
// Custom field: Prénom david 201310 201410
$fields[‘prenom’] = array(
//’humans_name’ => __(utf8_encode(“Prénom”), “alo-easymail”),
‘humans_name’ => __(“Prénom”, “alo-easymail”),
//’sql_attr’ => “VARCHAR(100) NOT NULL AFTERe-mail“,
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false,
‘input_attr’ => “maxlength=\”100\””
);// Custom field: Nom david 201310 201410
$fields[‘nom’] = array(
//’humans_name’ => __(utf8_encode(“Nom”), “alo-easymail”),
‘humans_name’ => __(“Nom”, “alo-easymail”),
//’sql_attr’ => “VARCHAR(100) NOT NULL AFTERname“,
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false,
‘input_attr’ => “maxlength=\”100\””
);// Custom field: Activité david 201310 201410
$fields[‘activite’] = array(
//’humans_name’ => __(utf8_encode(“Activité”), “alo-easymail”),
‘humans_name’ => __(Activité, “alo-easymail”),
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “select”,
‘input_options’ => array(
“” => ”,
//”medecin” => __(utf8_encode(“médecin”), “alo-easymail”),
//”chirurgien” => __(utf8_encode(“chirurgien”), “alo-easymail”),
//”kine” => __(utf8_encode(“kiné”), “alo-easymail”),
//”patient” => __(utf8_encode(“patient”), “alo-easymail”),
//”infirmiere” => __(utf8_encode(“infirmière”), “alo-easymail”),
//”para_autre” => __(utf8_encode(“para-médical autre”), “alo-easymail”)
“medecin” => __(“médecin”, “alo-easymail”),
“chirurgien” => __(“chirurgien”, “alo-easymail”),
“kine” => __(“kiné”, “alo-easymail”),
“patient” => __(“patient”, “alo-easymail”),
“infirmiere” => __(“infirmière”, “alo-easymail”),
“para_autre” => __(“para-médical autre”, “alo-easymail”)
),
‘input_mandatory’ => true, // obligatoire si oui = true si non = false
‘input_validation’ => false,
//’input_attr’ => “style=\”color: #f00\””
);
// FIN ————————————————————–/*
// Text Custom field: Company
$fields[‘cf_company’] = array(
‘humans_name’ => __(“Company”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(200) NOT NULL AFTERname“,
‘input_type’ => “text”,
‘input_mandatory’ => true,
‘input_validation’ => false
);
*//*
// Select Custom field: Fovourite music
$fields[‘cf_music’] = array(
‘humans_name’ => __(“Favourite music”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(100) DEFAULT NULL”,
‘sql_key’ => true,
‘input_type’ => “select”,
‘input_options’ => array(
“” => ”,
“rock” => __(“Rock / Metal”, “alo-easymail”),
“jazz” => __(“Jazz”, “alo-easymail”),
“classic” => __(“Classic”, “alo-easymail”),
“country” => __(“Country / Folk”, “alo-easymail”),
“other” => __(“Other”, “alo-easymail”)
),
‘input_mandatory’ => false,
‘input_validation’ => false,
‘input_attr’ => “style=\”color: #f00\””
);
*//*
// Checkbox Custom field: Privacy checkbox
$fields[‘cf_privacy’] = array(
‘humans_name’ => __(“Privacy”, “alo-easymail”),
‘sql_attr’ => “VARCHAR(1) NOT NULL”,
‘input_type’ => “checkbox”,
‘input_mandatory’ => true,
);
*/return $fields;
}
add_filter ( ‘alo_easymail_newsletter_set_custom_fields’, ‘custom_easymail_set_my_custom_fields’ );it works with no problem with older version of ALO EasyMail Newsletter plugin
these code also break the admin adding user in wordpress admin users page
if i remove the “alo-easymail_custom-fields.php” in the folder “mu-plugins”
and i have just e-mail in the subscribe page ?what’s going wrong ?
i’ve also modify one page of your fantastic plugins alo-easymail-widget.php
with :
<?php if ( !defined(‘ABSPATH’) ) die(); // If this file is called directly, abort./**
* Widget functions and class
*
* @package WordPress
* @subpackage ALO EasyMail plugin
*//**
* Show the widget form for registered/public
*/function alo_em_show_widget_form ( ) {
global $user_ID, $user_email, $wpdb;// If registerd user check if subscriber
$subscriber_id = alo_em_is_subscriber($user_email);// prepare mailing lists table
$lists_msg = ( alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_lists_msg’,false) !=””)? alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_lists_msg’,false) : __(“You can also sign up for specific lists”, “alo-easymail”);
$mailinglists = alo_em_get_mailinglists( ‘public’ );
$lists_table = “”;//—————————————————————————-
// DEBUT DAVID
/*
if ( $mailinglists ) {
$user_lists = alo_em_get_user_mailinglists ( $subscriber_id );
$lists_table .= “<div class=’alo_easymail_lists_table’>” . $lists_msg .”:
“;
$lists_table .= “<table><tbody>\n”;
foreach ( $mailinglists as $list => $val ) {
$checked = ( $user_lists && in_array ( $list, $user_lists )) ? “checked=’checked'” : “”;
// if registered add js to ajax subscribe/unsubscribe
if (is_user_logged_in()) {
$checkbox_js = “onchange=’alo_em_user_form(\”lists\”);'”;
} else {
$checkbox_js = “”;
}
$lists_table .= “<tr><td><input type=’checkbox’ name=’alo_em_form_lists[]’ id=’alo_em_form_list_$list’ value=’$list’ $checked $checkbox_js class=’input-checkbox’ /></td><td><label for=’alo_em_form_list_$list’ value=’$list’>” . alo_em_translate_multilangs_array ( alo_em_get_language(), $val[‘name’], true ) . “</label></td></tr>\n”; //edit : added the “label” element for better accessibility
}
$lists_table .= “</tbody></table>\n”;
$lists_table .= “</div>\n”;
*/
// FIN DAVID
//—————————————————————————-
// DEBUT CHOIX DE LA MAILING LISTE VISIBLE
if ( $mailinglists ) {
//—————————————————————————-
// DEBUT DAVID
$lists_table .= “<table class=’alo_easymail_form_table’ id=’table_contact’><tbody>\n”;
$lists_table .= “<tr><td colspan=’2′><div class=’table_entete’>”.utf8_encode(‘Options’).”</div></td></tr>”;$user_lists = alo_em_get_user_mailinglists ( $subscriber_id );
$lists_table .= “<tr><td>”;
$lists_table .= “” . $lists_msg .”:
“;
//$lists_table .= “<table><tbody>\n”;$lists_table .= “</td><td style=’text-align:left;width:30%’>”;
foreach ( $mailinglists as $list => $val ) {
$checked = ( $user_lists && in_array ( $list, $user_lists )) ? “checked=’checked'” : “”;
// if registered add js to ajax subscribe/unsubscribe
if (is_user_logged_in()) {
$checkbox_js = “onchange=’alo_em_user_form(\”lists\”);'”;
} else {
$checkbox_js = “”;
}
$lists_table .= “<input type=’checkbox’ name=’alo_em_form_lists[]’ id=’alo_em_form_list_$list’ value=’$list’ $checked $checkbox_js class=’input-checkbox’ /><label for=’alo_em_form_list_$list’ value=’$list’>” . alo_em_translate_multilangs_array ( alo_em_get_language(), $val[‘name’], true ) . “</label>\n”; //edit : added the “label” element for better accessibility$lists_table .= “
“;}
//$lists_table .= “</tbody></table>\n”;
//$lists_table .= “</div>\n”;$lists_table .= “</td></tr>”;
$lists_table .= “</tbody></table>\n”;
// FIN DAVID
//—————————————————————————-
}
// FIN CHOIX DE LA MAILING LISTE VISIBLE$preform_msg = ( alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_preform_msg’,false) !=””)? alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_preform_msg’,false) : false;
$preform_html = ( $preform_msg ) ? “<div class=’alo_easymail_preform_msg’>” . $preform_msg . “</div>\n” : “”;$disclaimer_msg = ( alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_disclaimer_msg’,false) !=””)? alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_disclaimer_msg’,false) : false;
$disclaimer_html = ( $disclaimer_msg ) ? “<div class=’alo_easymail_disclaimer’>” . $disclaimer_msg . “</div>\n” : “”;/*
//—————————————————————————-
// DEBUT DAVID
// DEBUT utilisateur logue ou non
// DEBUT désactivation de cette fonctionnalité
// 20131112if (is_user_logged_in()) {
// For REGISTERED USER
if ( $subscriber_id ){
$optin_checked = “checked=’checked'”;
$optout_checked = “”;
}
else{
$optin_checked = “”;
$optout_checked = “checked=’checked'”;
}
$optin_msg = ( alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_optin_msg’,false) !=””)? alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_optin_msg’,false) : __(“Yes, I would like to receive the Newsletter”, “alo-easymail”);
$optout_msg = ( alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_optout_msg’,false) !=””)? alo_em_translate_option ( alo_em_get_language (), ‘alo_em_custom_optout_msg’,false) : __(“No, please do not email me”, “alo-easymail”);$html = “<div id=’alo_em_widget_loading’ class=’alo_em_widget_loading’ style=’display:none;’><img src='”.ALO_EM_PLUGIN_URL.”/images/wpspin_light.gif’ alt=” style=’vertical-align:middle’ /> “. __(“Updating…”, “alo-easymail”) .”</div>\n”;
$html .= “<div id=’alo_easymail_widget_feedback’></div>\n”;
$html .= “<form name=’alo_easymail_widget_form’ id=’alo_easymail_widget_form’ class=’alo_easymail_widget_form alo_easymail_widget_form_registered’ method=’post’ action=” >\n”;
$html .= $preform_html;
$html .= “<table class=’alo_easymail_form_table’>\n”;
$html .= ” <tr>\n”;
$html .= ” <td><input onchange=’alo_em_user_form(\”yes\”);return false;’ type=’radio’ $optin_checked name=’alo_easymail_option’ value=’yes’ class=’input-radio’ /></td>\n”;
$html .= ” <td>$optin_msg</td>\n”;
$html .= ” </tr><tr>\n”;
$html .= ” <td><input onchange=’alo_em_user_form(\”no\”);return false;’ type=’radio’ $optout_checked name=’alo_easymail_option’ value=’no’ class=’input-radio’ /></td>\n”;
$html .= ” <td>$optout_msg</td>\n”;
$html .= ” </tr>\n”;//edit : added all the next if
//global $alo_em_cf;
$alo_em_cf = alo_easymail_get_custom_fields();
if( $alo_em_cf ):
$subscriber = alo_em_get_subscriber ( $user_email );
foreach( $alo_em_cf as $key => $value ){
$html .= ” <tr>\n”;
$field_id = “alo_em_”.$key; // edit-by-alo
$html .= ” <th><label for='”.$field_id.”‘>”. $value[‘humans_name’] .”</label></th>\n”;$html .= ” <td>\n”;
//$html .= sprintf( $value[‘edit_html’], $subscriber->ID, $subscriber->ID, format_to_edit( $subscriber->$key ) ).”\n”;
$prev = isset($subscriber->$key) ? format_to_edit( $subscriber->$key ) : ”;
$html .= alo_easymail_custom_field_html ( $key, $value, $field_id, $prev, true, “alo_em_user_form(‘cf’);” );$html .= ” </td>\n”;
$html .= ” </tr>\n”;
}
endif;$html .= “</table>\n”;
$html .= $lists_table; // add lists table
$html .= $disclaimer_html;
//$html .= “<input type=’submit’ name=’submit’ value='”.__(“Update”, “alo-easymail”).”‘ class=’input-submit’ onclick=’alert(\”yes\”);return false;’ />\n”;
$html .= “</form>\n”;} else {
*/
// FIN DAVID
//—————————————————————————-// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// For NOT-REGISTERED, PUBBLIC SUBSCRIBER
//—————————————————————————-
// DEBUT DAVID
//$aujourdhui = date (YmdHis);
$alo_em_opt_name = ( isset($_POST[‘alo_em_opt_name’]) ) ? esc_attr( strip_tags($_POST[‘alo_em_opt_name’]) ) : “”;
//$alo_em_opt_name = ( isset($_POST[‘alo_em_opt_name’]) ) ? esc_attr( strip_tags($_POST[‘alo_em_opt_name’]) ) : ‘. $aujourdhui .’;
// FIN DAVID
//—————————————————————————-
$alo_em_opt_email = ( isset($_POST[‘alo_em_opt_email’]) ) ? esc_attr( strip_tags($_POST[‘alo_em_opt_email’]) ) : “”;
$html = “<div id=’alo_em_widget_loading’ class=’alo_em_widget_loading’ style=’display:none;’><img src='”.ALO_EM_PLUGIN_URL.”/images/wpspin_light.gif’ alt=” style=’vertical-align:middle’ /> “. __(“sending…”, “alo-easymail”) .”</div>\n”;
$html .= “<div id=’alo_easymail_widget_feedback’></div>\n”;
$html .= “<form name=’alo_easymail_widget_form’ id=’alo_easymail_widget_form’ class=’alo_easymail_widget_form alo_easymail_widget_form_public’ method=’post’ action=” onsubmit=’alo_em_pubblic_form();return false;’>\n”;
$html .= $preform_html;
//—————————————————————————-
// DEBUT DAVID
// $html .= “<table class=’alo_easymail_form_table’><tbody>\n”;
$html .= “<table class=’alo_easymail_form_table’ id=’table_contact’><tbody>\n”;
$html .= “<tr><td colspan=’2′><div class=’table_entete’>”.utf8_encode(‘Vos coordonnées’).”</div></td></tr>”;
//$html .= ” <tr>\n”;
$html .= ” <tr style=’display:none’>\n”;
// FIN DAVID
//—————————————————————————-// ICI SI NON LOGUE
if ( get_option(‘alo_em_hide_name_input’) != ‘yes’ )
{//—————————————————————————-
// DEBUT DAVID
// champ name mais en fait un id unique… composé de la date AAAAMMJJHHMMSS// origine
//$html .= ” <td><label for=’opt_name’>”.__(“Name”, “alo-easymail”).”</label></td>”; //edit : added the “label” element for better accessibility
//$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value='”. $alo_em_opt_name .”‘ id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;$aujourdhui = date (YmdHis);
//echo “<style>#tr_name {display:none}</style>”;
//$html .= ” <tr id=\”tr_name\”>\n”;
$html .= ” <td><label for=’opt_name’><span class=’table_obligatoire’>*</span> “.__(“Name”, “alo-easymail”).” :</label></td>”; //edit : added the “label” element for better accessibility
//$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value='”. $alo_em_opt_name .”‘ id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;
$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value='”. $aujourdhui .”‘ id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;
//$html .= ” </tr>\n”;// FIN DAVID
//—————————————————————————-} else {
//$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value=” id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;
}
$html .= ” </tr>\n”;
$html .= ” <tr>\n”;
//—————————————————————————-
// DEBUT DAVID
//$html .= ” <td><label for=’opt_email’>”.__(“E-mail”, “alo-easymail”).”</label></td>\n”; //edit : added the “label” element for better accessibility
$html .= ” <td><label for=’opt_email’><span class=’table_obligatoire’>*</span> “.__(“E-mail”, “alo-easymail”).” :</label></td>\n”; //edit : added the “label” element for better accessibility
// FIN DAVID
//—————————————————————————-$html .= ” <td><input type=’text’ name=’alo_em_opt_email’ value='”. $alo_em_opt_email .”‘ id=’opt_email’ maxlength=’50’ class=’input-text’ /></td>\n”;
$html .= ” </tr>\n”;/*
//—————————————————————————-
// DEBUT DAVID
// champ name mais en fait un id unique… composé de la date AAAAMMJJHHMMSS
$aujourdhui = date (YmdHis);
echo “<style>#tr_name {display:none}</style>”;
$html .= ” <tr id=\”tr_name\”>\n”;
$html .= ” <td><label for=’opt_name’><span class=’table_obligatoire’>*</span> “.__(“Name”, “alo-easymail”).” :</label></td>”; //edit : added the “label” element for better accessibility
//$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value='”. $alo_em_opt_name .”‘ id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;
$html .= ” <td><input type=’text’ name=’alo_em_opt_name’ value='”. $aujourdhui .”‘ id=’opt_name’ maxlength=’50’ class=’input-text’ /></td>\n”;
$html .= ” </tr>\n”;
// FIN DAVID
//—————————————————————————-
*///edit : added all the next if
$alo_em_cf = alo_easymail_get_custom_fields();
if( $alo_em_cf ):
foreach( $alo_em_cf as $key => $value ){
//—————————————————————————-
// DEBUT DAVID
if ($value[‘truc’]) {
$html .= “<tr><td colspan=’2′><div class=’table_entete’>”.utf8_encode(‘Sécurité’).”</div></td></tr>”;
}
// FIN DAVID
//—————————————————————————-$html .= ” <tr>\n”;
$field_id = “alo_em_”.$key; // edit-by-alo//—————————————————————————-
// david
$html .= ” <td><label for='”.$field_id.”‘>”;
//—————————————————————————-
//DEBUT DAVID
if ($field_id[‘input_mandatory’] == true) {
$html .= “<span class=’table_obligatoire’>*</span> “;
}
else
{
}//FIN DAVID
//—————————————————————————-
// $html .= ” <td><label for='”.$field_id.”‘>”. __( $value[‘humans_name’], “alo-easymail”) .”</label></td>\n”;
$html .= “”. __( $value[‘humans_name’], “alo-easymail”) .” : </label></td>\n”;
// / david
//—————————————————————————-$html .= ” <td>\n”;
$html .= alo_easymail_custom_field_html ( $key, $value, $field_id, “”, true ) .”\n”;$html .= ” </td>\n”;
$html .= ” </tr>\n”;
}
endif;//—————————————————————————-
//DEBUT DAVID
$html .= “”.utf8_encode(“<tr>
<td colspan=’2′ style=’text-align:left;font-size:8px’><span class=’table_obligatoire’>* = obligatoire
Il vous faut javascript activé et accepter les cookies pour poursuivre…
</span></td>
</tr>”);
//FIN DAVID
//—————————————————————————-
$html .= “</tbody></table>\n”;$html .= $lists_table; // add lists table
$html .= $disclaimer_html;//—————————————————————————-
// DEBUT DAVID marche pas
//wpcf7_add_shortcode( ‘captchac’, ‘wpcf7_captcha_shortcode_handler’, true );
//wpcf7_add_shortcode( ‘captchar’, ‘wpcf7_captcha_shortcode_handler’, true );
//$html.= echo do_shortcode (‘[captchac captcha bg:#d9e9fa]’);
//$html.= echo do_shortcode (‘[captchar captcha 10/10]’);
// FIN DAVID
//—————————————————————————-$html .= “<input type=’submit’ name=’submit’ value='”.__(“Subscribe”, “alo-easymail”).”‘ class=’input-submit’ />\n”;
$html .= “</form>\n”;//}
// FIN david
// FIN utilisateur logue ou non
//—————————————————————————-// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// and output it
return $html;}
/**
* Class ALO_Easymail_Widget
*/
class ALO_Easymail_Widget extends WP_Widget {public function __construct() {
/* Widget settings. NOTE: Class name must be lower case*/
$widget_ops = array( ‘classname’ => ‘alo_easymail_widget’, ‘description’ => __(‘Allow users to opt in/out of email’, ‘alo-easymail’) );/* Widget control settings. */
$control_ops = array( ‘width’ => 300, ‘height’ => 350, ‘id_base’ => ‘alo-easymail-widget’ );/* Create the widget. */
parent::__construct( ‘alo-easymail-widget’, __(‘ALO Easymail Widget’, ‘alo-easymail’), $widget_ops, $control_ops );
}/**
* Display the widget on the screen.
*/
public function widget( $args, $instance ) {global $user_ID, $user_email, $wpdb;
extract( $args );
// add ALO: hide the widget in subscriber page
if ( is_page( get_option(‘alo_em_subsc_page’) ) ) return;
if ( is_page( alo_em_get_subscrpage_id( alo_em_get_language() ) ) ) return;// Hide widget to users, if required in setting
if ( get_option(‘alo_em_hide_widget_users’) == “yes” && is_user_logged_in() ) return;// Our variables from the widget settings.
$title = apply_filters(‘widget_title’, $instance[‘title’] );// Before widget (defined by themes).
echo $before_widget;// Display the widget title if one was input (before and after defined by themes).
if ( $title ) {
echo $before_title . $title . $after_title;
}// add ALO: print the form
echo alo_em_show_widget_form ();// After widget (defined by themes).
echo $after_widget;
}/**
* Update the widget settings.
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;// Strip tags for title and name to remove HTML
$instance[‘title’] = strip_tags( $new_instance[‘title’] );return $instance;
}/**
* Displays the widget settings controls on the widget panel.
* Make use of the get_field_id() and get_field_name() function
* This handles the confusing stuff.
*/
public function form( $instance ) {/* Set up some default widget settings. */
$defaults = array( ‘title’ => __(‘Newsletter’, ‘alo-easymail’) );
$instance = wp_parse_args( (array) $instance, $defaults );$html = “”;
$html .= “\r\n”;//—————————————————————————-
// DEBUT DAVID
$html .= “<table class=’alo_easymail_form_table’><tbody>\n”;
$html .= “<tr><td colspan=’2′><div class=’table_entete’>”.utf8_encode(‘Options’).”</div></td></tr>”;
// FIN DAVID
//—————————————————————————-
$html .= “\r\n”.'<p>’;
$html .= “\r\n”.’ <label for=”‘.$this->get_field_id( ‘title’ ).'”>Title</label>’;
$html .= “\r\n”.’ <input id=”‘.$this->get_field_id( ‘title’ ).'” name=”‘.$this->get_field_name( ‘title’ ).'” value=”‘.esc_attr( $instance[‘title’] ).'” style=”width:100%;” />’;
$html .= “\r\n”.'</p>’;//—————————————————————————-
// DEBUT DAVID
$html .= “</tbody></table>\n”;
// FIN DAVID
//—————————————————————————-echo $html;
}
}/**
* Widget activation
*/
function alo_em_load_widgets() {
register_widget( ‘ALO_Easymail_Widget’ );
}
add_action( ‘widgets_init’, ‘alo_em_load_widgets’ );/* EOF */
what’s going wrong ?
Forum: Plugins
In reply to: [Lightbox Plus Colorbox] conflict with wp-slimstathere the solution :
https://wordpress.org/support/topic/conflict-with-lightbox-plus?replies=3Forum: Plugins
In reply to: [SlimStat Analytics] conflict with lightbox-plusthat’s fix my problem !
i put “lightbox” at Do not track value
thanks !thanks to the support team who help me to convert the database !