WordPress.org

Ready to get started?Download WordPress

Forums

Gravatar Box
[resolved] Link when no Gravatar (9 posts)

  1. mathewmackenzie
    Member
    Posted 2 years ago #

    No link appears in the default avatar in cases when the user has no gravatar.

    http://wordpress.org/extend/plugins/gravatar-box/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    Works fine for me.

  3. mathewmackenzie
    Member
    Posted 2 years ago #

    Just looked into this. I am using the Under Construction plugin to mask my site until it is launched. With this plugin deactivated, the Gravatar link appears prperly. Thanks.

  4. Jaja..
    Member
    Posted 2 years ago #

    Dear Otto,

    Do you need an online (Live) website to test this plugin?

    Cause i'm still building my website and activated this plugin locally on my Mac (MAMP) and no Avatar shows up.

    Only the default WP avatar shows up but when i test with my @mail address it doesn't show my regular avatar that has been attached to my @mail ID for years.

    Also none errors in the Safari Web inspector > console and also both .js files will get loaded fine.

    So i was wondering do i need a Live website to make it work?
    Thanks,

  5. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    No, it's just javascript code. Nothing special server side. Should work on a local setup.

  6. Jaja..
    Member
    Posted 2 years ago #

    Hmm strange for me it's not working.

    Bummer..
    I really liked this function.

  7. Jaja..
    Member
    Posted 2 years ago #

    I think i found something..

    When i entered this line of code to my comments.php
    <?php comment_form(); ?>

    It works but it uses the default comment-form of WordPress.
    My theme (a little bit older) uses it's own comment-form build into the comments.php and looks like this.

    <form action="<?php echo (defined('WP_SITEURL'))? WP_SITEURL: get_bloginfo('url'); ?>/wp-comments-post.php" method="post" id="commentform">
    		<fieldset>
    			<ul>
    				<li>
    					<label for="commentsAuthor">Naam</label>
    					<input id="commentsAuthor" name="author" type="text"value="<?php echo esc_attr($comment_author); ?>" required="required" />
    				</li>
    				<li>
    					<label for="commentsEmail">Email</label>
    					<input id="commentsEmail" name="email" type="text"value="<?php echo esc_attr($comment_author_email); ?>" required="required" />
    				</li>
    				<li>
    				</li>
    				<li>
    					<label for="commentsUrl">Website</label>
    					<input id="commentsUrl" name="url" type="text"value="<?php echo esc_attr($comment_author_url); ?>" />
    				</li>
    				<li>
    					<label for="commentsComment">Het bericht</label>
    					<textarea cols="60" id="commentsComment" name="comment" rows="10"></textarea>
    				</li>
    				<li>
    					<input id="commentsSubmit" type="submit" value="Verzenden" />
    					<?php comment_id_fields(); ?>
    				</li>
    			</ul>
    		</fieldset>
    	</form>

    I think it will be a class or ID matching problem?

  8. Jaja..
    Member
    Posted 2 years ago #

    Yes that was the problem!

    So helping people troubleshoot in the future.

    Go inside the plugin folder and look for this file: gravbox.js
    open the file and see if this line of code matches the ID of the Email input form.

    $('#email').blur(function () {

    #email should have the same name as <input id="here" ....>

    In my case i had to change #email to -> commentsEmail inside the gravbox.js

  9. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    I would have changed the theme to be using the correct ID's instead, but either way works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic