Wsparcie » Używanie i konfiguracja WordPressa » Jak wsawić entery w opiniach motywu WP Customer Reviews?

  • Witam. Problem w tym że po uzupełnieniu opinii i zaakceptowaniu jej przez administratora strony wszystkie zdefiniowane pola są w jednej linii czyli np.
    Imie: xxx Nazwisko: xxx Temat: xxxx
    a chce zrobić to tak:
    -Imie: xxx
    Nazwisko: xxx
    Temat: xxxx
    Jeśli ktoś wie to proszę dać mi znać które linie kodu za to odpowiadają?

Viewing 5 replies - 1 through 5 (of 5 total)
  • comments_template() is located in wp-includes/comment-template.php.

    oraz jakiś plik szablonu w nazwie zawierający „comment”

    Polecam Notepad++ – przez niego masowe szukanie w plikach jest o wiele szybsze niz na piechote

    Thread Starter mzcv

    (@mzcv)

    Dzięki 'mojeprogramy.com’ za zainteresowaniem tematem. Mam już fragment kodu funkcji comments_template jednak nie wiem gdzie to zmienić:

    function comments_template( $file = '/comments.php', $separate_comments = false ) {
    	global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
    
    	if ( !(is_single() || is_page() || $withcomments) || empty($post) )
    		return;
    
    	if ( empty($file) )
    		$file = '/comments.php';
    
    	$req = get_option('require_name_email');
    
    	/*
    	 * Comment author information fetched from the comment cookies.
    	 */
    	$commenter = wp_get_current_commenter();
    
    	/*
    	 * The name of the current comment author escaped for use in attributes.
    	 * Escaped by sanitize_comment_cookies().
    	 */
    	$comment_author = $commenter['comment_author'];
    
    	/*
    	 * The email address of the current comment author escaped for use in attributes.
    	 * Escaped by sanitize_comment_cookies().
    	 */
    	$comment_author_email = $commenter['comment_author_email'];
    
    	/*
    	 * The url of the current comment author escaped for use in attributes.
    	 */
    	$comment_author_url = esc_url($commenter['comment_author_url']);
    
    	$comment_args = array(
    		'order'   => 'ASC',
    		'orderby' => 'comment_date_gmt',
    		'status'  => 'approve',
    		'post_id' => $post->ID,
    	);
    
    	if ( $user_ID ) {
    		$comment_args['include_unapproved'] = array( $user_ID );
    	} elseif ( ! empty( $comment_author_email ) ) {
    		$comment_args['include_unapproved'] = array( $comment_author_email );
    	}
    
    	$comments = get_comments( $comment_args );
    
    	/**
    	 * Filter the comments array.
    	 *
    	 * @since 2.1.0
    	 *
    	 * @param array $comments Array of comments supplied to the comments template.
    	 * @param int   $post_ID  Post ID.
    	 */
    	$wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
    	$comments = &$wp_query->comments;
    	$wp_query->comment_count = count($wp_query->comments);
    	update_comment_cache($wp_query->comments);
    
    	if ( $separate_comments ) {
    		$wp_query->comments_by_type = separate_comments($comments);
    		$comments_by_type = &$wp_query->comments_by_type;
    	}
    
    	$overridden_cpage = false;
    	if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
    		set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
    		$overridden_cpage = true;
    	}
    
    	if ( !defined('COMMENTS_TEMPLATE') )
    		define('COMMENTS_TEMPLATE', true);
    
    	$theme_template = STYLESHEETPATH . $file;
    	/**
    	 * Filter the path to the theme template file used for the comments template.
    	 *
    	 * @since 1.5.1
    	 *
    	 * @param string $theme_template The path to the theme template file.
    	 */
    	$include = apply_filters( 'comments_template', $theme_template );
    	if ( file_exists( $include ) )
    		require( $include );
    	elseif ( file_exists( TEMPLATEPATH . $file ) )
    		require( TEMPLATEPATH . $file );
    	else // Backward compat code will be removed in a future release
    		require( ABSPATH . WPINC . '/theme-compat/comments.php');
    }

    ??

    Bo zaraz pod tym powyższym kodem jest znów kod chyba odpowiadający za wyświetlanie komentarzy:

    function comments_popup_script( $width = 400, $height = 400, $file = '' ) {
    	global $wpcommentspopupfile, $wpcommentsjavascript;
    
    	if (empty ($file)) {
    		$wpcommentspopupfile = '';  // Use the index.
    	} else {
    		$wpcommentspopupfile = $file;
    	}
    
    	$wpcommentsjavascript = 1;
    	$javascript = "<script type='text/javascript'>\nfunction wpopen (macagna) {\n    window.open(macagna, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";
    	echo $javascript;
    }

    Nie mam zielonego pojęcia jak to zrobić dlatego proszę o pomoc.

    Thread Starter mzcv

    (@mzcv)

    Także proszę o informację gdzie i jak te 'entery’ wstawić w kodzie.

    Thread Starter mzcv

    (@mzcv)

    Panowie i może też panie, bardzo proszę o pomoc w powyższym temacie. 🙁

    Od wyświetlania tych komentarzy jest raczej:
    wp-customer-reviews.php, stawiałbym na linie 1051-1087 ale specjalistą od php nie jestem, jest to bardziej przeczucie.

    Najpierw spróbowałbym pobawić się w CSS, plik jest bardzo mały i przejrzysty plus do każdej sekcji są komentarze.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Temat ‘Jak wsawić entery w opiniach motywu WP Customer Reviews?’ jest zamknięty na nowe odpowiedzi.