Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#241 2007-05-08 18:29:08
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Ben,
Thanks. It was one degree removed :)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#242 2007-05-31 15:26:12
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hi
unsubscribe problem using permalink set to section_title
I get a 404 error following the link produced by <txp:bab_pm_unsubscribeLink />
The link produces the following format:
http://mysite.com/section/article&uid=xxxxxxxxxxxxxxxxxxxxxxxx
If I remove the &uid=xxxxxxxxxxxxxxxxxxx, the article shows with no error.
The ‘&’ character should in this place be a ‘?’.
I’ll post a hack fix, when I solved it.
Last edited by Psilo (2007-05-31 15:35:37)
Never make the same mistake twice… there are so many… try a new one each day!
Offline
#243 2007-05-31 16:32:39
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
You need to use the hard url for the unsubscribe link, as described here *
But if you do build a fix, even better …
- Ben
Last edited by benbruce (2007-05-31 16:33:52)
Offline
#244 2007-05-31 17:10:08
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Here’s a fix to allow non-messy unsubscription links while keeping compatibility for messy permalinks.
Find the section: // —— mail function ——————————————-
Replace this code:
if (!empty($listUnsubscribeUrl)) {
$bab_pm_unsubscribeLink = $listUnsubscribeUrl . $uidQ . "uid=" . $unsubscribeID;
}
with this:
if (!empty($listUnsubscribeUrl)) {
$uidQ = "?";
if(strrchr($listUnsubscribeUrl, "?"))
$uidQ = "&";
$bab_pm_unsubscribeLink = $listUnsubscribeUrl . $uidQ . "uid=" . $unsubscribeID;
}
That should do it!
Last edited by Psilo (2007-06-01 03:18:39)
Never make the same mistake twice… there are so many… try a new one each day!
Offline
#245 2007-06-04 16:39:32
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
I’m not receiving any mail from this plugin on two different installs on two different servers. I can’t explain it.
Offline
#246 2007-06-05 06:04:23
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Hello Ben,
I must say I have high hopes for this plugin, but I just can’t get it to work fully. I have MySQL 5 and found your hack to enable it to create the tables properly, and I have solved that by editing my plugin to have:
$create_sql1[] = safe_query("CREATE TABLE IF NOT EXISTS $bab_pm_PrefsTable (
`listID` int(4) NOT NULL auto_increment,
`listName` varchar(100) NOT NULL default '',
`listDescription` longtext,
`listAdminEmail` varchar(100) NOT NULL default '',
`listUnsubscribeUrl` varchar(100) NOT NULL default '',
`listEmailForm` varchar(100) NOT NULL default '',
`listSubjectLine` varchar(128) NOT NULL default '',
`catchall` longtext,
PRIMARY KEY (`listID`)
) $tabletype ");
$create_sql2[] = safe_query("CREATE TABLE IF NOT EXISTS $bab_pm_SubscribersTable (
`subscriberID` int(4) NOT NULL auto_increment,
`subscriberName` varchar(100) NOT NULL default '',
`subscriberEmail` varchar(100) NOT NULL default '',
`subscriberLists` varchar(100) NOT NULL default '',
`subscriberCustom1` longtext,
`subscriberCustom2` longtext,
`subscriberCustom3` longtext,
`subscriberCustom4` longtext,
`subscriberCustom5` longtext,
`subscriberCustom6` longtext,
`subscriberCustom7` longtext,
`subscriberCustom8` longtext,
`subscriberCustom9` longtext,
`subscriberCustom10` longtext,
`subscriberCatchall` longtext,
`flag` varchar(100) NOT NULL default '',
`unsubscribeID` varchar(100) NOT NULL default '',
PRIMARY KEY (`subscriberID`),
UNIQUE (subscriberEmail),
FULLTEXT (subscriberLists)
) $tabletype ");
(can’t quite get it to display correctly here, but I basically changed all of the lines that contained “longtext, NOT NULL, default’‘” to have just “longtext,”. This appears to work, however when I go to add a new list, I get this error:
Warning: Incorrect integer value: '' for column 'listID' at row 1 INSERT INTO bab_pm_list_prefs values ('','TEst','description','userATdomain.com','nothing','nope','TESTLIST','') in \textpattern\lib\txplib_db.php on line 84
…and I have a feeling that it’s caused by the line `listID` int(4) NOT NULL auto_increment,
since the same thing happens for adding a subscriber (just with “subscriberID” instead, but they both have the same int(4) NOT NULL auto_increment code).
Anyways, I am SO close after hacking for about 30 mins to get this plugin working…do you have any other suggestions or replacement code I could try?
Thanks so much in advance,
- G
Offline
#247 2007-06-05 22:36:36
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
FireFusion,
I’m not sure how to help you. Have you followed the tutorial? What other info can you post?
georgeM,
I’m sure it’s a PHP 5 issue. Not sure about your hacks, but as for your warning:
- Your comment about the
NOT NULL
could be it - But first, someone’s posted about how you can’t have a
''
as an entry in PHP 5 — it has to beNULL
, so in your error warning, it saysline 84
— go to line 84 and change the''
to anNULL
and see if that works. If not, then … go back to #1 and maybe just delete theNOT NULL
part?
Please reply here to the forum as your work will help others.
- Ben
PS. I’m adding some comments and notes from the thread to the Postmanual.
Atlas Shrugged, saw your comment again — Added a note to the tutorial here
Last edited by benbruce (2007-06-05 23:59:47)
Offline
#248 2007-06-05 23:17:59
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Ben
What are the possibilities of getting this excellent plugin to be able to send attachments?
[Ducks for cover, knowing that if HTML emails are naughty, bulkmailing attachments have got to be wicked…]
The shameful hacks I made to your plugin almost worked, (adding a new “type” for base64 attachments). But it seems like a better approach would be to simply allow the plugin to reference txp “files”.
What do you think?
Offline
#249 2007-06-05 23:30:30
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
mrdale,
ha ha :)
No, I actually did some thinking about this and as I remember it, it wouldn’t be too complicated (in theory). The hardest part would be changing the mime-type of the email so that the email reader knows there are attachments. This could be done in the code pretty simply, but wrapping my head around how to make it know if there WEREN’t any or WERE some or might be got me tired.
I can’t really remember now but I think you might be able to add a tag (a new tag, yet to be created) to your email form, that would overwrite the existing mime-types set up by the existing mime tags (or the default). Then you could add a drop down in the write-tab module that allowed you to pick an id number and attach it1. It’s a bit clunky and that’s why I gave off.
Not sure if this relates to what you’ve done at all. Does that help you at all? What else have you done in there? Anything to add to the Postmanual or a next version?
- Ben
PS. Another thing to think about is, I don’t know what large emails do to the batch method — you might have to reduce your batches down to get them all to mail out.
1 You could also make the form tag accept the id number, which makes it unnecessary to rework the write tab module.
Last edited by benbruce (2007-06-05 23:34:50)
Offline
#250 2007-06-05 23:46:32
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
>Ben: Ha ha yourself.
You give me too much credit. I wasn’t doing very nice things with your plugin. ;)
All I did was hack a new attribute into the mime type called “blank” that would output a boundary with nothing after it, but with the ID code.
Then I tried adding stuff like…
Content-Transfer-Encoding: base64
Content-Type: application/pdf;
name="Name.pdf"
Content-Disposition: attachment;
filename="Name.pdf"
…then used forms to output the encoded attachment.
But I ran into the size limits for form items. tried multiples, but then there’s be some mysterious spacing issues.
Then I gave up an talked the client into referencing a pdf instead of attaching it.
Last edited by mrdale (2007-06-05 23:48:09)
Offline
#251 2007-06-06 07:13:01
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
OK, So I’m getting 500 errors from textdrive now.
I have a bunch of users (490 or so) in different but cascading lists but when I go to send to the main List I get a server error. When I send smaller lists everything is ok… I hope I haven’t just sent 10 emails to the entire first half of the list. That would be bad, but how would I know?
Any ideas?
Offline
#252 2007-06-06 12:34:01
Re: [archived] Postmaster -- A simple email-on-post / newsletter manager
Can anyone point me toward some tests to find out why I’m not getting any emails out?
The list is set up. The form is set up. Even on “Test” I don’t get any email as the admin?
Any thoughts?
Thanks,
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline