I currently have the problem that I need 2 different contact forms in 1 weblog. I have adpoted the contact plugin to my needs, but I cannot figure out how to install it a second time.
Is that impossible ?
use the contact plugin more than once in a blog
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: use the contact plugin more than once in a blog
Hi!
You could try to edit the contactform PHP plugin file, search for a 'stackable' attribute and set that to 'true' instead of 'false'?
Best regards,
Garvin
You could try to edit the contactform PHP plugin file, search for a 'stackable' attribute and set that to 'true' instead of 'false'?
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hi garvin !
I looked at the php file of the plugin and it is already true ...
Is there any other idea you have ?
EDIT: I can choose the plugin to install again, but even if I choose a different name and shortname it uses the same plugin. I need in the 2 contact forms different fields, so it would be important to have the plugin physically installed twice.
I looked at the php file of the plugin and it is already true ...
Code: Select all
$propbag->add('stackable', true); EDIT: I can choose the plugin to install again, but even if I choose a different name and shortname it uses the same plugin. I need in the 2 contact forms different fields, so it would be important to have the plugin physically installed twice.
Sigh. I'm sorry, but it looks like you'll need to copy the plugin to a new directory, change the name of the serendipity_event_<plugin>.php to match the new directory name, and modify the contents to use different database tables or columns.
Even then, I'm not so sure it would work. But it could be easily deleted if it didn't.
Even then, I'm not so sure it would work. But it could be easily deleted if it didn't.
-
mgroeninger
- Regular
- Posts: 546
- Joined: Mon Dec 20, 2004 11:57 pm
- Contact:
Ok, if Judebert has started talking about drastic measures, it's time for a little testing...
Plus it have given me a few minutes away from my job....
Interestingly, I was just able to install a second copy of the plugin on my 1.1 test site.
I simply installed the plugin, configured the permalink to /pages/test.html, configured the URL shorthand to "Test" and saved it.
The I went to http://myurl/pages/test.html and there it was...
http://myurl/index.php?/pages/test.html also worked.
I don't remember the subpage url off the top of my head, so I can't test that...
Do you have a url I could look at? Are you willing to post what your permalink/URL shorthand settings are?
Plus it have given me a few minutes away from my job....
Interestingly, I was just able to install a second copy of the plugin on my 1.1 test site.
I simply installed the plugin, configured the permalink to /pages/test.html, configured the URL shorthand to "Test" and saved it.
The I went to http://myurl/pages/test.html and there it was...
http://myurl/index.php?/pages/test.html also worked.
I don't remember the subpage url off the top of my head, so I can't test that...
Do you have a url I could look at? Are you willing to post what your permalink/URL shorthand settings are?
Matthew (Feeling generous?)
I try to explain the problem a little bit more clearly 
It works to make a second contact form plugin, but it uses the same php-file. I adapted the php-file of the plugin to make a reservation form out of it. Now I want to have a second contactform. that works but it uses the adapted php-file and instead of a usual contact form (name email, url comment) I get my reservation form.
adapted plugin:
http://www.viennacityflats.at/wien/inde ... tform.html
second plugin:
http://www.viennacityflats.at/wien/inde ... /test.html[/url]
It works to make a second contact form plugin, but it uses the same php-file. I adapted the php-file of the plugin to make a reservation form out of it. Now I want to have a second contactform. that works but it uses the adapted php-file and instead of a usual contact form (name email, url comment) I get my reservation form.
adapted plugin:
http://www.viennacityflats.at/wien/inde ... tform.html
second plugin:
http://www.viennacityflats.at/wien/inde ... /test.html[/url]
-
mgroeninger
- Regular
- Posts: 546
- Joined: Mon Dec 20, 2004 11:57 pm
- Contact:
Ahhh... then Judebert is probably right...
There are two ways you could go forward:
1) Copy your changed plugin to another folder and rename anything which uses "serendipity_event_contactform". Essentially, you would be creating a new plugin.
Or
2) The contact form plugin uses a tpl file. If most of your changes are in the tpl file, and not in the php file itself, you could create an option in the plugin to choose the tpl file used.
Personally, I think the second option might make more sense, because we can add the code to CVS and no-one else would run into your problem again.
If most of your changes are in the tpl file I would be happy to modify the plugin to allow you to choose the tpl file to use... But, right now I am a little busy, and it might take me a little while to get around to it.
There are two ways you could go forward:
1) Copy your changed plugin to another folder and rename anything which uses "serendipity_event_contactform". Essentially, you would be creating a new plugin.
Or
2) The contact form plugin uses a tpl file. If most of your changes are in the tpl file, and not in the php file itself, you could create an option in the plugin to choose the tpl file used.
Personally, I think the second option might make more sense, because we can add the code to CVS and no-one else would run into your problem again.
If most of your changes are in the tpl file I would be happy to modify the plugin to allow you to choose the tpl file to use... But, right now I am a little busy, and it might take me a little while to get around to it.
Matthew (Feeling generous?)
back from the holidays and a new problem 
The reservation form (http://www.viennacityflats.at/wien/inde ... tform.html) is suddenly not reachable any more I get an internal server error "The server encountered an internal error or misconfiguration and was unable to complete your request."
The site says that the reasons could be too much load by the script or a mistake in the .htaccess. The other sites of the blog work perfect. the contact form is not reachable via index.php?serendipity[subpage]=contactform, I only see the normal frontpage (index.php)
The only change were some new entrys with a google map in it.
Could please anybody help me as I am currently a little bit desperate.
@mgroeninger:
I will try the first option as I changed the TPL and the PHP File and wil post the result ( if the problem above is solved)
EDIT: If I rename the .htaccess File the error is still there, so I think I can exclude the .htaccess as the source of error
The reservation form (http://www.viennacityflats.at/wien/inde ... tform.html) is suddenly not reachable any more I get an internal server error "The server encountered an internal error or misconfiguration and was unable to complete your request."
The site says that the reasons could be too much load by the script or a mistake in the .htaccess. The other sites of the blog work perfect. the contact form is not reachable via index.php?serendipity[subpage]=contactform, I only see the normal frontpage (index.php)
The only change were some new entrys with a google map in it.
Could please anybody help me as I am currently a little bit desperate.
@mgroeninger:
I will try the first option as I changed the TPL and the PHP File and wil post the result ( if the problem above is solved)
EDIT: If I rename the .htaccess File the error is still there, so I think I can exclude the .htaccess as the source of error