Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#325 2007-08-06 23:56:10

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

NeilA,

Both of those issues are annoyingly unresolved. I think the “inserted tabs” is just sleuthing — finding where in the code that is being done, and reversing it in the “strip_html” part of PM code. The “article_context” issue is probably the same. I think I could make that go away if I had time to dig into TXP and figure out how to define article_context. But I never do seem to have the time. I’ve been trying some experiments with the inserted tabs to no avail, but I’ll let you know if I find anything.

– Ben

Offline

#326 2007-08-07 00:48:26

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Thanks Ben – I understand the problem of debugging these small problems…

Anyone else out there more experienced than me with PHP want to help track down the ‘inserted tab’ problem?

Cheers


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#327 2007-08-13 22:55:58

facho
Member
Registered: 2007-04-15
Posts: 64

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Anyone know how to edit the formatting of this great plug-in? I’m trying to roll out a very simple implementation of the plug-in so that I can collect email addresses for monthly newsletter mailings. What I have not been able to figure out is how to change the “Contact” text that shows up and that ovalish frame. You can see how I have it implemented here Example

I’m a total newbie so any help is appreciated.

Offline

#328 2007-08-13 23:25:30

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

facho,

The subscription form is actually created using zem_contact_reborn, so that’s a better place to go for styling. Check the zem_contact_reborn Help file first (do you know how to find the help files? Go to Admin > Plugins and then click the “View” link next to zem_contact_reborn), and if that doesn’t get you what you need you can ask for help here (the support thread for zem_contact_reborn).

  • Ben

Offline

#329 2007-08-13 23:27:44

facho
Member
Registered: 2007-04-15
Posts: 64

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

thanks, I’ll take a look and see what i can figure out. Muchos gracias.

Offline

#330 2007-08-14 06:31:58

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

facho, the “Contact” text is set by the label attribute in the <txp:zem_contact> tag.

<txp:zem_contact to="your@email.com" label="Subscribe">

Your complete form could look like this:

<txp:zem_contact to="your@email.com" label="Subscribe">
<txp:zem_contact_email name="zemSubscriberEmail" label="Submit your email" break="br" />
<txp:zem_contact_submit /> 
<input type="hidden" name="zemSubscriberLists" value="your-list-name" >
</txp:zem_contact>

Offline

#331 2007-08-14 11:42:51

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

I noticed that in text mode, not all special characters got filtered out. Encoded ampersands and non-breaking spaces were left in. So I edited the deGlyph function at the end of Postmaster Library:

// ===========================

function deGlyph($text)
{
	$glyphs = array (
		'&#8217;',   //  single closing
		'&#8216;',  //  single opening
		'&#8220;',                 //  double closing
		'&#8222;',              //  double opening
		'&#8230;',              //  ellipsis
		'&#8212;',                   //  em dash
		'&#8211;',             //  en dash
		'&#215;',             //  dimension sign
		'&#8482;',          //  trademark
		'&#174;',               //  registered
		'&#169;',             //  copyright
		'&#160;',             //  non-breaking space numeric
		'&#nbsp;',             //  non-breaking space named
		'&#38;',             //  ampersand numeric
		'&amp;'             //  ampersand named
	);

	$deGlyphs = array (
		"'",           //  single closing
		"'",           //  single opening
		'"',           //  double closing
		'"',           //  double opening
		'...',         //  ellipsis
		' -- ',        //  em dash
		' - ',         //  en dash
                ' x ',         //  dimension sign
		'T',          //  trademark
		'R',          //  registered
		'(c)',        //  copyright
		' ',          //  non-breaking space numeric
		' ',          //  non-breaking space named
		'&',          //  ampersand numeric
		'&'           //  ampersand named
	);

	$text = str_replace($glyphs, $deGlyphs, $text);
	return $text;
}

The dimension sign was commented out in the second array – was that intentional?

Last edited by andreas (2007-08-14 11:44:54)

Offline

#332 2007-08-14 19:14:59

benbruce
Plugin Author
Registered: 2006-01-13
Posts: 328
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

andreas,

Thanks for that. I’m not sure why the dimension sign was commented out — either that was the way the code was when I grabbed it, or I would have done it. Did you get your other issues straightened out?

This could be why NeilA was having trouble with spaces being inserted — NeilA, if you read this, can try replacing the code at the very bottom of Postmaster_library with the code andreas posted above? See if that helps with your “strip_html issue”.

  • Ben

Offline

#333 2007-08-14 19:18:30

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Ben, I also get the spaces with the corrections I’ve made.

I haven’t looked into my other issue with the second form again. Probably going to work on it tomorrow.

Offline

#334 2007-08-14 21:13:55

NeilA
Member
From: Blue Mountains, Australia
Registered: 2004-08-15
Posts: 316
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

You guys read my mind!
When I saw Andreas post, I thought maybe this was related to the tab issue!

Andreas – let me encourage you to see if you can work out why those tabs are inserted at the start of paragraphs when using the strip_html switch… ;-)

Thanks guys!


Neil – Blue Mountains, Australia

http://westserve.org
http://ministrygrounds.net.au

Offline

#335 2007-08-15 14:24:40

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Ben, I got my form-related problem solved – but don’t ask me how :-).

I copied the code/text of the working form into the non-working one and modified it. I double-ckecked all entries in the listst page etc. Then it worked – so it was probably PEBMAC.

Anyway – all’s well at last. :-)

Neil, I have to disappoint you – I don’t really know PHP, I edited that deGlyph function simply based on the pattern that was used and what I observed in the emails. I had a look through the library code looking for hidden tabs in the functions that I understood to be respobsible to put together the emails (function bab_pm_mime) but I couldn’t find any. Sorry.

Last edited by andreas (2007-08-15 14:25:11)

Offline

#336 2007-08-15 15:13:08

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: [archived] Postmaster -- A simple email-on-post / newsletter manager

Another thing: it would be great if tags such as <txp:bab_pm_data display="section" /> could fetch the title of the section instead of the name. Or have an attribute such as <txp:section title="1" />.

Last edited by andreas (2007-08-15 15:13:34)

Offline

Board footer

Powered by FluxBB