Forum Replies Created

Viewing 15 replies - 181 through 195 (of 205 total)
  • Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    No. User A can not see the comments from user B. And B can not see A.

    But both have the same 6 forms. With the same information.

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Im not sure about the cheese and the flowers ??

    All i can tell is that i need like 10 fields on one page.

    How are you fealing today? (example not what its gonna be)
    ///input///

    Do you like cheese? (example not what its gonna be)
    ///input///

    When did you last eat candy? (example not what its gonna be)
    ///input///

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    “I don’t blame you if you do not want to deal with me any more.”

    Dont worry man. I’m really happy that your helping me at all. Ill gonna have the code above a try. With all the information that you give me i have been looking for some alts myself. And i like to have your opinion about the plugins. And if i can use this. Cus i maybe still want the option to edit the comments in the back of wordpress.

    1) custom-metadata
    2) easy-custom-fields
    3) Custom-Metaboxes-and-Fields-for-WordPress

    I have been looking at this plugins and tryed some. But its all magic for me on how to get it to work. And i mis the information to know if this can be used in my case.

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    I Think multiple templates is the best way for me. It can easily be changed bij admin per page in the wordpress back.

    Im still using your bcw_ so i changed the following code:

    if( current_user_can('like_cheese')) echo 'Favorite cheese? <input type="text" name="bcw_test" id="bcw_test" size="22" />';
    else if( current_user_can('like_flowers')) echo 'Favorite flower? <input type="text" name="bcw_test" id="bcw_test" size="22" />';
    else echo 'What do you like? <input type="text" name="bcw_test" id="bcw_test" size="22" />';

    But when i put this to the comment.php it gives me a total of 3 fields now. One is the standaard comment_input. One is the get_comment_meta located in the function. And the last is this new comment input “What do you like?”. When i put something in all the 3 fields it gives me only the result from the normal comment_input and the bcw_test located in function.php.

    I need to remove the one from function and the standaard comment box. To remove the one from function i need to remove this code?:

    // Add extra field to comment form
    function add_bcw_fields(){
    echo '<input type="text" name="test" id="test" size="22" />';
    }
    add_action( 'comment_form_logged_in_after', 'add_bcw_fields' );

    But how to disable the normal comment?

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    If i’m correct i can use the code on the following way in the comment.php.

    https://pastebin.com/raw.php?i=ZiqrfCz2

    Why do i want templates?: I can easly copy the 6 pages with the correct template selected on it in WordPress with a plugin.

    And im not sure how you whant me to change it to a dynamically include page…(<?php include ‘page1code.php’; ?>)? And put the same code there ?

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    “Is there anything in my assumption that is not correct?”
    I think its the following:

    “Why was this commented out version not working for you?”

    It works good for me…But i still need 6 diffrent pages. Atm i can add fields to the standaard comment that will be the same for every page that you will make on the website. So i thougt i needed to remove the <?php echo get_comment_meta( $comment->comment_ID, ‘bcw_test’, true ); ?> from the function.php. But i think this can be in the function.php but i still need to change the input fields display. See below.

    But in my case i need to have like 6 diffrent comment forms.

    Like the following

    Page1
    Do you like cheese?:
    /////input field/////

    Do you like candy?:
    /////input field/////

    (Submit button)

    Page2
    Do you like flowers?:
    /////input field/////

    Do you like cats or dogs?:
    /////input field/////

    (Submit button)

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    I got it almoost to working. I can now add custom fields to the reply field in a comment.php and this way i can make custom templates that i can load for specific pages.

    But i have the add field function in the function.php this adds the field below the reply. If i whant to put this on every comment.php it will give me a error.

    This: comment.php is what i have for a comment.php that will show the correct field in the correct places.

    And this code: function.php is still located in the function.php that makes the field and places it in the comment place.

    I have to get this code from function.php and place it in the comment.php whit out getting errors…

    Putting the code <?php echo get_comment_meta( $comment->comment_ID, ‘bcw_test’, true ); ?> in the comment.php works… But that only works for the first post. If i want to post a new comment the line will disapear and will only be show in the new comment.

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Ill try to explain it beter. Cus i dont realy understand how this “user meta” is working.

    Totaal 10(will be more) users that can login to the website with his own login information.

    They will only see a standaard menu. This menu will be the same for all the user that will login. Cuz im gonna try to put all the pages on 1 layout and use the scroll function Go to page one. This will be linked on the custom title of that page.

    At the backand i have to create 6 pages per person. However all these pages will have the same template. This way all the comment field will be the same for every user and the menu will always work. I only have to set (with a plugin) that those 6 pages can be shown by a specific user. This way thy will not see all the other 6x pages that are on the website.

    But if im correct im gonna get a problem with the <?php echo get_comment_meta( $comment->comment_ID, ‘bcw_test’, true ); ?>

    If user1 posts a comment on his page than user2 will see this comment ?

    To change the comment_form or poiting out the following?: Comments_template_Filter

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Thx bcworkz that works like a charm.

    I tryed to customize some information but i think i need some facts if you can tell me. I hope the below is posibble in some way.

    I need to do the following exemple:

    1) Make: 10 logins(customers)
    2) Make: 6 pages a person (totaal 60 pages)
    3) Make: custom fields for this 6 pages

    I was thinking to do this my makeing this custom fields in the function.php and put the correct fields in a comment.php. This way i simple need to make 6x a diffrent comment.php. And include the correct comment.php this will replace the <?php comments_template(); ?>.

    Seems this isnt realy how it works. I can place the code from the function to the comment.php. This way i can edit it on the normal comment.php just like in the function.php. The error will come when i try to add <?php include ‘comment.php’; ?>.

    Code function.php now:
    Code comment.php now: https://pastebin.com/raw.php?i=j4Gnbwm2

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    I think it must be working. But the problem that the field is not showing is because im logged in? The website can only be shown when logged in. So i need to place the correct code… in the correct posistion or edit a line for this field?

    And dont i need to edit this:
    update_comment_meta( $id, ‘bcw_test’, $_POST[‘test’]);
    to:
    update_comment_meta( $id, ‘test’, $_POST[‘test’]);

    https://pastebin.com/embed_js.php?i=LJ7T8gCe&#8221;

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Im not sure how to add that 2 lines of code and where…Maybe like this below?

    function bcw_handle_comment($id) {
    if (array_key_exists(‘test’, $_POST))
    update_comment_meta( $id, ‘bcw_test’, $_POST[‘test’]);
    }
    add_action(‘wp_insert_comment’, ‘bcw_handle_comment’);

    //////////

    <div class=”comment-body”><?php comment_text(); ?></div>
    <div class=”comment-body”><?php add_bcw_fields(); ?></div>
    <div class=”comment-body”><?php bcw_handle_comment(); ?></div>
    <?php echo get_comment_meta( $comment->comment_ID, ‘bcw_test’, true ); ?>

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Though I haven’t done so, you can also add a metabox to the edit-comment screen that allows admin editing of the field.

    This would make it all easyer. But my main point now is to get it to work that the customer(client) can see what he/she posted. As a admin i just need to remove the comment when needed.

    Do i still need this in the comment.php?

    <?php comment_form(); ?>
    
    <p><input type="text" name="bcw_test" id="bcw_test" size="22" />
    <label for="url"><small>test</small></label></p>
    
    </div><!-- #comments -->

    Total function.php code now: This will not give me a new comment fiel to type. I can only see the comment field that i placed in the comment.php

    function bcw_handle_comment($id) {
       if (array_key_exists('test', $_POST))
          update_comment_meta( $id, 'bcw_test', $_POST['test']);
    }
    add_action('wp_insert_comment', 'bcw_handle_comment');
    
    function twentyten_comment( $comment, $args, $depth ) {
    	$GLOBALS['comment'] = $comment;
    	switch ( $comment->comment_type ) :
    		case '' :
    	?>
    	<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, 40 ); ?>
    				<?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    			</div><!-- .comment-author .vcard -->
    			<?php if ( $comment->comment_approved == '0' ) : ?>
    				<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
    				<br />
    			<?php endif; ?>
    
    			<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
    				<?php
    					/* translators: 1: date, 2: time */
    					printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    				?>
    			</div><!-- .comment-meta .commentmetadata -->
    
    			<div class="comment-body"><?php comment_text(); ?></div>
                <?php echo get_comment_meta( $comment->comment_ID, 'bcw_test', true ); ?>
    
    			<div class="reply">
    				<?php /* <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> */ ?>
    			</div><!-- .reply -->
    		</div><!-- #comment-##  -->
    
    	<?php
    			break;
    		case 'pingback'  :
    		case 'trackback' :
    	?>
    	<li class="post pingback">
    		<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>
    	<?php
    			break;
    	endswitch;
    }
    endif;
    
    /**
     * Register widgetized areas, including two sidebars and four widget-ready columns in the footer.
     *
     * To override twentyten_widgets_init() in a child theme, remove the action hook and add your own
     * function tied to the init hook.
     *
     * @since Twenty Ten 1.0
     * @uses register_sidebar
     */
    function twentyten_widgets_init() {
    	// Area 1, located at the top of the sidebar.
    	register_sidebar( array(
    		'name' => __( 'Primary Widget Area', 'twentyten' ),
    		'id' => 'primary-widget-area',
    		'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	// Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
    	register_sidebar( array(
    		'name' => __( 'Secondary Widget Area', 'twentyten' ),
    		'id' => 'secondary-widget-area',
    		'description' => __( 'An optional secondary widget area, displays below the primary widget area in your sidebar.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	// Area 3, located in the footer. Empty by default.
    	register_sidebar( array(
    		'name' => __( 'First Footer Widget Area', 'twentyten' ),
    		'id' => 'first-footer-widget-area',
    		'description' => __( 'An optional widget area for your site footer.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	// Area 4, located in the footer. Empty by default.
    	register_sidebar( array(
    		'name' => __( 'Second Footer Widget Area', 'twentyten' ),
    		'id' => 'second-footer-widget-area',
    		'description' => __( 'An optional widget area for your site footer.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	// Area 5, located in the footer. Empty by default.
    	register_sidebar( array(
    		'name' => __( 'Third Footer Widget Area', 'twentyten' ),
    		'id' => 'third-footer-widget-area',
    		'description' => __( 'An optional widget area for your site footer.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	// Area 6, located in the footer. Empty by default.
    	register_sidebar( array(
    		'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
    		'id' => 'fourth-footer-widget-area',
    		'description' => __( 'An optional widget area for your site footer.', 'twentyten' ),
    		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    		'after_widget' => '</li>',
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    }
    /** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
    add_action( 'widgets_init', 'twentyten_widgets_init' );
    
    /**
     * Removes the default styles that are packaged with the Recent Comments widget.
     *
     * To override this in a child theme, remove the filter and optionally add your own
     * function tied to the widgets_init action hook.
     *
     * This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1
     * to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles,
     * but they won't have any effect on the widget in default Twenty Ten styling.
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_remove_recent_comments_style() {
    	add_filter( 'show_recent_comments_widget_style', '__return_false' );
    }
    add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
    
    if ( ! function_exists( 'twentyten_posted_on' ) ) :
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_posted_on() {
    	printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
    		'meta-prep meta-prep-author',
    		sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
    			get_permalink(),
    			esc_attr( get_the_time() ),
    			get_the_date()
    		),
    		sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    			get_author_posts_url( get_the_author_meta( 'ID' ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    			get_the_author()
    		)
    	);
    }
    endif;
    
    if ( ! function_exists( 'twentyten_posted_in' ) ) :
    /**
     * Prints HTML with meta information for the current post (category, tags and permalink).
     *
     * @since Twenty Ten 1.0
     */
    function twentyten_posted_in() {
    	// Retrieves tag list of current post, separated by commas.
    	$tag_list = get_the_tag_list( '', ', ' );
    	if ( $tag_list ) {
    		$posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	} elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
    		$posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	} else {
    		$posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
    	}
    	// Prints the string, replacing the placeholders.
    	printf(
    		$posted_in,
    		get_the_category_list( ', ' ),
    		$tag_list,
    		get_permalink(),
    		the_title_attribute( 'echo=0' )
    	);
    }
    endif;

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    Dear bcworkz,

    Your gonna make me happy! Im almoost there i think…

    This is what i have in my function.php.
    I placed the following codes in 2 places in the function.php to test. But this isnt working:

    <?php print $comment->test; ?>

    function add_bcw_fields($fields){
    	$fields['test'] = '<input type="text" name="test" id="test" size="22" />';
    	return $fields;
    }
    add_filter( 'comment_form_default_fields', 'add_bcw_fields' );
    
    function twentyten_comment( $comment, $args, $depth ) {
    	$GLOBALS['comment'] = $comment;
    	switch ( $comment->comment_type ) :
    		case '' :
    	?>
    	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    		<div id="comment-<?php comment_ID(); ?>"><?php echo $comment->test; ?>
    
    			<div class="comment-author vcard">
    				<?php echo get_avatar( $comment, 40 ); ?>
    				<?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    			</div><!-- .comment-author .vcard -->
    			<?php if ( $comment->comment_approved == '0' ) : ?>
    				<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
    				<br />
    			<?php endif; ?>
    
    			<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
    				<?php
    					/* translators: 1: date, 2: time */
    					printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    				?>
    			</div><!-- .comment-meta .commentmetadata -->
    
    			<div class="comment-body"><?php comment_text(); ?><?php print $comment->test; ?></div>
    
    			<div class="reply">
    				<?php /* <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> */ ?>
    			</div><!-- .reply -->
    		</div><!-- #comment-##  -->
    
    	<?php
    			break;
    		case 'pingback'  :
    		case 'trackback' :
    	?>
    	<li class="post pingback">
    		<p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p>
    	<?php
    			break;
    	endswitch;
    }
    endif;
    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    I think i found it with the following plugin: https://blog.ideashower.com/post/15147134893/wordpress-plugin-extra-comment-fields

    But when i get to the part to show the result from the command im a bit lost…The code below is from mij comment.php i did ad the code:
    test?: <?php print $comment->extra_test; ?>

    <?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form. The actual display of comments is
     * handled by a callback to twentyten_comment which is
     * located in the functions.php file.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?>
    
    			<div id="comments">
    <?php if ( post_password_required() ) : ?>
    				<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
    			</div><!-- #comments -->
    <?php
    		/* Stop the rest of comments.php from being processed,
    		 * but don't kill the script entirely -- we still have
    		 * to fully load the template.
    		 */
    		return;
    	endif;
    ?>
    
    <?php
    	// You can start editing here -- including this comment!
    ?>
    
    <?php if ( have_comments() ) : ?>
    			<h3 id="comments-title"><?php
    			printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    			number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    			?></h3>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    			</div> <!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    			<ol class="commentlist">
    				<?php
    					/* Loop through and list the comments. Tell wp_list_comments()
    					 * to use twentyten_comment() to format the comments.
    					 * If you want to overload this in a child theme then you can
    					 * define twentyten_comment() and that will be used instead.
    					 * See twentyten_comment() in twentyten/functions.php for more.
    					 */
    					wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
    				?>
    
    			test?: <?php print $comment->extra_test; ?>
    
    			</ol>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">&larr;</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    			</div><!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    	<?php
    	/* If there are no comments and comments are closed, let's leave a little note, shall we?
    	 * But we only want the note on posts and pages that had comments in the first place.
    	 */
    	if ( ! comments_open() && get_comments_number() ) : ?>
    		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
    	<?php endif;  ?>
    
    <?php endif; // end have_comments() ?>
    
    <?php comment_form(); ?>
    <p><input type="text" name="test" id="test" size="22" />
    <label for="url"><small>test</small></label></p>
    
    </div><!-- #comments -->

    Forum: Hacks
    In reply to: Add a comment field
    Thread Starter Taro

    (@sicktb)

    I think i found it with the following plugin: https://blog.ideashower.com/post/15147134893/wordpress-plugin-extra-comment-fields

    But when i get to the part to show the result from the command im a bit lost…The code below is from mij comment.php i did ad the code:
    test?: <?php print $comment->extra_test; ?>

    <?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form. The actual display of comments is
     * handled by a callback to twentyten_comment which is
     * located in the functions.php file.
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?>
    
    			<div id="comments">
    <?php if ( post_password_required() ) : ?>
    				<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
    			</div><!-- #comments -->
    <?php
    		/* Stop the rest of comments.php from being processed,
    		 * but don't kill the script entirely -- we still have
    		 * to fully load the template.
    		 */
    		return;
    	endif;
    ?>
    
    <?php
    	// You can start editing here -- including this comment!
    ?>
    
    <?php if ( have_comments() ) : ?>
    			<h3 id="comments-title"><?php
    			printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    			number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    			?></h3>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    			</div> <!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    			<ol class="commentlist">
    				<?php
    					/* Loop through and list the comments. Tell wp_list_comments()
    					 * to use twentyten_comment() to format the comments.
    					 * If you want to overload this in a child theme then you can
    					 * define twentyten_comment() and that will be used instead.
    					 * See twentyten_comment() in twentyten/functions.php for more.
    					 */
    					wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
    				?>
    
    			test?: <?php print $comment->extra_test; ?>
    
    <?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
    			<div class="navigation">
    				<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div>
    				<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    			</div><!-- .navigation -->
    <?php endif; // check for comment navigation ?>
    
    	<?php
    	/* If there are no comments and comments are closed, let's leave a little note, shall we?
    	 * But we only want the note on posts and pages that had comments in the first place.
    	 */
    	if ( ! comments_open() && get_comments_number() ) : ?>
    		<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentyten' ); ?></p>
    	<?php endif;  ?>
    
    <?php endif; // end have_comments() ?>
    
    <?php comment_form(); ?>
    <p><input type="text" name="test" id="test" size="22" />
    <label for="url"><small>test</small></label></p>
    
    </div><!-- #comments --></blockquote>
    </a>

    [Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]

Viewing 15 replies - 181 through 195 (of 205 total)