change the "post added" value place
-
Hey,
So i have a theme that is in turkish but i am slowly translating it to english.
on the site i have a most viewed sidebar that gives the value of most view in this format “26 views” which is fine but underneath thier is an “when added” but after i have translated the text to enlgish to say “added week ago”, “added years ago” and “Added months ago” the number that should be in the middle is at the beginning i.e. “2 added week ago” rather than “added 2 week ago”
Below is my functions php, can anyone help?
/*********************/<br /> /* */<br /> /* Dezend for PHP5 */<br /> /* NWS */<br /> /* */<br /> /* */<br /> /*********************/</p> <p>function register_my_menus( )<br /> {<br /> register_nav_menus( array( "header-nav" => __( "Keremiya Header Menüsü" ) ) );<br /> }</p> <p>function keremiya_afis_sistemi( $meta )<br /> {<br /> global $post;<br /> if ( get_option( "keremiya_yeni" ) == "On" )<br /> {<br /> $dil = get_post_meta( $post->ID, "".$meta."", true );<br /> if ( $dil == "Girilmedi" )<br /> {<br /> echo "";<br /> }<br /> if ( $dil == "Turkce Dublaj" )<br /> {<br /> echo "<span class=\"tr-dublaj\"></span>";<br /> }<br /> if ( $dil == "Turkce Altyazi" )<br /> {<br /> echo "<span class=\"tr-altyazi\"></span>";<br /> }<br /> }<br /> }</p> <p>function keremiya_meta( $isim, $alan, $sonra )<br /> {<br /> global $post;<br /> $ozel = get_post_meta( $post->ID, "".$alan."", true );<br /> if ( $ozel != "" )<br /> {<br /> echo "<p><span>".$isim."</span>: ".$ozel."</p>";<br /> }<br /> else<br /> {<br /> echo "".$sonra."";<br /> }<br /> }</p> <p>function keremiya_resim( $uzunluk, $genislik, $hasresim )<br /> {<br /> global $post;<br /> $resim = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "".$hasresim."" );<br /> $resmim = get_post_meta( $post->ID, "resim", true );<br /> $resim_bul = keremiya_resim_bulucu( );<br /> if ( has_post_thumbnail( ) )<br /> {<br /> echo "<img src=\"".$resim[0]."\" alt=\"".get_the_title( $post->ID )."\" height=\"".$uzunluk."\" width=\"".$genislik."\" />";<br /> }<br /> else if ( $resmim != "" )<br /> {<br /> echo "<img src=\"".$resmim."\" alt=\"".get_the_title( $post->ID )."\" height=\"".$uzunluk."\" width=\"".$genislik."\" />";<br /> }<br /> else<br /> {<br /> echo "<img src=\"".$resim_bul."\" alt=\"".get_the_title( $post->ID )."\" height=\"".$uzunluk."\" width=\"".$genislik."\" />";<br /> }<br /> }</p> <p>function toplamfilm( $ilk = "Sitemizde ?uan toplam", $son = "film bulunmaktad?r." )<br /> {<br /> $toplam_film = wp_count_posts( "post" );<br /> $toplam_film = $toplam_film->publish;<br /> $b = " ";<br /> echo "<div class=\"toplamfilm\">".$ilk.$b.$toplam_film.$b.$son."</div>";<br /> }</p> <p>function keremiya_zaman( $type = "post" )<br /> {<br /> $d = "comment" == $type ? "get_comment_time" : "get_post_time";<br /> return human_time_diff( $d( "U" ), current_time( "timestamp" ) )." ".__( "?nce", "keremiya" );<br /> }</p> <p>function nezaman_yazildi( )<br /> {<br /> $gun = get_the_date( "d" );<br /> $ay = get_the_date( "m" );<br /> $yil = get_the_date( "Y" );<br /> $bugun = date( "d" );<br /> $buay = date( "m" );<br /> $buyil = date( "Y" );<br /> if ( $yil == $buyil )<br /> {<br /> if ( $ay == $buay )<br /> {<br /> if ( $gun == $bugun )<br /> {<br /> echo "Added today.";<br /> }<br /> else<br /> {<br /> $gunonce = $bugun - $gun;<br /> if ( 6 < $gunonce )<br /> {<br /> $haftaonce = round( $gunonce / 7 );<br /> echo $haftaonce." added week ago.";<br /> }<br /> else<br /> {<br /> if ( $gunonce == 1 )<br /> {<br /> echo "Added Yesterday.";<br /> }<br /> else<br /> {<br /> echo $gunonce." added days ago.";<br /> }<br /> }<br /> }<br /> }<br /> else<br /> {<br /> $ayonce = $buay - $ay;<br /> echo $ayonce." Added months ago.";<br /> }<br /> }<br /> else<br /> {<br /> $yilonce = $buyil - $yil;<br /> if ( $yilonce < 2 )<br /> {<br /> $ayonce = 12 - $ay + $buay;<br /> echo $ayonce." Added months ago.";<br /> }<br /> else<br /> {<br /> echo $yilonce." added years ago.";<br /> }<br /> }<br /> }</p> <p>function keremiya_resim_bulucu( )<br /> {<br /> global $post;<br /> global $posts;<br /> $first_img = "";<br /> ob_start( );<br /> ob_end_clean( );<br /> $output = preg_match_all( "/<img.+src=['\"]([^'\"]+)['\"][^>]*>/i", $post->post_content, $matches );<br /> $first_img = $matches[1][0];<br /> $adres = get_bloginfo( "template_url" );</p> <p> {<br /> $first_img = "{$adres}/images/no-thumbnail.png";<br /> }<br /> return $first_img;<br /> }</p> <p>function bilgi_part( $args = "" )<br /> {<br /> global $post;<br /> $bilgi = get_post_meta( $post->ID, "partbilgi", true );<br /> if ( $bilgi != "" )<br /> {<br /> echo "<span style=\"margin-right:2px;text-transform:none;\">( ".$bilgi." )</span>";<br /> }<br /> else<br /> {<br /> echo "<span style=\"margin-right:2px;text-transform:none;\">( Yüksek Kalite )</span>";<br /> }<br /> }</p> <p>function keremiya_part_sistemi( $args = "" )<br /> {<br /> $defaults = array( "before" => "".__( "".$bilgi."" ), "after" => "<span class=\"keros\"><a href="#respond">Yorum yap</a></span>", "link_before" => "<span>", "link_after" => "</span>", "echo" => 1 );<br /> $r = wp_parse_args( $args, $defaults );<br /> extract( $r, EXTR_SKIP );<br /> global $page;<br /> global $numpages;<br /> global $multipage;<br /> global $more;<br /> global $pagenow;<br /> global $pages;<br /> $bilgi_bir = get_option( "keremiya_part_bir" );<br /> $output = "";<br /> if ( $multipage )<br /> {<br /> $output .= $before;<br /> $i = 1;<br /> while ( $i < $numpages + 1 )<br /> {<br /> $part_content = $pages[$i - 1];<br /> $has_part_title = strpos( $part_content, "<!--baslik:" );<br /> if ( 0 === $has_part_title )<br /> {<br /> $end = strpos( $part_content, "-->" );<br /> $title = trim( str_replace( "<!--baslik:", "", substr( $part_content, 0, $end ) ) );<br /> }<br /> $output .= " ";<br /> if ( $i != $page || !$more && $page == 1 )<br /> {<br /> $output .= _wp_link_page( $i );<br /> }</p> <p> $output .= $link_before.$title.$link_after;<br /> if ( $i != $page || !$more && $page == 1 )<br /> {<br /> $output .= "";<br /> }<br /> $i = $i + 1;<br /> }<br /> $output .= $after;<br /> }<br /> if ( $echo )<br /> {<br /> echo $output;<br /> }<br /> return $output;<br /> }</p> <p>function keremiya_comment( $comment, $args, $depth )<br /> {<br /> $GLOBALS['comment'] = $comment;<br /> echo " <li ";<br /> comment_class( );<br /> echo " id=\"li-comment-";<br /> comment_id( );<br /> echo "\">\r\n <div id=\"comment-";<br /> comment_id( );<br /> echo "\">\r\n <div class=\"comment-author vcard\">\r\n ";<br /> echo get_avatar( $comment->comment_author_email, "30", $default = get_template_directory_uri( )."/images/gravatar.gif" );<br /> echo "\r\n ";<br /> printf( __( "<cite class=\"fn\">%s</cite> <span class=\"says\"> - </span>" ), get_comment_author_link( ) );<br /> echo "<s";<br /> echo "pan class=\"comment-zaman\">";<br /> echo keremiya_zaman( "comment" );<br /> echo " demi? ki:</span>\r\n </div>\r\n ";<br /> if ( $comment->comment_approved == "0" )<br /> {<br /> echo " <em>";<br /> _e( "Your comment is awaiting moderation." );<br /> echo "</em>\r\n \r\n ";<br /> }<br /> echo "\r\n <div class=\"comment-meta commentmetadata\"><a href=\"";<br /> echo esc_url( get_comment_link( $comment->comment_ID ) );<br /> echo "\">";<br /> printf( __( "%1\$s" ), get_comment_date( __( "F j, Y" ) ) );<br /> echo " 'de yaz?ld?.";<br /> edit_comment_link( __( "(Edit)" ), " ", "" );<br /> echo "</div>\r\n\r\n ";<br /> comment_text( );<br /> echo " </div>\r\n";<br /> }</p> <p>function keremiya_facebook( )<br /> {<br /> global $post;<br /> $fb_resim = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "single-resim" );<br /> $fb_resmim = get_post_meta( $post->ID, "resim", true );<br /> if ( is_single( ) )<br /> {<br /> if ( has_post_thumbnail( ) )<br /> {<br /> echo "<meta property=\"og:image\" content=\"".$fb_resim[0]."\" />";<br /> }<br /> else if ( $fb_resmim != "" )<br /> {<br /> echo "<meta property=\"og:image\" content=\"".$fb_resmim."\" />";<br /> }<br /> else<br /> {<br /> echo "<meta property=\"og:image\" content=\"".keremiya_resim_bulucu( )."\" />";<br /> }<br /> echo "\r\n<meta property=\"og:title\" content=\"";<br /> wp_title( "|", true, "right" );<br /> bloginfo( "name" );<br /> echo "\" />\r\n<meta property=\"og:site_name\" content=\"";<br /> bloginfo( "name" );<br /> echo "\" />\r\n<meta property=\"og:url\" content=\"";<br /> the_permalink( );<br /> echo "\" />\r\n";<br /> }<br /> }</p> <p>include_once( "framework/keremiya.php" );<br /> include_once( "framework/tema-dili.php" );<br /> include_once( "framework/likethis.php" );<br /> include_once( "framework/tema-kurulumu.php" );<br /> include_once( "framework/keremiya-yenilikleri.php" );<br /> include_once( "framework/widgets/keremiya-film-kutusu.php" );<br /> include_once( "framework/widgets/keremiya-kategoriler.php" );<br /> include_once( "framework/widgets/facebook-like-widget.php" );<br /> add_filter( "show_admin_bar", "__return_false" );<br /> remove_action( "personal_options", "_admin_bar_preferences" );<br /> remove_action( "wp_head", "rel_canonical" );<br /> global $wp_rewrite;<br /> $wp_rewrite->author_base = "profil";<br /> add_theme_support( "post-thumbnails", array( "post" ) );<br /> add_image_size( "anasayfa-resim", 119, 125, true );<br /> add_image_size( "single-resim", 125, 160, true );<br /> add_image_size( "izlenen-resim", 70, 80, true );<br /> add_image_size( "slide-resim", 110, 138, true );<br /> add_action( "init", "register_my_menus" );<br /> register_sidebar( array( "name" => "Sidebar", "id" => "sidebar", "before_widget" => "<div class=\"sidebarborder\"><div class=\"sidebar-right\">", "after_widget" => "</div></div>", "before_title" => "<h2>", "after_title" => "</h2>" ) );<br /> register_sidebar( array( "name" => "Sidebar (Anasayfa Film B?lümü)", "id" => "Anasayfa", "before_widget" => "<div class=\"filmborder\"><div class=\"filmcontent\">", "after_widget" => "</div></div>", "before_title" => "<div class=\"yazitip\">", "after_title" => "</div>" ) );<br /> register_sidebar( array( "name" => "Sidebar (Kategori)", "id" => "kategori", "before_widget" => "<div class=\"sidebarborder\"><div class=\"sidebar-right\">", "after_widget" => "</div></div>", "before_title" => "<h2>", "after_title" => "</h2>" ) );</p> <p>?><br />
Thanks in advance !
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘change the "post added" value place’ is closed to new replies.