Changeset 647410
- Timestamp:
- 01/03/2013 12:18:18 PM (13 years ago)
- Location:
- mj-contact-us/trunk
- Files:
-
- 4 added
- 4 edited
-
css/mj.css (modified) (2 diffs)
-
files (added)
-
files/includes.php (added)
-
files/mj-class-html.php (added)
-
files/mj-class-process.php (added)
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
-
screenshot-1.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
mj-contact-us/trunk/css/mj.css
r630014 r647410 127 127 #mailform label.error { 128 128 129 bottom: 4px;129 bottom: -13px; 130 130 color: #000000; 131 131 font-size: 12px; … … 136 136 .h-134{ height:134px;} 137 137 .h-71{ height:71px;} 138 #mailform .w-16{width: 16px;} -
mj-contact-us/trunk/index.php
r630016 r647410 2 2 /* 3 3 Plugin 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 4 Plugin URI: http://mecontact.wordpress.com/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. <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> 6 6 Author: anil kumar 7 Version: 5. 08 Author URI: http:// myjunk.in7 Version: 5.1 8 Author URI: http://about.me/anilDhiman 9 9 */ 10 10 11 include( plugin_dir_path( __FILE__ ) . 'files/includes.php'); 11 12 12 13 add_action("wp_enqueue_scripts", "my_jquery_enqueue"); 13 14 add_shortcode('mjcontactus', 'mj_contact_us'); 15 /* add_action('admin_menu', 'mjcontactmenu'); */ 14 16 function my_jquery_enqueue() { 15 17 wp_deregister_script('mjform'); … … 23 25 } 24 26 27 25 28 function mj_contact_us(){ 26 global $post; 29 $object = new mjContactHTML; 30 $object->mjForm(); 31 $object->send_mail(); 32 } 33 27 34 28 35 ?> 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 submitted40 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 <?php86 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 1 1 === MJ Contact us === 2 2 Contributors: 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 3 Donate link: http://mecontact.wordpress.com/mj-contact-us-plugin/ 4 Tags: contact us, simple and easy contact us form, contact us form, contact form, wordpress contact form, wordpress simple contact us form, javascript 5 contact us form, customizable contact us form 5 6 Requires at least: 3.0.1 6 7 Tested up to: 3.4 … … 53 54 == Screenshots == 54 55 55 1. simple contact us form screen shot 56 2. validation view of form 56 1. simple contact us form screen shot. 57 2. validation view of form. 57 58 58 59 == Changelog == … … 60 61 * add the jquery validation 61 62 * changes in form design 63 * copy to me option added 64 * add object and classes 62 65 63 66 = 4.3 = … … 67 70 = 4.3 = 68 71 = 5.0 = 72 = 5.1 =
Note: See TracChangeset
for help on using the changeset viewer.