Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4   Go Down

Author Topic: Newsletter Plugin  (Read 109612 times)

0 Members and 1 Guest are viewing this topic.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Newsletter Plugin
« on: January 17, 2007, 02:28:02 pm »

This one is pretty much a pluginized version of the 1.3 mod I posted ~ 2 years ago. Therefore the code isn't that pretty but works. No code cleanup or improvements added except that it only works with the modpack.
Reason for the restriction to the modpack: I do not like newsletter scripts to much. But sometimes they come in pretty handy. Still the users should have the possibility to opt out. This they can do when unchecking 'Allow admin emails' in their profile. Or the similar setting in a bridged environment (should work bridged but I haven't tested that at all).

How does it work:
Unzip the archive in the plugin dir, install it via the coppermine config. Now you'll see a new button 'Newsletter' in the admin menu. A click on it gives you the option to 1. send mail or 2. check the archive. Check archive lets you view/ delete old newsletters you've sent. Send mail allows you to create a new mail template or to edit an old one and resend it.
When you've created/ edited your template (you can use the placeholder {username} to insert the username), hit send and you come to an options page.

How to send mails: php_mail or sendmail, php_mail means what you've set in coppermine config or you can force sendmail (excluding coppermines mailer include)
Sendmail path: The path to sendmail if you've chosen above to use it
Server OS: should be self detecting, uses \r\n as linefeed for win and \n for nix
How many mails per batch: Best is to use a low value even if that needs longer. Timeout problems won't occur or at least not that often. The newsletter will send the number of set emails, refreshes the page and sends the next batch
Send as preview: If checkt the plugin won't send the newsletter but only a preview to the admin
Automatic wordwrap after 72 chars: If checked the wordwrap every 72 chars is enabled

Click send and the plugin will send away

What if I run into a timeout: I only experienced that with huge batches and/ or invalid email addies.
Check the address bar and find an entry lastmailed=xxx, raise the xxx number and hit the browsers reload button. The plugin will continue to send
eg lastmailed=180, your batch size is 20, then set it to lastmailed=200, the plugin will continue at email nr. 200
or you set nummails=1 (batch size), then you'll see exactly what email makes the troubles, then raise lastmailed by one and edit the trouble email.

edit: Translations are welcome (see plugin/newsletter/lang/english.php as reference, use the lang file naming scheme coppermine uses - see the lang dir)
« Last Edit: January 17, 2007, 02:36:41 pm by Stramm »
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

twogayther

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Newsletter Plugin
« Reply #1 on: January 17, 2007, 03:12:03 pm »

Hi

I have a probleme with this plugin.
I install it and after when i use menu newsletter i have this error :
Fatal error: main() [function.require]: Failed opening required 'plugins/newsletter/include/functions.inc.php' (include_path='/mnt/105/sdb/c/a/godeboy/include:.:/usr/php4/lib/php') in /mnt/105/sdb/c/a/godeboy/plugins/newsletter/newsletter.php on line 9

In adress bar i can see this url http://mysite.com/index.php?file=newsletter/newsletter

Isn't it here the problem ... ?
Thank and excuse because i don't speak english not at all

EDIT : I find the first problem the file function.inc.php was not in the good place .
but i have always a problem . Did anyone test it ?
« Last Edit: January 17, 2007, 03:22:38 pm by twogayther »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #2 on: January 17, 2007, 05:12:40 pm »

post a real url, don't rename the folder name 'newsletter'
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

twogayther

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Newsletter Plugin
« Reply #3 on: January 18, 2007, 12:06:42 pm »

Hi,

I don't have rename folder newsletter
real url is http://godeboy.free.fr/index.php?file=newsletter/newsletter

here's the debogage info :

While executing query "SELECT count(user_id) AS num FROM `godeboy`.coppermine_users  WHERE user_email <> '' AND  = '1' AND user_active = 'YES'" on

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1' AND user_active = 'YES'' at line 1

Fichier: /mnt/105/sdb/c/a/godeboy/include/functions.inc.php - Ligne: 249
« Last Edit: January 18, 2007, 04:53:39 pm by twogayther »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #4 on: January 18, 2007, 02:31:28 pm »

I don't see your coppermine gallery when opening http://www.mysite.com

and I clearly have written (in bold) in the first post of this thread, third sentence, that this plugin only works when you have the modpack installed. In the following sentences I have explained why...

Again, if you do not have the modpack installed it won't work. If you want support, post true URLs. Urls, when I click them that your coppermine gallery opens.

Don't post debug output unless requested. It tells you that above the debug output. I'm going to edit your above post to unclutter this thread. Please do more reading...
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

twogayther

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Newsletter Plugin
« Reply #5 on: January 18, 2007, 04:55:55 pm »

Hi,

I explain you i dont' speack not at all english but i understand you're angry ...
but untderstand I do an personnal job when i wrote in english

I don't need help so ..

Not a problem
Have a nice day .
bye
Logged

angeldevil

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Newsletter Plugin
« Reply #6 on: January 18, 2007, 10:21:45 pm »

Great work Stramm!! thank you  ;D

finally one newsletter!

I've traslated in italian language
Logged
a

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #7 on: January 19, 2007, 08:14:06 am »

Thanks for the translation, much appreciated
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Newsletter Plugin
« Reply #8 on: January 19, 2007, 10:03:50 am »

Mornin' Stramm,

Here's French lang

Because my Zipper is out today, i can'nt send a ZIP lang  ???
Copy and Past in a new file nammed french.php

   PYAP

Code: [Select]
<?php
/**************************************************
  CPG Newsletter Plugin for Coppermine Photo Gallery
  *************************************************
  Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
  *************************************************
  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.
  *************************************************
  Coppermine version: 1.4.10
  Newsletter version: 1.01 Translation by PYAP
  $Revision: 1.0 $
  $Author: stramm $
***************************************************/
if (!defined('IN_COPPERMINE')) 
{
die('Not in Coppermine...');
}
$lang_newsletter = array(
  
'uninstall' => 'Voulez-vous supprimer la table SQL dans laquelle les infos de votre Newsletter sont stockées ?',
'admin_title' => 'NewsLetter',
    
'title' => 'NewsLetter',
'user' => 'Utilisateur',
'pw' => 'Mot de Passe',
'welcome' => 'Bienvenue sur le plugin NewsLetter... ',
'mail_menu' => 'Menu',
'send' => 'Expédiez le Mail',
'archive' => 'Controlez Archive',
'active_users' => 'Nombre de emails confirm&eacute; dans la base de donnés : ',
'archive_welcome' => 'Archive Newsletter ',
'show_archive_mail' => 'Montrez',
'delete_archive_mail' => 'Supprimez',
    
'subject' => 'Sujet de la NewsLetter',
'content' => 'Contenu de la NewsLetter',
'chose_send' => 'Faites une sélection',
'create_new' => 'Créez un nouvel email',
'create_edit' => 'Editez un email existant et expédiez-le de nouveau',
'sending' => 'Expédié...',
'date' => 'Date',
'send' => 'Expédiez le email',
'nomail_error' => 'ATTENTION : Vous avez sans doute oublié de taper une adresse email !',
'sendmail_path' => 'Sendmail-path<br>(si vous avez choisi sendmail, <br>incl. option [-t])',
'batch' => 'Combien de email désirez-vous expédier par batch ?',
'send_type' => 'Comment expédier les emails ?',
'serveros' => 'Server OS',
'preview' => 'Expédiez   vous-même un preview',
'wordwrap' => 'Automatic wordwrap apr&egrave; 72 caracteres',
'sendmail_error' => 'Mauvais chemin (path) vers sendmail ou pas installé',
'edit_archive_mail' => 'Sélectionnez',  
'mailing' => 'Mailing ...',  
'all_sent' => 'Tous les emails sont expédiés',
'preview_sent' => 'La prévisualisation du email envoyé<br><br>Vous pouvez fermer cette fenetre navigateur.<br><br><br><b>Si vous &egrave;tes satisfait de votre email, uncheck \'Expediez è vous-meme un preview\' et tapez \'Expédiez\' de nouveau !!!</b>',
'continue' => 'Continuez',  
'click' => 'click',  
'wait' => 'Attendez quelques instants...',  
  );
?>

edit by Stramm : attached the lang file as zip... thanks PYAP :)
« Last Edit: July 20, 2007, 10:43:33 am by PYAP »
Logged

marpessa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Newsletter Plugin
« Reply #9 on: February 13, 2007, 12:38:28 am »

I'd love to use this but I keep getting that error when I click on "newsletter" button.

Critical error: There was an error while processing a database query


Help? :)
Logged

Nibbler

  • Guest
Re: Newsletter Plugin
« Reply #10 on: February 13, 2007, 12:51:38 am »

Enable debug mode and post the mysql error message (not the entire debug output) you get when you replicate the error.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #11 on: February 13, 2007, 09:42:04 am »

have you read the very first post of this thread? Especially that part...

Quote
it only works with the modpack
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Newsletter Plugin
« Reply #12 on: February 13, 2007, 10:05:22 am »

Goodmorning!

dutch.php added as zip.

Hein
Logged

marpessa

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Newsletter Plugin
« Reply #13 on: February 13, 2007, 10:11:03 am »

have you read the very first post of this thread? Especially that part...


Oh... Where can I find the modepack and would it work with 1.4?
« Last Edit: February 13, 2007, 02:28:38 pm by marpessa »
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Newsletter Plugin
« Reply #14 on: February 13, 2007, 10:27:17 am »

In the first post it is said it only works with the modpack (which Stramm made).
So you might want to go look in here http://forum.coppermine-gallery.net/index.php?board=81.0
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #15 on: February 13, 2007, 12:13:37 pm »

Hein, thank you for the translation ;D
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/

antisa33

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 181
    • Free french kids coloring
Re: Newsletter Plugin
« Reply #16 on: March 20, 2007, 04:56:34 pm »

Hello
The newsletter module seems good but i don't want to install the MOD pack, how can i do ?
Best regards
Logged

Joachim Mller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Newsletter Plugin
« Reply #17 on: March 20, 2007, 05:51:30 pm »

Not at all. Just read the posting just two above yours (posted by HJein): this mod will only work with the modpack. That's it. If you need it as standalone mod, go ahead and code it.
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Quest about list of users
« Reply #18 on: March 23, 2007, 05:58:21 am »

Hi, Stramm, Thank u very much for this plugin :) It works fine, just one question. When I send mail it is sent only to users who registered AFTER installig your mod. Can I manually insert others to Mysql table? If yes, please name the table & the field. Thanks.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 6006
Re: Newsletter Plugin
« Reply #19 on: March 23, 2007, 07:56:58 am »

not after installing the mod but after installing the modpack. Your users need to tick in their profile the checkbox 'allow admin email'.
Auto checked when registering with the modpack

It's possible to use phpmyadmin to set that for all users. But it's not the purpose of this functionality
Logged
my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/
Pages: [1] 2 3 4   Go Up
 

Page created in 0.026 seconds with 21 queries.