How to change "From info" to include sub category name

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change "From info" to include sub category name

Coleen_Astalos
My forum is only one level deep.  I have the main level (SUDSOL) and then I have subcategories (Business, Creative, etc.) under that level.  I only allow posting in the subcategories (not in the main level forum)

If a member subscribes via email, the From Name in the email looks like:  
From: Name of poster [via SUDSOL]  

Is it possible to include the name of the subcategory in that from name - so it would look like:
From: Name of poster [via SUDSOL - Business Topics]  or
From: Name of poster [via SUDSOL - Creative Idea Shares]

Thanks,
Coleen
Reply | Threaded
Open this post in threaded view
|

Re: How to change "From info" to include sub category name

Pedro
Edit your send_subscription_email macro:
<override_macro name="send_subscription_email" parameters="node_attr,text_part,html_part" requires="subscription">
    <n.set_local_subscription.this_subscription/>
    <n.set_local_node.node_attr/>
    <n.block.>
        <n.new_email.>
            <n.send>
                <to.local_subscription.user.user_email/>
                <to_name.local_subscription.user.name/>
                <from.local_subscription.user.reply_address_for.local_node/>
                <from_name><n.local_node.owner.name/> [via <n.root_node.subject/> - <n.local_node.parent_node.subject/>]</from_name>
                <subject.local_node.subject/>
                <text_part.text_part/>
                <html_part.html_part/>
                <set_headers_for.local_node/>
                <bounce_to.local_subscription.user.bounces_address/>
            </n.send>
        </n.new_email.>
    </n.block.>
</override_macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: How to change "From info" to include sub category name

Coleen_Astalos
I made this change and I'm seeing mixed results that I'm not understanding.  All of the posts are coming from my SUDSOL Yahoogrop into the Yahoo Archives subforum.  So I'd expect ALL the From Names to be [via SUDSOL - Yahoo Archives].   But some of them have their subject line listed instead.  So it's [via SUDSOL  - Subject line].   I'm not seeing any connection/differences to the ones that have the subject line versus the ones that have the subforum name.

Here is a screen print of some of the emails showing the From name (first column) and the Subject line (second column):


You can see the first one [via SUDSOL] was before I made the change.
Then the second one [via SUSDOL - Yahoo Archives] is what I expected.
The third one (from me) is a reply that I did from my email - back to Nabble which distributed back to the yahoo group.  It has via subject line instead of via subcategory.

But there are several others (which I didn't reply to) highlighted in yellow that also have [via SUDSOL - the subject line] instead of the category.  

One in particular that is very odd is the 2nd one that is highlighted.  Notice that the subject line is "SU!: Chat & Challenge TODAY", but the From name has TOMORROW instead of TODAY.

Any ideas?
Coleen
Reply | Threaded
Open this post in threaded view
|

Re: How to change "From info" to include sub category name

Pedro
I think so. That's because I tested in a gmail interface which is different. I will fix it.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: How to change "From info" to include sub category name

Pedro
In reply to this post by Coleen_Astalos
Please, replace with this code:
<override_macro name="send_subscription_email" parameters="node_attr,text_part,html_part" requires="subscription">
    <n.set_local_subscription.this_subscription/>
    <n.set_local_node.node_attr/>
    <n.block.>
        <n.new_email.>
            <n.send>
                <to.local_subscription.user.user_email/>
                <to_name.local_subscription.user.name/>
                <from.local_subscription.user.reply_address_for.local_node/>
                <from_name><n.local_node.owner.name/> [via <n.root_node.subject/> - <n.local_node.get_app_node.subject/>]</from_name>
                <subject.local_node.subject/>
                <text_part.text_part/>
                <html_part.html_part/>
                <set_headers_for.local_node/>
                <bounce_to.local_subscription.user.bounces_address/>
            </n.send>
        </n.new_email.>
    </n.block.>
</override_macro>
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: How to change "From info" to include sub category name

Coleen_Astalos
Thanks.  Seems to be working - I'll keep watching as more emails come in.
Coleen