Changeset 1004840
- Timestamp:
- 10/10/2014 02:26:26 AM (11 years ago)
- Location:
- cognito-forms/trunk
- Files:
-
- 7 added
- 4 edited
-
cogicon.ico (added)
-
plugin.php (modified) (5 diffs)
-
readme.txt (modified) (3 diffs)
-
screenshot-4.jpg (added)
-
screenshot-5.jpg (added)
-
screenshot-6.jpg (added)
-
screenshot-7.jpg (added)
-
tinymce/cogicon.ico (added)
-
tinymce/plugin.js (modified) (1 diff)
-
tmpl/main.php (modified) (2 diffs)
-
tmpl/options.php (added)
Legend:
- Unmodified
- Added
- Removed
-
cognito-forms/trunk/plugin.php
r915624 r1004840 58 58 if(!current_user_can('edit_posts') && !current_user_can('edit_pages')) return; 59 59 60 register_setting('cognito_plugin', 'cognito_api_key'); 61 register_setting('cognito_plugin', 'cognito_admin_key'); 62 register_setting('cognito_plugin', 'cognito_public_key'); 63 register_setting('cognito_plugin', 'cognito_organization'); 64 60 65 // If the flag to delete options was passed-in, delete them 61 66 if (isset($_GET['cog_clear']) && $_GET['cog_clear'] == '1') { … … 63 68 delete_option('cognito_admin_key'); 64 69 delete_option('cognito_public_key'); 70 delete_option('cognito_organization'); 65 71 } 66 72 … … 87 93 delete_option('cognito_admin_key'); 88 94 delete_option('cognito_public_key'); 95 delete_option('cognito_organization'); 89 96 90 97 update_option('cognito_api_key', $organization->apiKey); 91 98 update_option('cognito_admin_key', $organization->adminKey); 92 99 update_option('cognito_public_key', $organization->publicKey); 100 update_option('cognito_organization', $organization->code); 93 101 } 94 102 … … 111 119 // Initialize administration menu (left-bar) 112 120 public function admin_menu() { 113 add_menu_page('Cognito Forms', 'Cognito Forms', 'manage_options', 'Cognito', array($this, 'main_page'), '../wp-content/plugins/cognito /gear.ico');121 add_menu_page('Cognito Forms', 'Cognito Forms', 'manage_options', 'Cognito', array($this, 'main_page'), '../wp-content/plugins/cognito-forms/cogicon.ico'); 114 122 add_submenu_page('Cognito', 'Cognito Forms', 'View Forms', 'manage_options', 'Cognito', array($this, 'main_page')); 115 123 add_submenu_page('Cognito', 'Create Form', 'New Form', 'manage_options', 'CognitoCreateForm', array($this, 'main_page')); 116 124 add_submenu_page('Cognito', 'Templates', 'Templates', 'manage_options', 'CognitoTemplates', array($this, 'main_page')); 125 126 add_options_page('Cognito Options', 'Cognito Forms', 'manage_options', 'CognitoOptions', array($this, 'options_page')); 117 127 } 118 128 … … 138 148 public function main_page() { 139 149 include 'tmpl/main.php'; 150 } 151 152 public function options_page() { 153 include 'tmpl/options.php'; 140 154 } 141 155 -
cognito-forms/trunk/readme.txt
r915624 r1004840 5 5 Requires at least: 3.5 6 6 Tested up to: 3.9.1 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 58 58 59 59 60 == Instructions == 61 1. After activating the plugin, a Cognito Forms section will appear on the admin bar. Click on this, and either create an account or login if you already have one. 62 2. Once you have logged into Cognito Forms, create a new form. All forms that you create will be available to be inserted into the content editor when editing a page or post. 63 3. When editing a page or post, click on the Cognito Forms icon, the orange cog, and select your form to be inserted. 64 4. Update your page or post and your form should appear. 65 66 60 67 == Frequently Asked Questions == 61 68 … … 71 78 == Screenshots == 72 79 80 81 73 82 1. Build your form with our easy-to-use, drag-and-drop editor. 74 83 2. Publish your form and adjust your form's style. 75 84 3. View your entries. 85 4. After installation, Cognito Forms will appear on the admin bar. 86 5. After logging into (or registering with) Cognito Forms from your wordpress site, click on the Cognito Forms icon to insert a form into your page or post. 87 6. Choose your Cognito Form. 88 7. The appropriate short code will be added to your page or post. 76 89 -
cognito-forms/trunk/tinymce/plugin.js
r915567 r1004840 14 14 title : 'Cognito Forms', 15 15 cmd : 'cognito_embed_window', 16 image : url + '/ gear.ico'16 image : url + '/cogicon.ico' 17 17 }); 18 18 } -
cognito-forms/trunk/tmpl/main.php
r915567 r1004840 21 21 $url = CognitoAPI::$formsBase; 22 22 if ($_GET['page'] == 'CognitoCreateForm') { 23 $url = $url . ' build';23 $url = $url . 'forms/new'; 24 24 } elseif ($_GET['page'] == "CognitoTemplates") { 25 $url = $url . ' templates';25 $url = $url . 'forms/templates'; 26 26 } 27 27 ?> … … 34 34 35 35 <script language="javascript"> 36 var element = document.getElementById('cognito-frame'); 37 for (; element; element = element.previousSibling) { 38 if (element.nodeType === 1 && element.id !== 'cognito-frame') { 39 element.style.display = 'none'; 40 } 41 } 42 36 43 var adminheight = document.getElementById('wpadminbar').clientHeight; 37 44 document.getElementById('cognito-frame').height = (document.body.clientHeight - adminheight) + "px";
Note: See TracChangeset
for help on using the changeset viewer.