Exemplo n.º 1
0
/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_friends/index.php
* Handles requests to /friends 
* Handles requests to /friends/followers
* Handles requests to /friends/recommended
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'login', 'authSecret' => @$_COOKIE['pp_auth'], 'debug' => 0));
if (!$POD->libOptions('enable_core_friends')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$max_friends = 20;
$offset = 0;
if (isset($_GET['offset'])) {
    $offset = $_GET['offset'];
}
$mode = "friends";
if (isset($_GET['mode'])) {
    $mode = $_GET['mode'];
}
if ($mode == "friends") {
    $people = $POD->currentUser()->friends($max_friends, $offset);
    $title = "My Friends";
Exemplo n.º 2
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_invite/index.php
* Send email invitations and generate invite codes.
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'verified', 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_invite')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$max_allowed_invites = 5;
if ($_POST) {
    // send invites.
    for ($i = 1; $i <= $max_allowed_invites; $i++) {
        if (isset($_POST["email{$i}"]) && $_POST["email{$i}"] != '') {
            $POD->currentUser()->sendInvite($_POST["email{$i}"], $_POST['message'], @$_POST['group']);
            $POD->addMessage("Invites sent!");
        }
    }
}
$POD->header('Send Invites');
?>
Exemplo n.º 3
0
?>
	
<div class="panel">

	<h1>Images & Icons</h1>
	
	<p>
		PeoplePods can automatically resize and create thumbnail versions of uploaded photos.
		Customize the size of these images below.
	</p>

	<h2>People Images</h2>
	
	<form method="post">
		<p><input type="checkbox" value="peopleImageResize" name="peopleImageResize" <?php 
if ($POD->libOptions('peopleImageResize')) {
    ?>
checked<?php 
}
?>
 /> Resize profile images.
		<div class="more_info">
			<P>Resize images to a maximum width of:
			<input type="text" class="text" name="peopleImageMaxWidth" value="<?php 
echo $POD->libOptions('peopleImageMaxWidth');
?>
" />
			</p>
		</div></p>
		
		<P>Resize icons to a maximum width of:
Exemplo n.º 4
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_profiles/editprofile.php
* Handles requests to /editprofile
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/messaging
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => 'login', 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_profiles')) {
    header("Location: " . $POD->libOptions('serverRoot'));
    exit;
}
if (@$_POST['account'] != '') {
    $POD->currentUser()->set('nick', $_POST['nick']);
    //$POD->currentUser()->set('email',$_POST['email']);
    $POD->currentUser()->save();
    if (!$POD->currentUser()->success()) {
        $POD->addMessage($POD->currentUser()->error());
    } else {
        $POD->addMessage("Your settings have been updated.");
        foreach ($_FILES as $filename => $file) {
            $POD->currentUser()->addFile($filename, $file);
            if (!$POD->currentUser()->success()) {
                $POD->addMessage('An error occured while attaching your file: ' . $POD->currentUser()->error());
Exemplo n.º 5
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'authSecret' => @$_COOKIE['pp_auth']));
$request = 'http://twitter.com/oauth/request_token';
$access = 'http://twitter.com/oauth/access_token';
$auth = 'http://twitter.com/oauth/authorize';
$key = $POD->libOptions('twitter_api');
$secret = $POD->libOptions('twitter_secret');
if (!($key && $secret)) {
    $POD->header('Configuration Required');
    echo '<div class="info">Configuration required!</div>';
    echo '<p>To enable Twitter login, please set the Twitter API key and secret via the PeoplePods command center.</p>';
    echo '<P>To obtain the necessary details from Twitter, <a href="https://dev.twitter.com/apps">register your app</a>.</p>';
    $POD->footer();
    exit;
}
// we need to make sure sessions are on so we can store the twitter codes
session_start();
if (isset($_GET['remove'])) {
    $POD->currentUser()->addMeta('twitter_name', null);
    $POD->currentUser()->addMeta('twitter_secret', null);
    $POD->currentUser()->addMeta('twitter_token', null);
    $POD->currentUser()->addMeta('twitter_id', null);
    $POD->addMessage("Your Twitter account has been removed.");
}
$access_token_info = array();
if (@$_GET['mode'] == 'verify') {
    if ($_SESSION['twitter_state'] == 1 && !isset($_GET['oauth_token'])) {
        $_SESSION['twitter_state'] = 0;
    }
Exemplo n.º 6
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_authentication/logout.php
* Handles requests to /logout
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../lib/Core.php";
$POD = new PeoplePod();
if (!$POD->libOptions('enable_core_authentication_login')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
setcookie('pp_user', '', 0, "/");
setcookie('pp_pass', '', 0, "/");
setcookie('pp_auth', '', 0, "/");
session_destroy();
if ($_SERVER['HTTP_REFERER']) {
    header("Location: " . $_SERVER['HTTP_REFERER']);
} else {
    header("Location: " . $POD->siteRoot(false));
}
Exemplo n.º 7
0
* as defined in my_theme/people/dashboard.php

* Displays a welcome page for non-members
* as defined in my_theme/people/welcome.php

* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
if ($_POST) {
    $lockdown = 'verified';
} else {
    $lockdown = null;
}
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => $lockdown, 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_dashboard')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
if (@$_GET['msg']) {
    $POD->addMessage(htmlspecialchars(strip_tags($_GET['msg'])));
}
$POD->header();
if ($POD->isAuthenticated()) {
    if (!isset($_GET['replies'])) {
        $POD->currentUser()->output('dashboard');
    } else {
        $POD->currentUser()->output('dashboard_replies');
    }
} else {
    $POD->getPerson()->output('welcome');
Exemplo n.º 8
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_api_simple/index.php
* Handles simple requests to /api
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('authSecret' => @$_COOKIE['pp_auth'], 'debug' => 2));
if ($POD->libOptions('enable_core_api_simple')) {
    $method = $_GET['method'];
    $POD->tolog("API CALL METHOD: {$method}");
    if ($method == "alert.markAsRead") {
        if ($POD->isAuthenticated()) {
            $alert = $POD->getAlert(array('id' => $_GET['id']));
            $alert->markAsRead();
            if ($alert->success()) {
                echo json_encode($alert->asArray());
            } else {
                echo json_encode(array('error' => $alert->error(), 'id' => $_GET['id']));
            }
        } else {
            echo json_encode(array('error' => 'PERMISSION DENIED', 'id' => $_GET['docId']));
        }
    }
Exemplo n.º 9
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
error_reporting(1);
$themesDir = opendir($POD->libOptions('installDir') . "/themes/");
$themes = array();
while ($theme = readdir($themesDir)) {
    if (file_exists($POD->libOptions('installDir') . "/themes/{$theme}/theme.info")) {
        $themeinfo = file_get_contents($POD->libOptions('installDir') . "/themes/{$theme}/theme.info");
        $lines = explode("\n", $themeinfo);
        $info = array();
        $info['theme'] = $theme;
        foreach ($lines as $line) {
            list($key, $value) = explode("=", $line, 2);
            $key = trim($key);
            $value = trim($value);
            $info[$key] = $value;
        }
        if ($info['name'] && $info['theme']) {
            array_push($themes, $info);
        }
    }
}
if ($_GET['activate']) {
    $POD->setLibOptions('currentTheme', $_GET['activate']);
    $POD->saveLibOptions();
    if (!$POD->success()) {
        $message = $POD->error();
    } else {
    }
Exemplo n.º 10
0
			<?php 
    echo $message;
    ?>
			
		</div>
	
	<?php 
}
?>
		
<div class="panel">

	<h1>Email Options</h1>
	
	<p>
		PeoplePods sends a variety of emails during the course of operation.
		These settings effect all emails.
	</p>

	<form method="post" class="valid">
		
		<p class="input"><label for="fromAddress">From Address:</label><input name="fromAddress" id="fromAddress" class="text required" value="<?php 
echo htmlspecialchars($POD->libOptions('fromAddress'));
?>
" type="text" /></p>
		
		<p><input type="submit" value="Update Email Options" class="button" /></p>
	</form>
</div>
<?php 
$POD->footer();
Exemplo n.º 11
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'authSecret' => @$_COOKIE['pp_auth']));
$key = $POD->libOptions('fb_connect_api');
$secret = $POD->libOptions('fb_connect_secret');
// we need to make sure sessions are on so we can store the twitter codes
session_start();
if (isset($_GET['rfb'])) {
    $POD->currentUser()->removeMeta('facebook_token');
    $POD->currentUser()->removeMeta('fbuid');
    $POD->addMessage("Your Facebook account has been removed.");
}
$display = 'page';
if (strpos($_SERVER['HTTP_USER_AGENT'], "iPhone") || strpos($_SERVER['HTTP_USER_AGENT'], "Android")) {
    //	$display='touch';
}
if (!($key && $secret)) {
    $POD->header('Configuration Required');
    echo '<div class="info">Configuration required!</div>';
    echo '<p>To enable Facebook login, please set the Facebook API key and secret via the PeoplePods command center.</p>';
    echo '<P>To obtain the necessary details from Facebook, <a href="http://www.facebook.com/developers/">register your app</a>.</p>';
    $POD->footer();
    exit;
}
$user = null;
if (isset($_GET['code'])) {
    $code = $_GET['code'];
    $oauth_token = file_get_contents("https://graph.facebook.com/oauth/access_token?client_id=" . $key . "&redirect_uri=" . $POD->siteRoot(false) . "/facebook&client_secret=" . urlencode($secret) . "&code=" . urlencode($code));
    list($junk, $oauth_token) = explode("=", $oauth_token);
    // if authenticated, add to user
Exemplo n.º 12
0
    ?>
		
	</div>

<?php 
}
?>
<div class="panel">

	<h1>Database Options</h1>


	<p>Connect to this database via the command line MySQL tool:</p>

	<p>mysql -u <?php 
echo $POD->libOptions('mysql_user');
?>
 -p -h <?php 
echo $POD->libOptions('mysql_server');
?>
 <?php 
echo $POD->libOptions('mysql_db');
?>
</p>

	<form method="post" id="database_options" class="valid">
	
	<p class="input"><label for="siteName">MySQL Server:</label><input name="mysql_server" id="mysql_server" class="text required" type="text" value="<?php 
echo htmlspecialchars($POD->libOptions('mysql_server'));
?>
" /></p>
Exemplo n.º 13
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
error_reporting(1);
if ($_POST) {
    $pod = $_POST['pod'];
    if (!$POD->libOptions('enable_' . $pod)) {
        $msg = "{$pod} is not enabled.";
    } else {
        if (!$POD->libOptions('settings_' . $pod)) {
            $msg = "No settings found for {$pod}";
        } else {
            if (!function_exists($POD->libOptions('settings_' . $pod))) {
                $msg = "Settings function missing.  Should be " . $POD->libOptions('settings_' . $pod) . " in " . $POD->libOptions('include_' . $pod);
            } else {
                $func = $POD->libOptions('settings_' . $pod);
                $fields = $func($POD);
                foreach ($fields as $field => $label) {
                    $POD->setLibOptions($field, $_POST['libOption_' . $field]);
                }
                $POD->saveLibOptions();
                if (!$POD->success()) {
                    $msg = $POD->error();
                } else {
                    $msg = "Settings updated.";
                }
            }
        }
    }
} else {
Exemplo n.º 14
0
/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_usercontent/list.php
* Handles the blog style reverse chronological list this type of content
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/new-content-type
/**********************************************/
include_once "content_type.php";
// this defines some variables for use within this pod
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('authSecret' => @$_COOKIE['pp_auth'], 'debug' => 0));
if (!$POD->libOptions("enable_contenttype_{$content_type}_list")) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$offset = 0;
if (isset($_GET['offset'])) {
    $offset = $_GET['offset'];
}
$wikis = $POD->getContents(array('type' => $content_type));
$POD->header('List of supported wikis!');
?>

	<div class="column_8">
		<? 
		if ($POD->libOptions("enable_contenttype_wiki_add")) 
			if($POD->isAuthenticated() && $POD->currentUser()->get('adminUser')){ ?>
Exemplo n.º 15
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_private_messaging/inbox.php
* Handles requests to /inbox
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/messaging
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 2, 'lockdown' => 'verified', 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_private_messaging')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$offset = 0;
if (isset($_GET['offset'])) {
    $offset = $_GET['offset'];
}
$inbox = $POD->getInbox(20, $offset);
$POD->header("Conversations");
$inbox->output('thread_short', 'header', 'pager', 'Conversations', 'You don\'t have any messages. :(');
$POD->footer();
Exemplo n.º 16
0
/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_files/index.php
* Handles simple requests to /download
* Allows files to be downloaded with their original file name
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
error_reporting(0);
$POD = new PeoplePod(array('debug' => 0));
// no parameters, we want the most basic pod we can get to serve images
if (!$POD->libOptions('enable_core_files')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$f = $POD->getFile(array('id' => $_GET['id']));
if (!$f->success()) {
    header("Status: 404 Not Found");
    echo "404 Not Found";
    exit;
}
$f->download($_GET['size']);
if (!$f->success()) {
    header("Status: 404 Not Found");
    echo "Download Failed";
}
Exemplo n.º 17
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => $_COOKIE['pp_auth']));
$this_database_update = 0.9;
$last_version = $POD->libOptions('last_database_update');
if (!$last_version) {
    $last_version = 0;
}
if (isset($_GET['confirm'])) {
    echo "<ul>";
    if ($last_version < 0.7) {
        echo "<li>Checking permissions...</li>";
        $POD->saveLibOptions();
        if (!$POD->success()) {
            echo "<li><strong>" . $POD->error() . "</strong></li>";
        } else {
            echo "<li>Creating table meta_tmp...</li>";
            $sql = "CREATE TABLE meta_tmp(type enum('group','content','user'),itemId bigint(12), name varchar(100),value text,id bigint(12) NOT NULL UNIQUE auto_increment, unique index u (type,itemId,name));";
            $res = mysql_query($sql, $POD->DATABASE);
            if (!$res) {
                echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
            } else {
                echo "<li>Copying meta values into meta_tmp...</li>";
                $sql = "REPLACE INTO meta_tmp (type,itemId,name,value) SELECT type,itemId,name,value FROM meta;";
                $res = mysql_query($sql, $POD->DATABASE);
                if (!$res) {
                    echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
                } else {
                    echo "<li>Deleting values from meta... (If this errors, you may have to restore your db from backup)</li>";
                    $sql = "DELETE FROM meta";
Exemplo n.º 18
0
 $POD->setLibOptions('currentTheme', 'default');
 $POD->setLibOptions('server', 'http://' . $_SERVER['SERVER_NAME']);
 $POD->setLibOptions('documentIconMaxWidth', '100');
 $POD->setLibOptions('documentIconSquare', 'documentIconSquare');
 $POD->setLibOptions('documentImageMaxWidth', '530');
 $POD->setLibOptions('documentImageResize', 'documentImageResize');
 $POD->setLibOptions('peopleIconMaxWidth', '60');
 $POD->setLibOptions('peopleIconSquare', 'peopleIconSquare');
 $POD->setLibOptions('peopleImageMaxWidth', '300');
 $POD->setLibOptions('peopleImageResize', 'peopleImageResize');
 // FIX THIS
 // set other default options!!
 $error = false;
 $POD->saveLibOptions(true);
 if ($POD->success()) {
     echo "<p>Defaults written to " . $POD->libOptions('etcPath') . '/options.php</p>';
     $POD->loadAvailablePods();
     foreach ($POD->PODS as $name => $podling) {
         if (in_array($name, $required_pods)) {
             $POD->enablePOD($name);
         }
     }
     $message = $POD->writeHTACCESS($installDir . "/..");
     if (!$POD->success()) {
         $error = true;
         unlink($POD->libOptions('etcPath') . "/options.php");
         echo '<p class="error">Could not write to .htaccess file! ' . $POD->error() . "</p>";
     } else {
         $POD->saveLibOptions(true);
         echo "<p>{$message}</p>";
     }
Exemplo n.º 19
0
<?php

/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* search/index.php
* Search content or people
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/messaging
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_search')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
if (isset($_GET['offset'])) {
    $offset = $_GET['offset'];
} else {
    $offset = 0;
}
$POD->tolog("DOING SEARCH");
if ($keyword = @$_GET['q']) {
    $docs = $POD->getContents(array('or' => array('headline:like' => "%{$keyword}%", 'body:like' => "%{$keyword}%")), null, 20, $offset);
} else {
    if ($keyword = @$_GET['p']) {
        $people = $POD->getPeople(array('or' => array('nick:like' => "%{$keyword}%", 'email:like' => "%{$keyword}%")), null, 20, $offset);
    }
Exemplo n.º 20
0
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td valign="top" align="left">
				&nbsp;
			</td>
			<td valign="top" align="left">
				&nbsp;
			</td>
			<td valign="top" align="left">
				Send Email
			</td>
			<td valign="top" align="right">
				<input type="checkbox" class="enabler"  name="friendEmail" value="friendEmail" <?php 
if ($POD->libOptions('friendEmail')) {
    ?>
checked<?php 
}
?>
 />
			</td>
		</tr>
		<tr>
			<td valign="top" align="left">
				&nbsp;
			</td>
			<td valign="top" align="left">
				&nbsp;
			</td>
			<td valign="top" align="left">
Exemplo n.º 21
0
/***********************************************
* This file is part of PeoplePods
* (c) xoxco, inc  
* http://peoplepods.net http://xoxco.com
*
* core_usercontent/edit.php
* Handles the add/edit form for this type of content
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/new-content-type
/**********************************************/
include_once "content_type.php";
// this defines some variables for use within this pod
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => 'verified', 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions("enable_contenttype_{$content_type}_add")) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
// by default, this script will redirect to the homepage of the site.
// this can be changed by passing in an alternative via the redirect parameter
$redirect = $POD->siteRoot(false);
if ($_POST) {
    if (isset($_POST['id'])) {
        $content = $POD->getContent(array('id' => $_POST['id']));
        if (!$content->success()) {
            $POD->addMessage($content->error());
        }
        if (!$content->isEditable()) {
            $POD->addMessage("Access Denied");
        }
Exemplo n.º 22
0
    $POD->cacheflush();
    $message = "Cache Flushed!";
}
$POD->header();
// lets generate some stats!
$today = date("Y-m-d");
/*
  	$totalMembers = $POD->getPeople(array('memberSince:lte'=>$today));  
	$membersToday = $POD->getPeople(array('lastVisit:gt'=>$today),'lastVisit desc',10);
	$membersJoined = $POD->getPeople(array('memberSince:gt'=>$today));
	$docsCreated = $POD->getContents(array('date:gt'=>$today));
	$newComments = $POD->getComments(array('date:gt'=>$today),'date desc',5);
	$total = $membersJoined->totalCount()  + $totalMembers->totalCount();
*/
$this_database_update = 0.9;
$last_version = $POD->libOptions('last_database_update');
if (!$last_version) {
    $last_version = 0;
}
// load each type of thing
// get total, total for today, total for the last week
// members, content, comments, files, groups
$members = $POD->getPeople(array('memberSince:gte' => date('Y-m-d') . ' 00:00:00'));
$stats['members_today'] = $members->totalCount();
$members = $POD->getPeople(array('memberSince:gte' => date('Y-m-d', strtotime('-7 days'))));
$stats['members_week'] = $members->totalCount();
$members = $POD->getPeople(array(), 'memberSince DESC', 10);
$stats['members_total'] = $members->totalCount();
$visitors = $POD->getPeople(array('lastVisit:gte' => date('Y-m-d') . ' 00:00:00'));
$stats['visits_today'] = $visitors->totalCount();
$visitors = $POD->getPeople(array('lastVisit:gte' => date('Y-m-d', strtotime('-7 days'))));
Exemplo n.º 23
0
		
	</div>

<?php 
}
?>
<div class="panel">

	<h1>Site Options</h1>



	<form method="post" id="site_options" class="valid">
	
	<p class="input"><label for="siteName">What do you want to call your site?</label><input name="siteName" id="siteName" class="text required" type="text" value="<?php 
echo htmlspecialchars($POD->libOptions('siteName'));
?>
" /></p>

	<p class="input"><label for="siteName">What is your <a href="http://peoplepods.net/">PeoplePods.net API Key</a></label><input name="peoplepods_api" id="peoplepods_api" class="text" type="text" value="<?php 
echo htmlspecialchars($POD->libOptions('peoplepods_api'));
?>
" /></p>
	
	<p class="input"><label for="installDir">What is the path to your PeoplePods installation?</label><input name="installDir" id="installDir" class="text required" type="text" value="<?php 
echo htmlspecialchars($POD->libOptions('installDir'));
?>
" />
	<span class="field_explain">Tells PeoplePods where to look for itself.</span></p>

	<p class="input"><label for="server">What is the URL for this PeoplePods website?</label><input name="server" id="server" class="text required" type="text" value="<?php 
Exemplo n.º 24
0
* core_groups/index.php
* Handles requests to /groups
* Creates new groups
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
if ($_POST) {
    $lockdown = 'verified';
} else {
    $lockdown = '';
    // anyone can see the groups homepage.
}
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => $lockdown, 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_groups')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$max = 10;
$offset = 0;
if (isset($_GET['offset'])) {
    $offset = $_GET['offset'];
}
if ($_POST) {
    $group = $POD->getGroup();
    $group->set('groupname', $_POST['groupname']);
    $group->set('description', $_POST['description']);
    $group->set('type', $_POST['type']);
    $group->save();
    if (!$group->success()) {
Exemplo n.º 25
0
			/lists/favorites/benbrown
			/lists/tags/foo
			/lists/user/benbrown/tags/foo
			/lists/type/post
			/lists/type/post/tag/foo
			/lists/search/keyword
			/lists/type/post/search/keyword


*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_feeds')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
// lets parse the parameters we got passed in so we know what kind of feed to create
$arguments = explode("/", $_GET['args']);
$field = null;
foreach ($arguments as $arg) {
    if ($field) {
        $param[$field] = $arg;
        $field = null;
    } else {
        $field = $arg;
    }
}
// set up our fail indicator var
Exemplo n.º 26
0
* core_usercontent/view.php
* Handles permalinks, comments and voting for this type of content
*
* Documentation for this pod can be found here:
* http://peoplepods.net/readme/new-content-type
/**********************************************/
include_once "content_type.php";
// this defines some variables for use within this pod
include_once "../../PeoplePods.php";
if ($_POST) {
    $lockdown = 'verified';
} else {
    $lockdown = null;
}
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => $lockdown, 'authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions("enable_core_pages")) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
if (isset($_GET['stub'])) {
    $doc = $POD->getContent(array('stub' => $_GET['stub']));
} else {
    if (isset($_GET['id'])) {
        $doc = $POD->getContent(array('id' => $_GET['id']));
    } else {
        if (isset($_POST['id'])) {
            $doc = $POD->getContent(array('id' => $_POST['id']));
        }
    }
}
if (!$doc->success()) {
Exemplo n.º 27
0
		</div>
	
	<?php 
}
?>
	<div class="panel">
	<h1>Plugin Pods</h1>

	<p>
		Plugin Pods are sets of PeoplePods functionality that can be easily turned on and off.
		Choose Pods from the list below to customize the features present on your site.
	</p>
	
	<p>
		New Pods should be placed in <i><?php 
echo $POD->libOptions('installDir');
?>
/pods</i>
	</p>
	
	<form method="post" action="<?php 
$POD->podRoot();
?>
/admin/options/pods.php">
	<input name="go" type="hidden" value="foo" />
	<table cellspacing="0" cellpadding="0" class="stack_output">
		<tr>
			<th align="left">
				POD Name
			</th>
			<th align="left">