'; }else{ echo ''; } echo << block; } function inap_content($link_show_text = 'Continue Reading', $link_hide_text='Hide Post', $stripteaser = 0){ return inap_post($link_show_text, $link_hide_text,1,1,'content'); } function inap_excerpt($link_show_text = 'Continue Reading', $link_hide_text='Hide Post') { return inap_post($link_show_text, $link_hide_text,3,0,'excerpt',55); } function inap_post_s($args=''){ parse_str($args, $r); if ($r['link_show_text'] == ''){ $r['link_show_text'] = 'Click to continue reading'; } if ($r['link_hide_text'] == ''){ $r['link_hide_text'] = 'Hide Post'; } if ($r['split_mode'] == ''){ $r['split_mode'] = '0'; } if ($r['show_html'] == ''){ $r['show_html']= '1'; } if ($r['default_behavior'] == ''){ $r['default_behavior'] = 'content'; } if ($r['word_limit'] == ''){ $r['word_limit'] = '121'; } if ($r['line_break'] == ''){ $r['line_break'] = '1'; } return inap_post(stripslashes($r['link_show_text']), stripslashes($r['link_hide_text']), $r['split_mode'], $r['show_html'], $r['default_behavior'],$r['word_limit'], $r['line_break']); } function inap_post($link_show_text ='Click to continue reading', $link_hide_text='Hide Post', $split_mode=0, $show_html=1, $default_behavior='content', $word_limit=121, $line_break = 1){ global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages; global $preview; global $pagenow; if ( !empty($post->post_password) ) { // if there's a password if ( stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password ) { // and it doesn't match the cookie $output = get_the_password_form(); } } // decide on the content if ($post->post_excerpt != ''){ $output = $post->post_excerpt; }else{ $content = $pages[$page-1]; if($show_html == 0){ $content = strip_tags($content); } if($split_mode == 1){ $content = explode('', $content, 2); $output = $content[0]; }elseif($split_mode == 2){ if(strpos($content,'') !== false){ $content = explode('', $content, 2); $output = $content[0]; }else{ $content = force_balance_tags($content); $content = explode(chr(13), $content, $line_break+1); for($x=0; $x < $line_break; $x++){ $output .= $content[$x]; } } }else{ $words = explode(' ', $content, $word_limit + 1); if (count($words) > $word_limit) { array_pop($words); array_push($words, '...'); $output = implode(' ', $words); $show_more=1; }else{ $content = force_balance_tags($content); $output=$content; } } if($show_html == 1){ } } //lets make it look good if ( $preview ){ // preview fix for javascript bug with foreign languages $output =preg_replace('/\%u([0-9A-F]{4,4})/e', "'&#'.base_convert('\\1',16,10).';'", $output); } if ($default_behavior == 'content'){ $output = apply_filters('the_content', $output.chr(13)); }else{ $output = apply_filters('the_excerpt', $output); } $output = str_replace(']]>', ']]>', $output); // Start the output. echo '
'.$output.'
'; //if there is more to show then we need an empty div and some links. if ( count($content) > 1 || $show_more == 1) { echo ''; echo ''.$link_show_text.''; } } function inap_comments(){ global $id, $post; echo ''; } function inap_addcomments(){ global $id; echo ''; } function inap_addcomments_link($addcomment_open= 'Add Comment', $addcomment_hide='Hide Comment Form',$num = ''){ global $id; echo ''.$addcomment_open.''; } function inap_comments_link($comment_open= 'Show Posts Comments', $comment_hide='Hide Post Comments',$extra = 0){ global $id,$post; if ($post->comment_count == 0){ echo ''; echo 'No Comments Yet'; echo ' '; echo ''; }else{ echo ''.$comment_open.''; } } ?>