mail-template.php or rollback subscribe by email

Hi Folks,

We made tweaks to mail-template.php prior to the update that did this:

REFERENCE NEW NOTICE IN SUBSCRIBE BY EMAIL (SBE):

Want to override the template files?

Move any file in /home2/segretof/public_html/blog.segretofinishes.com/wp-content/plugins/subscribe-by-email/inc/mail-templates/views/ to /home2/segretof/public_html/blog.segretofinishes.com/wp-content/themes/child/subscribe-by-email/ an edit them for changes:

header.php The code that handles the header styles
footer.php The code that handles the footer styles
body.php The code that handles the main body styles
post.php The code that handles every single post included in the digests

Now, our mail-template.php will not work at all (at least with our test emails and the preview mode).

#1 How can our mail-template.php work with this version?

#2 If not easily, then how can I rollback the Subscribe By Email plugin 1 version prior to the update that included the above? I need to be able to retain all the plugin settings on the admin area too.

Please let me know . . .

I need to solve this ASAP as the template is default and a automated email send is going out soon.

:slight_smile:

Greg

  • Vaughan

    Hi Greg,

    Hope you're well?

    I'm a little unclear on all your exact changes.

    But from what I can tell you just need to add your footer lines to the footer.php

    in the footer.php

    <table style="width: 100%;">
    		<tbody>
    			<tr>
    				<td></td>
    				<td style="display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important;" bgcolor="#EFEFEF">
    					<div style="padding: 15px; max-width: 600px; margin: 0 auto; display: block;">
    						<table style="width: 100%;">
    							<tbody>
    								<tr>
    									<td style="font-size:11px;color:#666 !important;">
    										<p>
    											<?php printf( __( 'You are subscribed to email updates from <a href="%s">%s</a>', INCSUB_SBE_LANG_DOMAIN ), get_home_url(), get_bloginfo( 'name' ) ); ?>  <br/>
    											<?php if ( sbe_get_manage_subscriptions_page_id() ): ?>
    												<?php printf( __( 'To manage your subscriptions, <a href="%s">click here</a>.', INCSUB_SBE_LANG_DOMAIN ), esc_url( sbe_email_template_get_manage_subscriptions_url() ) ); ?> <br/>
    											<?php endif; ?>
    											<?php printf( __( 'To stop receiving these emails, <a href="%s">click here</a>.', INCSUB_SBE_LANG_DOMAIN ), esc_url( sbe_email_template_get_unsubscribe_url() ) ); ?>
    										</p>
    										<p><?php echo sbe_get_footer_text(); ?></p>
    									</td>
    								</tr>
    							</tbody>
    						</table>
    					</div>
    				</td>
    				<td></td>
    			</tr>
    		</tbody>
    	</table>
    </div>

    then add your lines above.

    <h1 class="textwidget" style="text-align: center;"><a href="http://blog.segretofinishes.com/wp-content/uploads/2015/03/forward-blk.jpg"><img class="alignnone size-full wp-image-14505" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/forward-blk.jpg" alt="forward-blk" width="125" height="20" /></a></h1>
    &nbsp;
    <h1 class="textwidget" style="text-align: center;"><a href="http://blog.segretofinishes.com/" target="_blank">Segreto Secrets</a></h1>
    <h1 class="textwidget" style="text-align: center;">?<a href="http://blog.segretofinishes.com/feed" target="_blank"><img class="alignnone size-full wp-image-14495" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-rss.png" alt="social-media-rss" width="38" height="36" /></a><a href="https://www.facebook.com/segretofinishes" target="_blank"><img class="alignnone size-full wp-image-14496" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-fb.png" alt="social-media-fb" width="33" height="36" /></a><a href="https://twitter.com/segretofinishes" target="_blank"><img class="alignnone size-full wp-image-14497" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-tw.png" alt="social-media-tw" width="34" height="36" /></a><a href="http://www.pinterest.com/segretofinishes/" target="_blank"><img class="alignnone size-full wp-image-14498" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-pin.png" alt="social-media-pin" width="35" height="36" /></a><a href="http://instagram.com/segretofinishes" target="_blank"><img class="alignnone size-full wp-image-14499" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-inst.png" alt="social-media-inst" width="36" height="36" /></a><a href="http://www.houzz.com/segreto-finishes" target="_blank"><img class="alignnone size-full wp-image-14500" src="http://blog.segretofinishes.com/wp-content/uploads/2015/03/social-media-houzz.png" alt="social-media-houzz" width="31" height="36" />
    </a></h1>
    <table style="width: 100%;">
    		<tbody>
    			<tr>
    				<td></td>
    				<td style="display: block!important; max-width: 600px!important; margin: 0 auto!important; clear: both!important;" bgcolor="#EFEFEF">
    					<div style="padding: 15px; max-width: 600px; margin: 0 auto; display: block;">
    						<table style="width: 100%;">
    							<tbody>
    								<tr>
    									<td style="font-size:11px;color:#666 !important;">
    										<p>
    											<?php printf( __( 'You are subscribed to email updates from <a href="%s">%s</a>', INCSUB_SBE_LANG_DOMAIN ), get_home_url(), get_bloginfo( 'name' ) ); ?>  <br/>
    											<?php if ( sbe_get_manage_subscriptions_page_id() ): ?>
    												<?php printf( __( 'To manage your subscriptions, <a href="%s">click here</a>.', INCSUB_SBE_LANG_DOMAIN ), esc_url( sbe_email_template_get_manage_subscriptions_url() ) ); ?> <br/>
    											<?php endif; ?>
    											<?php printf( __( 'To stop receiving these emails, <a href="%s">click here</a>.', INCSUB_SBE_LANG_DOMAIN ), esc_url( sbe_email_template_get_unsubscribe_url() ) ); ?>
    										</p>
    										<p><?php echo sbe_get_footer_text(); ?></p>
    									</td>
    								</tr>
    							</tbody>
    						</table>
    					</div>
    				</td>
    				<td></td>
    			</tr>
    		</tbody>
    	</table>
    </div>

    To adjust all the colours etc, you can adjust the styles in each template file.

    Hope this helps

  • Greg

    @Vaughan

    Here is our mail-template.php prior to that update.

    Could you take a look at this and let me know how to incorpoarate it easily?

    What you saw on the site is likely not the same thing. The attached is the exact thing. If you put it on a prior version of SBE, then you will see it.

    See here: https://www.dropbox.com/s/ydskxcwedzddhk4/mail-template.zip?dl=0

    Thanks a lot!

    :slight_smile:

    Greg

  • Vaughan

    Hi Greg,

    Can you try the following templates.

    simply download the attached zip & unzip it to your desktop

    Now using FTP, upload the subscribe-by-email folder in the zip to your current theme folder.

    /wp-content/themes/your-current-theme/

    I can't seem to get the read more filter to work though.

    add_filter( 'excerpt_more', array( &$this, 'set_excerpt_more' ), 80 );

    So I can't adjust the read more to be changed. I will need to ask the developer about that.

    Hope this helps though.

  • Greg

    @Vaughan

    Did you load it into a version of SBE prior to adding the options to add body, footer, header, and post.php's?

    Actually, I have a better idea . . . I have test replica of SBE with the exact same SBE old template and old SBE version. I will give you access to it. You may send or post real live posts to it as well as much as you want. Here is the TEST install that has the replica SBE with all the exact same SBE settings and OLD mail-template.php so you can see exactly the preview and actual posts. Make yourself a subscriber so you can get your own tests with a featured image. Sending the real posts will give you the best view of it (not the preview or the test emails from the eNewsletter).

    Here is the test url and also I have enable support access to it via the WPMUDEV dashboard to. Here it is here as well: http://bit.ly/1BmOJQh

    Here is what is should look like (this one of the most recent posts as example to show you and prior to my applying the SBE update with it). See attached.

    Yea, we were having a problem with the "Continue Reading" box (we edited it to be centered and have a box around it that reads "Continue Reading" or, yea, the "read more" as you say too. It was showing the "Continue Reading" box perfectly in the preview and test emails but not in actual real post sends (if that helps some so you guys can figure out the issue with that). You will notice the "Continue Reading" box is not showing in the attached because of that too.

    Please let me know.

    :slight_smile:

    • Greg

      @Vaughan

      I am just circling back to you on this. I was able to successfully revert to a older version of SBE from the "test" site. So, I am running the older version prior to SBE allowing for breaking up the email template parts.

      The main site is: http://bit.ly/1L2ONGN (where SBE is active and being used in a live environment)

      The effective TEST site where you can run real test posts as much as you want is here (not a live environment and only has test subscribers . . . I used this to restore the main one back as it is basically a exact replica of the the main site): http://bit.ly/1GeIzTh

      Please do NOT upgrade the SBE plugin on the MAIN site until we know how to get the template to look and feel the same as the test one.

      You can upgrade the SBE plugin on the test site if need here http://bit.ly/1GeIzTh so we can test whatever template you come up with that would work on the updated plugin.

      You can send me any updated templates and I can upload them to the test site as well and put them where you want me to.

      ***Sidenote, currently, it also seems like I have the "Continue Reading . . ." box showing up in the MAIN site actual posts too. So the main site mail template is currently perfect with the older version of SBE (by the way, the older version of SBE is currently 3.1.2). See teh note below on this (it started working out of the blue as I have not touch anything on the site since the last message here).

      QUESTION: Is there any way I can HIDE the SBE plugin updates from ALL admins except for me so it is not accidentally updated before this is resolved (thereby losing our mail template)? I have backed up the currently working mail-template.php for SBE 3.1.2 that is exactly what we want right now. I would like (if possible somehow) folks not be able to see that SBE is asking to be updated while this issue is active in the WP admin area.

      Below is the current correct mail-template.php that is what we have (and is ok) but is running on SBE 3.1.2 (see attached) from a actual real post and NOT a test post or preview (test posts and previews in 3.1.2 are not really representative of the actual real posts just FYI).

      Notice the dates on the top right corner of the beginning of each screenshot. The Jun 22nd one does not have the "Continue Reading . . . " box at all but the Jun 29th one spontaneously began to have the "Continue Reading . . ." box that is clickable to the post start coming up all of a sudden (we did not do anything different at all). It just started working out of the blue? I wanted to let you know this so it may give a clue to you why? That is the way it should be showing.

      :slight_smile:

  • Vaughan

    Hi Greg,

    Sorry for the delays on this.

    Just letting you know i've nearly got this figured out.

    The biggest issue is changing the 'read more' as this was done with a filter inside the template in the old version.

    But this is a bit more difficult in the new version as it's in an abstract class, so we will need to write a custom mu-plugin function for this, which has been done, we just need to figure out a way now of only loading the new class once SBE has actually loaded it, as obviously you wouldn't want these changes to appear on every other post on the site globally, so we need to make it only affect the SBE mail template which is being quite difficult. But I will hopefully have something for you shortly.

    Thanks

  • Vaughan

    Hi,

    so i've managed to sort the Read more link issue.

    Attached are 2 zips, 1 has the modified templates

    Unzip the subscribe-by-email.zip file to your desktop

    Then upload the included subscribe-by-email folder to /wp-content/themes/your-current-theme/

    so you then have the following in your theme folder;

    /wp-content/themes/your-current-theme/subscribe-by-email/

    Now, unzip the file sbe-custom-template.php.zip

    Upload the sbe-custom-template.php file to

    /wp-content/mu-plugins

    Hopefully then that should get you going, the rest might be just tweaks needed.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.