Thanks Ben for the translation, I added 2 more lines that need your language skills
'user_menu_subscribe' => 'Subscribe to Newsletter',
'user_menu_unsubscribe' => 'Unsubscribe from Newsletter'
if you could.
You can now blacklist and whitelist in the newsletter admin and you can even black/white list whole domains with an Astrix ie. *@somedomain.com
I ended up adding a user menu subscribe/unsubscribe instead of the profile display - since Dirk chose not to address my concerns for 4 months.
Future versions certainly could get that from geeklog itself.
This plugin uses CodeWorx phpmailer which seems far more reliable then geeklog's built-in mail functions.
I noticed you had taken down your newsletter block on yoursite.
I know I had broken some functionality with my sloppy release.
Hopefully this release fixes any issues you had and you'll continue with your translation contributions.
-s
There will always be...
Anonymous: lwc
November 18 2009 07:00 AM
Another problem is many domains (read: the free ones) don't accept more than X messages from one sender at a time. That's why a mailing list software like phplist allows to limit the number of messages per each domain in one sending. Until I found this setting in phplist, domains like Gmail simply bounced my messages back (after sending to more than X users). So this option is very important. Please have it.
@lwc
I was just reading about those issues this morning.
http://phpmailer.worxware.com/index.php?pg=tips
http://phpmailer.worxware.com/index.php?pg=tip_spf
But we're not sending in "one big send" these actually get sent one-by-one albeit very quickly.
I have not yet run into the issue you described. But have seen spam issues which relate more to mail server settings then the actual application itself. For example DNS PTR and the above SPF record.
-s
There will always be...
Anonymous: lwc
November 18 2009 12:45 PM
Of course it's one by one when we're talking about a mailing list. For example, if you send to a Gmail user, then to another Gmail user, then to another...eventually Gmail starts bouncing your messages.
I am not - I repeat, not - talking about Gmail putting it in a spam folder. I am talking about actually bouncing DNS/SPF/anything-you-want approved messages back with a message that says something like "you simply can't send to so many of our users in such a short time". The more subscribers you have with the same domains, the more likely you are to fall into this problem.
Of course it's one by one when we're talking about a mailing list. For example, if you send to a Gmail user, then to another Gmail user, then to another...eventually Gmail starts bouncing your messages.
I am not - I repeat, not - talking about Gmail putting it in a spam folder. I am talking about actually bouncing DNS/SPF/anything-you-want approved messages back with a message that says something like "you simply can't send to so many of our users in such a short time". The more subscribers you have with the same domains, the more likely you are to fall into this problem.
This reminds me of the problem I have with my link exchange plugin. Though mine dealt with running out of processing time if you checked more than 5 to 10 links. I wanted to sit down and write a plugin that other plugins (or geeklog) could send batch jobs to, that the plugin could then initiate in the background at a predetermine time.
I never did sit down and figure out what the best way to do this was.
If it were only 10, 20 or even 30 seconds, the admin could sit and wait:
"Please wait while we process your request...."
And use ajax with setInterval or setTimeout.
But if you are talking minutes or hours, cron only.
-s
There will always be...
Anonymous: lwc
November 18 2009 15:15 PM
phplist let's you do define whatever you want and just reloads by itself to start a new batch (even if it takes hours).
But keep in mind it's not a simple delay. The whole point is to delay the same domains, not to delay in general (that's an unrelated feature).
If it were only 10, 20 or even 30 seconds, the admin could sit and wait:
"Please wait while we process your request...."
And use ajax with setInterval or setTimeout.
But if you are talking minutes or hours, cron only.
-s
LWC mentioned delays in general. I know some hosts only allow you to send so many emails every hour (or whatever).
But to answer your question
My schedule was from 1 to 30 days and then I needed the plugin to check about 3 to 4 links at a time (of about 150 in total) to ensure it didn't extend beyond the PHP execution time limit. I didn't want to use cron jobs because they can be a pain to setup for some people and they cannot be configured by the plugin (this was a plugin I was going to release but never did). I also had to make sure the website didn't freeze up whenever the batch was triggered
What I ended up doing was bury a transparent image in the html code to trigger the batch. This way the site would continue to load and the getimage.php file would check to see if a scheduled event was needed to run.
I'm using cron to send lot of emails (email to user, newsletter...). The mail form (advanced editor) send message in the DB and the cron send email every X minutes. You can set the number of email sent during each job in the code.
Feel free to use some of this code in the newletter plugin if you need.
send_hello_cron.php
PHP Formatted Code
<?php
/* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | hello 1.0.0 | // +---------------------------------------------------------------------------+ // | send_hello_cron.php | // | | // | Geeklog hello send page | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2008 by the following authors: | // | | // | Authors: :Ben | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ //
// Set this to true if you want to log debug messages to error.log $_HELLO_VERBOSE = false;
/* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ // | hello 1.0.0 | // +---------------------------------------------------------------------------+ // | index.php | // | | // | Geeklog hello administration page | // +---------------------------------------------------------------------------+ // | Copyright (C) 2000-2008 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | // | Jason Whittenburg - jwhitten AT securitygeeks DOT com | // | Dirk Haun - dirk AT haun-online DOT de | // | : :Ben http://geeklog.fr | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | // | modify it under the terms of the GNU General Public License | // | as published by the Free Software Foundation; either version 2 | // | of the License, or (at your option) any later version. | // | | // | This program is distributed in the hope that it will be useful, | // | but WITHOUT ANY WARRANTY; without even the implied warranty of | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | // | GNU General Public License for more details. | // | | // | You should have received a copy of the GNU General Public License | // | along with this program; if not, write to the Free Software Foundation, | // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | // | | // +---------------------------------------------------------------------------+ //
// Set this to true if you want to log debug messages to error.log $_HELLO_VERBOSE = false;
/**
* Shows the form the admin uses to send Geeklog members a message. Right now
* you can only email an entire group.
*
* @return string HTML for the email form
*
*/ function display_mailform () { global$_CONF, $_TABLES, $_USER, $LANG31, $LANG24;
/**
* This function actually sends the messages to the specified group
*
* @param array $vars Same as $_POST, holds all the email info
* @return string HTML with success or error message
*
*/ function send_messages($vars) { global$_CONF, $_TABLES, $LANG31, $LANG_HELLO01;
//Group name $group_name = DB_query("SELECT grp_name FROM {$_TABLES['groups']} WHERE grp_id =" . $vars['to_group'] . " "); $group_name = DB_fetchArray ($group_name); $email_group = $group_name[0];
$content = ($vars['content']);
// Programme la diffusion $groupList = implode(',', USER_getChildGroups($vars['to_group']));
if(isset($vars['overstyr'])){ $sql = "SELECT DISTINCT username,fullname,email FROM {$_TABLES['users']},{$_TABLES['group_assignments']} WHERE uid > 1"; $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))"; $sql .= " AND {$_TABLES['users']}.uid = ug_uid AND ug_main_grp_id IN ({$groupList})"; }else{ $sql = "SELECT DISTINCT username,fullname,email,emailfromadmin FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['group_assignments']} WHERE {$_TABLES['users']}.uid > 1"; $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))"; $sql .= " AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND emailfromadmin = 1"; $sql .= " AND ug_uid = {$_TABLES['users']}.uid AND ug_main_grp_id IN ({$groupList})"; }
/**
* Returns admin menu display
*
* Generates the admin menu from the template and returns the result as a string of HTML
*
* @return string HTML of admin menu
* @todo add support for pending (physical) transaction, not fully implemented
*/ function hello_admin_menu(){ global$_CONF, $_TABLES, $LANG_HELLO01;
This is the french translation for Newsletter v 1.0.8
PHP Formatted Code
<?php
############################################################################### # french_france_utf-8.php # This is the english language file for the Newsletter plugin Vers. 1.08 # # Copyright (C) 2001 Tony Bibbs # tony@tonybibbs.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ###############################################################################
############################################################################### # Array Format: # $LANGXX[YY]: $LANG - variable name # XX - file id number # YY - phrase id number ###############################################################################
$LANG_NL = array( 'newpage' => 'Nouvelle Page', 'adminhome' => 'Panneau administration', 'newsletter' => 'Newsletter', 'newslettereditor' => 'Editeur de Newsletter', 'writtenby' => 'Auteur', 'date' => 'Mise à jour', 'title' => 'Titre', 'content' => 'Contenu', 'hits' => 'Visites', 'newsletterlist' => 'Liste des Newsletters', 'block_title' => 'Newsletter', 'block_text' => "<img style=\"border:0px solid; float:right;height:40px;width:40px;\" src=\"{$_CONF['site_url']}/newsletter/images/newsletter.png\"/>Merci de saisir votre adresse email pour vous inscrire à la newsletter.", 'block_button_text' => 'Envoyer', 'block_link_text' => 'Archives', 'success_title' => 'Merci', 'list_title' => 'Archives des Newsletters', 'add_success' => 'Votre adresse email à bien été ajoutée à notre liste.', 'url' => 'URL', 'edit' => 'Editer', 'lastupdated' => 'Dernière mise à jour', 'pageformat' => 'Format de page', 'leftrightblocks' => 'Block à gauche et à droite', 'blankpage' => 'Page blanche', 'noblocks' => 'Pas de block', 'leftblocks' => 'Blocks à gauche', 'addtomenu' => 'Ajouter au Menu', 'label' => 'Label', 'nopages' => 'Il n\'y a pas encore de newsletter', 'save' => 'sauvegarde', 'preview' => 'preview', 'delete' => 'supprimer', 'cancel' => 'annuler', 'email' => 'Email', 'access_denied' => 'Accès non autorisé', 'access_denied_msg' => 'Vous essayez d\'accéder à une partie administrative de ce site sans y être autorisé. Cette tentative à été enregistrée.', 'all_html_allowed' => 'Tout le HTML est permis', 'results' => 'Résultats des Newsletters', 'author' => 'Auteur', 'no_title_or_content' => 'Vous au moins devez compléter les champs <b>Titre</b> et <b>Contenu</b>.', 'no_such_page_anon' => 'Merci de vous identifier.', 'no_page_access_msg' => "Cela peut être par-ce que vous n'êtes pas identifié, ou que vous n'êtes pas un membre du site {$_CONF['site_name']}. Merci de a href=\"{$_CONF['site_url']}/users.php?mode=new\">créer un compte<</a> sur {$_CONF['site_name']} pour pouvoir accéder à l'espace membre.", 'php_msg' => 'PHP: ', 'php_warn' => 'Attention: Le code PHP de vos page sera evalué si vous activez cette option. A utiliser avec précaution!!', 'exit_msg' => 'Type de sortie: ', 'exit_info' => 'Activer pour afficher le message de connexion nécessaire. Laissez non coché pour un message et une vérification normale de la sécurité.', 'deny_msg' => 'L\'accès à cette page n\'est pas possible. Soit elle à été déplacé ou supprimée, soit vous n\'avez pas la permission suffisante pour l\'afficher.', 'stats_headline' => 'Les 10 Newsletter les plus consultées', 'stats_page_title' => 'Titre', 'stats_hits' => 'Hits', 'stats_no_hits' => 'Soit il n\'y a pas de newsletter disponible sur ce site, soit personne n\'en à encore vu une.', 'id' => 'ID', 'duplicate_id' => 'L\'ID que vous avez choisi pour cette newsletter est déjà utilisée. Merci dans choisir une autre.', 'instructions' => 'Pour modifier ou supprimer une newsletter, cliquez sur l\'icon d\'édition ci-dessous. Pour voir une newsletter, cliquez sur le titre de la page que vous souhaitez voir. Pour créer une nouvelle newsletter, cliquez sur "Ajouter" ci-dessus. Cliquez sur l\'icon de copie pour dupliquer une newsletter existante.', 'centerblock' => 'Block central: ', 'centerblock_msg' => 'Lorsque cette option est cochée, cette Newsletter sera affichée dans un block central sur la page principale dus site.', 'topic' => 'Catégorie: ', 'position' => 'Position: ', 'all_topics' => 'Toutes', 'no_topic' => 'Accueil uniquement', 'position_top' => 'Haut de la page', 'position_feat' => 'Après l\'article en vedette', 'position_bottom' => 'Bas de page', 'position_entire' => 'Page complète', 'head_centerblock' => 'Block central', 'centerblock_no' => 'Non', 'centerblock_top' => 'Haut', 'centerblock_feat' => 'Article Vedette', 'centerblock_bottom' => 'Bas', 'centerblock_entire' => 'Page complète', 'inblock_msg' => 'Dans un block: ', 'inblock_info' => 'Afficher la Newsletter dans un block.', 'title_edit' => 'Editer la newsletter', 'title_copy' => 'Faire une copie de la newsletter', 'title_display' => 'Voir la newsletter', 'select_php_none' => 'Ne pas exécuter le PHP', 'select_php_return' => 'exécuter le PHP (return)', 'select_php_free' => 'exécuter le PHP', 'php_not_activated' => 'L\'utilsiation du PHP dans les newsletters est activé. Merci de vous reporter à la <a href="' . $_CONF['site_url'] . '/docs/newsletter.html#php">documentation</a> pour plus de détails.', 'printable_format' => 'Format imprimante', 'edit' => 'Editer', 'copy' => 'Copier', 'limit_results' => 'Limiter les résultats', 'search' => 'Chercher', 'submit' => 'Envoyer', 'sendnow' => 'Envoyer cette newsletter maintenant?', 'sendtest' => 'Envoyer un test à votre adresse email?', 'send' => 'Envoyer maintenant', 'sent_time' => 'Dernière expédition', 'removed_title' => 'Désinscription', 'removed_msg' => 'L\'adresse email %s à bien été supprimée de la liste.', 'import_checkbox' => 'Ajouter à la Blacklist', 'blacklisted_title' => 'Blacklisté', 'blacklisted_msg' => 'L\'adresse email %s a été ajoutée à notre blacklist.', 'whitelisted_title' => 'Whitelisté', 'whitelisted_msg' => 'L\'adresse email %s a été ajoutée à notre whitelist.', 'trouble_viewing' => 'Si vous avez du mal à lire cette newsletter, vous pouvez la retrouver sur notre site en <a href="%s/newsletter/index.php?page=%s">cliquant ici</a>.<br />', 'unsubscribe' => 'Se dés-inscrire', 'subscriberlist' => 'Souscripteurs', 'list_status' => 'Status de la liste', 'list_status_hover_message' => 'Ajouter à %slist', 'email_format_error' => '<strong>Erreur</strong>: Une adresse email non valide à été saisie.', 'email_store_error' => '<strong>Erreur</strong>: Oups je n\'ai pas réussi à enregistrer votre adresse email.', 'email_success' => 'Merci pour votre inscription!', 'email_missing' => 'Merci de saisir une adresse email.', 'adding_msg' => 'Adresse email ajoutée...', 'block_text_small' => 'Inscrivez vous à la newsletter!', 'import' => 'Importer', 'export' => 'Exporter', 'clear' => 'Vider la liste des souscripteurs', 'import_temp_text' => 'Copier/Coller votre liste d\'importation ici.', 'delimiter' => 'Delimiteur', 'importer' => 'Newsletter Importation de liste Email', 'import_complete' => 'Importation Complète', 'user_edit_checkbox_label' => 'Souscrire à la Newsletter', 'sorry_no_archives_yet' => 'Désolé, il n\'y a pas encore de newsletter dans nos archives.', 'user_menu_subscribe' => 'S\'abonner à la Newsletter', 'user_menu_unsubscribe' => 'Se désabonner de la Newsletter', 'import_current_users' => 'Importer les utilisateurs', 'are_you_sure'=> 'Etes vous sûre de vouloir supprimer les souscripteurs?', 'truncate_complete' => 'Souscripteurs effacés', 'blacklisted_emails' => 'Blacklisted Emails: ', 'blacklisted_domains' => 'Blacklisted Domains: ', 'whitelisted_emails' => 'Whitelisted Emails: ', 'newsletter_admin' => 'Newsletter Administration', 'config' => 'Configuration', 'config_location_message' => 'Les options de configuration de la Newsletter sont maintenant disponible via le <a href="%s/configuration.php">panneau de configuration</a>.' );
// Messages for the plugin upgrade $PLG_newsletter_MESSAGE3001 = 'La mise à jour du Plugin n\'est pas supportée :('; $PLG_newsletter_MESSAGE3002 = $LANG32[9];
// Localization of the Admin Configuration UI $LANG_configsections['newsletter'] = array( 'label' => 'Newsletter', 'title' => 'Newsletter Configuration' );
$LANG_confignames['newsletter'] = array( 'allow_php' => 'Permettre le PHP?', 'sort_by' => 'Trier les blocks centraux par', 'sort_menu_by' => 'Trier les labels du menu par', 'delete_pages' => 'Supprimer les newsletter avec leur propriétaire?', 'in_block' => 'Afficher les newsletter dans un block par défaut?', 'show_hits' => 'Montrer le nombres de visites?', 'show_date' => 'Montrer la date de modification?', 'filter_html' => 'Filtrer le HTML?', 'censor' => 'Censuré le contenu?', 'default_permissions' => 'Permissions par défaut des newsletters', 'aftersave' => 'Après la sauvegarde', 'atom_max_items' => 'Max. Pages dans le flux des Webservices', 'subscribe_new_users' => 'Les membres souscrivent à la newsletter lorsqu\'ils s\'inscrivent sur le site' );
Yes this archive seems to do is job, but maybe I need more testing...
If there is one newsletter only available for Logged-in Users, anonymous don't see any message on /newsletter/index.php?view=list like "It appears that there are no newsletters" or something like "You must sign in to see the newsletter". It could be a feature in a next version.