Login  Register

Message Header

Posted by Coleen_Astalos on Nov 20, 2014; 3:54pm
URL: https://support.nabble.com/Message-Header-tp7592763.html

I previously created a special message at the top of emails from one section of my forum (Newsletter Co-op, Next Month's Article Staging Area) by adding this new macro to the instant_html macro:

 <macro name="SUDSOL_message_header" parameters="append" requires="subscription, node_page">
    <n.set_local_user.this_subscription.user/>
    <n.set_local_node.page_node.get_app_node/>
    <n.if.equal value1="[n.local_node.subject/]" value2="Next Month’s Article Staging Area">
        <then>
            <t>NOTE: This email is only being distributed to NEWSLETTER CO-OP Members.</t> <n.hide_null.append/><br/><br/>
            <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <a href="mailto:[n.page_node.owner.user_email/]?subject=[n.page_node.subject/]">Click here to reply directly to <n.page_node.owner.name/> privately at <n.page_node.owner.user_email/></a>
                <div style="font-weight:bold"><t>If you just reply to this email, your message will go back to ONLY Newsletter Co-op members.</t></div>
            </div>
            <hr noshade="noshade" size="1" color="#cccccc" />
        </then>
        <else>
            <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <a href="mailto:[n.page_node.owner.user_email/]?subject=[n.page_node.subject/]">Click here to reply directly to <n.page_node.owner.name/> privately at <n.page_node.owner.user_email/></a>
                <div style="font-weight:bold"><t>If you just reply to this email, your message will go to all SUDSOL members, unless you change the To: email address to the author: <n.page_node.owner.user_email/></t></div>
            </div>
            <hr noshade="noshade" size="1" color="#cccccc" /> <n.hide_null.append/>
        </else>
    </n.if.equal>
    
</macro> 

Here is where it's called in instant_html:
 <override_macro name="instant_html" requires="subscription,node_page">
        <n.if.page_node.is_app>
        <then>
            <t><t.username.page_node.owner.name/> created a new subcategory</t>:
            <b><n.page_node.subject/></b><br/><br/>
        </then>
    </n.if.page_node.is_app>
 
    <n.SUDSOL_message_header/>
    <n.page_node.html_email_message_with_signature/>
    <br/>
    <n.comment.>Changed wording where reply goes to and included author email address</n.comment.>
    <hr noshade="noshade" size="1" color="#cccccc" />
    <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
        <t>If you want the reply to go ONLY to <n.page_node.owner.name/>, please change the email address to: </t>
        <a href="mailto:[n.page_node.owner.user_email/]"><n.page_node.owner.user_email/></a>
        <br/>
        <t>This message can be found in the SUDSOL Discussion Forum here</t>:
        <a href="[n.page_node.url/]"><n.page_node.url/></a>
    </div>
    <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
        <n.start_new_topic_line append="[br/]"/>
        <n.unsubscribe_line format="html"/><br/>
    <n.comment.>Removed link to view naml code</n.comment.>
    </div>
</override_macro> 

It was working great for the last several months (I implemented this is early September).  However, I noticed that it stopped sometime between Oct 28th & Nov 6th.  It is no longer adding the special Newsletter Co-op banner when it comes from that category.  Of course, that's right in the timeframe when we implemented the Froala editor, which I wouldn't think would have any effect on this - especially since I rolled back yesterday to an October 28th image.  But also when you guys did some site maintenance.

Were there changes done that would affect this?
Is there anything you notice that is wrong about the code I've got?
Is there another way I should be doing this?

Thanks,
Coleen