Is it possible to add attachments to the NMS Module?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
leifnicholz

Is it possible to add attachments to the NMS Module?

Post by leifnicholz »

Hi,

We have some clients who make their newsletters in PDF. I'm just wondering if it is possible for NMS to allow those clients to upload their .pdf files as attachments to NMS instead of typing in their newsletters in the textareas in the messages tab all over again?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Is it possible to add attachments to the NMS Module?

Post by calguy1000 »

add:  {nms_attachment name='blah'}  to your message template

it's similar to all the other nms plugins.

I didn't harass you because apparently there's a bug or something where this message isn't being displayed.

I've added a 'fix this' thing to my ever growing, never shrinking todo list.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
leifnicholz

Re: Is it possible to add attachments to the NMS Module?

Post by leifnicholz »

Hi Calguy,

Thanks for the reply. Your suggestion kinda worked for me, but the problem is that it only returned a dropdown menu that has sitepusher.sql selected as default to it. What I'm really looking for is an input field with a browse button beside it so that the user can upload any file (preferably PDF) from his/her computer. Is there some kind of special parameters that I need to define to achieve what I am going for?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Is it possible to add attachments to the NMS Module?

Post by calguy1000 »

NMS doesn't have stuff that'll do that ATM.

it relies on the images and/or files being already uploaded to the proper directories
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
leifnicholz

Re: Is it possible to add attachments to the NMS Module?

Post by leifnicholz »

Okay, thanks for the help though.. Good luck on your workload..
leifnicholz

[SOLVED] Re: Is it possible to add attachments to the NMS Module?

Post by leifnicholz »

Hi,

What parameters shoud I add to the {nms_attachment name='somename'} tag for it to select a 'select one' option in the dropdown menu as default instead of the first file in the uploads folder?
Last edited by leifnicholz on Thu Apr 24, 2008 7:32 pm, edited 1 time in total.
leifnicholz

[SOLVED] Re: Is it possible to add attachments to the NMS Module?

Post by leifnicholz »

leifnicholz wrote: Hi,

What parameters shoud I add to the {nms_attachment name='somename'} tag for it to select a 'select one' option in the dropdown menu as default instead of the first file in the uploads folder?
Okay, solved this thing myself... I wasn't able to find any parameters to add to the tag but I managed to do what I wanted to do by modifying the CGExtentions.module.php and en_US.php files of the CGExtensions module. Below are modifications that I made:

CGExtensions.module.php
Line 1308: add the following code

Code: Select all

$cgextensions =& $this->GetModuleInstance('CGExtensions');
    $items = array($cgextensions->Lang('none')=>0);
*this is necessary to display the blank/none item in the filelist...

Line 1314:

Code: Select all

$filelist = $items+$this->GetFileList($dir,$extensions);
*notice that I added '$items' in front of the original code

en_US.php
Just add this code anywhere in the file:

Code: Select all

$lang['none'] = 'None';
*note that you can declare any value you want for this one
jimeu
Forum Members
Forum Members
Posts: 17
Joined: Mon Mar 10, 2008 11:49 pm

Re: Is it possible to add attachments to the NMS Module?

Post by jimeu »

What is the propper folder ?
I don't mind pre-uploading the file so it can be attached.

Can I customize (how to) this so that it looks in a specified folder only ?
I have the files allready uploaded, in this folder as I used them in my mailings.
/uploads/images/Mails/

how can I have the drop down list pick the files from this location (only need to attach one file to the email)

Jimeu
NMS ver 2.1.1
CMSMS 1.2.3
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

Re: Is it possible to add attachments to the NMS Module?

Post by raymondo »

jimeu wrote: What is the propper folder ?
I don't mind pre-uploading the file so it can be attached.

Can I customize (how to) this so that it looks in a specified folder only ?
I have the files allready uploaded, in this folder as I used them in my mailings.
/uploads/images/Mails/

how can I have the drop down list pick the files from this location (only need to attach one file to the email)
I can't work out how to do this either.  I can't even find documentation on the {nms_attachment name='blah'} method of attaching a file or anything about how to embed an image.

Can you point me in the right direction please?

Ray
jimeu
Forum Members
Forum Members
Posts: 17
Joined: Mon Mar 10, 2008 11:49 pm

Re: Is it possible to add attachments to the NMS Module?

Post by jimeu »

The  {nms_attachment name='blah'}  is a very simple prompt created.
for example if you insert on the template :  {nms_attachment name='Select your file'}
When you create the email to be sent
an additional prompt "Select your file" with an empty drop down will appear

I understand, and everyone should do as well, that the images to be attached to the email, should be pre-uploaded on the server.  (a nice feature will be to have a browse your harddrive, so that the system, will upload the picture and send, but I guess we all can live with previously uploading the picture)

The question is how to configure this drop down,  that appears empty with a folder of our choice, or what is the folder where this drop down is looking / reading the contents to generate the drop down.... I have places sample.jpg in every folder I can think of, but the drop down still is coming up empty.
If we can configure which folder the pictures are in, will be better than the default whatever folder, as I like to keep things organized, and the pictures I am sending and want to attach are in /uploads/images/mailinglist folder.

The previous post from leifnicholz  with some modifications to the CGExtensions.module.php, I am not up to the task, and in the code, there is no variables for which folder the pictures should be.

Jimeu
NMS ver 2.1.1
CMSMS 1.2.3
raymondo
Forum Members
Forum Members
Posts: 18
Joined: Sun Feb 11, 2007 10:23 pm

Re: Is it possible to add attachments to the NMS Module?

Post by raymondo »

Ahh, I see.  But I'm still not sure where this is documented and how a new user (such as me) finds out about these things.

The big problem is then, which folder do I put the files in?

Also how does it work for images? Is there an {nms_image} tag too?

Ray
jimeu
Forum Members
Forum Members
Posts: 17
Joined: Mon Mar 10, 2008 11:49 pm

Re: Is it possible to add attachments to the NMS Module?

Post by jimeu »

That is the question what is /are the folders that populate this drop down list.
I did not follow or have the answer to your second question.

Jimeu
NMS ver 2.1.1
CMSMS 1.2.3
daveleger
Forum Members
Forum Members
Posts: 10
Joined: Tue Aug 05, 2008 5:46 pm

Re: Is it possible to add attachments to the NMS Module?

Post by daveleger »

Ok, I'm wondering if this is actually supposed to attach the file to the email or use a link?

I added {nms_attachment name='Select your file'} into my message template.. this creates a prompt to select a file in /uploads/.

But the file is not being attached to the email?

I tried with jpg and pdf files.

What am I doing wrong?

Dave Leger
jimeu
Forum Members
Forum Members
Posts: 17
Joined: Mon Mar 10, 2008 11:49 pm

Re: Is it possible to add attachments to the NMS Module?

Post by jimeu »

Confirmed. the folder is the /uploads/ folder and the drop down is populated with files on this folder
I did some tests with .jpg and .pdf files and the emails are being delivered, but the file is not being attached (or received at the clients end)

Jimeu
NMS ver 2.1.1
CMSMS 1.2.3
cgreen

Re: Is it possible to add attachments to the NMS Module?

Post by cgreen »

Has anyone had luck attaching pdfs?
I'm using NMS v2.2 and having the same problem. My emails go out ok, but the attachments don't.

Cheers
Locked

Return to “Modules/Add-Ons”