DESCRIPTION
-----------

Simplenews publishes and sends newsletters to lists of subscribers.

This module generate the code for an iframe that will show a form to register a
user in a newsletter.

There are some keys and a list of sites to check that the iframe is authorized.

REQUIREMENTS
------------

 * Simplenews

INSTALLATION
------------

 1. CREATE DIRECTORY

    Create a new directory "simplenews_iregister" in the sites/all/modules
    directory and place the entire contents of this simplenews_iregister folder
    in it.

 2. ENABLE THE MODULE

    Enable the module on the Modules admin page.

 3. ACCESS PERMISSION

    Grant the access at the Access control page:
      People > Permissions.

 4. CONFIGURE

    General configuration of Simplenews Iregister has found on the tab under
    Simplenews admin pages:

      Configuration > Web Services > Simplenews.
      http://www.example.com/admin/config/services/simplenews/iregister

    More detailed configuration has required for every newsletter:

      Configuration > Web Services > Simplenews > Newsletters (edit newsletter
      category).
      http://www.example.com/admin/config/services/simplenews/categories/1/edit


CONFIGURATION
-------------

- IFRAME GENERAL KEY

It needs a key to verify the authenticity of the URL inside the iframe. This is
a general key that is combined with newsletters keys.

Once saved the key, it's important never change it to avoid that all URLs into
the old iframe will be rejected.

- IFRAME KEY

For every newsletter inside this new fieldset, 2 new newsletter options are
required:

 * The key to validate the iframe - the newsletter own key, which is combined
   with the general key;

 * The URLs where are the iframes - a separated by commas string of domains or
   IPs where will have put the iframe code. If a site isn't in this list, then
   it will be rejected.

After have saved the page, there will be showed the iframe code to the copy in
the remote site.

- IFRAME CSS

To optimize the iframe to be similar the remote site theme, it's possible to 
add the CSS rules for the iframe content. The module prepends automaticaly 
every CSS line here with the div#"id" of every iframe, so you need define only 
the rules for the tags inside of the <form>...</form> tag. 

Tags "html" and "body" are left untouched.

- NOTES

The form in the iframe can be configured (block title and message) from the 
newsletter block configuration page 
http://www.example.com/admin/structure/block/manage/simplenews/1/configure . 

The code above that you have copied in your site can also get the browser 
language and it send it to the module, so if you configure the language and 
you localize the block title and message, you have the iframe localized.
