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 ?>