From 1d54a0f48b59282b937122ca6a757efa16e41f12 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 3 Mar 2013 21:44:31 -0800 Subject: [PATCH] Placeholder added for Social plugin --- e107_plugins/social/e_event.php | 111 ++++++++++++++++++++++++++++++++ e107_plugins/social/plugin.xml | 4 ++ 2 files changed, 115 insertions(+) create mode 100644 e107_plugins/social/e_event.php create mode 100644 e107_plugins/social/plugin.xml diff --git a/e107_plugins/social/e_event.php b/e107_plugins/social/e_event.php new file mode 100644 index 000000000..edff54ef5 --- /dev/null +++ b/e107_plugins/social/e_event.php @@ -0,0 +1,111 @@ +socialForm($data); + } + + } + + /* + * handle db create + * @param array $data + */ + function event_create($data) + { + //print_a($data); + $this->socialPost($data); + } + + /* + * handle db update + * @param array $data + */ + function event_update($data) + { + $this->socialPost($data); + } + + /* + * handle db delete + * @param array $data + */ + function event_delete($data) + { + // N/A + } + + + /** + * TODO - Make functional.. using hybridAuth class. + * ie. Admin enters a message, and the message + the newly generated link are submitted to Twitter or FB. + */ + + function socialForm($data='') + { + + //TODO Check Social Logins Pref for presence of FB and Twitter details.. if not found, return nothing.(see admin->preferences) + + $frm = e107::getForm(); + + $input[0]['caption'] = "Post to Twitter"; + $input[0]['html'] = $frm->text('twitterPost','', 150); // Text to post.. Link will automatically be appended to message. + $input[0]['help'] = "Enter a message to post a link to this item on Twitter"; // Text to post.. Link will automatically be appended to message. + + + $input[1]['caption'] = "Post to Facebook"; + $input[1]['html'] = $frm->text('FacebookPost'); + + return $input; + + } + + //TODO Function to Post Data to Twitter or FB. + // using hybridAuth class. + function socialPost($data) + { + + + } + +} //end class + +?> \ No newline at end of file diff --git a/e107_plugins/social/plugin.xml b/e107_plugins/social/plugin.xml new file mode 100644 index 000000000..c0f806e3e --- /dev/null +++ b/e107_plugins/social/plugin.xml @@ -0,0 +1,4 @@ + + + menu + \ No newline at end of file