Changeset 665554
- Timestamp:
- 02/09/2013 10:50:51 AM (13 years ago)
- Location:
- edge-suite/trunk
- Files:
-
- 3 edited
-
edge-suite.php (modified) (6 diffs)
-
includes/edge-suite-comp-builder.inc (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
edge-suite/trunk/edge-suite.php
r632663 r665554 5 5 Description: Upload Adobe Edge compositions to your website. 6 6 Author: Timm Jansen 7 Author URI: http://timm-jansen.net/ 8 Version: 0.4 7 Author URI: http://www.timmjansen.com/ 8 Donate link: http://www.timmjansen.com/donate 9 Version: 0.5 9 10 */ 10 11 11 /* Copyright 201 2 Timm Jansen (email: info at timm-jansen.net)12 /* Copyright 2013 Timm Jansen (email: info at timmjansen.com) 12 13 13 14 This program is free software; you can redistribute it and/or modify … … 78 79 ); 79 80 "; 80 81 // TODO: Is this the correct way to do this?82 81 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 83 82 dbDelta($sql); … … 85 84 86 85 // Default options. 87 add_option('edge_suite_max_size', 2);86 add_option('edge_suite_max_size', 5); 88 87 add_option('edge_suite_comp_default', -1); 89 88 add_option('edge_suite_comp_homepage', 0); … … 101 100 102 101 function edge_suite_uninstall() { 102 edge_suite_init_constants(); 103 104 global $wpdb; 105 $table_name = $wpdb->prefix . "edge_suite_composition_definition"; 106 if ($wpdb->get_var("show tables like '$table_name'") == $table_name) { 107 $wpdb->query('DROP TABLE ' . $table_name); 108 } 109 110 // Delete all edge directories 111 rmdir_recursive(trailingslashit(EDGE_SUITE_PUBLIC_DIR)); 112 113 // Delete options 114 delete_option('edge_suite_max_size'); 115 delete_option('edge_suite_comp_default'); 116 delete_option('edge_suite_comp_homepage'); 117 delete_option('edge_suite_deactivation_delete'); 118 delete_option('edge_suite_widget_shortcode'); 119 delete_option('edge_suite_jquery_noconflict'); 120 delete_option('edge_suite_debug'); 121 } 122 register_uninstall_hook(__FILE__, 'edge_suite_uninstall'); 123 124 125 function edge_suite_deactivate() { 103 126 if(get_option('edge_suite_deactivation_delete') == 1){ 104 edge_suite_init_constants(); 105 106 global $wpdb; 107 $table_name = $wpdb->prefix . "edge_suite_composition_definition"; 108 if ($wpdb->get_var("show tables like '$table_name'") == $table_name) { 109 $wpdb->query('DROP TABLE ' . $table_name); 110 } 111 112 // Delete all edge directories 113 rmdir_recursive(trailingslashit(EDGE_SUITE_PUBLIC_DIR)); 114 115 // Delete options 116 delete_option('edge_suite_max_size'); 117 delete_option('edge_suite_comp_default'); 118 delete_option('edge_suite_comp_homepage'); 119 delete_option('edge_suite_deactivation_delete'); 120 delete_option('edge_suite_widget_shortcode'); 121 delete_option('edge_suite_jquery_noconflict'); 122 delete_option('edge_suite_debug'); 123 } 124 } 125 126 register_deactivation_hook(__FILE__, 'edge_suite_uninstall'); 127 //register_uninstall_hook(__FILE__, 'edge_suite_uninstall'); 127 edge_suite_uninstall(); 128 } 129 } 130 register_deactivation_hook(__FILE__, 'edge_suite_deactivate'); 128 131 129 132 … … 164 167 edge_suite_boot(); 165 168 166 // Get default composition. 167 $definition_id = get_option('edge_suite_comp_default'); 168 169 // Get homepage composition. 170 if (is_home()) { 171 if (get_option('edge_suite_comp_homepage') != 0) { 172 $definition_id = get_option('edge_suite_comp_homepage'); 173 } 174 } 175 //Get post composition 176 else { 177 global $post; 178 $post_id = $post->ID; 179 $post_reference_id = get_post_meta($post_id, '_edge_composition', TRUE); 180 if (!empty($post_reference_id)) { 181 $definition_id = $post_reference_id; 182 } 183 } 184 185 // Render composition. 186 global $edge_suite; 187 $definition_res = edge_suite_comp_render($definition_id); 188 // Split scripts and stage so they can be used by the respective functions. 189 $edge_suite->scripts = isset($definition_res['scripts']) ? $definition_res['scripts'] : ''; 190 $edge_suite->stage = isset($definition_res['stage']) ? $definition_res['stage'] : ''; 191 169 if(!is_admin()){ 170 // Get default composition. 171 $definition_id = get_option('edge_suite_comp_default'); 172 173 // Get homepage composition. 174 if (is_home()) { 175 if (get_option('edge_suite_comp_homepage') != 0) { 176 $definition_id = get_option('edge_suite_comp_homepage'); 177 } 178 } 179 //Get post composition 180 else { 181 global $post; 182 if(isset($post->ID)){ 183 $post_id = $post->ID; 184 $post_reference_id = get_post_meta($post_id, '_edge_composition', TRUE); 185 if (!empty($post_reference_id)) { 186 $definition_id = $post_reference_id; 187 } 188 } 189 } 190 191 // Render composition. 192 global $edge_suite; 193 $definition_res = edge_suite_comp_render($definition_id); 194 // Split scripts and stage so they can be used by the respective functions. 195 $edge_suite->scripts = isset($definition_res['scripts']) ? $definition_res['scripts'] : ''; 196 $edge_suite->stage = isset($definition_res['stage']) ? $definition_res['stage'] : ''; 197 } 192 198 } 193 199 … … 226 232 227 233 function edge_suite_menu() { 228 // Todo: Create icon. 229 // $icon_url = plugins_url('/edge-suite').'/admin/edge_icon.png'; 230 $icon_url = ''; 231 add_menu_page('Edge Suite', 'Edge Suite', 'edge_suite_administer', __FILE__, 'edge_suite_menu_main', $icon_url); 234 add_menu_page('Edge Suite', 'Edge Suite', 'edge_suite_administer', __FILE__, 'edge_suite_menu_main'); 232 235 add_submenu_page(__FILE__, 'Manage', 'Manage', 'edge_suite_administer', __FILE__, 'edge_suite_menu_main'); 233 236 add_submenu_page(__FILE__, 'Settings', 'Settings', 'edge_suite_administer', 'edge_suite_menu_settings', 'edge_suite_menu_settings'); -
edge-suite/trunk/includes/edge-suite-comp-builder.inc
r643431 r665554 319 319 } 320 320 321 // Todo: Directory seems to always exist already 321 322 // Delete old edge tmp dir. 322 323 if (is_dir($destination)) { -
edge-suite/trunk/readme.txt
r613974 r665554 13 13 == Description == 14 14 15 Upload of compositions through a zipped archive. Integrate Adobe Edge Animate compositions seamlessly into your website.15 Upload of compositions through published OAM files. Integrate Adobe Edge Animate compositions seamlessly into your website. 16 16 17 Since Edge Animate itself is still in pre-release this plugin is a moving target as well and should therefore not yet be used in production. 17 Detailed tutorials on how to install and use Edge Suite can be found is here: 18 18 19 There have been problems with unzipping composition archives on shared hosting plans due to the wordpress filesystem. More detailed info is available in the FAQ section. 19 * <a href="http://edgedocks.com/content/edge-suite-integrate-edge-animate-wordpress">Edge Docks - written tutorial</a> 20 * <a href="http://edgedocks.com/content/edge-suite-integrate-edge-animate-wordpress">Adobe TV - video tutorial</a> 20 21 21 Roadmap: FTP Filesystem support, data injection 22 More resources can be found at <a href="http://edgedocks.com/edge_suite_wp">EdgeDocks.com</a>. 22 23 23 Please help to review and test the plugin. Feedback is appreciated. 24 25 <a href="http://edgedocks.com/content/edge-suite-integrate-edge-animate-wordpress">Tutorial</a> on how to install and use Edge Suite. More resources can be found 26 <a href="http://edgedocks.com/edge_suite_wp">EdgeDocks.com</a>. 24 The plugin has been intensively tested over the last couple of months and seems to be rather stable, it is up to you though if you want to try and use it in production. If you experience 25 any problems please open an issue in the support section. If you like the plugin please vote for it and let us know that it works for your wordpress version. 27 26 28 27 == Features == 29 28 30 * Upload Edge Animate compositions within one zipped archive29 * Upload Edge Animate compositions through published OAM files 31 30 * Manage all compositions 32 31 * Easy placement of compositions on the website 32 * Shortcode support for posts and widgets 33 * Sharing of resources 34 * jQuery no conflict mode 33 35 34 36 == Frequently Asked Questions == … … 38 40 * Open the debug console in Chrome (mac: alt + cmd + j) or Firefox and check for JavaScript errors. 39 41 42 = jQuery issues = 43 44 Try to enable jQuery no conflict mode in the settings page, this might resolve conflicts between Edge Animates 45 version of jQuery and other plugins. 46 47 = Background animation = 48 49 If you want to use your composition as a background animation, try the following CSS on your stage id, e.g. #Stage_mycomp 50 51 #Stage_mycomp{ 52 position: absolute !important; /* That is not pretty, but no way around it. */ 53 top: 0px; /* Aligns the animation with the top of the header (can be removed or changed) */ 54 z-index: 5; /* Sets animation as overlay, set to negative value for background placement */ 55 56 /* Only use the following if you want to center the animation */ 57 left: 50%; 58 margin-left: -346px; /* Half the width of the stage */ 59 } 60 40 61 = Animations don't show up = 41 62 42 63 Uploading worked but nothings shows up on the page. Things to check: 43 44 * Edge Suite doesn't support minified/published projects yet. Just zip the raw project folder (without the publish folder)45 64 46 65 * Look at the source code of the page and search for: … … 53 72 54 73 * For testing remove all other fancy JavaScript like galleries, slideshows, etc. that are placed alongside the animation, the JS might collide. 74 75 * Enable the JS debug log in the settings 76 77 * Enable jQuery no-conflict mode in the settings 55 78 56 79 = Head Cleaner: Animations don't show up = … … 106 129 = 0.3 = 107 130 Changes to support Edge Animate version 1.0, minified files, oam files 131 132 = 0.4 = 133 Bugfixes 134 135 = 0.5 = 136 Bugfixes, jQuery no conflict mode, readme update 137 138 139
Note: See TracChangeset
for help on using the changeset viewer.