Changeset 1570 for trunk

Show
Ignore:
Timestamp:
07/16/09 20:25:50 (4 months ago)
Author:
bsmith
Message:

merging version 1.1 updates from Six Apart internal svn repo

Location:
trunk/FacebookCommenters
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • trunk/FacebookCommenters/README.txt

    r1427 r1570  
    11# Facebook Connect Commenters Plugin for Movable Type 
    2 # Authors: Mark Paschal and David Recordon 
    3 # Copyright 2008 Six Apart, Ltd. 
    4 # License: Artistic, licensed under the same terms as Perl itself 
    52 
     3Authors: Mark Paschal and David Recordon 
     4Copyright 2008 Six Apart, Ltd. 
     5License: Artistic, licensed under the same terms as Perl itself 
    66 
    7 OVERVIEW 
     7## Overview 
    88 
    99The Facebook Connect Commenters plugin for Movable Type allows commenters to login to your 
     
    2323discover your blog. 
    2424 
    25 PLEASE NOTE: Facebook Connect currently requires pre-approval in order for you to launch your 
     25**PLEASE NOTE:** Facebook Connect currently requires pre-approval in order for you to launch your 
    2626blog integration. As long as you are using the standard blog plugin, this should be painless 
    2727and quick – it should take just a few days at the most.    
    2828 
    29 Check here to see if Facebook Connect is available for launch with out approval: http://wiki.developers.facebook.com/index.php/Facebook_Connect_Launch_Plans 
     29Check here to see if Facebook Connect is available for launch with out approval: <http://wiki.developers.facebook.com/index.php/Facebook_Connect_Launch_Plans> 
    3030 
    31 If approval is required, go here to submit your blog with Facebook Connect: http://www.facebook.com/connect/submit_site.php 
     31If approval is required, go here to submit your blog with Facebook Connect: <http://www.facebook.com/connect/submit_site.php> 
    3232 
    3333 
    34 PREREQUISITES 
     34## Prerequisites 
    3535 
    36  - Movable Type 4.1 or higher (4.2 is recommended) 
    37  - JSON::XS 2.0 or greater. 
     36* Movable Type 4.1 or higher (4.2 is recommended) 
     37* JSON::XS 2.0 or greater. 
    3838 
    3939The Facebook Commenters plugin ships with all of the other external libraries you should 
    4040need to run it. 
    4141 
     42## Installation 
    4243 
    43 INSTALLATION 
     441. Unpack the FacebookCommenters archive. 
     452. Copy the contents of FacebookCommenters/mt-static into /path/to/mt/mt-static/ 
     463. Copy the contents of FacebookCommenters/plugins into /path/to/mt/plugins/ 
     474. Login to your Movable Type Dashboard which will install the plugin. 
     485. Navigate to the Plugin Settings on the blog you wish to integrate Facebook Connect. 
     496. Create a Facebook Application to represent your site. 
     50    1. Go to http://www.facebook.com/developers/editapp.php to create a new application. 
     51    2. Enter a name for your application in the Application Name field. 
     52    3. Click the Optional Fields link to see more entry fields. 
     53    4. Keep all of the defaults, except enter a Callback URL. This URL should point to 
     54    the top-level directory of the site which will be implementing Facebook Connect 
     55    (this is usually your domain, e.g. http://www.example.com, but could also be a 
     56    subdirectory). 
     57    5. You should include a logo that appears on the Facebook Connect dialog. Next to 
     58    Facebook Connect Logo, click Change your Facebook Connect logo and browse to an 
     59    image file. The logo can be up to 99 pixels wide by 22 pixels tall, and must be 
     60    in JPG, GIF, or PNG format. 
     61    6. Click Submit to save your changes. 
     62    7. Take note of the API Key and Secret as you'll need these shortly. 
     637. Within your blog's Plugin Settings, input the API Key and Secret from Facebook. 
     648. Edit your templates to include Facebook Connect tags and customize the display. 
     659. Enable "Facebook" as a Registration Authentication Method via 
     66Preferences -> Registration and ensure that User Registration is allowed. 
     6710. Republish your blog for all of the changes to take effect. 
    4468 
    45   1. Unpack the FacebookCommenters archive. 
    46   2. Copy the contents of FacebookCommenters/mt-static into /path/to/mt/mt-static/ 
    47   3. Copy the contents of FacebookCommenters/plugins into /path/to/mt/plugins/ 
    48   4. Login to your Movable Type Dashboard which will install the plugin. 
    49   5. Navigate to the Plugin Settings on the blog you wish to integrate Facebook Connect. 
    50   6. Create a Facebook Application to represent your site. 
    51    6a. Go to http://www.facebook.com/developers/editapp.php to create a new application. 
    52    6b. Enter a name for your application in the Application Name field. 
    53    6c. Click the Optional Fields link to see more entry fields. 
    54    6d. Keep all of the defaults, except enter a Callback URL. This URL should point to 
    55        the top-level directory of the site which will be implementing Facebook Connect 
    56        (this is usually your domain, e.g. http://www.example.com, but could also be a 
    57        subdirectory). 
    58    6e. You should include a logo that appears on the Facebook Connect dialog. Next to 
    59        Facebook Connect Logo, click Change your Facebook Connect logo and browse to an 
    60        image file. The logo can be up to 99 pixels wide by 22 pixels tall, and must be 
    61        in JPG, GIF, or PNG format. 
    62    6f. Click Submit to save your changes. 
    63    6g. Take note of the API Key and Secret as you'll need these shortly. 
    64   7. Within your blog's Plugin Settings, input the API Key and Secret from Facebook. 
    65   8. Edit your templates to include Facebook Connect tags and customize the display. 
    66   9. Enable "Facebook" as a Registration Authentication Method via 
    67      Preferences -> Registration and ensure that User Registration is allowed. 
    68   10. Republish your blog for all of the changes to take effect. 
    69  
    70  
    71 TEMPLATE CODE 
     69## Template Code 
    7270 
    7371To add basic support for Facebook Connect, place the following tag in your Header template 
     
    7573customize the display of your comments. 
    7674 
    77   <mt:GreetFacebookCommenters> 
     75    <$mt:GreetFacebookCommenters$> 
    7876 
    7977To display a Facebook user's profile photo next to their comment, you will have to use a 
     
    8381useful guide to adding userpics to your templates. 
    8482 
    85   <div class="comment"<MTIfArchiveTypeEnabled archive_type="Individual"> id="comment-<$MTCommentID$>"</MTIfArchiveTypeEnabled>> 
    86       <div class="inner"> 
    87           <div class="comment-header"> 
    88               <div class="user-pic<mt:if tag="CommenterAuthType" eq="Facebook"> comment-fb-<$MTCommenterUsername></mt:if>"> 
     83    <div class="comment"<mt:IfArchiveTypeEnabled archive_type="Individual"> id="comment-<$mt:CommentID$>"</mt:IfArchiveTypeEnabled>> 
     84        <div class="inner"> 
     85            <div class="comment-header"> 
     86                <div class="user-pic<mt:If tag="CommenterAuthType" eq="Facebook"> comment-fb-<$mt:CommenterUsername$></mt:If>"> 
     87     
     88                <mt:If tag="CommenterAuthType" eq="Facebook"> 
     89                    <a href="http://www.facebook.com/profile.php?id=<$mt:CommenterUsername$>" class="auth-icon"><img src="<$mt:CommenterAuthIconURL size="logo_small"$>" alt="<$mt:CommenterAuthType$>"/></a> 
     90                    <fb:profile-pic uid="<$mt:CommenterUsername$>" size="square" linked="true"><img src="http://static.ak.connect.facebook.com/pics/q_default.gif" /></fb:profile-pic> 
     91     
     92                <mt:Else> 
     93                    <mt:If tag="CommenterAuthIconURL"> 
     94                        <a href="<$mt:CommenterURL$>" class="auth-icon"><img src="<$mt:CommenterAuthIconURL size="logo_small"$>" alt="<$mt:CommenterAuthType$>"/></a> 
     95                    </mt:If> 
     96                    <img src="<$mt:StaticWebPath$>images/default-userpic-50.jpg" /> 
     97                </mt:If> 
     98                </div> 
     99     
     100                <div class="asset-meta"> 
     101                    <span class="byline"> 
     102                    <mt:If tag="CommenterAuthType" eq="Facebook"> 
     103                        By <span class="vcard author"><fb:name uid="<$mt:CommenterUsername$>" linked="true" useyou="false"><a href="http://www.facebook.com/profile.php?id=<$mt:CommenterUsername$>"><$mt:CommenterName$></a></fb:name></span> on <a href="#comment-<$mt:CommentID$>"><abbr class="published" title="<$mt:CommentDate format_name="iso8601"$>"><$mt:CommentDate$></abbr></a></span> 
     104     
     105                    <mt:Else> 
     106                        By <span class="vcard author"><mt:If tag="CommenterURL"><a href="<$mt:CommenterURL$>"><$mt:CommentAuthor default_name="Anonymous" $></a><mt:Else><$mt:CommentAuthorLink default_name="Anonymous" show_email="0"$></mt:If></span><mt:IfNonEmpty tag="CommentAuthorIdentity"><$mt:CommentAuthorIdentity$></mt:IfNonEmpty> on <a href="#comment-<$mt:CommentID$>"><abbr class="published" title="<$mt:CommentDate format_name="iso8601"$>"><$mt:CommentDate$></abbr></a></span> 
     107                    </mt:If> 
     108                    </span> 
     109                </div> 
     110            </div> 
     111            <div class="comment-content"> 
     112                <$mt:CommentBody$> 
     113            </div> 
     114        </div> 
     115    </div> 
    89116 
    90               <mt:if tag="CommenterAuthType" eq="Facebook"> 
    91                   <a href="http://www.facebook.com/profile.php?id=<$MTCommenterUsername>" class="auth-icon"><img src="<$MTCommenterAuthIconURL size="logo_small"$>" alt="<$mt:CommenterAuthType$>"/></a> 
    92                   <fb:profile-pic uid="<$MTCommenterUsername>" size="square" linked="true"><img src="http://static.ak.connect.facebook.com/pics/q_default.gif" /></fb:profile-pic> 
     117The plugin's root directory also has an example file `comment_detail.mtml.example`, which is the default Comment Detail template module of the Community Blog template set included in MT 4.23 that also has the functionality to add Facebook userpics described above.  If you are using the default template module without any changes, you can overwrite `/path/to/mt/addons/Community.pack/templates/blog/comment_detail.mtml` with this file, and refresh the template from the Template Listing screen. 
    93118 
    94               <mt:else> 
    95                   <mt:if tag="CommenterAuthIconURL"> 
    96                       <a href="<$MTCommenterURL>" class="auth-icon"><img src="<$MTCommenterAuthIconURL size="logo_small"$>" alt="<$mt:CommenterAuthType$>"/></a> 
    97                   </mt:if> 
    98                   <img src="<$MTStaticWebPath>images/default-userpic-50.jpg" /> 
    99               </mt:if> 
    100               </div> 
    101  
    102               <div class="asset-meta"> 
    103                   <span class="byline"> 
    104                   <mt:if tag="CommenterAuthType" eq="Facebook"> 
    105                       By <span class="vcard author"><fb:name uid="<$MTCommenterUsername>" linked="true" useyou="false"><a href="http://www.facebook.com/profile.php?id=<$MTCommenterUsername>"><$MTCommenterName></a></fb:name></span> on <a href="#comment-<$MTCommentID$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a></span> 
    106  
    107                                 <mt:else> 
    108                                         By <span class="vcard author"><mt:if tag="CommenterURL"><a href="<mt:CommenterURL>"><$MTCommentAuthor default_name="Anonymous" $></a><mt:else><mt:CommentAuthorLink default_name="Anonymous" show_email="0"></mt:if></span><MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> on <a href="#comment-<$MTCommentID$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a></span> 
    109                                 </mt:if> 
    110                   </span> 
    111               </div> 
    112           </div> 
    113           <div class="comment-content"> 
    114               <$MTCommentBody$> 
    115           </div> 
    116       </div> 
    117   </div> 
    118  
    119 The plugin's root directory also has an example file "comment_detail.mtml.example", which is the default Comment Detail template module of the Community Blog template set included in MT 4.23 that also has the functionality to add Facebook userpics described above.  If you are using the default template module without any changes, you can overwrite /path/to/mt/addons/Community.pack/templates/blog/comment_detail.mtml with this file, and refresh the template from the Template Listing screen. 
    120  
    121 STYLES 
     119## Styles 
    122120 
    123121While you don't need to customize any of the CSS styles, there are many CSS classes which 
    124122can be tweaked to adjust the display of comments. 
    125123 
    126 .comment-friend { 
    127   background-color: #c3cddf; 
    128 } 
     124    .comment-friend { 
     125        background-color: #c3cddf; 
     126    } 
    129127 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/Auth.pm

    r1415 r1570  
    22 
    33use strict; 
     4 
     5sub password_exists { 0 } 
    46 
    57sub login { 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N.pm

    r1479 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: $ 
     6 
    17package FacebookCommenters::L10N; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/de.pm

    r1498 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: de.pm 99820 2009-03-09 13:55:28Z mschenk $ 
     6 
    17package FacebookCommenters::L10N::de; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/en_us.pm

    r1479 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: $ 
     6 
    17package FacebookCommenters::L10N::en_us; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/es.pm

    r1498 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: es.pm 99820 2009-03-09 13:55:28Z mschenk $ 
     6 
    17package FacebookCommenters::L10N::es; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/fr.pm

    r1498 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: fr.pm 99820 2009-03-09 13:55:28Z mschenk $ 
     6 
    17package FacebookCommenters::L10N::fr; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/ja.pm

    r1479 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: $ 
     6 
    17package FacebookCommenters::L10N::ja; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/L10N/nl.pm

    r1498 r1570  
     1# Movable Type (r) (C) 2001-2008 Six Apart, Ltd. All Rights Reserved. 
     2# This code cannot be redistributed without permission from www.sixapart.com. 
     3# For more information, consult your Movable Type license. 
     4# 
     5# $Id: nl.pm 99820 2009-03-09 13:55:28Z mschenk $ 
     6 
    17package FacebookCommenters::L10N::nl; 
    28 
  • trunk/FacebookCommenters/plugins/FacebookCommenters/plugin.pl

    r1479 r1570  
    88    name        => 'Facebook Commenters', 
    99    description => '<MT_TRANS phrase="Provides commenter registration through Facebook Connect.">', 
    10     version     => '1.0', 
     10    version     => '1.1', 
    1111    author_name => 'Six Apart, Ltd.', 
    1212    author_link => 'http://www.sixapart.com/',