コード例 #1
0
ファイル: LocalSettings.php プロジェクト: jkinner/ringside
$serverUrl = "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/api/restserver.php";
#
# $webUrl = The Web page url to return to an application
$webUrl = "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/web";
### Configuration for social ###
# RingsideSocial needs a connection the API server, even though they might be local
# their must be a Key/Secret required by Social to talk to the API engine.
# If the social layer gets deployed separately, also to make sure remote apps do not
# impersonate the RingsideSocial layer.
# We suggest adding in some random text right 6 to 8 characters long, such as 'sjd2jds';
#
$socialApiKey = 'Jkinner';
$socialSecretKey = 'Jkinner';
$socialRoot = '/social';
$socialUrl = "http://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}/social";
### Configuration for web ###
# Every WEB/ThirdParty connecting must maintain a NETWORK key indicating which WEB is connecting.
# This is the default/internal web community packaged with Ringside
$networkKey = 'ringside-web';
# Web apps need to do redirects and other URL related activities, however it does not know how the
# calling web front end is setup.  This setting tells it how to construct absolute urls.
$webRoot = '/web';
### Configuration for web-apps ###
# Set the support email address to be used during installation.
$supportEmail = 'admin@localhost';
### Configuration for demo-apps ###
### Configuration for API client ###
require_once 'ringside/api/clients/RingsideApiClientsConfig.php';
RingsideApiClientsConfig::$serverUrl = $serverUrl;
RingsideApiClientsConfig::$webUrl = $webUrl;
RingsideApiClientsConfig::$socialUrl = $socialUrl;
コード例 #2
0
 * Copyright 2008 Ringside Networks, Inc., and individual contributors as indicated
 * by the @authors tag or express copyright attribution
 * statements applied by the authors.  All third-party contributions are
 * distributed under license by Ringside Networks, Inc.
 * 
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * 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.
 ******************************************************************************/
class RingsideApiClientsConfig
{
    public static $webUrl = "";
    public static $serverUrl = "";
}
if (isset($_SERVER['SERVER_NAME'])) {
    $host = $_SERVER['SERVER_NAME'];
    $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : '80';
    RingsideApiClientsConfig::$webUrl = "http://{$host}:{$port}/";
    RingsideApiClientsConfig::$serverUrl = "http://{$host}:{$port}/restserver.php";
}
コード例 #3
0
ファイル: index.php プロジェクト: jkinner/ringside
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 the ringside client libraries
require_once 'config.php';
require_once 'SuggestionUtils.php';
include_once 'ringside/api/clients/RingsideApiClients.php';
include_once 'ringside/api/clients/RingsideRestClient.php';
// Get the ringside client
RingsideApiClientsConfig::$serverUrl = Config::$ringsideApi;
RingsideApiClientsConfig::$webUrl = Config::$ringsideWeb;
$ringsideClient = new RingsideApiClients(Config::$api_key, Config::$secret);
// Make sure the user is logged in and get the UID
$userid = $ringsideClient->require_login();
// Instantiate the rest client, this is for the ratings api in extension apps
$rest = new RingsideRestClient($ringsideClient->api_client);
$name = $rest->delegate->users_getInfo($userid, "first_name");
// Show the dashboard
?>
<fb:dashboard>
	<fb:action href="index.php?action=list">View Suggestions</fb:action>
	<fb:create-button href="index.php?action=add">Create a Suggestion</fb:create-button>
</fb:dashboard>
<?php 
// Say hi to the user, but let's use an fbml tag, just as another example of using fbml