- Timestamp:
- 07/16/09 20:25:50 (4 months ago)
- Location:
- trunk/FacebookCommenters
- Files:
-
- 10 modified
-
README.txt (modified) (4 diffs)
-
plugins/FacebookCommenters/lib/FacebookCommenters/Auth.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/de.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/en_us.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/es.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/fr.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/ja.pm (modified) (1 diff)
-
plugins/FacebookCommenters/lib/FacebookCommenters/L10N/nl.pm (modified) (1 diff)
-
plugins/FacebookCommenters/plugin.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/FacebookCommenters/README.txt
r1427 r1570 1 1 # Facebook Connect Commenters Plugin for Movable Type 2 # Authors: Mark Paschal and David Recordon3 # Copyright 2008 Six Apart, Ltd.4 # License: Artistic, licensed under the same terms as Perl itself5 2 3 Authors: Mark Paschal and David Recordon 4 Copyright 2008 Six Apart, Ltd. 5 License: Artistic, licensed under the same terms as Perl itself 6 6 7 OVERVIEW 7 ## Overview 8 8 9 9 The Facebook Connect Commenters plugin for Movable Type allows commenters to login to your … … 23 23 discover your blog. 24 24 25 PLEASE NOTE:Facebook Connect currently requires pre-approval in order for you to launch your25 **PLEASE NOTE:** Facebook Connect currently requires pre-approval in order for you to launch your 26 26 blog integration. As long as you are using the standard blog plugin, this should be painless 27 27 and quick â it should take just a few days at the most. 28 28 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_Plans29 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> 30 30 31 If approval is required, go here to submit your blog with Facebook Connect: http://www.facebook.com/connect/submit_site.php31 If approval is required, go here to submit your blog with Facebook Connect: <http://www.facebook.com/connect/submit_site.php> 32 32 33 33 34 PREREQUISITES 34 ## Prerequisites 35 35 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. 38 38 39 39 The Facebook Commenters plugin ships with all of the other external libraries you should 40 40 need to run it. 41 41 42 ## Installation 42 43 43 INSTALLATION 44 1. Unpack the FacebookCommenters archive. 45 2. Copy the contents of FacebookCommenters/mt-static into /path/to/mt/mt-static/ 46 3. Copy the contents of FacebookCommenters/plugins into /path/to/mt/plugins/ 47 4. Login to your Movable Type Dashboard which will install the plugin. 48 5. Navigate to the Plugin Settings on the blog you wish to integrate Facebook Connect. 49 6. 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. 63 7. Within your blog's Plugin Settings, input the API Key and Secret from Facebook. 64 8. Edit your templates to include Facebook Connect tags and customize the display. 65 9. Enable "Facebook" as a Registration Authentication Method via 66 Preferences -> Registration and ensure that User Registration is allowed. 67 10. Republish your blog for all of the changes to take effect. 44 68 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 72 70 73 71 To add basic support for Facebook Connect, place the following tag in your Header template … … 75 73 customize the display of your comments. 76 74 77 <mt:GreetFacebookCommenters>75 <$mt:GreetFacebookCommenters$> 78 76 79 77 To display a Facebook user's profile photo next to their comment, you will have to use a … … 83 81 useful guide to adding userpics to your templates. 84 82 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> 89 116 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> 117 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. 93 118 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 122 120 123 121 While you don't need to customize any of the CSS styles, there are many CSS classes which 124 122 can be tweaked to adjust the display of comments. 125 123 126 .comment-friend {127 background-color: #c3cddf;128 }124 .comment-friend { 125 background-color: #c3cddf; 126 } 129 127 -
trunk/FacebookCommenters/plugins/FacebookCommenters/lib/FacebookCommenters/Auth.pm
r1415 r1570 2 2 3 3 use strict; 4 5 sub password_exists { 0 } 4 6 5 7 sub 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 1 7 package FacebookCommenters::L10N; 2 8 -
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 1 7 package FacebookCommenters::L10N::de; 2 8 -
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 1 7 package FacebookCommenters::L10N::en_us; 2 8 -
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 1 7 package FacebookCommenters::L10N::es; 2 8 -
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 1 7 package FacebookCommenters::L10N::fr; 2 8 -
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 1 7 package FacebookCommenters::L10N::ja; 2 8 -
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 1 7 package FacebookCommenters::L10N::nl; 2 8 -
trunk/FacebookCommenters/plugins/FacebookCommenters/plugin.pl
r1479 r1570 8 8 name => 'Facebook Commenters', 9 9 description => '<MT_TRANS phrase="Provides commenter registration through Facebook Connect.">', 10 version => '1. 0',10 version => '1.1', 11 11 author_name => 'Six Apart, Ltd.', 12 12 author_link => 'http://www.sixapart.com/',
