[Radiant] How can I use Mailer form on every page?

2009-05-27 Thread N. Turnage

Hey guys,

I have built a contact form with Mailer and I would like to use it in my 
template so that it is at the bottom of every page. It is working on the 
contact page itself, but on any other page I get the "Mailer config is 
not valid" error. The ReadMe for Mailer says that you can use it in a 
snippet, but doesn't mention the syntax to do that. Right now I have 
this set up in a snippet that is at the bottom of my template:








The form is defined in the body of the /contact page (obviously). How 
can I use this in my template on pages other than /contact? Thanks.




~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread Mohit Sindhwani

N. Turnage wrote:

Hey guys,

I have built a contact form with Mailer and I would like to use it in 
my template so that it is at the bottom of every page. It is working 
on the contact page itself, but on any other page I get the "Mailer 
config is not valid" error. The ReadMe for Mailer says that you can 
use it in a snippet, but doesn't mention the syntax to do that. Right 
now I have this set up in a snippet that is at the bottom of my template:







not sure how the extension works, but can't you use it in a snippet and 
then use the snippet from the layout?


I just looked at its readme and it says:
You configure the recipients and other Mailer settings in a "mailer" part

Just a suggestion:
1. You may be able to use:

 from_field: my_form_field_that_contains_the_from_email_address
with a snippet that has the mailer form.

2. It seems that you mailer may be failing because you don't have a mailer 
part.  It may be that with your current code, you also need the mailer part on 
your pages.

Good luck.

On a side note, I noticed this:


Caveats

Relative urls will almost certainly not work if the mailer fails validation. 
Solution? Only use absolute urls.


I wonder if my suggestion for comments might work with this also.  I'll post 
that separately in a bit.

Cheers,
Mohit.
5/27/2009 | 10:18 PM.



___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread N. Turnage

Mohit Sindhwani wrote:

N. Turnage wrote:

Hey guys,

I have built a contact form with Mailer and I would like to use it in 
my template so that it is at the bottom of every page. It is working 
on the contact page itself, but on any other page I get the "Mailer 
config is not valid" error. The ReadMe for Mailer says that you can 
use it in a snippet, but doesn't mention the syntax to do that. Right 
now I have this set up in a snippet that is at the bottom of my 
template:







not sure how the extension works, but can't you use it in a snippet 
and then use the snippet from the layout?



I though so, and I'm curious how to make that happen.


I just looked at its readme and it says:
You configure the recipients and other Mailer settings in a "mailer" part
The form and it's config are set up properly. On the /contact page 
everything works perfectly. But on other pages it doesn't.


Just a suggestion:
1. You may be able to use:

 from_field: my_form_field_that_contains_the_from_email_address
with a snippet that has the mailer form.
This won't help. This is just to set the "From" field to the address of 
the user submitting the form.


2. It seems that you mailer may be failing because you don't have a 
mailer part.  It may be that with your current code, you also need the 
mailer part on your pages.

Yeah, it's set up properly. This isn't the issue...

Wait a minute, does this mean that even if the form is in a snippet, 
each page (every page for me) needs a mailer and an email part to allow 
for processing the form? If so, is there a way of "creating" a  page 
part in my template so that I don't have to add mailer and email parts 
to every page? So I can do something like this:



   
  
   



Good luck.

On a side note, I noticed this:


Caveats

Relative urls will almost certainly not work if the mailer fails 
validation. Solution? Only use absolute urls.

How would that affect me here?



~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread Mohit Sindhwani

N. Turnage wrote:

I just looked at its readme and it says:
You configure the recipients and other Mailer settings in a "mailer" 
part
The form and it's config are set up properly. On the /contact page 
everything works perfectly. But on other pages it doesn't.


I'm guessing that's because you have a "mailer" part on the contact page.



Just a suggestion:
1. You may be able to use:

 from_field: my_form_field_that_contains_the_from_email_address
with a snippet that has the mailer form.
This won't help. This is just to set the "From" field to the address 
of the user submitting the form.


Hmm, I see.. I think I misread that part of the document.

2. It seems that you mailer may be failing because you don't have a 
mailer part.  It may be that with your current code, you also need 
the mailer part on your pages.

Yeah, it's set up properly. This isn't the issue...

Wait a minute, does this mean that even if the form is in a snippet, 
each page (every page for me) needs a mailer and an email part to 
allow for processing the form? If so, is there a way of "creating" a  
page part in my template so that I don't have to add mailer and email 
parts to every page? So I can do something like this:



   
  
   



I don't think you can create page parts in a template.  You may have to 
create that on each page, but once you create that you could do 
something like:

 in that part on every page.

You could go one step further and set the mailer part to be a default 
created part on each page.



Caveats

Relative urls will almost certainly not work if the mailer fails 
validation. Solution? Only use absolute urls.

How would that affect me here?


Sorry, it won't affect you.  I meant that I have a solution that might 
fit this problem.  That's why I shall send it out separately with a 
subject of its own, in case it helps someone else.


Hope this helps.

Cheers,
Mohit.
5/27/2009 | 11:52 PM.

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread Mohit Sindhwani

Nate,

I looked at the code of the mailer extension and found this:
 def config
   @config ||= begin
 page = self
 until page.part(:mailer) or (not page.parent)
   page = page.parent
 end
 string = page.render_part(:mailer)
 (string.empty? ? {} : YAML::load(string))
   end
 end

It tends to suggest that if the parent has a mailer part, it should be 
fine.  Can you try to create a mailer part in the top page and try?


Cheers,
Mohit.
5/28/2009 | 12:02 AM.


Mohit Sindhwani wrote:

N. Turnage wrote:

I just looked at its readme and it says:
You configure the recipients and other Mailer settings in a "mailer" 
part
The form and it's config are set up properly. On the /contact page 
everything works perfectly. But on other pages it doesn't.


I'm guessing that's because you have a "mailer" part on the contact page.



Just a suggestion:
1. You may be able to use:

 from_field: my_form_field_that_contains_the_from_email_address
with a snippet that has the mailer form.
This won't help. This is just to set the "From" field to the address 
of the user submitting the form.


Hmm, I see.. I think I misread that part of the document.

2. It seems that you mailer may be failing because you don't have a 
mailer part.  It may be that with your current code, you also need 
the mailer part on your pages.

Yeah, it's set up properly. This isn't the issue...

Wait a minute, does this mean that even if the form is in a snippet, 
each page (every page for me) needs a mailer and an email part to 
allow for processing the form? If so, is there a way of "creating" a  
page part in my template so that I don't have to add mailer and email 
parts to every page? So I can do something like this:



   
  
   



I don't think you can create page parts in a template.  You may have 
to create that on each page, but once you create that you could do 
something like:

 in that part on every page.

You could go one step further and set the mailer part to be a default 
created part on each page.



Caveats

Relative urls will almost certainly not work if the mailer fails 
validation. Solution? Only use absolute urls.

How would that affect me here?


Sorry, it won't affect you.  I meant that I have a solution that might 
fit this problem.  That's why I shall send it out separately with a 
subject of its own, in case it helps someone else.


Hope this helps.

Cheers,
Mohit.
5/27/2009 | 11:52 PM.

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant




___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Re: Radiant Digest, Vol 38, Issue 26

2009-05-27 Thread Alexis Masters

Thanks very much for this. I worked, and saved the day!
~ Alexis
=
Alexis Masters, author
http://www.alexismasters.com
510 234-0027



On May 25, 2009, at 7:31 AM, radiant-requ...@radiantcms.org wrote:


Message: 3
Date: Sun, 24 May 2009 22:38:00 -0400
From: Jim Gay 
Subject: Re: [Radiant] Radiant Inheritance?
To: radiant@radiantcms.org
Message-ID: 
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

You may set the default page parts for the entire site with:

Radiant::Config['defaults.page.parts'] = 'body, summary'

Not sure about what is up to date, but you could try the
default_page_parts extension for per-page defaults
http://github.com/santry/radiant-default-page-parts-extension/network


On May 24, 2009, at 10:15 PM, Alexis Masters wrote:


Hello! I am working again on http://www.wizardofpaws.us and I'm
trying to figure out how to make "child" pages have the same page
structure as their parent page. I am virtually certain that my site
user will *not* remember to add a summary page part when she writes
a new article. I had assumed that when I made child pages they would
inherit the same basic structure as a parent page, which in this
case is "body" and "summary" -- but to my disappointment they do not
seem to inherit anything but "body." I think I must be doing
something wrong or may have overlooked something. Any help/advice
you can share will be most appreciated.
~ Alexis


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread Cristi Duma
I did this on a site some time ago. It was an older version of radiant 
and mailer extension but it should work for you.


I created a snippet which I used then on every page. The trick is to 
post the contact form to a page that has mailer part. Like this






Email:
id="email" />




The "newsletter" page has the mailer part and it works just fine.

Contact me if id doesn't work, we'll find a solution :)

Cristi

PS: or did it work allready? I'm too tired right now to read all the posts..

On 5/27/09 3:20 PM, N. Turnage wrote:

Hey guys,

I have built a contact form with Mailer and I would like to use it in 
my template so that it is at the bottom of every page. It is working 
on the contact page itself, but on any other page I get the "Mailer 
config is not valid" error. The ReadMe for Mailer says that you can 
use it in a snippet, but doesn't mention the syntax to do that. Right 
now I have this set up in a snippet that is at the bottom of my template:








The form is defined in the body of the /contact page (obviously). How 
can I use this in my template on pages other than /contact? Thanks.




~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread N. Turnage

Cristi Duma wrote:
I did this on a site some time ago. It was an older version of radiant 
and mailer extension but it should work for you.


I created a snippet which I used then on every page. The trick is to 
post the contact form to a page that has mailer part. Like this






Email:





The "newsletter" page has the mailer part and it works just fine.

Contact me if id doesn't work, we'll find a solution :)

Cristi

PS: or did it work allready? I'm too tired right now to read all the 
posts..


That looks like it's going to work. I am trying this on a side project, 
so I can't play with it until this evening though. I'll let ya know.



~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] How can I use Mailer form on every page?

2009-05-27 Thread Cristi Duma

On 5/27/09 8:44 PM, N. Turnage wrote:

Cristi Duma wrote:
I did this on a site some time ago. It was an older version of 
radiant and mailer extension but it should work for you.


I created a snippet which I used then on every page. The trick is to 
post the contact form to a page that has mailer part. Like this






Email:





The "newsletter" page has the mailer part and it works just fine.

Contact me if id doesn't work, we'll find a solution :)

Cristi

PS: or did it work allready? I'm too tired right now to read all the 
posts..


That looks like it's going to work. I am trying this on a side 
project, so I can't play with it until this evening though. I'll let 
ya know.



~Nate


i think for radiant 0.7 a few things changed and you will need to post 
to page like this


action="/pages/232/mail#mailer">


basically what you need to do is copy the form from that contact page's 
source code into the snippet

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] rspec 1.2.2 | radiant 0.7.1 anybody?

2009-05-27 Thread Andrew Neil
I've just ran into this problem too, whilst trying to upgrade a site  
from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake  
radiant:update`. I kept getting a message like:


can't activate rspec (= 1.1.12, runtime), already activated rspec-1.2.6

I found that uninstalling all rspec versions greater than 1.1.12 made  
the problem go away.


Once I had uninstalled more recent versions of rspec, I could run  
`rake radiant:update` fine. After running the rake task, I found that  
I could reinstall the most recent version of rspec (currently 1.2.6),  
and it no longer conflicted with Radiant. So it seems like there was  
just some catch-22 requirement going on within the `rake  
radiant:update` task.


I ran into a couple of other problems in trying to upgrade from 0.6.9  
to 0.7.1, so I wrote them up and put a new page on the wiki. Check it  
out:



http://wiki.github.com/radiant/radiant/updating-a-site-from-radiant-069-to-071

I hope this will save others some time when they come to do the same.

Cheers,
Drew


On 22 Apr 2009, at 10:17, Jeffrey Jones wrote:

Yes, Radiant 0.7.1 Rspec only works with 1.1.12 and, from my  
experience, merely having Rspec 1.2.x installed totally FUBARs Rspec  
1.1.12. There is a bug on the rspec tracker mentioning this but no  
movement on it yet.


https://rhomobile.lighthouseapp.com/projects/16701/tickets/144-cant-activate-rspec-1112-runtime-already-activated-rspec-120

I have no solution or workaround for this issue.

Jeff

Enrico Teotti wrote:

Hi,
I was happily running my test suite (rspec+cucumber) in my radiant  
extension.

I've frozen the rspec gems inside /vendor/gems
rspec-1.1.12rspec-rails-1.1.12
I've deployed that project, and started to work on some other rails
project and installed rspec 1.2.2 and 1.2.4.

Today I had to change something in the radiant project, and rake  
spec returns:

http://pastie.org/454312

Only after removing rspec (and rspec-rails) 1.2.2 1.2.4 my test are
running fine again.
Any clue why? "RubyGem version error: rspec(1.1.11 not = 1.2.4)
(Gem::LoadError)" doesn't look good to me :-\

Is anybody running the same versions or radiant and rspec?

Cheers,
Enrico
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] rspec 1.2.2 | radiant 0.7.1 anybody?

2009-05-27 Thread Mohit Sindhwani

Andrew Neil wrote:
I've just ran into this problem too, whilst trying to upgrade a site 
from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake 
radiant:update`. I kept getting a message like:


can't activate rspec (= 1.1.12, runtime), already activated 
rspec-1.2.6


I found that uninstalling all rspec versions greater than 1.1.12 made 
the problem go away.


Yes, I just noticed this when I installed a new version of rspec.

Once I had uninstalled more recent versions of rspec, I could run 
`rake radiant:update` fine. After running the rake task, I found that 
I could reinstall the most recent version of rspec (currently 1.2.6), 
and it no longer conflicted with Radiant. So it seems like there was 
just some catch-22 requirement going on within the `rake 
radiant:update` task.


I ran into a couple of other problems in trying to upgrade from 0.6.9 
to 0.7.1, so I wrote them up and put a new page on the wiki. Check it 
out:


http://wiki.github.com/radiant/radiant/updating-a-site-from-radiant-069-to-071 



I hope this will save others some time when they come to do the same.


Thanks a lot!  It is a nice list.

Cheers,
Mohit.
5/28/2009 | 12:10 PM.

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] rspec 1.2.2 | radiant 0.7.1 anybody?

2009-05-27 Thread Mohit Sindhwani

Mohit Sindhwani wrote:

Andrew Neil wrote:
I've just ran into this problem too, whilst trying to upgrade a site 
from Radiant 0.6.9 to 0.7.1. I found that I could not run `rake 
radiant:update`. I kept getting a message like:


can't activate rspec (= 1.1.12, runtime), already activated 
rspec-1.2.6


I found that uninstalling all rspec versions greater than 1.1.12 made 
the problem go away. 
Actually, is there any way to solve this problem other than uninstalling 
all versions other than 1.1.12?  I would like to play with the current 
developments of rspec (since I just bought the rspec book) but my 
reliance on Radiant is more...


Cheers,
Mohit.
5/28/2009 | 12:20 PM.

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant