Welcome, Guest. Please login or register.
March 21, 2010, 10:58:38 AM

Login with username, password and session length
Search:     Advanced search
WB 2.8.1 released!
Download and additional information are available here .
110578 Posts in 15968 Topics by 9313 Members
Latest Member: Gudrun
* Home Help Search Login Register
+  WebsiteBaker Community Forum
|-+  English
| |-+  Modules (Moderators: Argos, BerndJM)
| | |-+  Newsletter module
Pages: [1] 2 3 ... 5 Go Down Print
Author Topic: Newsletter module  (Read 19866 times)
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« on: November 10, 2007, 05:08:53 PM »

I have wrote a snippet = newsletter module which provides the Massmail module with an interface for visitors to sign on or sign off to a newsletter.

The module send an activation link to the user and after activation add the email to massmail

You must have installed massmail and newsletter module, then put the following code to your template or to any code section:

Code:
<?php
    
if (function_exists('newsletter_info')) {
      
newsletter_info('Newsletter','newsletter@ralf-hertsch.de',true,false);  }
?>


The function newsletter_info($massmailGroup, $fromEMail, $textOnly=true, $infoAdmin=false) has 4 parameters:

$massmailGroup is the massmail group used by the newsletter module, in the code example above Newsletter. This group must already exists.

$fromEMail is the email address which will be used as return address for the activation mails.

$textOnly is by default true, the newsletter module will only send emails in TEXT format. If set to false the newsletter module will use the $wb->mail() function and send emails in multipart mode.

$infoAdmin is by default false, if set to true the newsletter module will send status mails to the $fromEMail address to inform the administrator about the newsletter activities.

Please test the attached module and report any error and suggestions

Regards
Ralf

removed newsletter_0.13.zip - please look at newer posts for a actual version
« Last Edit: November 10, 2007, 09:24:30 PM by Ralf (Berlin) » Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
macsmet

Offline Offline

Posts: 157


« Reply #1 on: November 10, 2007, 06:56:01 PM »

Great snippet/module!

I added a dutch translation!

In the confirmation e-mails the links don't work.
I get --> ?nl_action=activate&nl_check=81417350

MacSmet
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #2 on: November 10, 2007, 07:14:10 PM »

Hello MacSmet,

thank you for the dutch translation!

Quote
In the confirmation e-mails the links don't work.
I get --> ?nl_action=activate&nl_check=81417350

Hmmm, I can't detect any error, in which way have you integrated the newsletter module? In your template or as a code section? Can you please post the code?

Thank you!

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
macsmet

Offline Offline

Posts: 157


« Reply #3 on: November 10, 2007, 07:20:53 PM »

Hi Ralf,

I use in a code-section:
 if (function_exists('newsletter_info')) {
      newsletter_info('Nieuwsbrief','williamdesmet@gmail.com',true,true);  }

and I call the section from the template with (it works but don't know if it is OK):
php $section_id = 68;

// Get requested section for requested page
$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE section_id = '$section_id' ");
// Make sure there is one
if($query_sections->numRows() > 0) {
    $section = $query_sections->fetchRow();
    $section_id = $section['section_id'];
    $module = $section['module'];
    require(WB_PATH.'/modules/'.$module.'/view.php');
}


greetings,

MacSmet    

                   
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #4 on: November 10, 2007, 07:29:29 PM »

Hello McSmet,

I think your integration is too tricky...  cool

It's not neccessary to create a code section and then call this section within the template.

Please add to your template just the lines:

Code:
if (function_exists('newsletter_info')) {
  newsletter_info('Nieuwsbrief','williamdesmet@gmail.com',true,true);  }

that's all.  cool

Greetings
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
macsmet

Offline Offline

Posts: 157


« Reply #5 on: November 10, 2007, 07:39:13 PM »

I put the code into my template but no success!
I still don't get a link to click on.

MacSmet
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #6 on: November 10, 2007, 08:09:12 PM »

Hello McSmet,

ok - I have changed the method for creating the activation link and added an alternate method.

Please try it again with the attached v0.14, which also contain NL.php

Regards
Ralf

removed newsletter_0.14.zip - please look at newer posts for a actual version
« Last Edit: November 10, 2007, 08:47:36 PM by Ralf (Berlin) » Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
macsmet

Offline Offline

Posts: 157


« Reply #7 on: November 10, 2007, 08:38:52 PM »

Sorry, no luck!
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #8 on: November 10, 2007, 08:46:34 PM »

ok - but now it should work  cool

Thank you for your patience!

Regards
Ralf
« Last Edit: February 22, 2008, 07:39:23 PM by Ralf (Berlin) » Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
macsmet

Offline Offline

Posts: 157


« Reply #9 on: November 10, 2007, 08:53:16 PM »

Yes, it does work now.
Thank you for a great snippet!
Logged
Gerard

Offline Offline

Posts: 65


WWW
« Reply #10 on: November 11, 2007, 05:38:56 PM »

Great job! It works fine. I'm gonna use it.

Regards,

Gerard
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #11 on: November 11, 2007, 05:43:46 PM »


thank you  cool

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
kida

Offline Offline

Posts: 24


« Reply #12 on: November 21, 2007, 06:27:43 AM »

Hey

Neat little addition.

2 hopeful questions (one will be easy, the other maybe not...):

1. How can I change the text on the sign up form (It's not in the language folder)
2. Any way I could add a 'Name' field to the subscription process and then maybe personalise the emails?

Cheers, and great job so far

Darren
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #13 on: November 21, 2007, 07:12:01 AM »

Hello Darren,

Quote
1. How can I change the text on the sign up form (It's not in the language folder)

all text is in the language file, please look for nl_text_intro ...

Quote
2. Any way I could add a 'Name' field to the subscription process and then maybe personalise the emails?

Massmail does not support personalized emails, therefore I haven't implemented a name field. Perhaps I will create a complete newsletter module next year...

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
messali

Offline Offline

Posts: 26


« Reply #14 on: November 22, 2007, 11:56:48 AM »

i dosen't work...
i have a problem with confirm button, when i click "ok"
open new window with text:
Not Found
The requested URL /pages/news-search.php was not found on this server.
What's wrong?
please help me

http://www.stalconex.pl/pages/polityka.php

Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #15 on: November 22, 2007, 04:03:30 PM »

Hello,

I haven't got this error from your page - it seems, that you are using an earlier version, please download latest version from here.

Please test it first with unchanged language file and translate later.

Thank you for your patience!

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
messali

Offline Offline

Posts: 26


« Reply #16 on: November 22, 2007, 05:35:53 PM »

Thnxs Ralf,
now it's working!
I have one question,

where is  css style file from this newsletter?
i want modify fonts size, and colour

best regards from Poland
Mess
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #17 on: November 22, 2007, 06:01:28 PM »

Hello Mess,

the Newsletter Snippet has no own css file, but it declare a class="newsletter":

Code:
<div class="newsletter">
   [...]
</div>

You may define this class in the css file of your template.

Also if you don't speak german, you may find some hints and a example css declaration at my homepage - I want to translate this page within the next few days...

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
kida

Offline Offline

Posts: 24


« Reply #18 on: December 03, 2007, 10:26:15 PM »

Hey

I assumed that I would be able to view the subscribers somewhere. I thought it would be on the mass mail page.

It is definitely adding subscribers to the 'wb_mod_massmail_add resses' table but I don't see how I can view them via the admin or wb page - mass mail.

Any help is greatly appreciated.

Cheers

Darren
Logged
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #19 on: December 04, 2007, 01:25:21 AM »

Hello Darren,

Quote
It is definitely adding subscribers to the 'wb_mod_massmail_add resses' table but I don't see how I can view them via the admin or wb page - mass mail.

The newsletter snippet job is finished by adding subscribers to the table, so please contact the developers of massmail module in this thread.

Thank you!

Best regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #20 on: February 22, 2008, 07:44:11 PM »

The Newsletter Module is now available for Download in the Addons Repository - Code Snippets.

You will find some hints and further informations at my homepage (german) and (english).

Regards
Ralf
« Last Edit: February 25, 2008, 05:42:42 AM by Ralf (Berlin) » Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #21 on: February 25, 2008, 05:45:53 AM »


Further informations and hints to the newsletter snippet are now also available in english language (at my homepage).

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #22 on: February 28, 2008, 06:15:49 PM »

Hello,

please upgrade to newsletter module v0.16 - this version closes a XSS security vulnerability.

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
Boudi

Offline Offline

Posts: 502


//o_-\\


« Reply #23 on: March 05, 2008, 02:48:45 PM »

Great combination between 2 modules!  smiley

But still 1 question to get it clear for me:

Is there no code snippet or someting where I (as an admin) could check the mailaddresses from subscribers?

For me this seems to be some basic feature within every newsletter script.
Logged

...:: Bake the Unbakable ::...
Ralf (Berlin)
Addons Team
******
Online Online

Posts: 816


Don't panic...


WWW
« Reply #24 on: March 05, 2008, 06:01:53 PM »

Hello,

you may set the $infoAdmin flag to true - the 4. parameter in newsletter_info()

Code:
<?php
  
if (function_exists('newsletter_info')) {
    
newsletter_info('Newsletter','newsletter@ralf-hertsch.de',true,true);  }
?>

in this case you will get automaticly statusmails about subscribing, unsubscribing a.s.o.

To view all subscribers, please look at Massmail and check the desired Mailgroup.

Regards
Ralf
Logged

phpManufaktur - Dienstleistungen rund um Website Baker, Programmierung, Schulung, User Group Berlin
panke.info - Das Informationsportal rund um die kleine Panke..
Pages: [1] 2 3 ... 5 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!