Plugin Directory

Changeset 647410


Ignore:
Timestamp:
01/03/2013 12:18:18 PM (13 years ago)
Author:
anildhiman
Message:

new section copy to me has been added

Location:
mj-contact-us/trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • mj-contact-us/trunk/css/mj.css

    r630014 r647410  
    127127#mailform label.error {
    128128 
    129     bottom: 4px;
     129    bottom: -13px;
    130130    color: #000000;
    131131    font-size: 12px;
     
    136136.h-134{ height:134px;}
    137137.h-71{  height:71px;}
     138#mailform .w-16{width: 16px;}
  • mj-contact-us/trunk/index.php

    r630016 r647410  
    22/*
    33Plugin Name: MJ Contact us
    4 Plugin URI: http://www.myjunk.in/wordpress-plugsin/my-first-mj-contact-us-plugin/
    5 Description: mj contact us a simple form with 4-5 fields to send email address to admin . its a simple contact us form with easy to customize coding standard and easy to customize html standard
     4Plugin URI: http://mecontact.wordpress.com/mj-contact-us-plugin/
     5Description: mj contact us a simple form with 4-5 fields to send email address to admin . its a simple contact us form with easy to customize coding standard and easy to customize html standard. <strong>add this code [mjcontactus] in page from admin section to activate plugin form also be sure that you have get_header() function in your header file so that validation can be work properly</strong>
    66Author: anil kumar
    7 Version: 5.0
    8 Author URI: http://myjunk.in
     7Version: 5.1
     8Author URI: http://about.me/anilDhiman
    99*/
    1010
     11include( plugin_dir_path( __FILE__ ) . 'files/includes.php');
    1112
    1213add_action("wp_enqueue_scripts", "my_jquery_enqueue");
    1314add_shortcode('mjcontactus', 'mj_contact_us');
     15/* add_action('admin_menu', 'mjcontactmenu'); */
    1416function my_jquery_enqueue() {
    1517   wp_deregister_script('mjform');
     
    2325}
    2426 
     27
    2528function mj_contact_us(){
    26 global $post;
     29        $object =   new mjContactHTML;
     30        $object->mjForm();
     31        $object->send_mail();
     32    }
     33
    2734
    2835?>
    29 <div>
    30 <?php if(isset($_REQUEST['MSG']) && $_REQUEST['MSG']=="SUCCESS"){
    31     echo "<div class='updatedcss' id='message'> Mail Sent Successfully</div>";
    32 }
    33 
    34 ?>
    35 
    36 <script type="text/javascript">
    37 
    38 jQuery(document).ready(function() {
    39     // validate the comment form when it is submitted
    40     jQuery("#mailform").validate();
    41 });
    42 </script>
    43        
    44        
    45         <div id="container">
    46         <h3 id="reply-title">Contact US</h3>
    47        
    48        
    49         <form action="<?php echo get_permalink($post->ID); ?>" method="post" id="mailform">
    50             <div class="h-71">
    51                 <label for="name">Name</label>
    52                 <input required name="uname" id="uname" type="name" aria-required="true" >
    53                
    54             </div>
    55             <div class="h-71">
    56                 <label for="email">E-mail</label>
    57                 <input id="email" required name="email" type="email" aria-required="true">
    58                
    59             </div>
    60             <div class="h-71">
    61                 <label for="subject">Subject</label>
    62                 <input id="subject" name="subject" required type="subject" size="30" aria-required="true">
    63                
    64             </div>
    65             <div class="h-71">
    66                 <label for="url">Website</label>
    67                 <input id="url" required name="url" type="url" value=""  aria-required="true">
    68             </div>
    69             <div class="h-134">
    70                 <label for="message">Comment</label>
    71                 <textarea id="comment" name="comment" required cols="" rows=""></textarea>
    72             </div>
    73             <div>
    74                 <input name="mj_submit" type="submit" id="submit" value="Send">
    75                 <input type="hidden" name="mj_submit" value="active">
    76                 <input type="hidden" name="page_id" value="<?php echo $post->ID; ?>">
    77             </div>
    78         </form>
    79     </div>
    80    
    81        
    82        
    83            
    84         </div>
    85 <?php
    86     if(isset($_REQUEST['mj_submit']) && $_REQUEST['mj_submit']=="active"){
    87         send_mail();
    88     }
    89 }
    90 
    91 function send_mail(){
    92    
    93         $name       =   strip_tags($_REQUEST['uname']);
    94         $email      =   $_REQUEST['email'];
    95         $subject    =   strip_tags($_REQUEST['subject']);
    96         $url        =   strip_tags($_REQUEST['url']);
    97         $comment    =   strip_tags($_REQUEST['comment']);
    98         $to         =   get_option('admin_email');
    99         $subject    =   (empty($subject))? "Contact Us mail" : $subject;
    100         $message = "
    101         <html>
    102             <head>
    103                 <title>Contact US Mail</title>
    104             </head>
    105             <body>
    106                 <p>Hello Admin<br/></p>
    107                 <p>Please find the details of contact us mail send by a new user</p>
    108                 <p>=============================================================</p>
    109                 <table>
    110                     <tr>
    111                         <th>Name : </th>
    112                         <td>{$name}</td>
    113                     </tr>
    114                     <tr>
    115                         <th>Email : </th>
    116                         <td>{$email}</td>
    117                     </tr>
    118                     <tr>
    119                         <th>Subject : </th>
    120                         <td>{$subject}</td>
    121                     </tr>
    122                     <tr>
    123                         <th>Website : </th>
    124                         <td>{$url}</td>
    125                     </tr>
    126                     <tr>
    127                         <th>Comment : </th>
    128                         <td>{$comment}</td>
    129                     </tr>
    130                 </table>
    131                 <p>=============================================================</p>
    132                 <p>Thanks & Regards</p>
    133             </body>
    134         </html>
    135         ";
    136         $headers  = 'MIME-Version: 1.0' . "\r\n";
    137         $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    138         $headers .= 'From: [email protected]' . "\r\n" .
    139         'Reply-To: [email protected]' . "\r\n" .
    140         'X-Mailer: PHP/' . phpversion();
    141        
    142         wp_mail($to,$subject,$message,$headers);
    143         $redirecturl    =    add_query_arg( 'MSG', 'SUCCESS', get_permalink($_REQUEST['page_id']) );
    144         echo "<script>window.location.href='$redirecturl'</script>";
    145    
    146 }
    147 
    148 ?>
  • mj-contact-us/trunk/readme.txt

    r630014 r647410  
    11=== MJ Contact us ===
    22Contributors: anildhiman
    3 Donate link: http://www.myjunk.in/wordpress-plugsin/my-first-mj-contact-us-plugin/
    4 Tags: contact us, simple and easy contact us form, contact us form
     3Donate link: http://mecontact.wordpress.com/mj-contact-us-plugin/
     4Tags: contact us, simple and easy contact us form, contact us form, contact form, wordpress contact form, wordpress simple contact us form, javascript
     5contact us form, customizable contact us form
    56Requires at least: 3.0.1
    67Tested up to: 3.4
     
    5354== Screenshots ==
    5455
    55 1. simple contact us form screen shot
    56 2. validation view of form
     561. simple contact us form screen shot.
     572. validation view of form.
    5758
    5859== Changelog ==
     
    6061 * add the jquery validation
    6162 * changes in form design
     63 * copy to me option added
     64 * add object and classes
    6265
    6366= 4.3 =
     
    6770= 4.3 =
    6871= 5.0 =
     72= 5.1 =
Note: See TracChangeset for help on using the changeset viewer.