diff options
Diffstat (limited to 'mod/twitter_api/start.php')
-rw-r--r-- | mod/twitter_api/start.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/twitter_api/start.php b/mod/twitter_api/start.php index 0c71104b5..b17643c8c 100644 --- a/mod/twitter_api/start.php +++ b/mod/twitter_api/start.php @@ -36,6 +36,9 @@ function twitter_api_init() { // push status messages to twitter elgg_register_plugin_hook_handler('status', 'user', 'twitter_api_tweet'); + + $actions = dirname(__FILE__) . '/actions/twitter_api'; + elgg_register_action('twitter_api/interstitial_settings', "$actions/interstitial_settings.php", 'logged_in'); } /** @@ -75,6 +78,18 @@ function twitter_api_pagehandler($page) { case 'login': twitter_api_login(); break; + case 'interstitial': + gatekeeper(); + // only let twitter users do this. + $guid = elgg_get_logged_in_user_guid(); + $twitter_name = elgg_get_plugin_user_setting('twitter_name', $guid, 'twitter_api'); + if (!$twitter_name) { + register_error(elgg_echo('twitter_api:invalid_page')); + forward(); + } + $pages = dirname(__FILE__) . '/pages/twitter_api'; + include "$pages/interstitial.php"; + break; default: forward(); break; |