aboutsummaryrefslogtreecommitdiff
path: root/mod/twitter_api/start.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-08-23 20:12:58 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-08-23 20:12:58 -0700
commit9f13557c2e7422cb15ce109adbe5714d6d78fc9e (patch)
treef2c3966a0bbaae5462475089945e531d0f9138c9 /mod/twitter_api/start.php
parent469f8ba89cc3b613b88228d95f9c69cb53e5b605 (diff)
downloadelgg-9f13557c2e7422cb15ce109adbe5714d6d78fc9e.tar.gz
elgg-9f13557c2e7422cb15ce109adbe5714d6d78fc9e.tar.bz2
Fixes #3117. Added an interstitial page for twitter new users.
Diffstat (limited to 'mod/twitter_api/start.php')
-rw-r--r--mod/twitter_api/start.php15
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;