NewsletTux 2 : Foire Aux Questions / Réponses (F.A.Q.)
Summary
- Can I have a look at NewsletTux's user guide ?
- What is the first step to install NewsletTux ?
- Connection file missing / Fichier de connexion manquant
- NewsletTux not already installed / NewsletTux n'est pas installé
- Go to Config > manage subscriptions / Rendez-vous dans Configuration > Configuration des inscriptions ...
- The webmaster hasn't created yet a newsletter profile
- form-newslettux.php : define "NTUX2_ROOT" ?
- What are templates ?
- Joined parts
- Import data from NewsletTux 1.X ?
- How to use the RSS feed ?
- Warning: session_start() [function.session-start]: open(/mnt/ ...
- User profile : what name, password ... are for ?
- CSS customization of the mail
- I've lost my password !
- None of the emails are received ...
- I have the error message : file_get_contents : http://...
- How can I install new language packs ?
- Why this modifications in upgrading 2.0.9. => 2.1.0. process ?
- Customize the newsletter's content
- Customise mail sending duration
- How to edit a text (link ...) and keep it even with updates ?
- How to split subscribers list between X profiles ?
- Pause / Unpause sendings
- Settings for NewsletTux 2 on free.fr hosting service
- Error file_get_contents when sendinf a newsletter from a securized server (HTTPS)
Can I have a look at NewsletTux's user guide ?Of course, you can. Link to NewsletTux's user guide
What is the first step to install NewsletTux ?- You just have to read the documentation provided in the archive named "install-english.txt" that explains how to install it. (Or check previous question)
Connection file missing / Fichier de connexion manquant- This error is due to the conn.php file missing in the sql/ directory. Either you didn't follow the installation wizard or you deleted this file. Find below the source code to copy and paste to restore this file, conn.php, in the sql/ directory.
Fill in the tables prefix (default : ntux2_) as well as the SQL parameters as shown. CAUTION : since the 2.1.1. version, the conn.php file must look like this :
<?php $mysql_host = 'your_mysql_host_here'; $mysql_db = 'your_database_name_here'; $mysql_usr = 'your_mysql_user_here'; $mysql_pwd = 'your_mysql_password_here'; if (!defined('DB_PREFIX')) define('DB_PREFIX','your_newslettux2_prefix_here'); ?>
NewsletTux not already installed / NewsletTux n'est pas installé- Remove the file called "install.php" from the admin/ directory, after being sure the installation has successfully been done.
Go to Config > manage subscriptions / Rendez-vous dans Configuration > Configuration des inscriptions ...- The address for the subscription page has not been filled. If you create a page called "my_newsletter.php" in the newslettux2/ directory (= the installation directory you created), then you have to fill in this field the address : http://www.mywebsite.ext/newslettux2/my_newsletter.php
The webmaster hasn't created yet a newsletter profile- Go to "Newsletters profiles" > "List profiles" and create a new one that is opened to subscriptions.
form-newslettux.php : define "NTUX2_ROOT" ?- This configuration is not easy, but I'll try to explain with simple words. Form-newslettux.php is a file whose aim is to be included in an other file, for example, "my_newsletter.php". This is described in "install-english.txt".
Defining NTUX2_TOOT is defining the relative path to NewsletTux's directory startinf from "my_newsletter.php".
If "my_newsletter.php" is inside the newslettux2/ directory, then the relative path is the directory itself, because we are already in it. This is symbolised with "./" (understand dot slash).
If "my_newsletter.php" is in the directory that contains newslettux2/ as well (so to say in the parent folder), then NTUX2_ROOT is "newslettux2/". In case of trouble with this variable, read the doc called relative and absolute path (Fr) from this website or ask on the forum detailling your tree.
What are templates ?- Templates are HTML files (extension .html) that enable customization of your newsletters appearence. Concretly, you create an HTML page on your web editor, you save it as .html file and it's nearly finished. There are a few things you have to know :
- If you want to include pictures such as your website banner for example, you have to insert it in abslute URL (that is to say <img src="http://www.your_website.ext/img/banner.jpg"> for example) : this doesn't increase the email weight (insofar as the image is stored on your website)
- Where you want the text to appear, you have to write a specific mark --NEWSLETTUX-- alone on a line. It will be replaced with the text of your newsletter.
- Since version 2.1.0., you can use the mark --FOOTER-- alone on a line that will be replaced with the links (manage subscriptions ...)
- Templates are not visible for Text format
- Using a template deactvates all other options (default font, etc.) for the HTML mail ; to use them, you have to include them as CSS classes in the template.
- By experience, mails in HTML format are bette displayed than mails in XHTML ones on the mails softwares : so write your HTML page in "simple" HTML.
Joined parts- Joined parts are files you send attached to the newsletter, whatever be the format for the subscriber (Text or HTML). These attached files can be a Zip file, a picture, a text or another multimedia content.
Be careful with the file size : when attaching a file to a mail, its size increases automatically of about to a third. For example, a file sizing 1 MB will size inn the mail, 1.3 MB (for encoding reasons). On your NewsletTux interface, you can specify manually the number and the maximum size for attached files.
Think about low rate subscribers, who will require 5 min to download a 1MB file ... The maximum limit of a mail in NewsletTux is 2 MB (Generlly it is the Apache server's limit).
Import data from NewsletTux 1.X ?- That's possible. A patch is avalaible in the download section. It imports as a copy informations about writers, permissions, subscribers, profiles, newsletters sent in NewsletTux 2. For security reasons, nothing about NewsletTux 1 is removed or modified : you'll have to remove manually NewsletTux 1 (tables and files) when you are sure all data is successfully imported in NewsletTux 2.
This patch is not compatible with all versions of NewsletTux 1.X, read the joined file for more information about this import. You must execute this patch on a blank install of NewsletTux 2 !
How to use the RSS feed ?- To use RSS feeds on a website, you have to give an address like that :
<?php // Display last 10 newsletters for profile ID 1 : include('http://www.yourwebsite.ext/newslettux2/newslettux_rss.php?feed=RSS&pid=1'); // Display last 10 newsletters for profiles IDs 1, 4, 5 : include('http://www.yourwebsite.ext/newslettux2/newslettux_rss.php?feed=RSS&pid=1,4,5'); // Display last 25 newsletters for profiles ID 1, 3, 5 : include('http://www.yourwebsite.ext/newslettux2/newslettux_rss.php?feed=RSS&show=25&pid=1,4,5'); // To export a feed in Atom 1.0 specification instead of RSS 2.0, replace "feed=RSS" with "feed=ATOM" ?>- http://www.newslettux2.ext/newslettux2/ is the address of your website and the NewsletTux 2 directory.
- feed=RSS means you export a RSS feed. (other optionS : feed=ATOM (Atom 1.0) or feed=HTML, to display as HTML)
- pid=X,Y,Z : X Y and Z are the IDs of the newsletters profiles. You can display the content of several profiles at the same time, or the one of an only profile. By default, the first newsletter profile has ID number 1. Be careful, in order to display the newsletters this way, the profile must have "Public access" on.
The number "10" is determined in newslettux_rss.php. This file will extract last 10 newsletters. You can edit this number by editing newslettux_rss.php line 42 : { $num_newsletters = 10; }. This number can be overwritten by the URL parameter show.
Warning: session_start() [function.session-start]: open(/mnt/ ...- If your server is a Free.fr, create a directory called "sessions" at the root of your FTP.
User profile : what name, password ... are for ?- In the subscribers management, there are several informations that are not all useful. (in reality, most of them seem useless). There are :
- The grade, subscriber (no access at all to admin interface), writer (just access to write a newsletter), admin (can manage nearly all the script) and super user (root), the one who installed the script, plenipotentiary.
- The name, used only when sending a newsletter as sender : that is why, by default, subscribers have no name (they don't have any access to the interface, so they won't send newsletters). When you upgrade a subscriber to writer, think about giving him a name ;o)
- The email, user email who receives newsletters according to his subscriptions. By default, the super user is subscribed to all profiles.
- The signature, simple text area useful to add some lines at the bottom of a newsletter, such as phone number, website, slogan ... This signature is personal to each user, but admins can edit all subscribers, so they can edit signatures as well.
- The password, never visible but well existant. It is hashed in MD5 in the database, it is used for subscriptions management and, for users with power (writers, admins) to login to the interface (with their email as login value).
CSS customization of the mail- It is possible to customize the links at the bottom of a newsletter (HTML format only) : the CSS class "ntux2_userfooter" is applied on the user's signature and the CSS class "ntux2_links is applied on the link to manage subscriptions, the link to view the newslettr on the website and the ad link as well.
I've lost my password !- Here is an annoying question ... Fortunately, you can recreate one. Passwords database are hashed, that is to say we're starting from a characters word (the initial password) which is processed to another characters words (the hash). Thys not cryptage : if the initial password is enough complex, there are quasi no chances to restore it (or we need some decades with a clustrer of the most powerful computers ...)
I release a tool to make it possible for you to recreate a password, please see page NewsletTux tools.
Once the hash get, the patch updates automatically your database.
None of the emails are received ...- You've just tested the script on your server, all seems good, but no email is received ... To help you better, here are the main tests to run :
- Is there at least one subscriber to the selected newsletter profile ?
- Did the hoster put a rectriction for mail sending ? (function syntax, or sending quota, for example Free.fr
- How much time did you wait between the end of sending newsletter and checking your mailbox ? Often a short time is necessary (one minute) but sometimes, this may take a while (10 minutes ...)
- Which formts have been tested ? Text ? HTML without template ? HTML with template ? Try to send a newsletter in Text format to see if the problem is a question of server or format.
- What is the mail sending method : PHP Mail( ) or SMTP server ?
- Do you have a particular mailbox software ? (for example Horde, SquirrelMail ...)
- Did you check your spams ?
- Is your hoster "NewsletTux capable" ? (cf. this list of hosters tested and compatible with NewsletTux)
I have the error message : file_get_contents : http://...- This message indicates NewsletTux tried to read a file whose URL is given in the error message, but failed. 2 solutions are possible :
- STEP 1 : the URL is wrong. Easy test : copy and paste the URL into your web browser. If the ressource exists, then goto next step.
- STEP 2 : Your server doesn't accept this function or disabled opening distant files. Contact your hoster for more information. You can the use "traditionnal" method to use templates (what will prevent you from using dynamic templates in PHP) by opening the main gonfiguration and set "File_get_contents function" to "Disabled".
How can I install new language packs ?- There is no muchwork to do. 4 files are required to translate :
- admin_fr.lang.php
- client_fr.lang.php
- common_fr.lang.php
- install_fr.lang.php
CAUTION : there are a file written in ANSI (ISO-8859-15) format and one written in UTF-8 format for each one. Rename your new files with the 2 letters for the language : en, sp, de, ... for example, admin_de.lang.php, admin_de-UTF-8.lang.php.
Than, upload these files into the languages/ directory on your server and in the "Miscellaneous" config, you will see the new language appear !
The ideal, to finish, is to add a small flag picture in the img/ directory named newslettux-{language}.png, 24 pixels width and 16 pixels height. (For example, newslettux-de.png)
Since version 2.1.0., you can check if language pack is avalaible in the automatic modules ... Installation will be done by wizard this way.
Finally, if the language doesn't exist, you can offer your work to NewsletTux community : language pack will be avalaible for everyone. Contact me for more information.
Why this modifications in upgrading 2.0.9. => 2.1.0. process ?In order to add automated modules, some source code parts have been rewrited. The connection to the database has been optimized, that's why you need to edit "sql/conn.php"
This small job makes it possible to gain more flexibility in future updates, and in the installation of modules as well.
Your "conn.php" file must look like the one given at the bottom of the question #q02, you have to update your admin/tools.php and lib/functions.php by erasing your files with the 2.1.0. ones (provided in this archive)
There may be somme missing alert messages at the end of the update, it's not a bug : when the page is reloaded, all this bugs won't appear anymore.
Customize the newsletter's contentThe module called CustomizeNewsletter allows you to use special marks in the body of your newsletters. Those marks are replaced with data extracted from the subscriber's profile from thee users table. The informations you can include in your newsletters are :
- --ntux2_id-- will display the subscriber's id,
- --ntux2_groupval-- will display the subscriber group (administrator, writer, subscriber or root),
- --ntux2_pwd-- will display the subscriber's password (encrypted),
- --ntux2_name-- will display the subscriber's name,
- --ntux2_mail-- will display the subscriber's email address,
- --ntux2_firstletter-- will display the subscriber's email first letter, (useful only to sort out them by letter)
- --ntux2_footer-- will display the subscriber's footer, useful only when he's a writer or administrator or root, otherwise this will be empty,
- --ntux2_activation-- will display the subscriber's activation code, empty id accound already activated,
- --ntux2_own_lang-- will display the subscriber's own language (default one or personal one, if writer/administrator/root)
Don't forget each subscriber will receive his own data, if his name is not stored in the database, --ntux2_name-- will be replaced with a blank text (but for other subscribers it will be replaced with their respective names if stored in the database)
Customise mail sending durationSome hosters oblige a maximum quota for mail sending each hour, for example. It is possible to customize the frequency NewsletTux sends emails by tweaking some values ...
First, open Configuration > Mails sending method. Adjust the "Number of email by cycle" to 1. This done, the page admin/send_newsletter.php will send emails only 1 by 1.
Then, open Configuration > General Configuration and choose to save session in database
To end, open admin/send_newsletter.php, search for the line containing RedirectTo($uri, 4000, true); and change the 4000 value (in milliseconds) to whatever you want. For example, to send an email every 10 seconds, specify 10000.
How to edit a text (link ...) and keep it even with updates ?The tip is easy, you just have to spot in the languages/ subdir in the files what text you want to change. For example, you want to change $ntux2['oui']. Open languages/mods-en.php (and the equivalent for UTF-8) and add a new line (between <?php and ?>) with $ntux2['oui'] = "Your new text here";
Explanation : when an update is being done, the language files may be uodated, so you loose your customization. The "mods" file (for add-ons) needn't being updated.
Caution : don't forget the inverted commas and the ;
How to split subscribers list between X profiles ?Suppose an initial profile, ID 1. There are also 1 million users subscribed to this profile, their ID_user goes from 1 (the super user, "root", the one who installed NewsletTux) to 1 million (to make explanation easier).
Into the ntux2_subscriptions table, we have 1 million lines, each one with ID_USER, 1 (ID_profile) and html or text as reg_format according to what they chose when subscribing.
- Step 1 : create a new profile. ID 2. (or more if necessary, for example we are going to split the million between 4 profiles, 250 thousands subscribers each one, so new profiles IDs are 2, 3 and 4.)
- Step 2 : open PHPMyAdmin, select the good database (if not automatically done) and in the right frame, click on "SQL" tab. Let's suppose your DB prefix is "ntux2_", paste this SQL request :
-- we transfer to profile 2 users whose ID is between 250 000 and 500 000 UPDATE ntux2_subscriptions SET id_profile='2' WHERE (id_user >= '250000' AND id_user < '500000');
Launch this request. Then redo it with profile 3 using (id_user >= '500000' AND id_user < '750000') for example.
This method makes it possible to switch subscriptions without loosing the subscriber\s format choice.
Pause / Unpause sendingsUntil v. 2.1.4., you can stop newsletters sending to relaunch it laterly.
to pause the sending : use the link given while sending the newsletter beneath the emails list that has just been processed. Write down in the URL, the lim= parameter value : this is the treshold you stop the sending. (You will be reminided this number at the end of the sending)
to unpause the sending : : use the link "restart from this newsletter" given in the history of sendings and, in the field at the bottom of the writing page, "start from ..." fill in the limit you stopped at (and wish to start from).
Settings for NewsletTux 2 on free.fr hosting serviceFree.fr is aparticular, and has the annoying manner not to communicate data. I will gather in this question settngs you have to do.
First of all, you have to create a directory called "session" at the root of your FTP.
the file_get_contents function (dynamic templates) seems to work randomly depending on the server.
You can't send more than 100 emails per day (24H consecutives). This is a global quota on your hosting service, so to say NewsletTux + you others scripts (cf. in french explanation by the Free technical service). You have to manually stop the newsletter sending before 100, then start from this newsletter in the history of sendings 24H later to start at position 100, then stop again at 100 emails, and so on ... (of course if you don't hane another script that sends emails) - pausing/starting at position X is included in version 2.1.4. of NewsletTux.
Error file_get_contents when sendinf a newsletter from a securized server (HTTPS)When NewsletTux is hosted onto an HTTPS server IP restricted as follows :
<Directory /var/www/newsletux>: Options -Indexes FollowSymLinks AllowOverride None order allow,deny allow from XXX.YYY.ZZZ.TTT </Directory>where XXX.YYY.ZZZ.TTT is the server's IP address, you may experiment an error while reading a template file for example.
The error in the Apache "log" file looks like : client denied by server configuration.
Solution : add the server's address into the restriction :
<Directory /var/www/newsletux>: Options -Indexes FollowSymLinks AllowOverride None order allow,deny allow from XXX.YYY.ZZZ.TTT AAA.BBB.CCC.DDD </Directory>More details : go to the relative subject in the forum
Certaines solutions peuvent valoir pour plusieurs problèmes. Si vous ne parvenez pas à trouver, mettez un mot dans le forum en copiant tout le message d'erreur.

