NMS - capture message id into the message template?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am
Location: Sydney, Australia

NMS - capture message id into the message template?

Post by tinhat »

I want to create link to put into the message template so that subscribers can click on a "send this newsletter to a friend" link to a form on the website which will allow them to enter the name and email address of a friend they want to send  a link to the archived view of that message. I figure if I know how to embed the message id into the message template I can figure out a solution - but I don't know how to access the message id in the message temple. Any help? Any suggestions?

Thanks.
RobinH
New Member
New Member
Posts: 4
Joined: Sun Dec 31, 2006 10:11 pm

Re: NMS - capture message id into the message template?

Post by RobinH »

I would also be interested in finding a solution for this.  I would like to be able to "Forward this message to a friend" and I would also like to create a link to enable the user to "click here to display this message in your web browser".

In both cases I need to be able to link to the archived view of that message.

I would be grateful if anybody could help with this.

Thanks
User avatar
tinhat
Forum Members
Forum Members
Posts: 65
Joined: Fri May 23, 2008 6:33 am
Location: Sydney, Australia

Re: NMS - capture message id into the message template?

Post by tinhat »

In NMS.module.php

Around line 630 (after the "setup smarty" comment) I added the following line:
[php]
$smarty->assign('messageid', $this->current_message);
[/php]

Which gives me a smarty tag {$messageid} which I can use in my newsletter template.

Ideally, it would be good to know if there is any other already existing smarty variable I could use without having to hack NMS.module.php as above?
Post Reply

Return to “Modules/Add-Ons”