Overview
This plugin extends phpList's Template functionality by allowing you to define multiple Content Regions within your Templates.
You are also able to include or exclude sections of your Template based on whether one of these Content Regions is empty or not.
Finally, the plug-in automatically creates an editor for your Content Regions based on settings you provide.
Installation
Moderate level of experience, or at least a DIY attitude will have this running in about ten minutes. (see install.txt for complete notes)
You do need to modify a core file, so please, please, please backup sendemaillib.php BEFORE making the manual code change required to use this.
RFC
This is a new plugin and I’d truly appreciate feedback and suggestions. Particularly from some experts who might have a thing or two to say about where I’ve modified send email (between you and me: I anticipate changing where this hooks in).
I'm not married to the syntax, so if you have suggestions or have seen something better, please, post your ideas.
Also, how to better integrate with standard, out-of-the-box phpList functions would be appreciated.
Sample
Just to give a heads-up, here is what you would put into your Template:
- Code: Select all
[PBTS_XTRA name="MyNewColumn"]
That is all of that’s required. If you do choose to include some of the extra parameters you’ll be rewarded with a better Editor. These parameters are basically what you use for HTML form elements;
- Code: Select all
[PBTS_XTRA name="MyNewColumn" displayname="Joke of the Day"
type="textarea" rows="6" cols="45"]
OK. Hope this helps.
As a last tease, the conditional processing:
- Code: Select all
[pbts_if condition="not_blank" name="Urgent_Action"]
<h5>Urgent Action</h5>
[pbts_xtra name="Urgent_Action"]
<p>For how you can get involved contact Bob ...</p>
[/pbts_if]
Stuff inside the IF and /IF only is emitted if the custom tag inside this template named "Urgent_Action" is not blank. Lot's of uses for this -- mainly, fewer but smarter templates.
I’ll be watching the forums for problems and suggestions. Thanks.
Oh, you still retain the option of using “normal” templates:
I've modified sendmaillib.php where it generates the text and HTML versions of the email (where it does the CONTENT substitution into your template). If the template contains at least one PBTS custom tags it parses the message's CONTENT and stuffs it into the appropriate places within the template otherwise it uses phpList’s normal replacement.
My email, if you have questions (though the forum is great), is: buz carter aht hotmail doht com.
I've setup a page on my website here:
http://pizzabytheslice.com/phplist/pbts_xtra/
Oh, debt of gratitude is owed Karl Hedner whose been testing this for me and providing tremendous feedback and encouragement.