Plugin Directory

Changeset 497787


Ignore:
Timestamp:
01/31/2012 04:31:20 AM (14 years ago)
Author:
kcfried
Message:

Compliance with Facebook update on 2/01/2012 providing direct linkage of apps to fan pages.

Location:
fanpage-connect
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • fanpage-connect/tags/1.4.5/fanpage-connect-options.php

    r448145 r497787  
    2323}
    2424global $wp_filter;
     25global $post;
     26$fpc_pages = array();
     27$fpc_posts = array();
     28$fpc_options = array();
    2529?>
    2630<link rel="stylesheet" href="<?php echo FPC_PLUGIN_URL; ?>/css/fanpage-connect.css" type="text/css" media="screen" />
     
    302306            </form>
    303307
     308            <h3>Add Application to Facebook Page</h2>
     309            <form name="FPCAddAppToPage">
     310                <?php
     311                    $fpc_qry_args = array(
     312                        'post_type' => 'page',
     313                        'orderby' => 'title',
     314                        'order' => 'ASC',
     315                        'meta_key' => '_fbfp',
     316                        'paged' => false
     317                        );
     318                    $fpc_posts = new WP_Query($fpc_qry_args);
     319                    $fpc_pages = array();
     320                    if ($fpc_posts->have_posts()) {
     321                        array_push($fpc_pages, array('NONE','Please select a Fanpage to add.', '', '' ));
     322                        while( $fpc_posts->have_posts() ) {
     323                            $fpc_posts->the_post();
     324                            setup_postdata($post);
     325                            $fpc_post_meta = get_post_meta($post->ID,'_fbfp',true);             
     326                            if ( strcasecmp($fpc_post_meta['isfanpage'],'true') == 0 ) {
     327                                array_push($fpc_pages, array($post->ID, $post->post_title, $fpc_post_meta['appid'], get_permalink() ));
     328                            }
     329                        }
     330                        foreach($fpc_pages as $fpc_page) {
     331                            array_push( $fpc_options, '<option value="'.$fpc_page[0].'">'.$fpc_page[1].'</option>' );
     332                            $fpc_input_id = 'fpc_appid_'.$fpc_page[0];
     333?>
     334                <input type="hidden" id="<?php echo $fpc_input_id ?>" name="<?php echo $fpc_input_id ?>" value="<?php echo $fpc_page[2] ?>" />
     335<?php
     336                            $fpc_input_id = 'fpc_pagelink_'.$fpc_page[0];
     337?>
     338                <input type="hidden" id="<?php echo $fpc_input_id ?>" name="<?php echo $fpc_input_id ?>" value="<?php echo $fpc_page[3] ?>" />
     339<?php
     340                        }
     341                    }
     342?>
     343                <table border="0" cellpadding="4" cellspacing="4">
     344                    <tr>
     345                        <td valign="top"><strong>Your Fan Pages</strong></td>
     346                        <td>
     347                            <select id="App_ID_Select" name="App_ID_Select" style="width: 500px;">
     348<?php
     349                                foreach($fpc_options as $fpc_option) {
     350                                    echo $fpc_option;
     351                                }
     352?>
     353                            </select>
     354                            <p>
     355                                This dropdown contains a list of all pages you have configured as Fan Pages.
     356                            </p>
     357                        </td>
     358                    </tr>
     359                    <tr>
     360                        <td valign="top"><strong>App ID</strong></td>
     361                        <td>
     362                             <input id="App_ID" name="App_ID" disabled="true" value="" />
     363                            <p>
     364                                This is the current App ID assigned to the Fan Page selected above.
     365                            </p>
     366                        </td>
     367                    </tr>
     368                    <tr>
     369                        <td colspan="2">
     370                            <input type="button" id="App_ID_Add" name="App_ID_Add" value="Add to Page" class="option-update" />
     371                        </td>
     372                    </tr>
     373                </table>
     374            </form>         
     375           
    304376            <h3>Fanpage Connect Usage</h2>
    305377
     
    557629
    558630</div><!-- wrap -->
     631<script language="JavaScript">
     632    jQuery(document).ready( function() {
     633        jQuery("#App_ID_Add").click( function() {
     634            App_ID = jQuery("#App_ID").val();
     635            if (App_ID != "") {
     636                srcID = "#fpc_pagelink_" + jQuery("#App_ID_Select").val();
     637                redirURL = jQuery(srcID).val();
     638                //redirURL = 'https://apps.facebook.com/trilogicllc/';
     639                window.open("http://www.facebook.com/dialog/pagetab?app_id=" + App_ID + "&redirect_uri="+redirURL,"PageTab","width=500,height=200");
     640            } else {
     641                alert("Please enter your\nFacebook Application ID.");
     642            }
     643        });
     644        jQuery("#App_ID_Select").change( function() {
     645            srcID = "#fpc_appid_" + jQuery("#App_ID_Select").val();
     646            jQuery("#App_ID").val( jQuery(srcID).val() );
     647        });
     648    }); 
     649</script>
  • fanpage-connect/tags/1.4.5/fanpage-connect.php

    r448145 r497787  
    33Plugin Name: Fanpage Connect FREE
    44Plugin URI: http://www.fanpageconnect.com
    5 Version: v1.4.4
     5Version: v1.4.5
    66Author: Pat Friedl, Chris Friedl, Bryan Batson
    77Description: Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress.
     
    7979
    8080            if (!defined('FPC_PLUGIN_VERSION'))
    81                 define('FPC_PLUGIN_VERSION','1.4.4');
     81                define('FPC_PLUGIN_VERSION','1.4.5');
    8282
    8383            global $post;
     
    655655                'fpogimg' => '',
    656656                'fpogname' => '',
    657                 'aff' => ''
     657                'aff' => 'affriedl'
    658658            );
    659659
  • fanpage-connect/tags/1.4.5/readme.txt

    r448145 r497787  
    119119== Changelog ==
    120120= 1.4.4 =
    121 * Fixed occasional https/http/multi-site confusion when activating the plugin.
     121* Fixed occasional https/http confusion when activating the plugin.
    122122* Fixed like/unlike in reload to ensure that a fan page url is defined for edge.create/remove events
    123123* Now enqueueing jQuery!
    124 * Added plugin version number to the global settings page
     124* Added plgin version number to the global settings page
    125125* Converted the soon to be deprecated setAutoResize function to setAutoGrow for FB iFrame resizing
    126 * Fixed menu width - now 520 pixels!
    127126
    128127= 1.4.3 =
  • fanpage-connect/trunk/fanpage-connect-options.php

    r448145 r497787  
    2323}
    2424global $wp_filter;
     25global $post;
     26$fpc_pages = array();
     27$fpc_posts = array();
     28$fpc_options = array();
    2529?>
    2630<link rel="stylesheet" href="<?php echo FPC_PLUGIN_URL; ?>/css/fanpage-connect.css" type="text/css" media="screen" />
     
    302306            </form>
    303307
     308            <h3>Add Application to Facebook Page</h2>
     309            <form name="FPCAddAppToPage">
     310                <?php
     311                    $fpc_qry_args = array(
     312                        'post_type' => 'page',
     313                        'orderby' => 'title',
     314                        'order' => 'ASC',
     315                        'meta_key' => '_fbfp',
     316                        'paged' => false
     317                        );
     318                    $fpc_posts = new WP_Query($fpc_qry_args);
     319                    $fpc_pages = array();
     320                    if ($fpc_posts->have_posts()) {
     321                        array_push($fpc_pages, array('NONE','Please select a Fanpage to add.', '', '' ));
     322                        while( $fpc_posts->have_posts() ) {
     323                            $fpc_posts->the_post();
     324                            setup_postdata($post);
     325                            $fpc_post_meta = get_post_meta($post->ID,'_fbfp',true);             
     326                            if ( strcasecmp($fpc_post_meta['isfanpage'],'true') == 0 ) {
     327                                array_push($fpc_pages, array($post->ID, $post->post_title, $fpc_post_meta['appid'], get_permalink() ));
     328                            }
     329                        }
     330                        foreach($fpc_pages as $fpc_page) {
     331                            array_push( $fpc_options, '<option value="'.$fpc_page[0].'">'.$fpc_page[1].'</option>' );
     332                            $fpc_input_id = 'fpc_appid_'.$fpc_page[0];
     333?>
     334                <input type="hidden" id="<?php echo $fpc_input_id ?>" name="<?php echo $fpc_input_id ?>" value="<?php echo $fpc_page[2] ?>" />
     335<?php
     336                            $fpc_input_id = 'fpc_pagelink_'.$fpc_page[0];
     337?>
     338                <input type="hidden" id="<?php echo $fpc_input_id ?>" name="<?php echo $fpc_input_id ?>" value="<?php echo $fpc_page[3] ?>" />
     339<?php
     340                        }
     341                    }
     342?>
     343                <table border="0" cellpadding="4" cellspacing="4">
     344                    <tr>
     345                        <td valign="top"><strong>Your Fan Pages</strong></td>
     346                        <td>
     347                            <select id="App_ID_Select" name="App_ID_Select" style="width: 500px;">
     348<?php
     349                                foreach($fpc_options as $fpc_option) {
     350                                    echo $fpc_option;
     351                                }
     352?>
     353                            </select>
     354                            <p>
     355                                This dropdown contains a list of all pages you have configured as Fan Pages.
     356                            </p>
     357                        </td>
     358                    </tr>
     359                    <tr>
     360                        <td valign="top"><strong>App ID</strong></td>
     361                        <td>
     362                             <input id="App_ID" name="App_ID" disabled="true" value="" />
     363                            <p>
     364                                This is the current App ID assigned to the Fan Page selected above.
     365                            </p>
     366                        </td>
     367                    </tr>
     368                    <tr>
     369                        <td colspan="2">
     370                            <input type="button" id="App_ID_Add" name="App_ID_Add" value="Add to Page" class="option-update" />
     371                        </td>
     372                    </tr>
     373                </table>
     374            </form>         
     375           
    304376            <h3>Fanpage Connect Usage</h2>
    305377
     
    557629
    558630</div><!-- wrap -->
     631<script language="JavaScript">
     632    jQuery(document).ready( function() {
     633        jQuery("#App_ID_Add").click( function() {
     634            App_ID = jQuery("#App_ID").val();
     635            if (App_ID != "") {
     636                srcID = "#fpc_pagelink_" + jQuery("#App_ID_Select").val();
     637                redirURL = jQuery(srcID).val();
     638                //redirURL = 'https://apps.facebook.com/trilogicllc/';
     639                window.open("http://www.facebook.com/dialog/pagetab?app_id=" + App_ID + "&redirect_uri="+redirURL,"PageTab","width=500,height=200");
     640            } else {
     641                alert("Please enter your\nFacebook Application ID.");
     642            }
     643        });
     644        jQuery("#App_ID_Select").change( function() {
     645            srcID = "#fpc_appid_" + jQuery("#App_ID_Select").val();
     646            jQuery("#App_ID").val( jQuery(srcID).val() );
     647        });
     648    }); 
     649</script>
  • fanpage-connect/trunk/fanpage-connect.php

    r448145 r497787  
    33Plugin Name: Fanpage Connect FREE
    44Plugin URI: http://www.fanpageconnect.com
    5 Version: v1.4.4
     5Version: v1.4.5
    66Author: Pat Friedl, Chris Friedl, Bryan Batson
    77Description: Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress.
     
    7979
    8080            if (!defined('FPC_PLUGIN_VERSION'))
    81                 define('FPC_PLUGIN_VERSION','1.4.4');
     81                define('FPC_PLUGIN_VERSION','1.4.5');
    8282
    8383            global $post;
     
    655655                'fpogimg' => '',
    656656                'fpogname' => '',
    657                 'aff' => ''
     657                'aff' => 'affriedl'
    658658            );
    659659
  • fanpage-connect/trunk/readme.txt

    r448145 r497787  
    66Requires at least: 3.0
    77Tested up to: 3.2.1
    8 Stable tag: 1.4.4
     8Stable tag: 1.4.5
    99
    1010Fanpage Connect is the WordPress plugin that allows you to create an administer your Facebook fan pages directly from WordPress.
     
    118118
    119119== Changelog ==
     120= 1.4.5 =
     121* Compliance with Facebook update on 2/01/2012 providing direct linkage of apps to fan pages.
     122
    120123= 1.4.4 =
    121124* Fixed occasional https/http/multi-site confusion when activating the plugin.
     
    124127* Added plugin version number to the global settings page
    125128* Converted the soon to be deprecated setAutoResize function to setAutoGrow for FB iFrame resizing
    126 * Fixed menu width - now 520 pixels!
    127129
    128130= 1.4.3 =
Note: See TracChangeset for help on using the changeset viewer.