Thread subject: muscapaul's PHP-Fusion website :: Newsletter Infusion v2.xx

Posted by muscapaul on 31-07-2008 19:35
#1

New version: v2.00

A system that will alow you to write newsletters, store them and send them. Newsletters can be sent in plain text or HTML formats.
Members can add themselves to the subscribers list by clicking a link in the Newsletter Subscription Panel and can remove themselves in a similar fashion.

Remark:
Upgrade of the last version of Newsletter Infusion as available for PHP-Fusion v6 from the main PHP-Fusion site.

Changes:
- Code completely updated for compatibility with PHP-Fusion v7.
- Added code to clean the list of subscribers from deleted members before a newsletter is sent.
- Some improvements to Newsletter Subscription Management

Upgrading from PHP-Fusion v6 to PHP-Fusion v7:
Please note, if you want to upgrade your Newsletter Infusion during a PHP-Fusion version upgrade from v6 to v7, there is no need to defuse the infusion. There will be no error messages as long as you upload the infusion files at the same time as the PHP-Fusion files. When you upload the infusion files, you can simply overwrite the existing ones.
PHP-Fusion v7 utilises a somewhat different system for administering admin rights for Infusions. In v6 it used to be a single setting that gave rights to all Infusions. Under the new version every infusion will be given its own code for admin rights. As a result it is necessary to run an upgrade script (../infusions/newsletter_panel/v6-7upgrade.php) that will at least add the rights for the primary Superadministrator. The file has checkboxes to indicate whether all superadmins should be given access rights to the Newsletter Infusion and/or whether all admins with Infusion Administration rights should be given those rights.
This script only needs to be run if a site is upgraded from PHP-Fusion v6 to v7. Even though a check has been built in to prevent the script from being run after the upgrade has already been performed, it is advised to delete the script from your server after upgrading.

DOWNLOAD (last version: 01.08.2008)
* Some errors corrected in infusion.php.


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by muscapaul on 02-08-2008 00:30

Posted by W3C_Valid on 31-07-2008 21:23
#2

$inf_folder = "newsletter_panel";

is missing in infusion.php

changed $inf_newtable_[1] to $inf_newtable[1]
and $inf_newtable_[2] to $inf_newtable[2]


nice infusion thanks


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by W3C_Valid on 31-07-2008 21:35

Posted by willy888 on 31-07-2008 21:38
#3

I can't infuse it.
I don't know why.
v7 RC2

Posted by muscapaul on 01-08-2008 00:05
#4

Probably because of the reasons SiteMaster indicated (one error due to oversight one, the other one due to an unfortunate change in the infusion code). Download is updated!

Posted by scofield on 01-08-2008 00:53
#5

Hi

can you please do something with this function.
Becores i have +800 on my newsletter, and evey time i send out a newsletter. the off. site email, get 9 email with the same thing.

if it just send 1 mail to the off site mail adress, it will be ok.

hope oyu understand what i mean.
Code
if ($rows == 1 || $i == 99) {
               if (!sendemail($settings['siteusername'],$settings['siteemail'],$settings['siteusername'],$settings['siteemail'],$subject,$content,$_POST['format'],"", $bcc_list)) {
                  $error = $locale['NL418'];
               }
            $bcc_list = "";
            }
         if ($i != 99) { $i++; } else { $i = 1; }
         $rows--;
         }
      }



Posted by muscapaul on 01-08-2008 01:24
#6

I'll check it out.

Posted by muscapaul on 01-08-2008 12:34
#7

I get it. As long as the official site email is the only address that gets the nine mails, it should be okay. The emails are send by bcc, but there needs to be an addressee in the 'To' field. In this case it is the site email, preventing other members of the site to inadvertedly see the address of another member, who may have opted to have an invisible email address.
The counter is introduced to prevent the sending of messages being blocked by the mail server because too many addresses are listed in the bcc field. That could be a sign of spamming. It might even be possible that some providers have a lower limit.

What you could try, but I have no clue whether it will work, is to replace all instances of the 99 in the counter with, say, 199, and see if that works. It will at leats save half of the messages to your site email.

Posted by afoster on 01-08-2008 20:12
#8

I just downloaded what I believe is the updated infusion, but I still can't infuse it (v7RC2). It does not show up on the infused list although it shows up as a panel when I try to Add a Panel. When adding a panel, I get this error message:

Table 'domain_website.fusion_newsletter_subs' doesn't exist

To receive email updates from This Website click the subscribe button.

Posted by muscapaul on 02-08-2008 00:27
#9

First, preview this code in a Custom Page:
<?php
$result = dbquery("DELETE FROM ".DB_INFUSIONS." WHERE inf_title = 'Newsletters' LIMIT 1");
$result = dbquery("DELETE FROM ".DB_ADMIN." WHERE admin_title = 'Newsletters' LIMIT 1");
?>

Then donload this package: http://www.muscap...8.2008.zip (or use the download link in the first post) and infuse that one. You should be alright after that.

I thought I had updated the package correctly, but apaprently I shoudl not have updated the files directly in the zip file but rather created a new one. The present version infused alright on one of my own websites. Sorry for the confusion...


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by muscapaul on 02-08-2008 00:29

Posted by afoster on 02-08-2008 03:48
#10

I followed the instructions in your last post, and I still get the same error message:

Table 'domain_website.fusion_newsletter_subs' doesn't exist

To receive email updates from the Family Website click the subscribe button.

When I previewed the code in a custome page, the panel that was displayed was blank if that means anything.

Posted by W3C_Valid on 02-08-2008 03:58
#11

afoster wrote:
I followed the instructions in your last post, and I still get the same error message:

Table 'domain_website.fusion_newsletter_subs' doesn't exist

To receive email updates from the Family Website click the subscribe button.

When I previewed the code in a custome page, the panel that was displayed was blank if that means anything.


defuse it and edit your infusion.php
changed $inf_newtable_[1] to $inf_newtable[1]
and $inf_newtable_[2] to $inf_newtable[2]

4 places in total you need to update

he forgot to change it in the infusion.php ;)

Posted by afoster on 02-08-2008 05:07
#12

SiteMaster,

Got it infused, and everything seems to be working well after making your updates as noted in the post. however, once I am logged out, the panel just shows the Title "Newsletters" with everything else blank, is that the way it should be?

BTW, you said that there are 4 places to edit, the two you mention and the other two are the following I hope:

$inf_droptable[1] = "newsletters";
$inf_droptable[2] = "newsletter_subs";


Notice: Undefined index: post_edituser in /home/muscapal/public_html/print.php on line 114
Edited by afoster on 02-08-2008 05:08

Posted by dallas on 02-08-2008 05:22
#13

Nice infusion. Is there any way we can make it for guests also.

Posted by W3C_Valid on 02-08-2008 05:58
#14

afoster wrote:
SiteMaster,

Got it infused, and everything seems to be working well after making your updates as noted in the post. however, once I am logged out, the panel just shows the Title "Newsletters" with everything else blank, is that the way it should be?

BTW, you said that there are 4 places to edit, the two you mention and the other two are the following I hope:

$inf_droptable[1] = "newsletters";
$inf_droptable[2] = "newsletter_subs";


set the panel to member, as i think it is only made for members of your site, and therefore guest does not need to see it

and yes is was the other 2 to edit ;)

Posted by muscapaul on 02-08-2008 14:38
#15

New version: v2.01

Changes:
- Finally gotten rid of those errors in infusion.php.
I took too little time for the previous correction. That is what you get when you hurry too much because you want to please everyone. ;)

DOWNLOAD (last version: 02.08.2008)

Posted by muscapaul on 02-08-2008 14:41
#16

dallas wrote:
Nice infusion. Is there any way we can make it for guests also.

That would add a whole new part to the infusion. Presently, the users table is used for the email addresses. Guests would have to leave their email address which needs to be stored in a separate table. At the moment outside the scope of this update, which is intended to make it available for PHP-Fusion v7. Maybe in the future...

Posted by W3C_Valid on 02-08-2008 18:08
#17

can i get you to check the zipfile.
i get broken zipfile when i try to unpack it

Posted by rob on 02-08-2008 18:25
#18

the zip file is not working Pleas check the file.

he is broken wen you open the file.

greetings rob

Posted by dallas on 02-08-2008 18:37
#19

muscapaul wrote:
dallas wrote:
Nice infusion. Is there any way we can make it for guests also.

That would add a whole new part to the infusion. Presently, the users table is used for the email addresses. Guests would have to leave their email address which needs to be stored in a separate table. At the moment outside the scope of this update, which is intended to make it available for PHP-Fusion v7. Maybe in the future...


Ok thanks for the reply. Appreciate it. I have a guest/member one for version 6 that I am trying to convert to 7. I will let you know how it goes. :)

Posted by muscapaul on 02-08-2008 19:06
#20

Does it never end? The server was very sluggish this morning but eventually it told me the file was uploaded. Never mind. Uploaded it again and it went in a jiffy. Should be okay now...