require_once 'ringside/web/RingsideWebUtils.php'; require_once 'ringside/web/config/RingsideWebConfig.php'; require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * This is SOCIAL render integration page. * This enables a third party site to point to this page and * get back an application. * * To render through we need to know which network is making the request. * NETWORK: * AUTHENTICATED USER: * */ $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideWebConfig::$networkKey, null, $webSession->getSocial()); $inSession = $social->inSession(); $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; $canvas = ''; $trailingSlash = false; if (!empty($pathInfo)) { if ($str[strlen($str) - 1] == "/") { $trailingSlash = true; } $pathInfo = ltrim($pathInfo, "/"); $path_parts = explode('/', trim($pathInfo), 2); $canvas = $path_parts[0]; if (isset($path_parts[1])) { $pathInfo = $path_parts[1]; } else { $pathInfo = '';
* License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. ******************************************************************************/ include_once 'include.php'; require_once 'ringside/web/RingsideWebUtils.php'; require_once 'ringside/web/config/RingsideWebConfig.php'; require_once 'ringside/web/session/RingsideWebSession.php'; require_once 'ringside/social/client/RingsideSocialClientLocal.php'; /** * Canvas page is the controller for displaying most applications. * The standard top and sidebars are used. * The application being invoked is picked from the path info. */ $webSession = new RingsideWebSession(); $social = new RingsideSocialClientLocal(RingsideSocialConfig::$apiKey, RingsideSocialConfig::$secretKey, $webSession->getSocial()); $inSession = $social->inSession(); $pathInfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : ''; if (empty($pathInfo) || strlen(trim($pathInfo)) < 2) { $canvas = 'index.php'; $pathInfo = ''; } else { $path_parts = explode('/', trim($pathInfo), 3); $canvas = $path_parts[1]; if (isset($path_parts[2])) { $pathInfo = $path_parts[2]; } else { RingsideWebUtils::redirect(ltrim($pathInfo, '/') . '/' . ($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '')); return; } $pathInfo = ltrim($pathInfo, "/");