Support » Plugin: wp-Monalisa » Change the location of the smileys

  • Resolved Mael Shanti

    (@mael-shanti)


    Hello !
    After reading the relevant topics in this forum, I didn’t find any solution to my request, so here I am to ask you a question ! 🙂

    Actually, I would like to display the smilies list right under the comment textarea instead of under the “Post a comment” button. I’d like the smilies to be displayed between the comment textarea and the list of html tags it’s possible to use, actually. So would it be possible to add a “location” option to the plugin, or to help me doing this by editing the templates ? (I don’t have any coding skills unfortunately)

    Many thanks for your help, and have a nice week-end !
    Regards,
    Maël.

    https://wordpress.org/plugins/wp-monalisa/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author tuxlog

    (@tuxlog)

    Did you try http://www.tuxlog.de/wordpress/2009/wp-monalisa-manual/#sechs ?
    In most cases this depends on your theme too, so it would be good to have an idea what you are using.

    Thread Starter Mael Shanti

    (@mael-shanti)

    Hi Tuxlog,
    Thanks for replying !

    Actually I do not know where to put the custom code you sent me to…
    Where should I post it regarding this line : <?php comment_form(); ?> ?

    I am using the theme Visual and here is a link to my blog if this can help you : http://www.maelshanti.com/
    Thanks again !

    Plugin Author tuxlog

    (@tuxlog)

    Normally it is placed in comments.php but depends on your theme

    Thread Starter Mael Shanti

    (@mael-shanti)

    Yup, I understood that, but I mean… Where should I insert the code in the the comment.php file ? At what location in the file itself ? Because I do not find where to paste it…

    Plugin Author tuxlog

    (@tuxlog)

    Look for comment_form and replace it with the code from the manual:

    $args = array(
    ‘comment_notes_after’ = get_wpml_comment(),
    ‘comment_notes_before’ = ‘The Smilies are below.’,
    );
    comment_form($args);

    Thread Starter Mael Shanti

    (@mael-shanti)

    Looks like it creates a bug, unless I made a mistake…

    By replacing comment_form by your code, here’s the result :

    <?php $args = array(
                 'comment_notes_after' = get_wpml_comment(),
                 'comment_notes_before' = 'The Smilies are below.',
                 );
            comment_form($args); ?>

    And see what it does…
    Before changing code : http://nsa34.casimages.com/img/2014/08/17/140817020606846160.jpg
    After changing code : http://nsa34.casimages.com/img/2014/08/17/140817020645780635.jpg

    So it makes the sidebar and the comment form totally disappear… Any idea of what the problem is ?
    Thanks for helping, that’s great ! 🙂

    Plugin Author tuxlog

    (@tuxlog)

    Can you paste the whole file comments.php where you changed it please.

    Thread Starter Mael Shanti

    (@mael-shanti)

    Before changing it :

    <?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 visual_comment() which is
     * located in the functions.php file.
     *
     * @package Visual
     * @since Visual 0.1
     */
    ?>
    
    <?php
    	/*
    	 * If the current post is protected by a password and
    	 * the visitor has not yet entered the password we will
    	 * return early without loading the comments.
    	 */
    	if ( post_password_required() )
    		return;
    ?>
    
    	<div id="comments" class="comments-area">
    
    	<?php // You can start editing here -- including this comment! ?>
    
    	<?php if ( have_comments() ) : ?>
    		<h2 class="comments-title">
    			<?php
    				printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'visual' ),
    					number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    			?>
    		</h2>
    
    		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    		<nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation">
    			<h1 class="assistive-text"><?php _e( 'Comment navigation', 'visual' ); ?></h1>
    			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'visual' ) ); ?></div>
    			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'visual' ) ); ?></div>
    		</nav><!-- #comment-nav-before .site-navigation .comment-navigation -->
    		<?php endif; // check for comment navigation ?>
    
    		<ol class="commentlist">
    			<?php
    				/* Loop through and list the comments. Tell wp_list_comments()
    				 * to use visual_comment() to format the comments.
    				 * If you want to overload this in a child theme then you can
    				 * define visual_comment() and that will be used instead.
    				 * See visual_comment() in inc/template-tags.php for more.
    				 */
    				wp_list_comments( array( 'callback' => 'visual_comment' ) );
    			?>
    		</ol><!-- .commentlist -->
    
    		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    		<nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
    			<h1 class="assistive-text"><?php _e( 'Comment navigation', 'visual' ); ?></h1>
    			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'visual' ) ); ?></div>
    			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'visual' ) ); ?></div>
    		</nav><!-- #comment-nav-below .site-navigation .comment-navigation -->
    		<?php endif; // check for comment navigation ?>
    
    	<?php endif; // have_comments() ?>
    
    	<?php
    		// If comments are closed and there are comments, let's leave a little note, shall we?
    		if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
    	?>
    		<p class="nocomments"><?php _e( 'Comments are closed.', 'visual' ); ?></p>
    	<?php endif; ?>
    
    	<?php comment_form(); ?>
    
    </div><!-- #comments .comments-area -->

    After changing it :

    <?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 visual_comment() which is
     * located in the functions.php file.
     *
     * @package Visual
     * @since Visual 0.1
     */
    ?>
    
    <?php
    	/*
    	 * If the current post is protected by a password and
    	 * the visitor has not yet entered the password we will
    	 * return early without loading the comments.
    	 */
    	if ( post_password_required() )
    		return;
    ?>
    
    	<div id="comments" class="comments-area">
    
    	<?php // You can start editing here -- including this comment! ?>
    
    	<?php if ( have_comments() ) : ?>
    		<h2 class="comments-title">
    			<?php
    				printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'visual' ),
    					number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
    			?>
    		</h2>
    
    		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    		<nav role="navigation" id="comment-nav-above" class="site-navigation comment-navigation">
    			<h1 class="assistive-text"><?php _e( 'Comment navigation', 'visual' ); ?></h1>
    			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'visual' ) ); ?></div>
    			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'visual' ) ); ?></div>
    		</nav><!-- #comment-nav-before .site-navigation .comment-navigation -->
    		<?php endif; // check for comment navigation ?>
    
    		<ol class="commentlist">
    			<?php
    				/* Loop through and list the comments. Tell wp_list_comments()
    				 * to use visual_comment() to format the comments.
    				 * If you want to overload this in a child theme then you can
    				 * define visual_comment() and that will be used instead.
    				 * See visual_comment() in inc/template-tags.php for more.
    				 */
    				wp_list_comments( array( 'callback' => 'visual_comment' ) );
    			?>
    		</ol><!-- .commentlist -->
    
    		<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
    		<nav role="navigation" id="comment-nav-below" class="site-navigation comment-navigation">
    			<h1 class="assistive-text"><?php _e( 'Comment navigation', 'visual' ); ?></h1>
    			<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'visual' ) ); ?></div>
    			<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'visual' ) ); ?></div>
    		</nav><!-- #comment-nav-below .site-navigation .comment-navigation -->
    		<?php endif; // check for comment navigation ?>
    
    	<?php endif; // have_comments() ?>
    
    	<?php
    		// If comments are closed and there are comments, let's leave a little note, shall we?
    		if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
    	?>
    		<p class="nocomments"><?php _e( 'Comments are closed.', 'visual' ); ?></p>
    	<?php endif; ?>
    
    	<?php $args = array(
                 'comment_notes_after' = get_wpml_comment(),
                 'comment_notes_before' = 'The Smilies are below.',
                 );
            comment_form($args); ?>
    
    </div><!-- #comments .comments-area -->

    (So I made the changes at the end of the file)

    Plugin Author tuxlog

    (@tuxlog)

    Your changes look good but I think I missed the =>

    Sorry, please try

    $args = array(
    ‘comment_notes_after’ => get_wpml_comment(),
    ‘comment_notes_before’ => ‘The Smilies are below.’,
    );
    comment_form($args);

    Thread Starter Mael Shanti

    (@mael-shanti)

    This works perfectly, indeed !
    Thank you very much for your help ! That’s great ! And no problem, we all make little mistakes 🙂

    My issue is finally resolved then 🙂
    Thanks again !

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change the location of the smileys’ is closed to new replies.