Page 1 of 1

[solved] Contactform - formatting PLUGIN_CONTACTFORM_TITLE

Posted: Thu Aug 21, 2008 2:56 pm
by fabian
Thats my first HELLO to the s9y-community ... so at this point respect and thanks to all developers for their great work!

At the moment I've got a problem or rather an understanding problem with the plugin-concept - especially with the serendipity_event_contactform. I use it with the serendipity_event_staticpage plugin and want to combine it with my impressum. I wrote the impressum-facts in the field for the introduction ("Einführungstext"). Now I'd like to change the pagetitle: as standart its name is "Contactform/Kontaktformular". For me it should read "Kontakt & Impressum". This was easy to change in the language-file, but the title is displayed to small. I read the sourcecode with my webbrowser and find this:

Code: Select all

<h3 class="serendipity_date">Impressum | Contact</h3>
I'd like to change this in a <h1> headline, but I don't know, how this page is generated and in which file i have to modify the code.

Thank you for any hints!

Regards,
Fabian

Re: Contactform - formatting PLUGIN_CONTACTFORM_TITLE

Posted: Thu Aug 21, 2008 3:09 pm
by garvinhicking
Hi!

Welcome to Serendipity! :)

You've already made it quite far, actually you even went one step ahead of yourself. :)

Many of the plugins ship with custom made templates. The staticpage plugin as well as the contactform plugin do as well. Have a look inside your serendipity_event_contactform directory, where you will see a plugin_contactform.tpl file. This holds the HTML code responsible for printing your contactform. There is one other .tpl file called plugin_dynamicform.tpl which is the file you would need to edit, if the contact form you created has the Type "Dynamic". You can configure this in the plugin configuration section.

Further, this template file can now be edited by you and changed with <h4> if you like. You can even insert your fixed title in here, so you wouldn'T need to edit a language file.

Now the best thing is, you can put this .tpl file simply inside your template directory of the template you are using (like templates/bulletproof/). This will preserve your local changes, so if at anytime you update your contactform plugin, your changes to that file will not get lost because you stored it in your custom template location.

Have a try, and if you have further questions, don't hesitate to ask.

Regards,
Garvin

Posted: Thu Aug 21, 2008 3:17 pm
by fabian
Hmm ..

Maybe in ~/plugins/serendipity_event_contactform/plugin_contactform.tpl ?? But I can not find PLUGIN_CONTACTFORM_TITLE ...

Posted: Thu Aug 21, 2008 3:19 pm
by fabian
Ooops .. i have reflected to long ... sorry! Now I read your reply ...

Posted: Thu Aug 21, 2008 5:46 pm
by fabian
Hi Garvin!

Many thanks for your help! I could fix the problem and get some more understanding about the template concept. :D

You assumed correctly that I use the bulletproof-template. In templates/bulletproof/ I could even find a plugin_dynamicform.tpl. The first 6 lines are:

Code: Select all

{if $plugin_contactform_articleformat}
   <div class="serendipity_Entry_Date">
       <h3 class="serendipity_date">{$plugin_contactform_name}</h3>
       <div class="serendipity_entry">
           <div class="serendipity_entry_body">
{/if}
In line 3 I only had to change h3 into h1 (not h4 because I want to have a bigger one - it was a mistake in my first post - sorry) and then I replaced {$plugin_contactform_name} with my desired headline. Furthermore I had to delete /templates_c/bulletproof_v1_2[...]plugin_dynamicform.tpl.php to see the changes.

Thank you again! :) Until the the next post ..

Regards,
Fabian