";
71 | foreach ($results as $item) {
72 | echo $item['volumeInfo']['title'], " \n";
73 | }
74 |
75 | /************************************************
76 | This is an example of deferring a call.
77 | ***********************************************/
78 | $client->setDefer(true);
79 | $optParams = array('filter' => 'free-ebooks');
80 | $request = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
81 | $results = $client->execute($request);
82 |
83 | echo "
Results Of Deferred Call:
";
84 | foreach ($results as $item) {
85 | echo $item['volumeInfo']['title'], " \n";
86 | }
87 |
88 | echo pageFooter(__FILE__);
89 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/src/Google/Auth/AppIdentity.php:
--------------------------------------------------------------------------------
1 | client = $client;
43 | }
44 |
45 | /**
46 | * Retrieve an access token for the scopes supplied.
47 | */
48 | public function authenticateForScope($scopes)
49 | {
50 | if ($this->token && $this->tokenScopes == $scopes) {
51 | return $this->token;
52 | }
53 | $memcache = new Memcached();
54 | $this->token = $memcache->get(self::CACHE_PREFIX . $scopes);
55 | if (!$this->token) {
56 | $this->token = AppIdentityService::getAccessToken($scopes);
57 | if ($this->token) {
58 | $memcache_key = self::CACHE_PREFIX;
59 | if (is_string($scopes)) {
60 | $memcache_key .= $scopes;
61 | } else if (is_array($scopes)) {
62 | $memcache_key .= implode(":", $scopes);
63 | }
64 | $memcache->set($memcache_key, $this->token, self::CACHE_LIFETIME);
65 | }
66 | }
67 | $this->tokenScopes = $scopes;
68 | return $this->token;
69 | }
70 |
71 | /**
72 | * Perform an authenticated / signed apiHttpRequest.
73 | * This function takes the apiHttpRequest, calls apiAuth->sign on it
74 | * (which can modify the request in what ever way fits the auth mechanism)
75 | * and then calls apiCurlIO::makeRequest on the signed request
76 | *
77 | * @param Google_Http_Request $request
78 | * @return Google_Http_Request The resulting HTTP response including the
79 | * responseHttpCode, responseHeaders and responseBody.
80 | */
81 | public function authenticatedRequest(Google_Http_Request $request)
82 | {
83 | $request = $this->sign($request);
84 | return $this->io->makeRequest($request);
85 | }
86 |
87 | public function sign(Google_Http_Request $request)
88 | {
89 | if (!$this->token) {
90 | // No token, so nothing to do.
91 | return $request;
92 | }
93 | // Add the OAuth2 header to the request
94 | $request->setRequestHeaders(
95 | array('Authorization' => 'Bearer ' . $this->token['access_token'])
96 | );
97 |
98 | return $request;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/examples/service-account.php:
--------------------------------------------------------------------------------
1 | '; //Client ID
42 | $service_account_name = ''; //Email Address
43 | $key_file_location = ''; //key.p12
44 |
45 | echo pageHeader("Service Account Access");
46 | if ($client_id == ''
47 | || !strlen($service_account_name)
48 | || !strlen($key_file_location)) {
49 | echo missingServiceAccountDetailsWarning();
50 | }
51 |
52 | $client = new Google_Client();
53 | $client->setApplicationName("Client_Library_Examples");
54 | $service = new Google_Service_Books($client);
55 |
56 | /************************************************
57 | If we have an access token, we can carry on.
58 | Otherwise, we'll get one with the help of an
59 | assertion credential. In other examples the list
60 | of scopes was managed by the Client, but here
61 | we have to list them manually. We also supply
62 | the service account
63 | ************************************************/
64 | if (isset($_SESSION['service_token'])) {
65 | $client->setAccessToken($_SESSION['service_token']);
66 | }
67 | $key = file_get_contents($key_file_location);
68 | $cred = new Google_Auth_AssertionCredentials(
69 | $service_account_name,
70 | array('https://www.googleapis.com/auth/books'),
71 | $key
72 | );
73 | $client->setAssertionCredentials($cred);
74 | if($client->getAuth()->isAccessTokenExpired()) {
75 | $client->getAuth()->refreshTokenWithAssertion($cred);
76 | }
77 | $_SESSION['service_token'] = $client->getAccessToken();
78 |
79 | /************************************************
80 | We're just going to make the same call as in the
81 | simple query as an example.
82 | ************************************************/
83 | $optParams = array('filter' => 'free-ebooks');
84 | $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
85 | echo "
Results Of Call:
";
86 | foreach ($results as $item) {
87 | echo $item['volumeInfo']['title'], " \n";
88 | }
89 |
90 | echo pageFooter(__FILE__);
91 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Google Docs RSVP, WordPress Plugin
2 | * Contributors: Gifford Cheung, Brian Watanabe, Chongsun Ahn
3 | * Tags: RSVP, guestlist, wedding, Google Docs, spreadsheet
4 | * Requires at least: 2.5
5 | * Tested up to: 4.0.1
6 | * Stable tag: 2.0
7 |
8 | This plugin allows you to add RSVP and guestlist functionality. Guests can leave custom messages for the planners. Uses Google Docs spreadsheets.
9 |
10 | # Known issue
11 | Guest codes are not case sensitive.
12 |
13 | # Installation
14 |
15 | 1. Create a google docs spreadsheet with the following 7 headers: Guest Name, Code, Custom Message for Guest, Ceremony, Banquet, Message from Guest, Hotel.
16 | 2. Go to "Settings->Google Docs RSVP" to configure.
17 | 3. Add the text: gdrsvp-googledocsrsvp in the content of your RSVP page.
18 |
19 | # Description
20 | This plugin allows you to add RSVP and guestlist functionality to your Wordpress site. It tracks RSVPs for ceremony and banquet. Additionally, guests can leave custom messages for the planners. The guestlist is maintained with a Google Docs spreadsheet which is very easy to use.
21 |
22 | It was originally designed to be a wedding guestlist that I made for a friend (congratulations to Mike & Di!).
23 |
24 | Features Bulletlist:
25 |
26 | * Customizable RSVP page
27 | * Connects to Google Docs Spreadsheet for guestlist
28 | * Planners can write custom messages to guests
29 | * Guests can send custom message to planners
30 | * Email updates are sent to the planner
31 | * Wedding features: Records responses for Ceremony, Banquet, or Hotel Reservations
32 |
33 | # Instructions
34 | 1. Using a Google account, create a new Spreadsheet at docs.google.com
35 | 2. The spreadsheet must have the following 7 headers: Guest Name, Code, Custom Message for Guest, Ceremony, Banquet, Message from Guest, Hotel
36 | 3. Fill in the guestlist with names, codes, and an optional custom message. Make sure the code is not guessable, for example: short numeric codes are probably a bad idea. A nosy guest might punch in random numbers and see guest information.
37 | 4. Download, unzip, upload, and activate your plugin.
38 | 5. In your Wordpress site, go to "Settings->Google Docs RSVP" and follow the step-by-step instructions on the page, and fill in the other information (Google Docs title and sheet, etc.).
39 | 6. Create a new wordpress Page and put the text: gdrsvp-googledocsrsvp in the content box. The plugin will replace it with the RSVP code.
40 | 7. Now, guests can type in a code and fill out the reservation form, which will send an email to you and update the spreadsheet. Note: Once guests have filled out the form, their RSVP code is no longer usable.
41 |
42 |
43 | Thank you! Good luck with your planning efforts. Remember to allow guests to contact you in other ways in case of digital emergencies.
44 |
45 | We look forward to any comments. If there is a good response, we may incorporate your suggestions into the next version.
46 |
47 | This code is released under GPLv3. If you create a new version of this plugin, let us know and we may link to it.
48 |
49 | Thanks!
50 |
51 | # Frequently Asked Questions
52 |
53 | = My plugin isn't working =
54 |
55 | Check the homepage for a lot of comments and responses about how to fiddle
56 | with this plugin, we have had a bit of discussion and help from other users.
57 |
58 | Note that you are required to have PHP version 5. Sorry, the only solution right now is to use that version of PHP.
59 |
60 | # How do I change some of the text?
61 |
62 | If you cannot change the text in the options page, you can change it in the source code (by editting wp-gdrsvp-plugin.php). This is not a very safe thing to do, but you could search the code for the words you want to change and fiddle around with it. This take familiarity with HTML and a little PHP.
63 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/src/Google/Service/GroupsMigration.php:
--------------------------------------------------------------------------------
1 |
22 | * Groups Migration Api.
23 | *
24 | *
25 | *
26 | * For more information about this service, see the API
27 | * Documentation
28 | *
29 | *
30 | * @author Google, Inc.
31 | */
32 | class Google_Service_GroupsMigration extends Google_Service
33 | {
34 |
35 |
36 | public $archive;
37 |
38 |
39 | /**
40 | * Constructs the internal representation of the GroupsMigration service.
41 | *
42 | * @param Google_Client $client
43 | */
44 | public function __construct(Google_Client $client)
45 | {
46 | parent::__construct($client);
47 | $this->servicePath = 'groups/v1/groups/';
48 | $this->version = 'v1';
49 | $this->serviceName = 'groupsmigration';
50 |
51 | $this->archive = new Google_Service_GroupsMigration_Archive_Resource(
52 | $this,
53 | $this->serviceName,
54 | 'archive',
55 | array(
56 | 'methods' => array(
57 | 'insert' => array(
58 | 'path' => '{groupId}/archive',
59 | 'httpMethod' => 'POST',
60 | 'parameters' => array(
61 | 'groupId' => array(
62 | 'location' => 'path',
63 | 'type' => 'string',
64 | 'required' => true,
65 | ),
66 | ),
67 | ),
68 | )
69 | )
70 | );
71 | }
72 | }
73 |
74 |
75 | /**
76 | * The "archive" collection of methods.
77 | * Typical usage is:
78 | *
79 | * $groupsmigrationService = new Google_Service_GroupsMigration(...);
80 | * $archive = $groupsmigrationService->archive;
81 | *
82 | */
83 | class Google_Service_GroupsMigration_Archive_Resource extends Google_Service_Resource
84 | {
85 |
86 | /**
87 | * Inserts a new mail into the archive of the Google group. (archive.insert)
88 | *
89 | * @param string $groupId
90 | * The group ID
91 | * @param array $optParams Optional parameters.
92 | * @return Google_Service_GroupsMigration_Groups
93 | */
94 | public function insert($groupId, $optParams = array())
95 | {
96 | $params = array('groupId' => $groupId);
97 | $params = array_merge($params, $optParams);
98 | return $this->call('insert', array($params), "Google_Service_GroupsMigration_Groups");
99 | }
100 | }
101 |
102 |
103 |
104 |
105 | class Google_Service_GroupsMigration_Groups extends Google_Model
106 | {
107 | protected $internal_gapi_mappings = array(
108 | );
109 | public $kind;
110 | public $responseCode;
111 |
112 | public function setKind($kind)
113 | {
114 | $this->kind = $kind;
115 | }
116 |
117 | public function getKind()
118 | {
119 | return $this->kind;
120 | }
121 |
122 | public function setResponseCode($responseCode)
123 | {
124 | $this->responseCode = $responseCode;
125 | }
126 |
127 | public function getResponseCode()
128 | {
129 | return $this->responseCode;
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/vendor/asimlqt/php-google-spreadsheet-client/src/Google/Spreadsheet/Spreadsheet.php:
--------------------------------------------------------------------------------
1 |
28 | */
29 | class Spreadsheet
30 | {
31 | const REL_WORKSHEETS_FEED = 'http://schemas.google.com/spreadsheets/2006#worksheetsfeed';
32 |
33 | /**
34 | * The spreadsheet xml object
35 | *
36 | * @var \SimpleXMLElement
37 | */
38 | protected $xml;
39 |
40 | /**
41 | * Initializes the spreadsheet object
42 | *
43 | * @param SimpleXMLElement $xml
44 | */
45 | public function __construct(SimpleXMLElement $xml)
46 | {
47 | $this->xml = $xml;
48 | }
49 |
50 | /**
51 | * Get the spreadsheet id
52 | *
53 | * @return string
54 | */
55 | public function getId()
56 | {
57 | return $this->xml->id->__toString();
58 | }
59 |
60 | /**
61 | * Get the updated date
62 | *
63 | * @return DateTime
64 | */
65 | public function getUpdated()
66 | {
67 | return new DateTime($this->xml->updated->__toString());
68 | }
69 |
70 | /**
71 | * Returns the title (name) of the spreadsheet
72 | *
73 | * @return string
74 | */
75 | public function getTitle()
76 | {
77 | return $this->xml->title->__toString();
78 | }
79 |
80 | /**
81 | * Get all the worksheets which belong to this spreadsheet
82 | *
83 | * @return \Google\Spreadsheet\WorksheetFeed
84 | */
85 | public function getWorksheets()
86 | {
87 | $res = ServiceRequestFactory::getInstance()->get($this->getWorksheetsFeedUrl());
88 | return new WorksheetFeed($res);
89 | }
90 |
91 | /**
92 | * Add a new worksheet to this spreadsheet
93 | *
94 | * @param string $title
95 | * @param int $rowCount default is 100
96 | * @param int $colCount default is 10
97 | *
98 | * @return \Google\Spreadsheet\Worksheet
99 | */
100 | public function addWorksheet($title, $rowCount=100, $colCount=10)
101 | {
102 | $entry = sprintf('
103 |
104 | %s
105 | %u
106 | %u
107 | ',
108 | $title,
109 | $rowCount,
110 | $colCount
111 | );
112 |
113 | $response = ServiceRequestFactory::getInstance()->post($this->getWorksheetsFeedUrl(), $entry);
114 | return new Worksheet(new SimpleXMLElement($response));
115 | }
116 |
117 | /**
118 | * Returns the feed url of the spreadsheet
119 | *
120 | * @return string
121 | */
122 | public function getWorksheetsFeedUrl()
123 | {
124 | return Util::getLinkHref($this->xml, self::REL_WORKSHEETS_FEED);
125 | }
126 |
127 | }
--------------------------------------------------------------------------------
/vendor/google/apiclient/tests/youtube/YouTubeTest.php:
--------------------------------------------------------------------------------
1 | setName('Google YouTube API tests');
26 | $suite->addTestSuite('YouTubeTest');
27 | return $suite;
28 | }
29 | }
30 |
31 | class YouTubeTest extends BaseTest
32 | {
33 | /** @var Google_PlusService */
34 | public $plus;
35 | public function __construct()
36 | {
37 | parent::__construct();
38 | $this->youtube = new Google_Service_YouTube($this->getClient());
39 | }
40 |
41 | public function testMissingFieldsAreNull()
42 | {
43 | if (!$this->checkToken()) {
44 | return;
45 | }
46 |
47 | $parts = "id,brandingSettings";
48 | $opts = array("mine" => true);
49 | $channels = $this->youtube->channels->listChannels($parts, $opts);
50 |
51 | $newChannel = new Google_Service_YouTube_Channel();
52 | $newChannel->setId($channels[0]->getId());
53 | $newChannel->setBrandingSettings($channels[0]->getBrandingSettings());
54 |
55 | $simpleOriginal = $channels[0]->toSimpleObject();
56 | $simpleNew = $newChannel->toSimpleObject();
57 |
58 | $this->assertObjectHasAttribute('etag', $simpleOriginal);
59 | $this->assertObjectNotHasAttribute('etag', $simpleNew);
60 |
61 | $owner_details = new Google_Service_YouTube_ChannelContentOwnerDetails();
62 | $owner_details->setTimeLinked("123456789");
63 | $o_channel = new Google_Service_YouTube_Channel();
64 | $o_channel->setContentOwnerDetails($owner_details);
65 | $simpleManual = $o_channel->toSimpleObject();
66 | $this->assertObjectHasAttribute('timeLinked', $simpleManual->contentOwnerDetails);
67 | $this->assertObjectNotHasAttribute('contentOwner', $simpleManual->contentOwnerDetails);
68 |
69 | $owner_details = new Google_Service_YouTube_ChannelContentOwnerDetails();
70 | $owner_details->timeLinked = "123456789";
71 | $o_channel = new Google_Service_YouTube_Channel();
72 | $o_channel->setContentOwnerDetails($owner_details);
73 | $simpleManual = $o_channel->toSimpleObject();
74 |
75 | $this->assertObjectHasAttribute('timeLinked', $simpleManual->contentOwnerDetails);
76 | $this->assertObjectNotHasAttribute('contentOwner', $simpleManual->contentOwnerDetails);
77 |
78 | $owner_details = new Google_Service_YouTube_ChannelContentOwnerDetails();
79 | $owner_details['timeLinked'] = "123456789";
80 | $o_channel = new Google_Service_YouTube_Channel();
81 | $o_channel->setContentOwnerDetails($owner_details);
82 | $simpleManual = $o_channel->toSimpleObject();
83 |
84 | $this->assertObjectHasAttribute('timeLinked', $simpleManual->contentOwnerDetails);
85 | $this->assertObjectNotHasAttribute('contentOwner', $simpleManual->contentOwnerDetails);
86 |
87 | $ping = new Google_Service_YouTube_ChannelConversionPing();
88 | $ping->setContext("hello");
89 | $pings = new Google_Service_YouTube_ChannelConversionPings();
90 | $pings->setPings(array($ping));
91 | $simplePings = $pings->toSimpleObject();
92 | $this->assertObjectHasAttribute('context', $simplePings->pings[0]);
93 | $this->assertObjectNotHasAttribute('conversionUrl', $simplePings->pings[0]);
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/tests/general/ApiMediaFileUploadTest.php:
--------------------------------------------------------------------------------
1 | getClient();
29 | $request = new Google_Http_Request('http://www.example.com', 'POST');
30 | $media = new Google_Http_MediaFileUpload(
31 | $client,
32 | $request,
33 | 'image/png',
34 | base64_decode('data:image/png;base64,a')
35 | );
36 |
37 | $this->assertEquals(0, $media->getProgress());
38 | $this->assertGreaterThan(0, strlen($request->getPostBody()));
39 | }
40 |
41 | public function testGetUploadType()
42 | {
43 | $client = $this->getClient();
44 | $request = new Google_Http_Request('http://www.example.com', 'POST');
45 |
46 | // Test resumable upload
47 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', 'a', true);
48 | $params = array('mediaUpload' => array('value' => $media));
49 | $this->assertEquals('resumable', $media->getUploadType(null));
50 |
51 | // Test data *only* uploads
52 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', 'a', false);
53 | $this->assertEquals('media', $media->getUploadType(null));
54 |
55 | // Test multipart uploads
56 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', 'a', false);
57 | $this->assertEquals('multipart', $media->getUploadType(array('a' => 'b')));
58 | }
59 |
60 | public function testResultCode()
61 | {
62 | $client = $this->getClient();
63 | $request = new Google_Http_Request('http://www.example.com', 'POST');
64 |
65 | // Test resumable upload
66 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', 'a', true);
67 | $this->assertEquals(null, $media->getHttpResultCode());
68 | }
69 |
70 | public function testProcess()
71 | {
72 | $client = $this->getClient();
73 | $data = 'foo';
74 |
75 | // Test data *only* uploads.
76 | $request = new Google_Http_Request('http://www.example.com', 'POST');
77 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', $data, false);
78 | $this->assertEquals($data, $request->getPostBody());
79 |
80 | // Test resumable (meta data) - we want to send the metadata, not the app data.
81 | $request = new Google_Http_Request('http://www.example.com', 'POST');
82 | $reqData = json_encode("hello");
83 | $request->setPostBody($reqData);
84 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', $data, true);
85 | $this->assertEquals(json_decode($reqData), $request->getPostBody());
86 |
87 | // Test multipart - we are sending encoded meta data and post data
88 | $request = new Google_Http_Request('http://www.example.com', 'POST');
89 | $reqData = json_encode("hello");
90 | $request->setPostBody($reqData);
91 | $media = new Google_Http_MediaFileUpload($client, $request, 'image/png', $data, false);
92 | $this->assertContains($reqData, $request->getPostBody());
93 | $this->assertContains(base64_encode($data), $request->getPostBody());
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/examples/idtoken.php:
--------------------------------------------------------------------------------
1 | ';
29 | $client_secret = '';
30 | $redirect_uri = '';
31 |
32 | $client = new Google_Client();
33 | $client->setClientId($client_id);
34 | $client->setClientSecret($client_secret);
35 | $client->setRedirectUri($redirect_uri);
36 | $client->setScopes('email');
37 |
38 | /************************************************
39 | If we're logging out we just need to clear our
40 | local access token in this case
41 | ************************************************/
42 | if (isset($_REQUEST['logout'])) {
43 | unset($_SESSION['access_token']);
44 | }
45 |
46 | /************************************************
47 | If we have a code back from the OAuth 2.0 flow,
48 | we need to exchange that with the authenticate()
49 | function. We store the resultant access token
50 | bundle in the session, and redirect to ourself.
51 | ************************************************/
52 | if (isset($_GET['code'])) {
53 | $client->authenticate($_GET['code']);
54 | $_SESSION['access_token'] = $client->getAccessToken();
55 | $redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
56 | header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
57 | }
58 |
59 | /************************************************
60 | If we have an access token, we can make
61 | requests, else we generate an authentication URL.
62 | ************************************************/
63 | if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {
64 | $client->setAccessToken($_SESSION['access_token']);
65 | } else {
66 | $authUrl = $client->createAuthUrl();
67 | }
68 |
69 | /************************************************
70 | If we're signed in we can go ahead and retrieve
71 | the ID token, which is part of the bundle of
72 | data that is exchange in the authenticate step
73 | - we only need to do a network call if we have
74 | to retrieve the Google certificate to verify it,
75 | and that can be cached.
76 | ************************************************/
77 | if ($client->getAccessToken()) {
78 | $_SESSION['access_token'] = $client->getAccessToken();
79 | $token_data = $client->verifyIdToken()->getAttributes();
80 | }
81 |
82 | echo pageHeader("User Query - Retrieving An Id Token");
83 | if (
84 | $client_id == ''
85 | || $client_secret == ''
86 | || $redirect_uri == '') {
87 | echo missingClientSecretsWarning();
88 | }
89 | ?>
90 |
105 |
2 |
3 | https://spreadsheets.google.com/feeds/worksheets/tFEgU8ywJkkjcZjGsXV/private/full
4 | 2014-02-07T18:33:44.826Z
5 |
6 | Test Spreadsheet
7 |
8 |
9 |
10 |
11 |
12 | asimlqt22
13 | asimlqt22@gmail.com
14 |
15 | 1
16 | 1
17 |
18 | https://spreadsheets.google.com/feeds/worksheets/tFEgU8ywJkkjcZjGsXV/private/full/od6
19 | 2013-12-27T15:24:52.148Z
20 |
21 | Sheet1
22 | Sheet1
23 |
24 |
25 |
26 |
27 |
28 | 100
29 | 20
30 |
31 |
32 | https://spreadsheets.google.com/feeds/worksheets/tFEgU8ywJkkjcZjGsXV/private/full/od6
33 | 2013-12-27T15:24:52.148Z
34 |
35 | Sheet2
36 | Sheet2
37 |
38 |
39 |
40 |
41 |
42 | 100
43 | 20
44 |
45 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 | "This file is @generated automatically"
6 | ],
7 | "hash": "f704d46a3b1e817188d477e5b1b1effb",
8 | "packages": [
9 | {
10 | "name": "asimlqt/php-google-spreadsheet-client",
11 | "version": "2.3.0",
12 | "source": {
13 | "type": "git",
14 | "url": "https://github.com/asimlqt/php-google-spreadsheet-client.git",
15 | "reference": "7c87fb7021f1fa1c5f2dbafd999e49f2e6bf364e"
16 | },
17 | "dist": {
18 | "type": "zip",
19 | "url": "https://api.github.com/repos/asimlqt/php-google-spreadsheet-client/zipball/7c87fb7021f1fa1c5f2dbafd999e49f2e6bf364e",
20 | "reference": "7c87fb7021f1fa1c5f2dbafd999e49f2e6bf364e",
21 | "shasum": ""
22 | },
23 | "require": {
24 | "php": ">=5.3.0"
25 | },
26 | "type": "library",
27 | "autoload": {
28 | "psr-4": {
29 | "Google\\": "src/Google"
30 | }
31 | },
32 | "notification-url": "https://packagist.org/downloads/",
33 | "license": [
34 | "Apache-2.0"
35 | ],
36 | "authors": [
37 | {
38 | "name": "Asim Liaquat",
39 | "email": "asimlqt22@gmail.com",
40 | "role": "Developer"
41 | },
42 | {
43 | "name": "Martin Czygan",
44 | "email": "martin.czygan@gmail.com",
45 | "homepage": "http://twitter.com/cvvfj",
46 | "role": "Packager"
47 | }
48 | ],
49 | "description": "Google Spreadsheet PHP Client",
50 | "homepage": "https://github.com/asimlqt/php-google-spreadsheet-client",
51 | "keywords": [
52 | "google",
53 | "spreadsheet"
54 | ],
55 | "time": "2014-12-02 18:15:21"
56 | },
57 | {
58 | "name": "google/apiclient",
59 | "version": "1.0.6-beta",
60 | "source": {
61 | "type": "git",
62 | "url": "https://github.com/google/google-api-php-client.git",
63 | "reference": "a41a9dc0662e36420030eaab802dbb1f85459479"
64 | },
65 | "dist": {
66 | "type": "zip",
67 | "url": "https://api.github.com/repos/google/google-api-php-client/zipball/a41a9dc0662e36420030eaab802dbb1f85459479",
68 | "reference": "a41a9dc0662e36420030eaab802dbb1f85459479",
69 | "shasum": ""
70 | },
71 | "require": {
72 | "php": ">=5.2.1"
73 | },
74 | "require-dev": {
75 | "phpunit/phpunit": "3.7.*"
76 | },
77 | "type": "library",
78 | "extra": {
79 | "branch-alias": {
80 | "dev-master": "1.0.x-dev"
81 | }
82 | },
83 | "autoload": {
84 | "classmap": [
85 | "src/"
86 | ]
87 | },
88 | "notification-url": "https://packagist.org/downloads/",
89 | "include-path": [
90 | "src/"
91 | ],
92 | "license": [
93 | "Apache-2.0"
94 | ],
95 | "description": "Client library for Google APIs",
96 | "homepage": "http://developers.google.com/api-client-library/php",
97 | "keywords": [
98 | "google"
99 | ],
100 | "time": "2014-09-30 19:33:59"
101 | }
102 | ],
103 | "packages-dev": [],
104 | "aliases": [],
105 | "minimum-stability": "stable",
106 | "stability-flags": {
107 | "google/apiclient": 10
108 | },
109 | "prefer-stable": false,
110 | "platform": [],
111 | "platform-dev": []
112 | }
113 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/src/Google/Cache/Memcache.php:
--------------------------------------------------------------------------------
1 |
30 | */
31 | class Google_Cache_Memcache extends Google_Cache_Abstract
32 | {
33 | private $connection = false;
34 | private $mc = false;
35 | private $host;
36 | private $port;
37 |
38 | public function __construct(Google_Client $client)
39 | {
40 | if (!function_exists('memcache_connect') && !class_exists("Memcached")) {
41 | throw new Google_Cache_Exception("Memcache functions not available");
42 | }
43 | if ($client->isAppEngine()) {
44 | // No credentials needed for GAE.
45 | $this->mc = new Memcached();
46 | $this->connection = true;
47 | } else {
48 | $this->host = $client->getClassConfig($this, 'host');
49 | $this->port = $client->getClassConfig($this, 'port');
50 | if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) {
51 | throw new Google_Cache_Exception("You need to supply a valid memcache host and port");
52 | }
53 | }
54 | }
55 |
56 | /**
57 | * @inheritDoc
58 | */
59 | public function get($key, $expiration = false)
60 | {
61 | $this->connect();
62 | $ret = false;
63 | if ($this->mc) {
64 | $ret = $this->mc->get($key);
65 | } else {
66 | $ret = memcache_get($this->connection, $key);
67 | }
68 | if ($ret === false) {
69 | return false;
70 | }
71 | if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
72 | $this->delete($key);
73 | return false;
74 | }
75 | return $ret['data'];
76 | }
77 |
78 | /**
79 | * @inheritDoc
80 | * @param string $key
81 | * @param string $value
82 | * @throws Google_Cache_Exception
83 | */
84 | public function set($key, $value)
85 | {
86 | $this->connect();
87 | // we store it with the cache_time default expiration so objects will at
88 | // least get cleaned eventually.
89 | $data = array('time' => time(), 'data' => $value);
90 | $rc = false;
91 | if ($this->mc) {
92 | $rc = $this->mc->set($key, $data);
93 | } else {
94 | $rc = memcache_set($this->connection, $key, $data, false);
95 | }
96 | if ($rc == false) {
97 | throw new Google_Cache_Exception("Couldn't store data in cache");
98 | }
99 | }
100 |
101 | /**
102 | * @inheritDoc
103 | * @param String $key
104 | */
105 | public function delete($key)
106 | {
107 | $this->connect();
108 | if ($this->mc) {
109 | $this->mc->delete($key, 0);
110 | } else {
111 | memcache_delete($this->connection, $key, 0);
112 | }
113 | }
114 |
115 | /**
116 | * Lazy initialiser for memcache connection. Uses pconnect for to take
117 | * advantage of the persistence pool where possible.
118 | */
119 | private function connect()
120 | {
121 | if ($this->connection) {
122 | return;
123 | }
124 |
125 | if (class_exists("Memcached")) {
126 | $this->mc = new Memcached();
127 | $this->mc->addServer($this->host, $this->port);
128 | $this->connection = true;
129 | } else {
130 | $this->connection = memcache_pconnect($this->host, $this->port);
131 | }
132 |
133 | if (! $this->connection) {
134 | throw new Google_Cache_Exception("Couldn't connect to memcache server");
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Google Docs RSVP, WordPress Plugin ===
2 | Contributors: Gifford Cheung, Brian Watanabe, Chongsun Ahn
3 | Tags: RSVP, guestlist, wedding, Google Docs, spreadsheet
4 | Requires at least: 2.5
5 | Tested up to: 4.0.1
6 | Stable tag: 2.0
7 |
8 | This plugin allows you to add RSVP and guestlist functionality. Guests can leave custom messages for the planners. Uses Google Docs spreadsheets.
9 |
10 | == Known issue ==
11 | Guest codes are not case sensitive.
12 |
13 | == Installation ==
14 |
15 | 1. Create a google docs spreadsheet with the following 7 headers: Guest Name, Code, Custom Message for Guest, Ceremony, Banquet, Message from Guest, Hotel.
16 | 2. Go to "Settings->Google Docs RSVP" to configure.
17 | 3. Add the text: gdrsvp-googledocsrsvp in the content of your RSVP page.
18 |
19 | == Description ==
20 | This plugin allows you to add RSVP and guestlist functionality to your Wordpress site. It tracks RSVPs for ceremony and banquet. Additionally, guests can leave custom messages for the planners. The guestlist is maintained with a Google Docs spreadsheet which is very easy to use.
21 |
22 | It was originally designed to be a wedding guestlist that I made for a friend (congratulations to Mike & Di!).
23 |
24 | Features Bulletlist:
25 |
26 | * Customizable RSVP page
27 | * Connects to Google Docs Spreadsheet for guestlist
28 | * Planners can write custom messages to guests
29 | * Guests can send custom message to planners
30 | * Email updates are sent to the planner
31 | * Wedding features: Records responses for Ceremony, Banquet, or Hotel Reservations
32 |
33 | == Instructions ==
34 | 1. Using a Google account, create a new Spreadsheet at docs.google.com
35 | 2. The spreadsheet must have the following 7 headers: Guest Name, Code, Custom Message for Guest, Ceremony, Banquet, Message from Guest, Hotel
36 | 3. Fill in the guestlist with names, codes, and an optional custom message. Make sure the code is not guessable, for example: short numeric codes are probably a bad idea. A nosy guest might punch in random numbers and see guest information.
37 | 4. Download, unzip, upload, and activate your plugin.
38 | 5. In your Wordpress site, go to "Settings->Google Docs RSVP" and follow the step-by-step instructions on the page, and fill in the other information (Google Docs title and sheet, etc.).
39 | 6. Create a new wordpress Page and put the text: gdrsvp-googledocsrsvp in the content box. The plugin will replace it with the RSVP code.
40 | 7. Now, guests can type in a code and fill out the reservation form, which will send an email to you and update the spreadsheet. Note: Once guests have filled out the form, their RSVP code is no longer usable.
41 |
42 |
43 | Thank you! Good luck with your planning efforts. Remember to allow guests to contact you in other ways in case of digital emergencies.
44 |
45 | We look forward to any comments. If there is a good response, we may incorporate your suggestions into the next version.
46 |
47 | This code is released under GPLv3. If you create a new version of this plugin, let us know and we may link to it.
48 |
49 | Thanks!
50 |
51 | == Frequently Asked Questions ==
52 |
53 | = My plugin isn't working =
54 |
55 | Check the homepage for a lot of comments and responses about how to fiddle
56 | with this plugin, we have had a bit of discussion and help from other users.
57 |
58 | Note that you are required to have PHP version 5. Sorry, the only solution right now is to use that version of PHP.
59 |
60 | = How do I change some of the text? =
61 |
62 | If you cannot change the text in the options page, you can change it in the source code (by editting wp-gdrsvp-plugin.php). This is not a very safe thing to do, but you could search the code for the words you want to change and fiddle around with it. This take familiarity with HTML and a little PHP.
63 |
64 | = License =
65 | Copyright (C) 2008-2014 Gifford Cheung, Brian Watanabe, Chongsun Ahn
66 |
67 | This program is free software: you can redistribute it and/or modify
68 | it under the terms of the GNU General Public License as published by
69 | the Free Software Foundation, either version 3 of the License, or
70 | (at your option) any later version.
71 |
72 | This program is distributed in the hope that it will be useful,
73 | but WITHOUT ANY WARRANTY; without even the implied warranty of
74 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 | GNU General Public License for more details.
76 |
77 | You should have received a copy of the GNU General Public License
78 | along with this program. If not, see .
79 |
--------------------------------------------------------------------------------
/vendor/google/apiclient/examples/simplefileupload.php:
--------------------------------------------------------------------------------
1 | ';
42 | $client_secret = '';
43 | $redirect_uri = '';
44 |
45 | $client = new Google_Client();
46 | $client->setClientId($client_id);
47 | $client->setClientSecret($client_secret);
48 | $client->setRedirectUri($redirect_uri);
49 | $client->addScope("https://www.googleapis.com/auth/drive");
50 | $service = new Google_Service_Drive($client);
51 |
52 | if (isset($_REQUEST['logout'])) {
53 | unset($_SESSION['upload_token']);
54 | }
55 |
56 | if (isset($_GET['code'])) {
57 | $client->authenticate($_GET['code']);
58 | $_SESSION['upload_token'] = $client->getAccessToken();
59 | $redirect = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
60 | header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL));
61 | }
62 |
63 | if (isset($_SESSION['upload_token']) && $_SESSION['upload_token']) {
64 | $client->setAccessToken($_SESSION['upload_token']);
65 | if ($client->isAccessTokenExpired()) {
66 | unset($_SESSION['upload_token']);
67 | }
68 | } else {
69 | $authUrl = $client->createAuthUrl();
70 | }
71 |
72 | /************************************************
73 | If we're signed in then lets try to upload our
74 | file. For larger files, see fileupload.php.
75 | ************************************************/
76 | if ($client->getAccessToken()) {
77 | // This is uploading a file directly, with no metadata associated.
78 | $file = new Google_Service_Drive_DriveFile();
79 | $result = $service->files->insert(
80 | $file,
81 | array(
82 | 'data' => file_get_contents(TESTFILE),
83 | 'mimeType' => 'application/octet-stream',
84 | 'uploadType' => 'media'
85 | )
86 | );
87 |
88 | // Now lets try and send the metadata as well using multipart!
89 | $file = new Google_Service_Drive_DriveFile();
90 | $file->setTitle("Hello World!");
91 | $result2 = $service->files->insert(
92 | $file,
93 | array(
94 | 'data' => file_get_contents(TESTFILE),
95 | 'mimeType' => 'application/octet-stream',
96 | 'uploadType' => 'multipart'
97 | )
98 | );
99 | }
100 |
101 | echo pageHeader("File Upload - Uploading a small file");
102 | if (
103 | $client_id == ''
104 | || $client_secret == ''
105 | || $redirect_uri == '') {
106 | echo missingClientSecretsWarning();
107 | }
108 | ?>
109 |