Forums / Developer / New contrib: phplist (Datatype)

New contrib: phplist (Datatype)

Author Message

Bruce Morrison

Monday 05 December 2005 11:14:30 pm

Hi Brendan

It's happening because the extension is meant to be the only way for the users to be added/modified/deleted from phplist.

When a user is created the extension sets the foreignkey in the phplist table to be that of the user object id. This is how the link is maintained between the ez user & the phplist user.

I'm thinking that I should also see if there is a user in phplist with the same email address. I'm pretty sure the ez doesn't allow for users to have the same email address?

Do all users in your phplist instalation have a corresponding ezpublish user?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Stuart Fenton

Tuesday 06 December 2005 6:30:34 am

I came across this error. You need to import the users email address along with their ez ID number to prevent this error.

Fats

-- Stuart

[email protected]
http://www.grandmore.com

Bruce Morrison

Tuesday 06 December 2005 3:27:51 pm

You need to import the users email address along with their ez ID number to prevent this error.

Or import the users directly into ezPublish and they will automatically be created in phplist.

I am interestered in how the module is being used so I can make improvments to it. It sounds like both Fats and Brendan have had users in phplist before using the script. Can you describe your setup and are using the module?

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Brendan Pike

Tuesday 06 December 2005 5:30:04 pm

I came across this error. You need to import the users email address along with their ez ID number to prevent this error.

This is only possible of course when they have an existing ez account which is our case they did not.

Or import the users directly into ezPublish and they will automatically be created in phplist.

This was not really possible either, in our case we switched from using a simple eZ publish orientated newsletter workflow extension that simply fires alert notifications to anyone who has subscribed. (ie. it only captured their email address and did not create eZpublish accounts) Therefore we simply imported these into phplist, but unfortunately if one of these recipients decide they want to join the website then the errors occur.

To answer the your other point we had not previously used phplist so after testing it with your extension have found this to be a great solution. It can be a little tricky to get elegant html to work across the various email clients/services though.

Mapping has worked very reliably (we have only mapped first + last name). There are probably a few facets which would could be useful to people in the future. I'm thinking a dedicated ezpublish accessed list subscribe/unscribe area. We only run a single list but with people that may run multiple it could be especially useful. And I guess to provide the option for users to recieve text only perhaps.

Many thanks Bruce.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Stuart Fenton

Wednesday 07 December 2005 3:22:38 am

One of the sites that I added phpList to had already been running for a while so it had hundreds of registered users. Since editing each of the users was out of the question and would be very time consuming it made sense to import them into PhpList.

I found that as long as the id number of the user was imported along with the email address of the user it worked perfectly.

I haven't tried mapping other attributes to phplist.

When the extension needs is a way of unregistering from the mailing lists directly in ez. Currently I have phpList itself doing the unregistration.

A method of subscribing that does not require editing the user details would be good as well. This way a picture button could be created that says "click here to subscribe to our best offers mailing list" or something similar and when the user logs in automatically subscribes them to the relevant mailing list. The same code could be used for unsubscribing as well.

Regards
Fats

-- Stuart

[email protected]
http://www.grandmore.com

Denis Igin

Friday 16 December 2005 10:19:10 am

FInally - long awaited start of newsletter functionality integration! Way to go and thank you for the effort!!

NXC - OPEN RELIABLE

Stuart Fenton

Friday 16 December 2005 11:09:57 am

I tested the attribute functionality to pass data between ez attributes and PHPList today and it all went without a hitch.

Tested across several systems one with an artificial load of 400 read connections per minute. It took a while but still passed the data across.

All working. No bugs not issues.

Nice implementation.

Good stuff all and all.

Fats.

-- Stuart

[email protected]
http://www.grandmore.com

Brendan Sainsbury

Friday 12 May 2006 7:01:21 am

Hi All,

Seems there's a bug during the user edit process. I've noticed that if a user cancels the editing of their account details, their details are also removed from phplist.

I presume it's got something to do with triggers associated with the deleting of the draft of the user content object. Any ideas...?

I'm reasonably new to EZ so any advice would be useful.

I'm running EZ 3.6.7, latest PHPlist extension and latest PHPlist

Cheers

Brendan Sainsbury

John Smith

Thursday 25 May 2006 7:06:14 am

hi there,

I was testing phplist contribution on ezpublish 3.6.1. I have done the following steps given below:

Installation
-----------------
Follow these steps to add the PHPlist module to your eZ publish installation:

1) Extract the archive into the /extension directory

2) Edit site.ini.append in /settings/override. Add the following to the file:

[ExtensionSettings]
ActiveExtensions[]=phplist

If you already have the [ExtensionSettings] block, just add the second line.

Usage
-----------------
Edit the user content class and add a "PHPList Subscribe" attribute. You will
be presented with a list of active lists. Choose one of these lists and store
the user content class. Name the attribute something like "Subscribe to
mailing list"

Now when editing a user a checkbox will appear, allowing the user to be
subscribed to the nominated list. Unchecking the box will unsubscribe the
user. The users email address will be updated if it is changed.

Would it be possible for someone to guide me what to do next, where i can see phplist administration part.

Please help.

Hapee de Groot

Thursday 25 May 2006 8:42:15 am

The phplist administration is in phplist. Check for more information on Phplist:

http://tincan.co.uk/phplist

It looks like you are working the wrong way around ;-) or am I reading the wrong way around?

Hapee

Ɓukasz Serwatka

Thursday 25 May 2006 9:47:28 am

Hi John,

Look at "eZ Newsletter" as dedicated for eZ publish newsletter extension.
http://ez.no/community/contribs/applications/ez_newsletter

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Bruce Morrison

Thursday 25 May 2006 5:58:03 pm

@Lukasz
The eZ newsletter extension is Compatible with 3.7+ and John is using 3.6.1. There are patches to 3.6 required to make it work.

@John
Hapee is correct. You must have phplist installed and configured to use the extension. phplist is used to manage lists and mailouts while the extension provides a bridge between eZ publish users and phplist users

@Brendan
I'll have a look into the issue you have described.

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Bruce Morrison

Thursday 25 May 2006 8:23:19 pm

Hi Brendan

When you say "if a user cancels the editing of their account details" are you refering to discarding a draft?

I've tested by editing a user and discarding the draft, but the phplist user is not removed.

I need a bit more info on this to be able to debug.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

John Smith

Friday 26 May 2006 3:55:18 am

Hi everybody,

Thanks for your support. Newsletter extension seems to be interesting, But I want to try phplist extension as well. Would it be possible to guide me step by step for setting up the phplist extension because two - three paragraphs of installation regarding phplist is quite short.

Please help.

Smith

Bruce Morrison

Thursday 22 June 2006 5:43:17 pm

Hi All

I've released a new version of the module with the following changes:
+ fixed issue where phplist user would be deleted if a version was deleted (reported by Brendan)
+ added script to import ez users into phplist

See: http://ez.no/community/contribs/datatypes/phplist_module

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Desislava Kioseva

Wednesday 06 January 2010 7:29:54 am

Hi ,

I have some questions about this extension phplist and if Bruce or somebody else from here can answer i will be thankfull.So let me try to explain in few steps what i've done and what is my problem.Am using php5 and ezPublish ver. 4.0.

1. I download and install the phplist according of the documentation on docs.phplist.com.Let me say that i made minimal configuration settings in config.php just to connect the ezdatabase and phplist. I just set up the block from config.php called General settings for language and database:

# what is your Mysql database server
$database_host = "localhost";
# what is the name of the database we are using
$database_name="name of database which ez use";
# who do we log in as?
$database_user = "my_user_name";
# and what password do we use
$database_password = 'my_password';

Am still investigating all settings but i just have an idea to see how extension work so thats why i set up just this part.

When i did this i point to my browser and open list/admin interface and follow the steps through installation.When done the phplist gave me some hints what to do to continue with setting it up.I was not so sure in some of them like (Configure Attributes,Subscriber page etc.) so i leave it for later.

2. Next what i did was to put phplist extension into ez.So i made step by step what was in readme doc.

- activate the extension.

- then I edit the user content class by adding the new attribute PHPlist.

- I read about this steps where i have to set URLs for subscribe/unsubscribe/etc. and for Attributes Mapping but i will be thankfull if somebody gaves me some more information cause i dont become so familiar from readme doc about this parts.

My problem becomes when i try to add new user or to edit existing(without matter did i check the box or not).

For example: In User directory i create new user. Then i start to add information about each attribute like : First name,Last name,Username,password,email and finally i checked the box (for newly added datatype PHPlist) called in README file like 'Subscribe to mailing list'.

When i try to Send for publishing, my new user or edited one, the system gaves me an ERROR.

Fatal error: A database transaction in eZ Publish failed.
The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-87f1338afe6bfcc3b52ca9fa727f782c and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.

The error in debug info was:

Error: eZMySQLDB Jan 06 2010 17:44:05
Query error: Incorrect integer value: '' for column 'blacklisted' at row 1. 
Query: INSERT INTO phplist_user_user (email, confirmed, blacklisted, bouncecount, entered, modified, uniqid, htmlemail, subscribepage, rssfrequency, password, passwordchanged, disabled, extradata, foreignkey) VALUES('[email protected]', '1', '', 0, '2010-01-06 17:44:04', '20100106174404', '0a032f4dbdc5ae71364e9caf9bd4ebe0', '1', 0, '', '', '', '', 'eZ publish user', '171')
Error: eZDBInterface::commit TRANSID-43cd0912f6d944dadea7a74a48d8d087 Jan 06 2010 17:44:05
Transaction in progress failed due to DB error, transaction was rollbacked. 
Transaction ID is TRANSID-43cd0912f6d944dadea7a74a48d8d087.
  • My question is why this happend? Did i made somthing wrong when am setting(configuring) phplist or phplist extension.
  • And if its possible can you explain a little bit about Attribute Mapping.Because on User content class i have attribute 'User accout ' ( holds username,password,confirmpassword and email ), but no in phplist attributes so how to proceed.
  • Finally can you gave more information for newbies how to start the importing script to import all users from ez to phplist ?

I will be happy if Bruce or Xavier or somebody else can provide me more info (if possible step by step) about setting up both phplist and phplist extension to made them work correctly.Am still newbie and any help is welcome.

Desi

'Don't be shamed to ask'