Plugin Directory

Changeset 543927


Ignore:
Timestamp:
05/14/2012 02:58:28 AM (14 years ago)
Author:
alledia
Message:
 
Location:
ostoolbar/trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • ostoolbar/trunk/controller.php

    r537573 r543927  
    33class OST_Controller
    44{
     5   
    56
    6     public function action_tutorials()
     7    public function action_tutorials($isFrontend = false)
    78    {
    89        if ($id = (int)$_GET['id'])
     
    5152                        ?>
    5253                        <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);?>">
    5455                                <?php echo $tutorials[$i]->title; ?></a>
    5556                            </td>
     
    8182        <div class="wrap">
    8283            <?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>
    8485            <?php endif;?>
    8586       
  • ostoolbar/trunk/libraries/application.php

    r537573 r543927  
    66    public function init()
    77    {
     8        add_shortcode("ostoolbar", array("OST_Application", "display"));
     9       
    810        get_role('administrator')->add_cap( 'see_videos' );
    911        $text = get_option('toolbar_permission');
     
    2729            add_action('admin_notices', array($this, 'api_key_check'));
    2830        }
     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;
    2971    }
    3072
  • ostoolbar/trunk/ostoolbar.php

    r537573 r543927  
    22/**
    33 * @package OSToolbar
    4  * @version 1.6
     4 * @version 2.2
    55 */
    66/*
     
    99Description: This plugin shows training videos inside your WordPress admin panel.
    1010Author: OSTraining.com
    11 Version: 1.0
     11Version: 2.2
    1212Author URI: http://www.ostraining.com
    1313*/
    1414
    15 if ( ! is_admin())
    16     return false;
    1715
    1816require_once(dirname(__FILE__).'/libraries/factory.php');
  • ostoolbar/trunk/readme.txt

    r542280 r543927  
    11=== Plugin Name ===
    22Contributors: alledia
    3 Tags: video, tutorials, helo
     3Tags: video, tutorials, help, support, documentation
    44Requires at least: 3.0
    55Tested up to: 3.4
     
    23233. Choose what order the videos appear in
    24244. Choose which users can see the videos
    25 5. Whitelabel the plugin. Add your name and image.
     255. Show the videos on the fronted of your site
     266. Whitelabel the plugin. Add your company name and logo.
    2627
    2728
    2829== Installation ==
    2930
    30 1. Install: install OSToolbar either via the WordPress.org plugin directory, or by uploading the files to your server
    31 2. Activate: click the Activate button.
    32 3. Watch: visit the OSToolbar link in your WordPress admin menu and start watching videos.
     311. Istall OSToolbar either via the WordPress.org plugin directory, or by uploading the files to your server
     322. Click the Activate button.
     333. Visit the OSToolbar link in your WordPress admin menu and start watching videos.
    3334
    3435== Frequently Asked Questions ==
     
    3738
    3839Yes, 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
     431. Go to a post or page.
     442. There will be an OSToolbar button in the editor. Click that button.
     453. The button will insert this code into your content [ostoolbar]
     464. Save and you're done!
    3947
    4048== Screenshots ==
     
    4856* Initial Launch
    4957
     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
    5061
Note: See TracChangeset for help on using the changeset viewer.