• 21-01-2010, 12:14:20
    #1
    Warning: preg_match() [function.preg-match]: Unknown modifier 'V' in /home/...../public_html/...../wp-content/themes/redcarpet/functions.php on line 85

    arkadaslar temada bu hatayı alıyorum ana sayfadayken birşey yok fakat bir konuya tıklayınca headerda bu çıkıyor.İlk kurduğumda güzeldi fakat sonra ne olduysa böyle hata verdi.
  • 21-01-2010, 17:28:30
    #2
    Üyeliği durduruldu
    belirtilen functions.php'yi buraya yapıştırın.
  • 21-01-2010, 18:31:45
    #3
    <?php
    
    /********************************************************************
    GLOBAL CALL
    ********************************************************************/
    
    $cpanel['name'] = 'mytheme';
    $cpanel['lib'] = TEMPLATEPATH.'/cpanel/lib.php';
    $cpanel['cpanel'] = TEMPLATEPATH.'/cpanel/cpanel.php';
    $cpanel['modules_dir'] = TEMPLATEPATH.'/cpanel/modules/';
    $cpanel['img_dir'] = get_template_directory_uri().'/cpanel/img/';
    $cpanel['js_dir'] = get_template_directory_uri().'/cpanel/js/';
    $cpanel['css_dir'] = get_template_directory_uri().'/cpanel/css/';
    require_once $cpanel['lib'];
    require_once $cpanel['cpanel'];
    
    /********************************************************************
    *********************************************************************
    ********************************************************************/
    
    /********************************************************************
    register sidebar widgets
    ********************************************************************/
    if (function_exists('register_sidebar'))
    
    register_sidebar(array(
    'name' => 'Left Sidebar',
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2>',
    'after_title' => '</h2>'
    ));
    
    register_sidebar(array(
    'name' => 'Right Sidebar',
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2>',
    'after_title' => '</h2>'
    ));
    
    /********************************************************************
    loading a custom archive for (category)
    ********************************************************************/
    function get_custom_archive($c) {
    
    	global $options;
    	
    	$the_cat = get_category_parents($c, FALSE, ' ', FALSE);
    
    	$video = get_cat_name($options['videos_id']);
    	$gallery = get_cat_name($options['photos_id']);
    
    	$search_a = '/^'. $video .'/';
    	$search_b = '/^'. $gallery .'/';
    	
    	if (preg_match($search_a, $the_cat)) {
    		include TEMPLATEPATH. '/category_videos.php';
    	} elseif (preg_match($search_b, $the_cat)) {
    		include TEMPLATEPATH. '/category_photos.php';
    	} else {
    		include TEMPLATEPATH. '/category_news.php';
    	}
    	
    }
    
    /********************************************************************
    loading a custom single post template
    ********************************************************************/
    function get_custom_post() {
    
    	global $post, $options;
    	$get_post_cat = wp_get_post_categories($post->ID);
    	foreach($get_post_cat as $catid ) {
    	$cat = get_category($catid);
    	$the_cat = get_category_parents($cat->cat_ID, FALSE, ' ', FALSE);
    	}
    	
    	$video = get_cat_name($options['videos_id']);
    	$gallery = get_cat_name($options['photos_id']);
    	
    	$search_a = '/^'. $video .'/';
    	$search_b = '/^'. $gallery .'/';
    	
    	if (preg_match($search_a, $the_cat)) {
    		include TEMPLATEPATH. '/single_videos.php';
    	} elseif (preg_match($search_b, $the_cat)) {
    		include TEMPLATEPATH. '/single_photos.php';
    	} else {
    		include TEMPLATEPATH. '/single_news.php';
    	}
    	
    }
    
    /********************************************************************
    excluded photos and videos IDs
    ********************************************************************/
    $excluded = array();
    $included_vid = array();
    $included_pic = array();
    
    $video_childs = get_categories('child_of='.$options['videos_id']);
    $pic_childs = get_categories('child_of='.$options['photos_id']);
    
    foreach($video_childs as $video_child) {
    array_push($excluded, $video_child->cat_ID);
    }
    
    foreach($video_childs as $video_child) {
    array_push($included_vid, $video_child->cat_ID);
    }
    
    foreach($pic_childs as $pic_child) {
    array_push($included_pic, $pic_child->cat_ID);
    }
    
    array_push($excluded, $options['photos_id']);
    array_push($excluded, $options['videos_id']);
    array_push($included_vid, $options['videos_id']);
    array_push($included_pic, $options['photos_id']);
    
    /********************************************************************
    custom comment display
    ********************************************************************/
    function mytheme_comment($comment, $args, $depth) {
    $GLOBALS['comment'] = $comment; ?>
    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    
    	<div id="comment-<?php comment_ID(); ?>">
    
    		<div class="comment-author vcard">
    		<?php echo get_avatar($comment,$size='48',$default=''); ?>
    		<cite class="fn"><?php print get_comment_author_link(); ?></cite>
    		</div>
    
    		<div class="comment-meta commentmetadata">
    		<a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">Posted on <?php print get_comment_date(); ?> at <?php print get_comment_time(); ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?>
    		</div>
    
    		<?php comment_text() ?>
    
    		<div class="reply">
    		<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    		</div>
    
    	</div><div class="clear"></div>
    <?php
    }
    
    ?>
    buyur hocam
  • 21-01-2010, 19:40:09
    #4
    Üyeliği durduruldu
    redcarpet'ta, video, resim ve haber için ayrı sayfa düzenleri varmış. hangi sayfa biçimi olduğunu belirten kod hata veriyor.

    buradan indirip baktım. functions.php kodları farklı. bir de bunu deneyin.

    redcarpet artık paralıymış ama paralı olan pro sürüm anlaşılan. bu sürümü bedava gibi duruyor.
  • 21-01-2010, 21:31:43
    #5
    yok hocam olmadı o ingilizce tema benimkisi türkçe tema o yüzden farklılık var yer değiştirdiğimde de hiç açılmadı