Page 1 of 2
Is it possible to add attachments to the NMS Module?
Posted: Wed Apr 23, 2008 11:03 pm
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?
Re: Is it possible to add attachments to the NMS Module?
Posted: Wed Apr 23, 2008 11:09 pm
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.
Re: Is it possible to add attachments to the NMS Module?
Posted: Wed Apr 23, 2008 11:20 pm
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?
Re: Is it possible to add attachments to the NMS Module?
Posted: Wed Apr 23, 2008 11:22 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Wed Apr 23, 2008 11:41 pm
by leifnicholz
Okay, thanks for the help though.. Good luck on your workload..
[SOLVED] Re: Is it possible to add attachments to the NMS Module?
Posted: Thu Apr 24, 2008 6:34 pm
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?
[SOLVED] Re: Is it possible to add attachments to the NMS Module?
Posted: Thu Apr 24, 2008 7:40 pm
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:
*note that you can declare any value you want for this one
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Sep 05, 2008 10:30 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Thu Sep 11, 2008 1:23 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Thu Sep 11, 2008 2:09 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Sep 12, 2008 9:20 am
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Sep 12, 2008 3:14 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Sep 12, 2008 3:19 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Sep 12, 2008 4:28 pm
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
Re: Is it possible to add attachments to the NMS Module?
Posted: Fri Apr 24, 2009 8:04 pm
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