Plugin Directory

Changeset 625240


Ignore:
Timestamp:
11/14/2012 03:39:24 PM (13 years ago)
Author:
digitaldonkey
Message:

Version 1.5

Location:
multilang-contact-form/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • multilang-contact-form/trunk/ml-contactform.php

    r512325 r625240  
    33Plugin Name: Multilang Contactform
    44Plugin URI: http://donkeymedia.eu/2010/08/26/worpress-multilingual-contactform/
    5 Description: Translatable Contacform Plugin. Based Ryan Duff and Peter Westwood WP-ContactForm (http://blog.ftwr.co.uk/wordpress/) on WP Contact Form is a drop in form for users to contact you. It can be implemented on a page or a post. It currently works with WordPress 2.0+
     5Description: Fully Translatable Contacform Plugin. Based Ryan Duff and Peter Westwood WP-ContactForm. The Contact-Form can be implemented on a page or a post. It currently works with WordPress 2.0+ <strong>Update note:</strong> The tag has changed to <strong>[contact_form]</strong>
    66Author: Thorsten Krug
    77Author URI: http://donkeymedia.eu
    8 Version: 1.2
     8Version: 1.5
    99*/
    1010
     
    126126}
    127127
    128 
    129 /* Wrapper function to use in a Template .*/
    130 function mlcf_form(){
    131   mlcf_callback($content, true);
    132 }
    133 
    134 
     128/* Replace Conten Tag */
     129function mclf_tag_replace( $atts ) {
     130    return mlcf_form();
     131}
    135132/*Wrapper function which calls the form.*/
    136 function mlcf_callback( $content , $templateTag=false) {
     133function mlcf_form() {
    137134    global $mlcf_strings;
    138135
    139     /* Run the input check. */     
    140     if(false === strpos($content, '<!--contact form-->') and !$templateTag) {
    141         return $content;
    142     }
    143  
    144136     //recaptcha
    145137        $recaptcha_html ='';
     
    257249            </form>
    258250        </div>';
    259         if ($templateTag){
    260           echo $form;
    261         }else{
    262           return str_replace('<!--contact form-->', $form, $content);
    263         }
     251      return $form;
    264252    }
    265253}
     
    332320   }
    333321}
    334 /* don't let Tinymce remove all comments */
    335 function mlcf_mce_valid_elements($init){
    336   $init['extended_valid_elements'] = '!--,'.$init['extended_valid_elements'];
    337 }
    338322
    339323/* Action calls for all functions */
    340324add_action('admin_menu', 'mlcf_add_options_page');
    341 add_filter('the_content', 'mlcf_callback', 7);
    342 add_filter('tiny_mce_before_init', 'mlcf_mce_valid_elements');
     325add_shortcode( 'contact_form', 'mclf_tag_replace' );
    343326
    344327?>
  • multilang-contact-form/trunk/readme.txt

    r515820 r625240  
    11=== Multilang Contact Form ===
    2 Tags: contact, template
     2Tags: contact, template, multilang, qtranslate
    33Contributors: digitaldonkey, westi, ryanduff, firas
    44Requires at least: 1.5
    5 Tested up to: 3.3.1
    6 Stable tag: 1.4.3
     5Tested up to: 3.4.2
     6Stable tag: Trunk
    77Donate link: http://donkeymedia.eu/2010/08/26/worpress-multilingual-contactform/
    88
     
    16162. Activate the plugin on the plugin screen.
    17173. Configure the plugin on it's settings screen. Settings ... Contact Form
    18 4. Add the `< !--contact form-->`(without the space at before the exclamation mark!) to the body of the post/page in the editors HTML mode.
     184. Add the `[contact_form]` to the body of the post/page in the editors HTML mode.
    1919
    2020
     
    2323= How do I add the contact form to a post/page? =
    2424
    25 You need to add the `< !--contact form-->` (without the space at before the exclamation mark!) to the body of the post/page in the editors HTML mode.
     25You need to add the `[contact_form]` to the body of the post/page in the editors HTML mode.
    2626
    2727== Screenshots ==
     
    3131
    3232== Upgrade Notice ==
     33
     34= 1.5 =
     35Changed Tag-Replace to current Wordpress Standard.
     36This will fix the WYSISYG errors appearing in latest Wordpress versions
    3337
    3438= 1.4 =
Note: See TracChangeset for help on using the changeset viewer.