Implode plugin?

Tags: #<Tag:0x00007ff5d0b07e80>

I have been running a very old version of phplist. I just installed the latest version on a subdomain to learn it a bit before importing my subscriber list.

I used to have an addon or plugin that allowed me to pull html into my email using a tag.

[PHP:$html = implode(’’, file(’/home/public_html/xx.txt’)); return($html); ]

I can no longer find it. Any idea?

Maybe what I’m looking for isn’t an implode plugin, but a PHP plugin?

@StevenSchlossman Do you still have access to the old phplist? If that tag is being processed by a plugin then the code might be in the admin/plugins directory. Otherwise it might have been a custom modification to the phplist code.

phplist currently doesn’t provide a way to include a file in this way.

I looked in my plugin directory. It’s not there. I probably added it to the code somewhere. It was so long ago. I’ll look at the files and hope that a modification date pops out.
Thank you.

@StevenSchlossman If you are trying to construct the complete email outside of phplist then you can probably do that just with php

Rename the template to a php file, e.g. template.php
Use php include statements to include the additional files

<html>
    <body>
        <div>some html</div>
        <?php include 'include1.html'; ?>
        <div>some more html</div>
        <?php include 'include2.html'; ?>
    </body>
</html>

Then on the Content tab use “Send a webpage”.

Good idea but after looking at your content area addon, that works even better. :slight_smile:

In the past I’d include text files in my message., But before I could do that I’d still have to edit them slightly to clean up some html.
With content areas I can copy and paste into the campaign text and edit it there.

BTW, when I <?php include 'include1.html'; ?>

some more html

<?php include 'include2.html'; ?>, it gets commented out.
I can add .php to a template name?

@StevenSchlossman I don’t understand what you mean. My previous suggestion was for use with “sending a web page”, it is not going to work with loading a template into phplist, if that is what you are doing. phplist doesn’t treat templates as containing embedded php code.

Gotcha. I wanted to import a page into the campaign message. Your Content Area addon is going to workout perfectly. It’s a couple extra steps but in the long run, editing the message is going to be easier. Thank you!.