WordPress.org

Plugin Directory

Changeset 383343


Ignore:
Timestamp:
05/10/11 20:43:34 (3 years ago)
Author:
hd-J
Message:

version 0.3 - improving parameters meta box in edit panel, fixing readme

Location:
wp-facebook-applications
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-facebook-applications/tags/0.3/readme.txt

    r382781 r383343  
    11=== WP-Facebook applications === 
    2 Contributors: jeherve 
     2Contributors: hd-J 
    33Donate link: http://jeremy.tagada.hu 
    44Tags: facebook, application, campaign, tab, custom post type, custom fields 
    55Requires at least: 3.0 
    66Tested up to: 3.2 
    7 Stable tag: 0.2 
     7Stable tag: 0.3 
    88 
    99Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    1111== Description == 
    1212 
    13 WP-Facebook applications adds a new menu to your WordPress admin panel, and allows you to create new tabs on the fly. When creating an application, you define a default landing tab that users will see if they are not fans of your Facebook page, and then you create content that will appear once they are fans. Optionnaly, you can add a Facebook comments box at the bottom of the content. 
     13WP-Facebook applications adds a new menu to your WordPress admin panel, and allows you to create new pages to use as iFrame app tabs on your Facebook pages. When creating an application, you define a default landing tab that users will see if they are not fans of your Facebook page, and then you create content that will appear once they are fans. Optionally, you can add a Facebook comments box at the bottom of the content. 
     14 
     15Thus you can integrate text, pictures, videos, comment forms, hidden for people who are not fans of your page yet. 
     16 
     17Thus plugin allows you to create as many tabs as you wish through WordPress. 
     18 
     19For more information, visit:  
     20* [Page officielle - FR](http://jeremy.tagada.hu/extension-wp-facebook-applications/ "Extension : WP Facebook Applications")  
    1421 
    1522This plugin is a work in progress. Do not hesitate to send me your remarks, suggestions and ideas for the future version of this plugin. 
     
    1926== Installation == 
    2027 
    21 1. Upload the complete flder to the `/wp-content/plugins/` directory 
     281. Upload the complete folder to the `/wp-content/plugins/` directory 
    22292. Activate the plugin through the 'Plugins' menu in WordPress 
    23303. A new menu now appears in your admin panel, above the 'comments' section. You can add and manage your Facebook tabs from there 
     
    2532= How to create my first Facebook tab? = 
    2633 
    27 1. Go to the 'Add new' menu of your Applications menu. 
    28 2. [Create a new Facebook application on Facebook:](http://www.facebook.com/developers/createapp.php "Create new application") 
     341. Go to the *Add new* menu of your Applications menu. 
     352. [Create a new Facebook application on Facebook](http://www.facebook.com/developers/createapp.php "Create new application") 
    29363. Now that the application is created, you have received an application ID and an application secret. Paste these 2 values into the dedicated fields of your WordPress application page. 
    30374. If you want a Facebook Comments box at the bottom of your content, simply specify how many comments do you want the box to show by default. 
    31385. Enter content that will appear when the user is fan in the content area. 
    32 6. Upload the image to see when the user is not a fan, and set this image as 'featured image'. 
     396. Upload the image to see when the user is not a fan, and set this image as *featured image*. 
    33407. Publish this page, note down the URL and change your Facebook application settings to point to that URL. 
    34418. You're done, enjoy! 
     
    3643== Screenshots == 
    3744 
    38 1. Applications menu in your WordPress install `/tags/0.2/img/screenshot-1.png` 
    39 2. Create new application `/tags/0.2/img/screenshot-2.png` 
     451. Applications menu in your WordPress install 
     462. Create new application 
    4047 
    4148== Frequently Asked Questions == 
     
    4350= How to avoid the scrollbars that show up when I view my tab on Facebook? = 
    4451 
    45 One of the images or one of the videos you have added to your page is too large to fit in the page. All the elements you include in your content should not be larger than 488 pixels. 
     52One of the images you have added to your page is too large to fit in the page. All the elements you include in your content should not be larger than 488 pixels. 
    4653 
    4754= When viewing my application tab on Facebook, I get a blank page, or a message telling me to switch to a HTTPS connection = 
     
    5158== Changelog == 
    5259 
     60= 0.3 = 
     61* Added fixed embed width 
     62* Edit Panel meta box now provides walk-through the application's creation 
     63 
    5364= 0.2 = 
    5465* Move files to trunk root to get the plugin to work, beginner's mistake 
  • wp-facebook-applications/tags/0.3/wp-fb-applications.php

    r382709 r383343  
    9292// Add metaboxes with custom fields 
    9393function werewp_fbapps_metaboxes(){ 
    94     add_meta_box( 'appid_meta', 'Application parameters', 'appparameters', 'werewp_fbapp', 'normal', 'low' ); 
     94    add_meta_box( 'appid_meta', 'Application parameters', 'werewp_fbappappparameters', 'werewp_fbapp', 'advanced', 'core' ); 
    9595} 
    9696add_action( 'admin_init', 'werewp_fbapps_metaboxes' ); 
    9797  
    98 function appparameters() { 
    99   global $post; 
    100   $custom = get_post_custom($post->ID); 
    101   $appid = $custom['appid'][0]; 
    102   $appsecret = $custom['appsecret'][0]; 
    103   $fbcomments = $custom['fbcomments'][0]; 
    104   ?> 
    105   <p><label>Application ID:</label><br /> 
    106   <textarea cols="50" rows="1" name="appid"><?php echo $appid; ?></textarea></p> 
    107   <p><label>Application Secret:</label><br /> 
    108   <textarea cols="50" rows="1" name="appsecret"><?php echo $appsecret; ?></textarea></p> 
    109   <p><label>Number of Facebook comments displayed (leave empty if you do not wish to have this feature enabled):</label><br /> 
    110   <textarea cols="1" rows="1" name="fbcomments"><?php echo $fbcomments; ?></textarea></p> 
    111   <?php 
     98function werewp_fbappappparameters() { 
     99    global $post; 
     100    $custom = get_post_custom($post->ID); 
     101    $appid = $custom['appid'][0]; 
     102    $appsecret = $custom['appsecret'][0]; 
     103    $fbcomments = $custom['fbcomments'][0]; 
     104    ?> 
     105    <h3>Create your application on Facebook</h3> 
     106    <p>Before to start creating content, you must create an application on Facebook : <a href="http://www.facebook.com/developers/createapp.php" target="_blank">Create application</a>. Once it is done, provide a description and icons to that application. Then, in the <strong>Web Site</strong> tab, fill in with your website's URL.</p> 
     107    <h3>Fill it application details</h3> 
     108    <p>You now have the necessary information to fill in the parameters below:</p> 
     109    <p><label><strong>Application ID:</strong></label><br /> 
     110    <textarea cols="50" rows="1" name="appid"><?php echo $appid; ?></textarea></p> 
     111    <p><label><strong>Application Secret:</strong></label><br /> 
     112    <textarea cols="50" rows="1" name="appsecret"><?php echo $appsecret; ?></textarea></p> 
     113    <p><label><strong>Number of Facebook comments displayed</strong> (leave empty if you do not wish to have this feature enabled):</label><br /> 
     114    <textarea cols="1" rows="1" name="fbcomments"><?php echo $fbcomments; ?></textarea></p> 
     115    <h3>Choose the image displayed to the non-fans of your page</h3> 
     116    <p>Facebook users who are not fans of your page will see a single image, that you input in the <strong>Featured image</strong> area of this page.</p> 
     117    <h3>Add content for your fans to see</h3> 
     118    <p>In the content area, add the content you want your fans to see. Publish, copy the URL of the created page to your clipboard: <br/><br/><code><?php the_permalink(); ?></code></p> 
     119    <p>Back to Facebook and your application settings, in the <strong>Facebook integration tab</strong>, scroll to the bottom and paste your URL into the <em>Tab URL</em> box.</p> 
     120    <p>And that's it!</p> 
     121    <?php 
    112122} 
    113123  
     
    182192} 
    183193add_action( 'wp_print_styles', 'werewp_fbapps_style' ); 
     194 
     195// Restrict the width of the embedded media to 488px 
     196function werewp_fbapps_embed( $embed_size ) { 
     197    if ( 'werewp_fbapp' == get_post_type() ) {  
     198        $embed_size['width'] = 488; 
     199        $embed_size['height'] = 600; 
     200    } 
     201    return $embed_size; 
     202} 
     203add_filter( 'embed_defaults', 'werewp_fbapps_embed' ); 
    184204?> 
  • wp-facebook-applications/trunk/readme.txt

    r382781 r383343  
    11=== WP-Facebook applications === 
    2 Contributors: jeherve 
     2Contributors: hd-J 
    33Donate link: http://jeremy.tagada.hu 
    44Tags: facebook, application, campaign, tab, custom post type, custom fields 
    55Requires at least: 3.0 
    66Tested up to: 3.2 
    7 Stable tag: 0.2 
     7Stable tag: 0.3 
    88 
    99Create custom tabs for your Facebook pages, hosted on your WordPress blog. 
     
    1111== Description == 
    1212 
    13 WP-Facebook applications adds a new menu to your WordPress admin panel, and allows you to create new tabs on the fly. When creating an application, you define a default landing tab that users will see if they are not fans of your Facebook page, and then you create content that will appear once they are fans. Optionnaly, you can add a Facebook comments box at the bottom of the content. 
     13WP-Facebook applications adds a new menu to your WordPress admin panel, and allows you to create new pages to use as iFrame app tabs on your Facebook pages. When creating an application, you define a default landing tab that users will see if they are not fans of your Facebook page, and then you create content that will appear once they are fans. Optionally, you can add a Facebook comments box at the bottom of the content. 
     14 
     15Thus you can integrate text, pictures, videos, comment forms, hidden for people who are not fans of your page yet. 
     16 
     17Thus plugin allows you to create as many tabs as you wish through WordPress. 
     18 
     19For more information, visit:  
     20* [Page officielle - FR](http://jeremy.tagada.hu/extension-wp-facebook-applications/ "Extension : WP Facebook Applications")  
    1421 
    1522This plugin is a work in progress. Do not hesitate to send me your remarks, suggestions and ideas for the future version of this plugin. 
     
    1926== Installation == 
    2027 
    21 1. Upload the complete flder to the `/wp-content/plugins/` directory 
     281. Upload the complete folder to the `/wp-content/plugins/` directory 
    22292. Activate the plugin through the 'Plugins' menu in WordPress 
    23303. A new menu now appears in your admin panel, above the 'comments' section. You can add and manage your Facebook tabs from there 
     
    2532= How to create my first Facebook tab? = 
    2633 
    27 1. Go to the 'Add new' menu of your Applications menu. 
    28 2. [Create a new Facebook application on Facebook:](http://www.facebook.com/developers/createapp.php "Create new application") 
     341. Go to the *Add new* menu of your Applications menu. 
     352. [Create a new Facebook application on Facebook](http://www.facebook.com/developers/createapp.php "Create new application") 
    29363. Now that the application is created, you have received an application ID and an application secret. Paste these 2 values into the dedicated fields of your WordPress application page. 
    30374. If you want a Facebook Comments box at the bottom of your content, simply specify how many comments do you want the box to show by default. 
    31385. Enter content that will appear when the user is fan in the content area. 
    32 6. Upload the image to see when the user is not a fan, and set this image as 'featured image'. 
     396. Upload the image to see when the user is not a fan, and set this image as *featured image*. 
    33407. Publish this page, note down the URL and change your Facebook application settings to point to that URL. 
    34418. You're done, enjoy! 
     
    3643== Screenshots == 
    3744 
    38 1. Applications menu in your WordPress install `/tags/0.2/img/screenshot-1.png` 
    39 2. Create new application `/tags/0.2/img/screenshot-2.png` 
     451. Applications menu in your WordPress install 
     462. Create new application 
    4047 
    4148== Frequently Asked Questions == 
     
    4350= How to avoid the scrollbars that show up when I view my tab on Facebook? = 
    4451 
    45 One of the images or one of the videos you have added to your page is too large to fit in the page. All the elements you include in your content should not be larger than 488 pixels. 
     52One of the images you have added to your page is too large to fit in the page. All the elements you include in your content should not be larger than 488 pixels. 
    4653 
    4754= When viewing my application tab on Facebook, I get a blank page, or a message telling me to switch to a HTTPS connection = 
     
    5158== Changelog == 
    5259 
     60= 0.3 = 
     61* Added fixed embed width 
     62* Edit Panel meta box now provides walk-through the application's creation 
     63 
    5364= 0.2 = 
    5465* Move files to trunk root to get the plugin to work, beginner's mistake 
  • wp-facebook-applications/trunk/wp-fb-applications.php

    r382709 r383343  
    9292// Add metaboxes with custom fields 
    9393function werewp_fbapps_metaboxes(){ 
    94     add_meta_box( 'appid_meta', 'Application parameters', 'appparameters', 'werewp_fbapp', 'normal', 'low' ); 
     94    add_meta_box( 'appid_meta', 'Application parameters', 'werewp_fbappappparameters', 'werewp_fbapp', 'advanced', 'core' ); 
    9595} 
    9696add_action( 'admin_init', 'werewp_fbapps_metaboxes' ); 
    9797  
    98 function appparameters() { 
    99   global $post; 
    100   $custom = get_post_custom($post->ID); 
    101   $appid = $custom['appid'][0]; 
    102   $appsecret = $custom['appsecret'][0]; 
    103   $fbcomments = $custom['fbcomments'][0]; 
    104   ?> 
    105   <p><label>Application ID:</label><br /> 
    106   <textarea cols="50" rows="1" name="appid"><?php echo $appid; ?></textarea></p> 
    107   <p><label>Application Secret:</label><br /> 
    108   <textarea cols="50" rows="1" name="appsecret"><?php echo $appsecret; ?></textarea></p> 
    109   <p><label>Number of Facebook comments displayed (leave empty if you do not wish to have this feature enabled):</label><br /> 
    110   <textarea cols="1" rows="1" name="fbcomments"><?php echo $fbcomments; ?></textarea></p> 
    111   <?php 
     98function werewp_fbappappparameters() { 
     99    global $post; 
     100    $custom = get_post_custom($post->ID); 
     101    $appid = $custom['appid'][0]; 
     102    $appsecret = $custom['appsecret'][0]; 
     103    $fbcomments = $custom['fbcomments'][0]; 
     104    ?> 
     105    <h3>Create your application on Facebook</h3> 
     106    <p>Before to start creating content, you must create an application on Facebook : <a href="http://www.facebook.com/developers/createapp.php" target="_blank">Create application</a>. Once it is done, provide a description and icons to that application. Then, in the <strong>Web Site</strong> tab, fill in with your website's URL.</p> 
     107    <h3>Fill it application details</h3> 
     108    <p>You now have the necessary information to fill in the parameters below:</p> 
     109    <p><label><strong>Application ID:</strong></label><br /> 
     110    <textarea cols="50" rows="1" name="appid"><?php echo $appid; ?></textarea></p> 
     111    <p><label><strong>Application Secret:</strong></label><br /> 
     112    <textarea cols="50" rows="1" name="appsecret"><?php echo $appsecret; ?></textarea></p> 
     113    <p><label><strong>Number of Facebook comments displayed</strong> (leave empty if you do not wish to have this feature enabled):</label><br /> 
     114    <textarea cols="1" rows="1" name="fbcomments"><?php echo $fbcomments; ?></textarea></p> 
     115    <h3>Choose the image displayed to the non-fans of your page</h3> 
     116    <p>Facebook users who are not fans of your page will see a single image, that you input in the <strong>Featured image</strong> area of this page.</p> 
     117    <h3>Add content for your fans to see</h3> 
     118    <p>In the content area, add the content you want your fans to see. Publish, copy the URL of the created page to your clipboard: <br/><br/><code><?php the_permalink(); ?></code></p> 
     119    <p>Back to Facebook and your application settings, in the <strong>Facebook integration tab</strong>, scroll to the bottom and paste your URL into the <em>Tab URL</em> box.</p> 
     120    <p>And that's it!</p> 
     121    <?php 
    112122} 
    113123  
     
    182192} 
    183193add_action( 'wp_print_styles', 'werewp_fbapps_style' ); 
     194 
     195// Restrict the width of the embedded media to 488px 
     196function werewp_fbapps_embed( $embed_size ) { 
     197    if ( 'werewp_fbapp' == get_post_type() ) {  
     198        $embed_size['width'] = 488; 
     199        $embed_size['height'] = 600; 
     200    } 
     201    return $embed_size; 
     202} 
     203add_filter( 'embed_defaults', 'werewp_fbapps_embed' ); 
    184204?> 
Note: See TracChangeset for help on using the changeset viewer.