Plugin Directory

Changeset 478922


Ignore:
Timestamp:
12/21/2011 10:47:26 PM (14 years ago)
Author:
oltdev
Message:

updated for compatibility with WordPress 3.3 uses the new wp_editor api

Location:
people-lists/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • people-lists/trunk/js/people-lists-tinymce.js

    r450069 r478922  
    1 
    2 // Javascript to load TinyMCE to textarea in Your Profile
    31jQuery(function($) {
    4     if ( typeof( tinyMCE ) == "object" && typeof( tinyMCE.execCommand ) == "function"){
    5         tinyMCE.execCommand("mceAddControl", false, "description");
    6     }
    7     // $("#description").before("<a href='#' class='plain'>HTML</a> <a href='#' class='visual active'>Visual</a>");
    8     $("#description").before("<div id='editor-tabs'><a href='#' class='plain'>HTML</a> <a href='#' class='visual active'>Visual</a></div>");
    9    
    10     $(".visual").live("click",function(){
    11         $(this).addClass("active");
    12         $(".plain").removeClass("active");
    13        
    14         tinyMCE.execCommand('mceAddControl', false, 'description');
    15         return false;
    16     });
    17     $(".plain").live("click",function(){
    18         $(this).addClass("active");
    19         $(".visual").removeClass("active");
    20        
    21         tinyMCE.execCommand('mceRemoveControl', false, 'description');
    22         return false;
    23     });
    24    
    25     $("label[for='description']").each(function(){
    26         $(this).html($(this).html().replace(/[^>]+$/,"General Information"));
    27     });
    28    
    29      // adding the media buttons
    30      var mbuttons = jQuery("#media-buttons-shell").html();
    31      if(mbuttons){
    32          jQuery("#media-buttons-shell").remove();
    33        
    34          jQuery("#editor-tabs").before( mbuttons );
    35          jQuery("#media-buttons").css('display','block');
    36          window.send_to_editor = function(html) {
    37                  tinyMCE.activeEditor.selection.setContent( html );
    38                  tb_remove();
    39                  }
    40      }
    41 
    42 });
    43 
    44 /* --- End of File --- */
     2    // remove the current version of th bio
     3    $("#description").parent().parent().remove();
     4});
  • people-lists/trunk/people-lists.php

    r450069 r478922  
    99 *              desired to be displayed.     
    1010 * Author: Gagan Sandhu / Enej Bajgoric / CTLT DEV
    11  * Version: 1.3.7
     11 * Version: 1.3.8
    1212 * Author URI: http://www.ctlt.ubc.ca
    1313 * 
     
    5959
    6060
     61// add wysiwig textarea to  to
     62add_action('show_user_profile', 'people_list_edit_user_profile_bio_field', 10, 1);
     63add_action('edit_user_profile', 'people_list_edit_user_profile_bio_field', 10 ,1);
     64
     65
     66function people_list_edit_user_profile_bio_field($user) { ?>
     67    <table class="form-table">
     68    <tr>
     69        <th><label for="description"><?php _e('General Information'); ?></label></th>
     70        <td><?php wp_editor($user->description, "description-1", array('textarea_name'=>'description')); ?>
     71        <span class="description"><?php _e('Share a little biographical information to fill out your profile. This may be shown publicly.'); ?></span></td>
     72    </tr>
     73    </table>
     74    <?php
     75}
    6176// a better way to filter the description
    6277remove_filter('pre_user_description', 'wp_filter_kses');
     
    240255 */
    241256function people_lists_tinymce_init_script(){
    242     wp_enqueue_script('tiny_mce');
    243     add_action('admin_print_footer_scripts', 'wp_tiny_mce', 25 );
     257    // wp_enqueue_script('tiny_mce');
     258    // add_action('admin_print_footer_scripts', 'wp_tiny_mce', 25 );
    244259   
    245260    wp_enqueue_script('people-lists-tinymce', plugins_url('/people-lists/js/people-lists-tinymce.js'),'jquery');
    246261   
    247     add_filter( 'tiny_mce_before_init', 'people_lists_tiny_filter_remove_fullscreen');
     262    // add_filter( 'tiny_mce_before_init', 'people_lists_tiny_filter_remove_fullscreen');
    248263}
    249264
     
    255270 */
    256271function people_lists_tinymce_init_style(){
    257     wp_enqueue_style('people-lists-tinymce', plugins_url('/people-lists/css/people-lists-tinymce.css'),'css');
     272    // wp_enqueue_style('people-lists-tinymce', plugins_url('/people-lists/css/people-lists-tinymce.css'),'css');
    258273}
    259274/**
  • people-lists/trunk/readme.txt

    r450069 r478922  
    11=== People Lists ===
    2 Contributors: sgagan, enej, oltdev, ctlt-dev
     2Contributors: sgagan, enej, ctlt-dev
    33Tags: people lists, people, list, form, user profile, user avatar, thumbnail, upload photo, user, users, profile, biography, profile biography, user profile, description, profile description, rich text, wysiwyg, tinyMCE, photos, images,  members, directory, profiles, jQuery, sortable, tabbable, thickbox, overlay, media button, Your Profile
    4 Requires at least: 3.0
    5 Tested up to: 3.2
     4Requires at least: 3.3
     5Tested up to: 3.3
    66Stable Tag: trunk
    77
     
    9696
    9797== Changelog ==
     98= 1.3.8 =
     99* bug fix: Compatibility with WordPress 3.3 it uses the new wp_editor API
    98100
    99101= 1.3.7 =
Note: See TracChangeset for help on using the changeset viewer.