Changeset 478922
- Timestamp:
- 12/21/2011 10:47:26 PM (14 years ago)
- Location:
- people-lists/trunk
- Files:
-
- 3 edited
-
js/people-lists-tinymce.js (modified) (1 diff)
-
people-lists.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
people-lists/trunk/js/people-lists-tinymce.js
r450069 r478922 1 2 // Javascript to load TinyMCE to textarea in Your Profile3 1 jQuery(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 9 9 * desired to be displayed. 10 10 * Author: Gagan Sandhu / Enej Bajgoric / CTLT DEV 11 * Version: 1.3. 711 * Version: 1.3.8 12 12 * Author URI: http://www.ctlt.ubc.ca 13 13 * … … 59 59 60 60 61 // add wysiwig textarea to to 62 add_action('show_user_profile', 'people_list_edit_user_profile_bio_field', 10, 1); 63 add_action('edit_user_profile', 'people_list_edit_user_profile_bio_field', 10 ,1); 64 65 66 function 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 } 61 76 // a better way to filter the description 62 77 remove_filter('pre_user_description', 'wp_filter_kses'); … … 240 255 */ 241 256 function 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 ); 244 259 245 260 wp_enqueue_script('people-lists-tinymce', plugins_url('/people-lists/js/people-lists-tinymce.js'),'jquery'); 246 261 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'); 248 263 } 249 264 … … 255 270 */ 256 271 function 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'); 258 273 } 259 274 /** -
people-lists/trunk/readme.txt
r450069 r478922 1 1 === People Lists === 2 Contributors: sgagan, enej, oltdev,ctlt-dev2 Contributors: sgagan, enej, ctlt-dev 3 3 Tags: 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. 05 Tested up to: 3. 24 Requires at least: 3.3 5 Tested up to: 3.3 6 6 Stable Tag: trunk 7 7 … … 96 96 97 97 == Changelog == 98 = 1.3.8 = 99 * bug fix: Compatibility with WordPress 3.3 it uses the new wp_editor API 98 100 99 101 = 1.3.7 =
Note: See TracChangeset
for help on using the changeset viewer.