WordPress.org

Plugin Directory

Changeset 607146


Ignore:
Timestamp:
10/02/12 19:24:49 (19 months ago)
Author:
jmdodd
Message:

Minor bugfixes

Location:
bbpress-threaded-replies/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bbpress-threaded-replies/trunk/js/bbpress-threaded-replies.js

    r496517 r607146  
    44    moveForm : function(commId, parentId, respondId, postId) { 
    55        var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-in-reply-to-link'), parent = t.I('inreplyto'), post = t.I('bbp_topic_id'); 
     6        t.rmTiny(); 
    67 
    78        t.respondId = respondId; 
     
    2324        cancel.onclick = function() { 
    2425            var t = addReply, temp = t.I('wp-temp-form-div'), respond = t.I(t.respondId); 
     26            t.rmTiny(); 
    2527 
    2628            if ( ! temp || ! respond ) 
     
    3234            this.style.display = 'none'; 
    3335            this.onclick = null; 
     36            t.addTiny(); 
    3437            return false; 
    3538        } 
     39        t.addTiny(); 
    3640 
    37         try { t.I('reply').focus(); } 
     41        try { t.I('bbp_reply_content').focus(); } 
    3842        catch(e) {} 
    3943 
     
    4347    I : function(e) { 
    4448        return document.getElementById(e); 
     49    }, 
     50     
     51    rmTiny : function() { 
     52        try { 
     53            tinyMCE.triggerSave(); 
     54            tinyMCE.execCommand('mceFocus', false, 'bbp_reply_content'); 
     55            tinyMCE.execCommand('mceRemoveControl', false, 'bbp_reply_content'); 
     56        } catch(el) {} 
     57    }, 
     58 
     59    addTiny : function() { 
     60        try {  
     61            tinyMCE.execCommand('mceAddControl', false, 'bbp_reply_content'); 
     62        } catch (e) {} 
    4563    } 
    4664} 
  • bbpress-threaded-replies/trunk/readme.txt

    r601809 r607146  
    44Requires at least: WordPress 3.4, bbPress 2.0 
    55Tested up to: 3.4 
    6 Stable tag: 0.4.1 
     6Stable tag: 0.4.2 
    77 
    88Add threaded (nested) reply functionality to bbPress. 
     
    2424 
    2525== Changelog == 
     26 
     27= 0.4.2 = 
     28* Change constants STYLESHEETPATH and TEMPLATEPATH to corresponding functions. 
     29* Fix divide-by-zero in replies_per_page. 
     30* TinyMCE DOM movement fix (props cosmic_invaders). 
    2631 
    2732= 0.4.1 = 
  • bbpress-threaded-replies/trunk/ucc-btr-loader.php

    r601809 r607146  
    33Plugin Name: bbPress Threaded Replies  
    44Description: Add threaded (nested) reply functionality to bbPress.  
    5 Version: 0.4.1 
     5Version: 0.4.2 
    66License: GPL 
    77Author: Jennifer M. Dodd 
     
    3737    public static $instance; 
    3838    public static $version; 
    39     public $plugin_dir; 
    40     public $template_dir; 
    41     public $lang_dir; 
     39    public static $plugin_dir; 
     40    public static $plugin_url; 
     41    public static $template_dir; 
    4242     
    4343    public function __construct() { 
    4444        self::$instance = $this; 
    45         $this->version = '20120915'; 
     45        $this->version = '20121002'; 
    4646        $this->plugin_dir   = plugin_dir_path( __FILE__ ); 
    4747        $this->plugin_url   = plugins_url( __FILE__ ); 
    48         $this->template_dir = $this->plugin_dir . 'templates'; 
     48        $this->template_dir = trailingslashit( $this->plugin_dir ) . 'templates'; 
    4949 
    5050        // Languages. 
     
    155155        $options['thread_replies_depth'] = array_key_exists( 'thread_replies_depth', $_options ) ? absint( $_options['thread_replies_depth'] ) : 5; 
    156156        $options['page_replies'] = array_key_exists( 'page_replies', $_options ) ? 1 : 0; 
    157         $options['replies_per_page'] = array_key_exists( 'replies_per_page', $_options ) ? absint( $_options['replies_per_page'] ) : 5; 
     157        $options['replies_per_page'] = array_key_exists( 'replies_per_page', $_options ) && absint( $_options['replies_per_page'] ) > 0 ? absint( $_options['replies_per_page'] ) : 5; 
    158158        $options['default_replies_page'] = ( array_key_exists( 'default_replies_page', $_options ) && ( $_options['default_replies_page'] == 'newest' ) ) ? 'newest' : 'oldest'; 
    159159        $options['reply_order'] = ( array_key_exists( 'reply_order', $_options ) && ( $_options['reply_order'] == 'desc' ) ) ? 'desc' : 'asc'; 
     
    184184 
    185185            // Check child theme first 
    186             if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_name ) ) { 
    187                 $located = trailingslashit( STYLESHEETPATH ) . $template_name; 
     186            if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_name ) ) { 
     187                $located = trailingslashit( get_stylesheet_directory() ) . $template_name; 
    188188            // Check parent theme next 
    189             } elseif ( file_exists( trailingslashit( TEMPLATEPATH ) . $template_name ) ) { 
    190                 $located = trailingslashit( TEMPLATEPATH ) . $template_name; 
     189            } elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_name ) ) { 
     190                $located = trailingslashit( get_template_directory() ) . $template_name; 
    191191            // Check theme compatibility 
    192192            } elseif ( file_exists( trailingslashit( bbp_get_theme_compat_dir() ) . $template_name ) ) { 
Note: See TracChangeset for help on using the changeset viewer.