Page 1 of 1

The language of the Contactform

Posted: Wed Nov 01, 2006 12:18 pm
by Davy
Hey!

I really love tweaking Serendipity! :D So I edit the event_contactform-plugin: I've changed all the filenames, so contactform.php will be contactform2.php. I've also changed the PHP-files included in the plugin, so they link correctly. Well, that works super.

But now the problem: The Contactform and Contactform2 plugins are using the same lang_en.inc.php! :( The language file of Contactform2 is totally ignored. Is there something I'm missing?

Oh! Something else: The plugin is always called 'Contact Form', even if I change the PHP-file.

Re: The language of the Contactform

Posted: Wed Nov 01, 2006 6:34 pm
by garvinhicking
Hi!

The best thing would be to create your very own plugin. Just copy the whole serendipity_event_contactform to serendipity_event_contactform2. Renamge the serendipity_event_contactform.php file to serendipity_event_contactform2.php, then edit that file and rename all occurences of "serendipity_event_contactform" to "serendipity_event_contactform2".

Then you can have your own language fiels more easily.

Best regards,
Garvin

MySQL-database

Posted: Wed Nov 01, 2006 9:34 pm
by Davy
Interesting, the 'Contact Form2' is called 'Contact Form' in the database and Spartacus. So it seems like it doesn't get the language-file.
But... It is getting the file when I delete the one in the contactform-folder.
So: This two plugins are using the same file (always).

Re: MySQL-database

Posted: Thu Nov 02, 2006 10:35 am
by garvinhicking
Hi!

Yes, because the plugins use the same constants! If you have installed both contact form plugins, only the languages from the first are used.

You will need to rename all PLUIGIN_BLABLA_ constants to "PLUGIN2_BLABLA" for distinct constant names. Also replace them in the PHP code then.

Best regards,
Garvin