Plugin Directory

Changeset 225202


Ignore:
Timestamp:
04/04/2010 01:00:32 PM (16 years ago)
Author:
nkuttler
Message:

add select form to comment_form action. plugin works out of the box.

Location:
custom-avatars-for-comments/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • custom-avatars-for-comments/trunk/inc/admin.php

    r225199 r225202  
    7777                'useplugincss'      =>  '1',
    7878                'showhomelink'      =>  '1',
     79                'removeselect'      =>  '0',
    7980                'size'              =>  '',
    8081                'bordercolor'       =>  '',
     
    146147
    147148            <p> <?php
    148                 _e( 'With this plugin your visitors can select from a list of custom avatars when they leave a comment. This plugin does <strong>not</strong> work out of the box, you <strong>need</strong> to modify your theme and upload avatars first. Please see the included readme.txt for instructions.', 'custom-avatars-for-comments' ); ?>
     149                _e( 'With this plugin your visitors can select from a list of custom avatars when they leave a comment.', 'custom-avatars-for-comments' ); ?>
    149150            </p>
    150151
     
    253254                    <tr valign="top">
    254255                        <th scope="row"> <?php
     256                            _e( "Don't show the select field automatically.", 'custom-avatars-for-comments' )?>
     257                        </th>
     258                        <td>
     259                            <input name="commentavatars[removeselect]" type="checkbox" value="1" <?php checked( '1', $this->options['removeselect'] ); ?> /> <?php
     260                            _e( "Use this option if you are placing the select field by hand in your theme.", 'custom-avatars-for-comments' ) ?>
     261                        </td>
     262                    </tr>
     263
     264                </table>
     265                    <tr valign="top">
     266                        <th scope="row"> <?php
    255267                            _e( "Show the link to the plugin page in the footer?", 'custom-avatars-for-comments' )?>
    256268                        </th>
  • custom-avatars-for-comments/trunk/inc/frontend.php

    r225199 r225202  
    4444            add_action( 'wp_head', array( &$this, 'styles' ), 7 );
    4545            add_action( 'wp_head', array( &$this, 'scripts' ), 8 );
     46            if ( $this->get_option( 'removeselect' ) !== '1' )
     47                add_action( 'comment_form', array( &$this, 'select' ), 1 );
    4648            if ( $this->get_option( 'showhomelink' ) == '1' )
    4749                add_action( 'wp_footer', array( &$this, 'homelink' ), 8 );
  • custom-avatars-for-comments/trunk/readme.txt

    r225201 r225202  
    77Requires at least: 2.9
    88Tested up to: 2.9
    9 Stable tag: 0.1.3.0
     9Stable tag: 0.2.0.0
    1010
    11 Allows custom avatars for every comment. You have to edit your theme for this to work.
     11Allows custom avatars for every comment.
    1212
    1313== Description ==
    1414This was initially written for a client and he agreed to open-source it. Thanks, John! Your visitors will be able to choose from the avatars you upload to your website for each and every comment they make. Various configuration options are available.
    15 
    16 You have to modify your theme a little for this to work, see the Installation section.
    1715
    1816See a [live demo](http://www.nkuttler.de/wordpress/custom-avatars-for-comments/) on the plugin's home page.
     
    3735
    3836== Installation ==
    39 Unzip, upload to your plugin directory and enable the plugin. You will need to do a little change to your theme to use this plugin. You need a very basic understanding of HTML and maybe CSS to do this. The steps are:
    40 
    41 1. Find the comments.php file in your theme directory and open it in an editor. Alternatively edit it through the WordPress theme editor under Appearance-Editor. If your theme doesn't use a comments.php search for a file with a wp_list_comments call or with the comments form.
    42 2. Add `<?php global $CommentAvatarsFrontend; if ( isset( $CommentAvatarsFrontend ) ) $CommentAvatarsFrontend->select(); ?>` where the avatar select list should appear.
    43 3. Upload your own custom avatars to the the wp-content/commentavatars/ directory.
    44 
    45 = Support =
    46 Visit the [plugin's home page](http://www.nkuttler.de/wordpress/custom-avatars-for-comments/) to leave comments, ask questions, etc. Please do NOT ask how to modify your theme. I offer paid support though, see my [contact page](http://www.nkuttler.de/contact/) if you're prepared to pay me something around $50.
     371. Unzip
     382. Upload to your plugins directory
     393. Enable the plugin
     404. Upload your own custom avatars to the the wp-content/commentavatars/ directory
    4741
    4842== Screenshots ==
     
    5145
    5246== Frequently Asked Questions ==
     47Q: I have uploaded avatars, there is no error message on the settings page, but I still can't see the avatar selection field<br />
     48A: Your theme is most likely broken. Tell your theme developer to read the [Theme Development](http://codex.wordpress.org/Theme_Development) page and to add the comment_form action.
     49
     50Q: I don't like where the avatar selection field show up on the page.<br />
     51A: Perform the following steps:
     521. Find the comments.php file in your theme directory and open it in an editor. Alternatively edit it through the WordPress theme editor under Appearance-Editor. If your theme doesn't use a comments.php search for a file with a wp_list_comments call or with the comments form.
     532. Add `<?php global $CommentAvatarsFrontend; if ( isset( $CommentAvatarsFrontend ) ) $CommentAvatarsFrontend->select(); ?>` where the avatar select list should appear.
     543. Check the "Don't show the select field automatically." box on the settings page.
     55
    5356Q: Why can't I see the select box for the custom avatars on my website?<br />
    5457A: Please read the Installation section.
     
    5861
    5962== Changelog ==
    60 = 0.1.3.0 ( 2010-04-03 ) =
     63= 0.2.0.0 ( 2010-04-03 ) =
     64 * The plugin should now work out of the box. If it does not, your theme is broken, please see the FAQ.
    6165 * Add 'select no avatar' link
    6266 * Fix forcing of border color
Note: See TracChangeset for help on using the changeset viewer.