Changeset 543927
- Timestamp:
- 05/14/2012 02:58:28 AM (14 years ago)
- Location:
- ostoolbar/trunk
- Files:
-
- 3 added
- 4 edited
-
controller.php (modified) (3 diffs)
-
libraries/application.php (modified) (2 diffs)
-
libraries/mce (added)
-
libraries/mce/editor_plugin.js (added)
-
libraries/mce/icon-tutorials.png (added)
-
ostoolbar.php (modified) (2 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ostoolbar/trunk/controller.php
r537573 r543927 3 3 class OST_Controller 4 4 { 5 5 6 6 public function action_tutorials( )7 public function action_tutorials($isFrontend = false) 7 8 { 8 9 if ($id = (int)$_GET['id']) … … 51 52 ?> 52 53 <tr> 53 <td><a href="<?php echo $tutorials[$i]->link;?>">54 <td><a href="<?php echo ($isFrontend ? "index.php?page_id=".$_GET["page_id"]."&id=".$tutorials[$i]->id : $tutorials[$i]->link);?>"> 54 55 <?php echo $tutorials[$i]->title; ?></a> 55 56 </td> … … 81 82 <div class="wrap"> 82 83 <?php if (in_array($tutorial->jversion, array("wp_trial"))):?> 83 <iframe src="http://www.ostraining.com/services/adv/adv1.html" width="734px" height="80px" ></iframe>84 <iframe src="http://www.ostraining.com/services/adv/adv1.html" width="734px" height="80px" style="overflow:visible"></iframe> 84 85 <?php endif;?> 85 86 -
ostoolbar/trunk/libraries/application.php
r537573 r543927 6 6 public function init() 7 7 { 8 add_shortcode("ostoolbar", array("OST_Application", "display")); 9 8 10 get_role('administrator')->add_cap( 'see_videos' ); 9 11 $text = get_option('toolbar_permission'); … … 27 29 add_action('admin_notices', array($this, 'api_key_check')); 28 30 } 31 add_action('init', array($this, 'ostoolbar_add_editor_button')); 32 } 33 34 function display() 35 { 36 ob_start(); 37 if (!$_GET["id"]) 38 OST_Controller::action_tutorials(true); 39 else 40 OST_Controller::action_tutorial($_GET["id"]); 41 $content = ob_get_contents(); 42 ob_end_clean(); 43 return $content; 44 } 45 46 function ostoolbar_add_editor_button() { 47 if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) 48 return; 49 50 if ( get_user_option('rich_editing') == 'true') { 51 add_filter("mce_external_plugins", array($this, "ostoolbar_load_plugin")); 52 add_filter('mce_buttons', array($this, 'ostoolbar_register_button')); 53 } 54 } 55 56 // --- 57 function ostoolbar_load_plugin($plugin_array) { 58 $plug = plugins_url('mce/editor_plugin.js',__FILE__); 59 $plugin_array['ostoolbar_plugin'] = $plug; 60 return $plugin_array; 61 } 62 63 // --- 64 function ostoolbar_register_button($buttons) { 65 $b[] = "separator"; 66 $b[] = "ostoolbar_plugin_button"; 67 if ( is_array($buttons) && !empty($buttons) ) { 68 $b = array_merge( $buttons, $b ); 69 } 70 return $b; 29 71 } 30 72 -
ostoolbar/trunk/ostoolbar.php
r537573 r543927 2 2 /** 3 3 * @package OSToolbar 4 * @version 1.64 * @version 2.2 5 5 */ 6 6 /* … … 9 9 Description: This plugin shows training videos inside your WordPress admin panel. 10 10 Author: OSTraining.com 11 Version: 1.011 Version: 2.2 12 12 Author URI: http://www.ostraining.com 13 13 */ 14 14 15 if ( ! is_admin())16 return false;17 15 18 16 require_once(dirname(__FILE__).'/libraries/factory.php'); -
ostoolbar/trunk/readme.txt
r542280 r543927 1 1 === Plugin Name === 2 2 Contributors: alledia 3 Tags: video, tutorials, hel o3 Tags: video, tutorials, help, support, documentation 4 4 Requires at least: 3.0 5 5 Tested up to: 3.4 … … 23 23 3. Choose what order the videos appear in 24 24 4. Choose which users can see the videos 25 5. Whitelabel the plugin. Add your name and image. 25 5. Show the videos on the fronted of your site 26 6. Whitelabel the plugin. Add your company name and logo. 26 27 27 28 28 29 == Installation == 29 30 30 1. I nstall: install OSToolbar either via the WordPress.org plugin directory, or by uploading the files to your server31 2. Activate: click the Activate button.32 3. Watch: visit the OSToolbar link in your WordPress admin menu and start watching videos.31 1. Istall OSToolbar either via the WordPress.org plugin directory, or by uploading the files to your server 32 2. Click the Activate button. 33 3. Visit the OSToolbar link in your WordPress admin menu and start watching videos. 33 34 34 35 == Frequently Asked Questions == … … 37 38 38 39 Yes, the plugin is released under the GPL license and you can install it on as many sites as wish. 40 41 = How Do I Show These Videos on the Front of My Site? = 42 43 1. Go to a post or page. 44 2. There will be an OSToolbar button in the editor. Click that button. 45 3. The button will insert this code into your content [ostoolbar] 46 4. Save and you're done! 39 47 40 48 == Screenshots == … … 48 56 * Initial Launch 49 57 58 = 2.2 = 59 * Added front-end viewing of the videos via a button in the editor 60 * Jumped version numbers from 1.0 to 2.2 in order to match our current version, not the one set by WordPress.org 50 61
Note: See TracChangeset
for help on using the changeset viewer.