Changeset 1284898
- Timestamp:
- 11/12/2015 03:29:29 PM (10 years ago)
- Location:
- contact-form-with-mailman/trunk
- Files:
-
- 2 edited
-
mailman-contact.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contact-form-with-mailman/trunk/mailman-contact.php
r1202529 r1284898 3 3 Plugin Name: Contact Form with Mailman 4 4 Description: Simple contact for with a check box to subscribe to a mailman mailing list 5 Version: 1.1.25 Version: 2.0.0 6 6 Author: Jeff Craft 7 7 Author URI: http://jeffcraft.ca … … 12 12 // Configuration 13 13 function cfwm_get_config() { 14 $config['list_name'] = ''; // eg. mylist 15 $config['mailman_url'] = ''; // eg. http://lists.domain.com/mailman/admin/ 16 $config['list_password'] = ''; // Password you use to login to mailman admin 14 //$config['list_name'] = ''; // eg. mylist 15 //$config['mailman_url'] = ''; // eg. http://lists.domain.com/mailman/admin/ 16 //$config['list_password'] = ''; // Password you use to login to mailman admin 17 18 $config['list_name'] = get_option('cfwm_list_name'); // eg. mylist 19 $config['mailman_url'] = get_option('cfwm_mailman_url'); // eg. http://lists.domain.com/mailman/admin/ 20 $config['list_password'] = get_option('cfwm_list_password'); // Password you use to login to mailman admin 17 21 18 22 return $config; … … 22 26 // Do not edit past this line 23 27 //////////////////////////////////////////////////////////////////////////////////////////////////// 28 29 // Create Settings Page 30 add_action('admin_menu', 'cfwm_plugin_settings'); 31 32 function cfwm_plugin_settings() { 33 add_menu_page('Contact Form with Mailman Settings', 'Mailman Settings', 'administrator', 'cfwm_settings', 'cfwm_display_settings'); 34 } 35 36 function cfwm_display_settings() { 37 $list_name = get_option('cfwm_list_name'); 38 $mailman_url = get_option('cfwm_mailman_url'); 39 $list_password = get_option('cfwm_list_password'); 40 41 $html = '</pre>'; 42 $html .= '<div class="wrap"><form action="options.php" method="post" name="options">'; 43 $html .= '<h2>Contact Form with Mailman Settings</h2>'; 44 $html .= '<h3>Update Your Settings</h3>'; 45 $html .= wp_nonce_field('update-options'); 46 47 $html .= '<table class="form-table" width="100%" cellpadding="10">'; 48 $html .= '<tbody>'; 49 50 $html .= '<tr>'; 51 $html .= '<td scope="row" align="left">'; 52 $html .= '<label><strong>Mailman List Name:</strong></label><br /><input type="text" name="cfwm_list_name" value="'.$list_name.'" />'; 53 $html .= '</td>'; 54 $html .= '</tr>'; 55 56 $html .= '<tr>'; 57 $html .= '<td scope="row" align="left">'; 58 $html .= '<label><strong>Mailman List URL:</strong></label><br /><input type="text" name="cfwm_mailman_url" value="'.$mailman_url.'" />'; 59 $html .= '</td>'; 60 $html .= '</tr>'; 61 62 $html .= '<tr>'; 63 $html .= '<td scope="row" align="left">'; 64 $html .= '<label><strong>Mailman List Password:</strong></label><br /><input type="text" name="cfwm_list_password" value="'.$list_password.'" />'; 65 $html .= '</td>'; 66 $html .= '</tr>'; 67 68 $html .= '</tbody>'; 69 $html .= '</table>'; 70 71 $html .= '<input type="hidden" name="action" value="update" />'; 72 $html .= '<input type="hidden" name="page_options" value="cfwm_list_name,cfwm_mailman_url,cfwm_list_password" />'; 73 $html .= '<input type="submit" name="Submit" value="Update" /></form></div>'; 74 75 $html .= '<pre>'; 76 77 echo $html; 78 } 24 79 25 80 // Prevent direct script access … … 42 97 echo '<p>'; 43 98 echo 'Subscribe to mailing list?<br />'; 44 echo '<input type="checkbox" name="cf-subscribe" checked/>';99 echo '<input type="checkbox" name="cf-subscribe" />'; 45 100 echo '</p>'; 46 101 echo '<p>'; -
contact-form-with-mailman/trunk/readme.txt
r1202514 r1284898 3 3 Tags: contact,contact us,comment,mailman,form,contact form,comment form,Post,plugin,posts,shortcode,page 4 4 Requires at least: 3.1.0 5 Tested up to: 4. 2.25 Tested up to: 4.3.1 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 18 18 3. Search for 'Contact Form with Mailman' 19 19 4. Click 'Activate' 20 5. Click on ' Edit' under 'Contact Form with Mailman'21 6. Just under the plugin info there is a config function with 3 variables. Fill this into match your mailman mailing list.22 7. Click 'Update File'20 5. Click on 'Mailman Settings' on the left. 21 6. Fill in the 3 fields to match your mailman mailing list. 22 7. Click 'Update' 23 23 8. Add the short code '[mailman_contact_form]' to any page or post you would like the form to display on. 24 24 … … 29 29 A: At the moment no but this will be coming in a future release. 30 30 31 Q: Will upgrading from version 1.x to version 2.x break it? 32 A: Yes! In version 1.x the mailman list information was stored in the main php file. With version 2.x the mailman list information is now accessable through the Wordpress Admin menu. Because version 2.x is looking for the list info in a different spot you will need to update the settings in the Wordpress Admin. 33 31 34 == Screenshots == 32 35 1. This is what the output looks like. 33 36 37 == Upgrade Notice == 38 = 2.0.0 = 39 In version 1.x the mailman list information was stored in the main php file. With version 2.x the mailman list information is now accessable through the Wordpress Admin menu. Because version 2.x is looking for the list info in a different spot you will need to update the settings in the Wordpress Admin. 40 34 41 == Changelog == 42 = 2.0.0 = 43 * All config options are now available in the Wordpress Admin 44 35 45 = 1.1.2 = 36 46 * Subscribe to mailing list checkbox is now checked by default.
Note: See TracChangeset
for help on using the changeset viewer.