Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thanks for doing this, great additions and bug fixes!

    One problem exists after installing the 1.2.0b version: when browsing through the images to be used as highlighted image it seems the thumbnails in the main list are not shown (in the list with the ‘Show’ links on the right column).

    I get some JS errors, which could maybe cause this problem:

    document.getElementById("wpbody-content") is null
    [Afbreken op deze fout] 	
    
    ...etElementById('wpbody-content').insertBefore(xdiv, document.getElementById('scre...
    
    media-...gory=25 (regel 102)
    jQuery("#media-items").sortable is not a function
    [Afbreken op deze fout] 	
    
    stop: function(event, ui) {
    
    media-...gory=25 (regel 317)
    document.getElementById("wpbody-content") is null
    [Afbreken op deze fout] 	
    
    ...etElementById('wpbody-content').insertBefore(xdiv, document.getElementById('scre...
    
    media-...gory=25 (regel 102
    Thread Starter stefandoorn

    (@stefandoorn)

    In the meanwhile I wrote a short hook which should do the case I think.. you have to set the tweet prefix to {category} and put the code somewhere in your theme (functions.php for instance).

    function twitter_category_prefix($tweet = FALSE, $post = FALSE) {
    	$replace_str = '{category}';
    
    	if($tweet && $post && isset($post->ID) && strpos($tweet->tw_text, $replace_str) !== FALSE) {
    		// Find categories for this post
    		$categories = get_the_category($post->ID);
    		if(count($categories) > 0) {
    			// Replace first category name in tweet text
    			$tweet->tw_text = str_replace($replace_str, $categories[0]->name, $tweet->tw_text);
    			return $tweet;
    		}
    	}
    	else {
    		return $tweet;
    	}
    }
    add_filter('aktt_do_blog_post_tweet', 'twitter_category_prefix', $priority = 10, $amount_of_args = 2);

    That would be a very useful function. At this moment the comments are placed directly after my content, but my content block is not so wide so the lay-out gets stuck. It would be nice to be able to hook it into the ‘normal’ commenting place also.

Viewing 3 replies - 1 through 3 (of 3 total)