To do this, simply insert the following code where you want to display the number of subscribers. (be carefull to put the right link to the extra.php file)
<script type="text/javascript" src="http://www.yourdomaine.com/rep/options/extra.php?liste=
[ID]
"></script>
Replace [ID] by the ID number of the list of which you want to display the number of subscribers.
Since our goal is to make WAnewsletter available to the largest audience,
the script manages different languages.
If you are fluent in a language in which the script has not already been
translated, and if you want to promote WAnewsletter, simply download the
package of your
choice, translate it and send it to wascripts_at_phpcodeur_dot_net.
The new language version will be made available for downloading, after verification.
To be informed of a new version release, or newly found security failures (improbable ? :) ), visit the phpCodeur site every now and then, or simply subscribe to the WAnewsletter mailing list here.
An import utility is available under the "Tools" header of
the administration menu. This utility will allow you, if you have proper
rights, to import subscribers' emails directly either through a text field,
by specifying the address of the emails file on the server, or by uploading
a file containing
the emails, providing your host allows file uploading.
The import utility has been tested with mass imports of up to 2500 email
addresses. This should be sufficient. If not, you can divide to import operation in
as many smaller parts as necessary to make sure it works.
Another way to import more than 2500 email addresses in one shot consists
in modifying the value of the MAX_IMPORT constant in the constantes.php files,
but this is at your own risks !
The script will check each email address, and will remove doubles. If emails are rejected, the script will attempt to write a report file in its temporary folder, which you then may download.
WAnewsletter can be managed by multiple users.
You can change the users' permissions through each user's profile..
There are two general levels : administrator and user. Administrators have
all rights automatically, whatever the settings on individual rights.
A user will be limited to granted rights (view, edit, delete, send, import,
export, ban, and attach files) for each list.
To add a user, go to the "Users" section and click on the "Add a user" button.
There already is a default subscription form, the subscribe.php file (users
of versions 2.0.x or
2.1.x, please note that the name of that file has changed because of its
wrong spelling and is therefore no longer suscribe.php, so do not forget
to change any links pointing to that file).
The subscribe.php file displays a standard form, and a selection list showing
names of all created lists.
The script also has a form generator in the tools section. This will allow
you to generate an adequate form for any given list.
You will then have to place this generated form code where you want on your
site, to place the newsletter.php inclusion code (also created by the Form
Generator) and to indicate in the list's settings the form's absolute address.
One last solution (available from versions 2.2-RC1 and up) consists in having
the visitor send an email to a list's address, with the word "Subscribe"
(case insensitive) on the subject line.
In this case, you must have access to cron (Unix servers or equivalent) or
use the free services of webcron.org to
automate the call to the cron.php file located in the script's options/ folder.
The script will undertake all necessary tasks (subscription, unsubscription,
format change, subscription confirmation, etc.) according to received emails.
To unsubscribe, the subscriber will have to send an email to the list's address
with the word "Unsubscribe" on the subject line. He will then receive
an email asking for a reply with the same subject, his account code, which
he will
already have.
To confirm subscription (if the list is set to require it), the subscriber
will have to send an email to the list with the word "confirmation" on
the subject line. To request a newsletter format change,
the subject line will have to read "setformat".
If many of your distibution lists use the same email address, there is a
risk of conflict, since the script will not be able to identify
to which list the pop account emails are addressed. If such is the case,
you will have to create an email alias on your host's administration panel,
if available (this excludes free hosting servers).
Example :
You have two lists using mailing@domain.com as email address.
You will have to create two aliases forwarded to mailing@domain.com and specify
these aliases in the settings of the lists, eg : mailing-1@domain.com and
mailing-2@domain.com
In the case of the "cron" option, you will have to specify the access parameters
to the list's email adress's pop account and specify the use of the"cron"
option by clicking on the proper radio button, in the admin Lists section.
Finally, cron will have to call an address of this type :
http://www.yourdomain.com/rep/newsletter/options/cron.php?liste=[list_ID]
In order to be accessible to the largest number of users, WAnewsletter
has two send engines.
Certain hosting services limit the number of emails sent daily (ex: multimania/lycos),
or only accept one recipient by email (ex: online).
Using the fist engine (emails in hidden
copy) gives a more professionnal impression (in my personal opinion).
On the other hand, by using the second engine, recipients will see ther email
address in the "To" field. Also, the unsubscribe address will contain the
correct parameters, instead of simply pointing back to the subscription/unsubscription
form.
In the end, it is up to you to choose the engine that suits you best ;-)
P.S: People hosted on "Online" must use the second engine (one subscriber
= one email)
The script's temporary folder, tmp/ by default, can be used by the script
in some specific cases :
If one of theses cases applies to your situation (eg: open_basedir) or you
want to use some of the script's possibilities (eg: storing the export
file on the server), then the tmp/ folder is necessary and must be writeable.
The tmp/ folder's name can be modified, provided you specify its new name
in the admin/pagestart.php file (find the line : $tmp_name = 'tmp';
)
If file upload is authorized by your host, it might be caused by the script
not having writing permissions on the attached files storage folder, or
because the ftp server's access parameters are not properly set (if this
option was chosen).
Check the folder's chmod and/or attributes, or check the ftp's access parameters.
If file upload is not authorized, the script adds the file to the list of
attached files only if it is already on the server, in the attached files
storage folder.
Upload your attached files with your ftp client, before adding them using
the form.
Unfortunately, using WAnewsletter's smtp option does not permit to send emails
to recipients other than those whose address is of the same domain as the
smtp server's if you are not identified as part of this domain. This is
a smtp server restriction (relay denial), not WAnewsletter.
Example :
You set smtp.wanadoo.fr as smtp server in the Wanewsletter settings.
If the smtp server does not identify you as being part of the wanadoo domain,
you will only be able to send emails to blablabla@wanadoo.fr type addresses.
The workaround is to have the smtp server that you want to use manage the
authentification, or in other words, that it recognizes the AUTH LOGIN command
(cf : RFC 2554).
In this case, you can specify the server access login and password in the
newsletter settings.
Integrating the subscription form to your site by calling it with a popup
window is very simple.
Here is the code :
<a href="chemin_vers_dossier/subscribe.php"
onclick="window.open('chemin_vers_dossier/subscribe.php', 'mailing', 'width=400, height=300, topmargin=2, left=100, top=100, toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0'); return false;">
Newsletter
</a>
In each of the newsletter's settings, you must enter the absolute url to
the form
(eg : (http://yourdomain.com/rep/subscribe.php)
However, when a new subscriber clicks to confirm his subscription, or if
he unsubscribes using the provided link in the newsletter, subscribe.php
will appear on a full page.
To verify the validity of email addresses provided for each subscription,
the script verifies their syntactic validity.
Some characters cannot be present and email must contain the @ sign and
a single dot for the domain name.
You can adjust the script so that a more elaborate verification is done.
(see configuration)
The more elaborate validation extracts the email's domain name,
and then does a search on it to verify that this domain does havel a Mail
eXchanger.
If it is the case, the script attempts to connect to the smtp server (if
the connection fails, the script will test the following smtp server...)
then sends orders to simulate a sending.
If the smtp server accepts to achieve the sending (nothing is sent, the
script won't end with the adequate order), the email belongs to its domain.
This last verification is not however guaranteed at 100%.
Smtp Servers generally refuse an outside request (the script's in
this case) to their domain for sending an email to an
address outside their domain, but this is not always
the case. (We speak
in this
case of a smtp server accepting the relaying).
The best validation procedure remains the sending of an email to confirm
the demand.
Changing the tstats/ directory name is easy. Edit the functions.stats.php
file and find the following line :
define('WA_STATS_PATH' , $waroot . 'stats/', true);
Replace"stats" by the a name of your choice.
The script allows you to send your newsletters with cron.
It's very simploe, just call the following address : http://www.yourdomain.com/rep/options/cron.php?mode=send&liste=[ID]
The part not put in bold is to be adjusted
by you.
Here also you must replace [ID] by the appropriate list id.
Note:
Pour utiliser les tags personnalisés (à l'instar de {LINKS} ou {NAME} ), éditez le fichier tags.inc.php avec un simple éditeur de texte. Vous devriez trouver ceci au début du fichier :
//$other_tags[$t]['column_name'] = '';
//$other_tags[$t]['tag_name'] = '';
//$t++;
Wanewsletter ne gère pas automatiquement les tags personnalisés. C'est à dire que c'est à vous de rajouter le
champs voulu dans la table prefixe_abonnes, puis de spécifier le tag dans tags.inc.php pour que
le script effectue le remplacement du tag par sa valeur lors de l'envoi.
Exemple :
Vous souhaitez pouvoir mettre un tag {ADDRESS} dans vos newsletters, lequel sera remplacé par l'adresse de l'abonné.
Après avoir ajouté un champs nommé par exemple abo_address dans la table prefixe_abonnes, vous placerez
les données du tag dans tags.inc.php (en ayant décommenté les lignes que j'ai donné plus haut), comme ci dessous :
$other_tags[0]['column_name'] = 'abo_address';
$other_tags[0]['tag_name'] = 'ADDRESS';
$t++;
Vous souhaitez maintenant ajouter un autre tag ? Reproduisez simplement la même opération.
Pour que vos abonnés puissent ajouter ces données dans leur profil, le panneau de gestion de profil doit être
activé (voir configuration générale). Vous devez modifier le template editprofile_body.tpl présent dasn le dossier
templates/ du script.
Ajoutez les champs text nécessaires en prenant soin de leur donner le nom de la colonne à laquelle il se rapporte.
Exemple en se basant sur les tags des exemples précédents :
<table class="content">
<tr>
<td class="row1"> <label>{L_EMAIL} :</label> </td>
<td class="row2"> <span class="texte">{EMAIL}</span> </td>
</tr>
<tr>
<td class="row1"> <label for="pseudo">{L_PSEUDO} :</label> </td>
<td class="row2"> <input type="text" id="pseudo" name="pseudo" value="{PSEUDO}" size="30" maxlength="30" class="text" /> </td>
</tr>
<tr>
<td class="row1"> <label for="abo_address">Votre adresse :</label> </td>
<td class="row2"> <textarea id="abo_address" name="abo_address" rows="4" cols="50" class="text">{ADDRESS}</textarea> </td>
</tr>
<tr>
<td class="row1"> <label for="abo_birthday">Anniversaire :</label> </td>
<td class="row2"> <input type="text" id="abo_birthday" name="abo_birthday" value="{BIRTHDAY}" size="30" maxlength="30" class="text" /> </td>
</tr>
<tr>
<td class="row1"> <label for="language">{L_LANG} :</label> </td>
<td class="row2"> {LANG_BOX} </td>
</tr>
<!-- BEGIN password -->
<tr>
<td class="row1"> <label for="current_pass">{password.L_PASS} :</label> </td>
<td class="row2"> <input type="password" id="current_pass" name="current_pass" size="30" maxlength="32" class="text" /> </td>
</tr>
<!-- END password -->
<tr>
<td class="row1"> <label for="new_pass">{L_NEW_PASS} :</label> </td>
<td class="row2"> <input type="password" id="new_pass" name="new_pass" size="30" maxlength="30" class="text" /> </td>
</tr>
<tr>
<td class="row1"> <label for="confirm_pass">{L_CONFIRM_PASS} :</label> </td>
<td class="row2"> <input type="password" id="confirm_pass" name="confirm_pass" size="30" maxlength="30" class="text" /> </td>
</tr>
</table>
Note : Vous ne pouvez pas utiliser les tags personnalisés avec le moteur d'envoi en copie cachée
This feature was asked by several users of Wanewsletter.
To define a language with the form (under reserve that this language is installed in Wanewsletter),
you just have to add the following line in the code of inclusion of newsletter.php which is supplied
by the generator of form :
Note:
include()
)