post_title == obt_translate("Contact")); include(TEMPLATEPATH."/ads/before-post-title.php"); $obt_post_title = apply_filters("the_title",$post->post_title); IF (!strlen($obt_post_title)) $obt_post_title = obt_translate("Untitled"); IF (strlen($post->post_password)) $obt_post_title = obt_translate("%1 (protected)",$obt_post_title); $obt_post_title = wp_specialchars($obt_post_title,true); $obt_post_url = (is_page())? obt_fix_link(get_permalink()) : get_permalink(); IF (!is_page() && !is_single() || $obt_comments_paginated || $obt_comment_form || $obt_send_form) echo "

{$obt_post_title}

\n"; ELSE echo "

{$obt_post_title}

\n"; include(TEMPLATEPATH."/ads/after-post-title.php"); IF (!is_page() && !$post->post_parent){ include(TEMPLATEPATH."/ads/before-post-date.php"); $obt_author_link = (function_exists("get_author_posts_url"))? get_author_posts_url($authordata->ID,$authordata->user_nicename) : get_author_link(false,$authordata->ID,$authordata->user_nicename); $obt_author_feed = get_author_rss_link(false,$authordata->ID,$authordata->user_nicename); $obt_author_link = obt_fix_link($obt_author_link); $obt_author_feed = obt_fix_feed_link($obt_author_feed,$obt_author_link); echo "
".obt_translate("By %1","".get_the_author()."").", ".obt_translate("%1 ago",obt_time_ago($post->post_date_gmt))."
\n"; include(TEMPLATEPATH."/ads/after-post-date.php"); }ELSEIF ($post->post_parent){ echo "
\n"; $obt_post_parent = $post->post_parent; WHILE ($obt_post_parent){ flush(); $obt_post_parent = get_post($obt_post_parent); $obt_post_parent_title = apply_filters("the_title",$obt_post_parent->post_title); IF (!strlen($obt_post_parent_title)) $obt_post_parent_title = obt_translate("Untitled"); IF (strlen($obt_post_parent->post_password)) $obt_post_parent_title = obt_translate("%1 (protected)",$obt_post_parent_title); $obt_post_parent_title = wp_specialchars($obt_post_parent_title,true); $obt_post_parent_url = (is_page())? obt_fix_link(get_permalink($obt_post_parent->ID)) : get_permalink($obt_post_parent->ID); echo " ← {$obt_post_parent_title}\n"; $obt_post_parent = $obt_post_parent->post_parent; }; echo "
\n"; }; include(TEMPLATEPATH."/ads/before-post-content.php"); IF ($obt_comments_paginated){ $wp_query->paragraph_count = 1; $wp_query->current_paragraph = 0; echo "
\n"; include(TEMPLATEPATH."/ads/before-post-paragraph.php"); echo "

← ".obt_translate("Read post")."

\n"; include(TEMPLATEPATH."/ads/after-post-paragraph.php"); echo "
\n"; }ELSEIF (strlen($post->post_password) && $_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password){ $wp_query->paragraph_count = 1; $wp_query->current_paragraph = 0; echo "
\n"; include(TEMPLATEPATH."/ads/before-post-paragraph.php"); echo "
\n"; echo "

".obt_translate("This post is password-protected").":

\n"; echo "

\n"; echo " "; echo "\n"; echo "

\n"; echo "
\n"; include(TEMPLATEPATH."/ads/after-post-paragraph.php"); echo "
\n"; }ELSE{ IF (!(is_single() || is_page()) && ((is_home() && obt_get_themeoption("posts") != "full") || (!is_home() && obt_get_themeoption("posts-archives") != "full"))){ IF ((is_home() && obt_get_themeoption("posts") == "excerpt") || (!is_home() && obt_get_themeoption("posts-archives") == "excerpt")){ IF (!strlen($post->post_excerpt)){ $obt_words = (is_home())? obt_get_themeoption("posts-words")*1 : obt_get_themeoption("posts-archives-words")*1; IF (!$obt_words) $obt_words = 55; $obt_post_excerpt = get_the_content(); $obt_post_excerpt = apply_filters("get_the_excerpt",$obt_post_excerpt); $obt_post_excerpt = apply_filters("the_excerpt",$obt_post_excerpt); $obt_post_excerpt = obt_excerpt($obt_post_excerpt,$obt_words); $obt_post_excerpt = "

{$obt_post_excerpt}

"; }ELSE{ $obt_post_excerpt = $post->post_excerpt; $obt_post_excerpt = apply_filters("get_the_excerpt",$post->post_excerpt); $obt_post_excerpt = apply_filters("the_excerpt",$obt_post_excerpt); }; $obt_post_excerpt = str_replace("
","

\n

",$obt_post_excerpt); echo "

\n"; obt_display_paragraphs($obt_post_excerpt); IF (strlen($post->post_excerpt) || substr($obt_post_excerpt,-7) == "...

" || $multipage) echo "

".obt_translate("Keep reading")." →

\n"; unset($obt_post_excerpt); echo "
\n"; }ELSE{ $obt_paragraphs = (is_home())? obt_get_themeoption("posts-paragraphs")*1 : obt_get_themeoption("posts-archives-paragraphs")*1; IF (!$obt_paragraphs) $obt_paragraphs = 1; $obt_post_content = get_the_content(obt_translate("Keep reading")." →",0,""); $obt_post_content = apply_filters("the_content",$obt_post_content); $obt_post_content = str_replace(']]>', ']]>', $obt_post_content); $obt_post_content = preg_replace("' (.*?)

'","

\n

\\2",$obt_post_content); echo "

\n"; obt_display_paragraphs($obt_post_content,$obt_paragraphs); unset($obt_post_content); IF ($wp_query->paragraph_count > $obt_paragraphs || $multipage) echo "

".obt_translate("Keep reading")." →

\n"; echo "
\n"; }; }ELSEIF (($_SERVER["REQUEST_METHOD"] != "POST" || !$obt_contact_form) && !$obt_send_form){ IF ($post->post_type == "attachment"){ $wp_query->paragraph_count = 1; $wp_query->current_paragraph = 0; echo "
\n"; include(TEMPLATEPATH."/ads/before-post-paragraph.php"); echo "
\"".get_the_guid()."\"iconsize[1])? "width=\"".(round($post->iconsize[1]))."\" height=\"".(round($post->iconsize[0]))."\"" : "")." />
"; IF (strlen(trim(get_the_content("",false,"")))) echo "

".wp_specialchars(get_the_content(),true)."

\n"; include(TEMPLATEPATH."/ads/after-post-paragraph.php"); echo "
\n"; }ELSEIF (strlen($post->post_content)){ $obt_post_content = get_the_content(obt_translate("Keep reading")." →",0,""); $obt_post_content = preg_replace("''","",$obt_post_content); $obt_post_content = apply_filters("the_content",$obt_post_content); $obt_post_content = str_replace(']]>', ']]>', $obt_post_content); $obt_post_content = preg_replace("' (.*?)

'","

\n

\\2",$obt_post_content); echo "

\n"; obt_display_paragraphs($obt_post_content); unset($obt_post_content); echo "
\n"; include(TEMPLATEPATH."/post-pagination.php"); }ELSE{ $wp_query->paragraph_count = 1; $wp_query->current_paragraph = 0; echo "
\n"; include(TEMPLATEPATH."/ads/before-post-paragraph.php"); echo "

...

"; include(TEMPLATEPATH."/ads/after-post-paragraph.php"); echo "
\n"; }; }; }; echo "
\n"; $obt_can_edit_post = $obt_can_edit_comments = $obt_can_delete_comments = $obt_can_moderate_comments = false; IF ($user_ID){ IF (function_exists("current_user_can")){ $obt_can_edit_post = $obt_can_edit_comments = $obt_can_delete_comments = ($post->post_type == "page")? current_user_can("edit_page",$post->ID) : current_user_can("edit_post",$post->ID); $obt_can_moderate_comments = current_user_can("moderate_comments"); }ELSEIF (function_exists("user_can_edit_post_comments")){ $obt_can_edit_post = user_can_edit_post($user_ID,$post->ID); $obt_can_edit_comments = user_can_edit_post_comments($user_ID,$post->ID); $obt_can_delete_comments = user_can_delete_post_comments($user_ID,$post->ID); }; }; $obt_pending_comments = false; $obt_total_pending_comments = 0; IF ($obt_can_moderate_comments){ flush(); IF (is_single() || is_page()){ $obt_pending_comments = $wpdb->get_results("SELECT * FROM {$wpdb->comments} WHERE comment_post_ID = '{$post->ID}' AND comment_approved = '0' ORDER BY comment_date"); $obt_total_pending_comments = count($obt_pending_comments); }ELSE $obt_total_pending_comments = $wpdb->get_var("SELECT COUNT(comment_post_ID) AS total_pending_comments FROM {$wpdb->comments} WHERE comment_post_ID = '{$post->ID}' AND comment_approved = '0'"); }; IF ($obt_can_edit_post || $obt_total_pending_comments){ echo "

"; IF ($obt_total_pending_comments){ IF ($obt_total_pending_comments == 1) echo "".obt_translate("1 comment awaiting moderation").""; ELSEIF ($obt_total_pending_comments > 1) echo "".obt_translate("%1 comments awaiting moderation",$obt_total_pending_comments).""; }; IF ($obt_can_edit_post && $obt_total_pending_comments > 0) echo " | "; IF ($obt_can_edit_post){ IF (obt_wp_is_21()) echo "post_type == "page")? "page" : "post").".php?action=edit&post={$post->ID}\" title=\"".obt_translate("Edit this post")."\">".obt_translate("Edit post").""; ELSE echo "ID}\" title=\"".obt_translate("Edit this post")."\">".obt_translate("Edit post").""; }; echo "

\n"; }ELSE edit_post_link(obt_translate("Edit post"),"

","

\n"); IF ($obt_send_form) include(TEMPLATEPATH."/send.php"); ELSEIF ($obt_contact_form) include(TEMPLATEPATH."/contact-form.php"); include(TEMPLATEPATH."/ads/after-post-content.php"); flush(); ?>