Plugin Directory

Changeset 372242


Ignore:
Timestamp:
04/13/2011 12:57:43 AM (15 years ago)
Author:
roggie
Message:

invite updates

Location:
sfce-create-event/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sfce-create-event/trunk/sfce-create-event.php

    r372048 r372242  
    22/*
    33Plugin Name: SFCe - Create Event
    4 Version: 3.95.6
     4Version: 3.95.7
    55Author: Roger Howorth
    66Author URI: http://www.thehypervisor.com
     
    5757        // load Facebook platform
    5858        $fboptions = get_option('sfc_options');
     59        $options = get_option('sfce_event_options');
     60
    5961        include_once WP_PLUGIN_DIR . '/simple-facebook-connect/facebook-platform/facebook.php';
    6062        $fb=new Facebook($fboptions['api_key'], $fboptions['app_secret']);
     
    103105        ,'app_secret' => $fboptions['app_secret']
    104106        ,'fb' => $fb
    105         ,'group_id' => $args['invite_group']
     107        ,'group_id' => $options['sfce_group_id']
    106108        ,'event_id' => $event_id
    107109        ,'fb_user' => $fb_user
     110        ,'access_token' => $options['sfce_access_token']
    108111        ));
    109112    }
     
    116119        ,'event_id' => $event_id
    117120        ,'fb_user' => $fb_user
     121        ,'access_token' => $options['sfce_access_token']
    118122        ));
    119123    }
    120124
    121 
    122         return $event_id;
     125    return $event_id;
    123126} //end sfce_create_event
  • sfce-create-event/trunk/sfce-settings-page.php

    r372048 r372242  
    1313function sfce_event_settings_page() {
    1414    global $sfce_text_inputs;
    15     $options = get_option('sfce_event_options');
    1615
    1716    if ( isset ($_POST['sfce_submit']) )
     
    3332            $options['sfce_hide_postpanel'] = $_POST['sfce_hide_postpanel'];
    3433            $options['sfce_show_promo'] = $_POST['sfce_show_promo'];
     34            $options['sfce_access_token'] = $_POST['sfce_access_token'];
     35            $options['sfce_group_id'] = $_POST['sfce_group_id'];
    3536
    3637            update_option('sfce_event_options', $options);
     
    4647        }
    4748    } // end if isset
     49    $options = get_option('sfce_event_options');
    4850    ?>
    4951    <form name="form1" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
     
    118120    echo '</h3>';
    119121    echo '<table><tr><td width="500">';
    120     _e('In order to invite members of a Facebook group to events you need to enter your Facebook access token key here. Be careful who you allow to use the plugin if you use this feature, as your access token should be kept private.', 'sfce-create-event');
     122    _e('In order to invite members of a Facebook group to events you need to enter your Facebook access token here. If you use this feature, be careful who you allow to edit or use the plugin because your access token should be kept private. If you want to cancel an access token, change your Facebook password.', 'sfce-create-event');
     123    echo '</td>';
     124    echo '<td width="220"><input type="password"';
     125    echo ' name="sfce_access_token" ';
     126    echo 'title="';
     127    _e('Put you Facebook Access Token here, it is used only to invite group members to events created with this plugin.', 'sfce-create-event');
     128    echo '"';
     129    echo ' value="';
     130    if ( $options['sfce_access_token'] ) echo $options['sfce_access_token'];
     131    echo '" /></td></tr></table>';
     132
     133    echo "<h3>";
     134    _e('Group ID', 'sfce-create-event');
     135    echo '</h3>';
     136    echo '<table><tr><td width="500">';
     137    _e('The Facebook Group ID. All members of this group will automatically be invited to events.', 'sfce-create-event');
    121138    echo '</td>';
    122139    echo '<td width="220"><input type="text"';
    123     echo ' name="sfce_access_token" />';
    124     if ( $options['sfce_access_token'] ) echo $options['sfce_access_token'];
    125     echo ' title="';
    126     _e('Put you Facebook Access Token here, it is used only to invite group members to events created with this plugin.', 'sfce-create-event');
    127     echo '." /></td></tr></table>';
     140    echo ' name="sfce_group_id" ';
     141    echo 'title="';
     142    _e('Put you Facebook Group ID here, it is used only to invite group members to events created with this plugin.', 'sfce-create-event');
     143    echo '"';
     144    echo ' value="';
     145    if ( $options['sfce_group_id'] ) echo $options['sfce_group_id'];
     146    echo '" /></td></tr></table>';
    128147
    129148    ?><p class="submit">
Note: See TracChangeset for help on using the changeset viewer.