Merge branch 'master' of evan@dev.controlyourself.ca:/var/www/trunk
This commit is contained in:
commit
750ed7899f
|
@ -202,13 +202,13 @@ class FacebookhomeAction extends FacebookAction
|
|||
$this->elementEnd('p');
|
||||
|
||||
$this->elementStart('form', array('method' => 'post',
|
||||
'action' => $app_url,
|
||||
'action' => "$app_url/index.php",
|
||||
'id' => 'facebook-skip-permissions'));
|
||||
|
||||
$this->elementStart('ul', array('id' => 'fb-permissions-list'));
|
||||
$this->elementStart('li', array('id' => 'fb-permissions-item'));
|
||||
$this->elementStart('fb:prompt-permission', array('perms' => 'status_update',
|
||||
'next_fbjs' => 'document.setLocation(\'' . $this->app_uri . '\')'));
|
||||
'next_fbjs' => 'document.setLocation(\'' . "$this->app_uri/index.php" . '\')'));
|
||||
$this->element('span', array('class' => 'facebook-button'),
|
||||
sprintf(_('Allow %s to update my Facebook status'), $this->app_name));
|
||||
$this->elementEnd('fb:prompt-permission');
|
||||
|
|
101
actions/facebooklogin.php
Normal file
101
actions/facebooklogin.php
Normal file
|
@ -0,0 +1,101 @@
|
|||
<?php
|
||||
/*
|
||||
* Laconica - a distributed open-source microblogging tool
|
||||
* Copyright (C) 2008, Controlez-Vous, Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('LACONICA')) { exit(1); }
|
||||
|
||||
require_once(INSTALLDIR.'/lib/facebookaction.php');
|
||||
|
||||
class FacebookinviteAction extends FacebookAction
|
||||
{
|
||||
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
|
||||
$this->error = $error;
|
||||
|
||||
if ($this->flink) {
|
||||
if (!$this->facebook->api_client->users_hasAppPermission('status_update') &&
|
||||
$this->facebook->api_client->data_getUserPreference(
|
||||
FACEBOOK_PROMPTED_UPDATE_PREF) == 'true') {
|
||||
|
||||
echo '<h1>REDIRECT TO HOME</h1>';
|
||||
}
|
||||
} else {
|
||||
$this->showPage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showContent()
|
||||
{
|
||||
|
||||
// If the user has opted not to initially allow the app to have
|
||||
// Facebook status update permission, store that preference. Only
|
||||
// promt the user the first time she uses the app
|
||||
if ($this->arg('skip')) {
|
||||
$this->facebook->api_client->data_setUserPreference(
|
||||
FACEBOOK_PROMPTED_UPDATE_PREF, 'true');
|
||||
}
|
||||
|
||||
if ($this->flink) {
|
||||
|
||||
$this->user = $this->flink->getUser();
|
||||
|
||||
// If this is the first time the user has started the app
|
||||
// prompt for Facebook status update permission
|
||||
if (!$this->facebook->api_client->users_hasAppPermission('status_update')) {
|
||||
|
||||
if ($this->facebook->api_client->data_getUserPreference(
|
||||
FACEBOOK_PROMPTED_UPDATE_PREF) != 'true') {
|
||||
$this->getUpdatePermission();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->showLoginForm();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function showSuccessContent()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function showFormContent()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
function title()
|
||||
{
|
||||
return sprintf(_('Login'));
|
||||
}
|
||||
|
||||
function redirectHome()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -34,7 +34,7 @@ require_once INSTALLDIR . '/lib/facebookutil.php';
|
|||
$last_updated_file = INSTALLDIR . '/scripts/facebook_last_updated';
|
||||
|
||||
// Lock file name
|
||||
$tmp_file = "/tmp/update_facebook.lock";
|
||||
$tmp_file = INSTALLDIR . '/scripts/update_facebook.lock';
|
||||
|
||||
// Make sure only one copy of the script is running at a time
|
||||
if (!($tmp_file = @fopen($tmp_file, "w")))
|
||||
|
|
|
@ -371,7 +371,7 @@ border-radius:7px;
|
|||
#content_inner {
|
||||
position:relative;
|
||||
width:100%;
|
||||
float;left;
|
||||
float:left;
|
||||
}
|
||||
|
||||
#aside_primary {
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
/* theme: identica */
|
||||
/** theme: default
|
||||
*
|
||||
* @package Laconica
|
||||
* @author Sarven Capadisli <csarven@controlyourself.ca>
|
||||
* @copyright 2009 Control Yourself, Inc.
|
||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||
* @link http://laconi.ca/
|
||||
*/
|
||||
|
||||
html,
|
||||
body,
|
||||
a:active {
|
||||
background-color:#CEE1E9;
|
||||
background-color:#97BFD1;
|
||||
}
|
||||
body {
|
||||
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
||||
|
@ -18,14 +26,17 @@ display:none;
|
|||
input, textarea, select, option {
|
||||
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
|
||||
}
|
||||
input, textarea, select {
|
||||
input, textarea, select,
|
||||
.entity_remote_subscribe {
|
||||
border-color:#aaa;
|
||||
}
|
||||
|
||||
|
||||
input.submit,
|
||||
#form_notice.warning #notice_text-count,
|
||||
#nav_register a,
|
||||
.form_settings .form_note {
|
||||
.form_settings .form_note,
|
||||
.entity_remote_subscribe {
|
||||
background-color:#A9BF4F;
|
||||
}
|
||||
|
||||
|
@ -34,35 +45,47 @@ input:focus, textarea:focus, select:focus,
|
|||
border-color:#A9BF4F;
|
||||
}
|
||||
input.submit,
|
||||
#nav_register a {
|
||||
color:#F5FDFD;
|
||||
#nav_register a,
|
||||
.entity_remote_subscribe {
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
a,
|
||||
div.notice-options input {
|
||||
div.notice-options input,
|
||||
.form_user_block input.submit,
|
||||
.form_user_unblock input.submit,
|
||||
#entity_send-a-message a,
|
||||
.form_user_nudge input.submit,
|
||||
#entity_nudge p {
|
||||
color:#002E6E;
|
||||
}
|
||||
|
||||
.notice p.entry-content a:visited {
|
||||
.notice,
|
||||
.profile {
|
||||
border-top-color:#D1D9E4;
|
||||
}
|
||||
.section .notice,
|
||||
.section .profile {
|
||||
border-top-color:#97BFD1;
|
||||
}
|
||||
|
||||
|
||||
#content .notice p.entry-content a:visited {
|
||||
background-color:#fcfcfc;
|
||||
}
|
||||
.notice p.entry-content .vcard a {
|
||||
#content .notice p.entry-content .vcard a {
|
||||
background-color:#fcfffc;
|
||||
}
|
||||
|
||||
#aside_primary,
|
||||
#user_subscribe a,
|
||||
#TB_window input.submit,
|
||||
.form_user_subscribe input.submit {
|
||||
background-color:#fff;
|
||||
#aside_primary {
|
||||
background-color:#CEE1E9;
|
||||
}
|
||||
|
||||
|
||||
#notice_text-count {
|
||||
color:#333;
|
||||
}
|
||||
#form_notice.warning #notice_text-count,
|
||||
#user_actions a {
|
||||
#form_notice.warning #notice_text-count {
|
||||
color:#000;
|
||||
}
|
||||
|
||||
|
@ -81,11 +104,11 @@ padding:2px 4px;
|
|||
|
||||
#content,
|
||||
#site_nav_local_views a {
|
||||
border-color:#F5FDFD;
|
||||
border-color:#fff;
|
||||
}
|
||||
#content,
|
||||
#site_nav_local_views .current a {
|
||||
background-color:#F5FDFD;
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
#site_nav_local_views a {
|
||||
|
@ -105,6 +128,20 @@ background-color:#F7E8E8;
|
|||
background-color:#EFF3DC;
|
||||
}
|
||||
|
||||
|
||||
#anon_notice {
|
||||
background-color:#97BFD1;
|
||||
color:#fff;
|
||||
border-color:#fff;
|
||||
}
|
||||
|
||||
#showstream #anon_notice {
|
||||
background-color:#A9BF4F;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#export_data li a {
|
||||
background-repeat:no-repeat;
|
||||
background-position:0 45%;
|
||||
|
@ -123,32 +160,41 @@ background-image:url(../../base/images/icons/icon_vcard.gif);
|
|||
}
|
||||
|
||||
|
||||
/*user_actions*/
|
||||
#user_actions li {
|
||||
border-top-color:#eee;
|
||||
}
|
||||
#user_subscribe a,
|
||||
#TB_window input.submit,
|
||||
.form_user_subscribe input.submit {
|
||||
background-image: url(../images/icons/twotone/green/shield.gif);
|
||||
background-position: 0 45%;
|
||||
#entity_send-a-message a,
|
||||
.form_user_nudge input.submit,
|
||||
.form_user_block input.submit,
|
||||
.form_user_unblock input.submit,
|
||||
#entity_nudge p {
|
||||
background-position: 0 40%;
|
||||
background-repeat: no-repeat;
|
||||
background-color:transparent;
|
||||
}
|
||||
.form_group_join input.submit,
|
||||
.form_group_leave input.submit
|
||||
.form_user_subscribe input.submit,
|
||||
.form_user_unsubscribe input.submit {
|
||||
background-color:#647819;
|
||||
color:#F5FDFD;
|
||||
background-color:#A9BF4F;
|
||||
color:#fff;
|
||||
}
|
||||
#user_send-a-message a {
|
||||
background:url(../images/icons/twotone/green/quote.gif) 0 45% no-repeat;
|
||||
.form_user_unsubscribe input.submit,
|
||||
.form_group_leave input.submit {
|
||||
background-color:#97BFD1;
|
||||
}
|
||||
|
||||
#entity_send-a-message a {
|
||||
background-image:url(../images/icons/twotone/green/quote.gif);
|
||||
}
|
||||
#entity_nudge p,
|
||||
.form_user_nudge input.submit {
|
||||
background:url(../images/icons/twotone/green/mail.gif) 0 45% no-repeat;
|
||||
background-image:url(../images/icons/twotone/green/mail.gif);
|
||||
}
|
||||
.form_user_block input.submit {
|
||||
background:url(../images/icons/twotone/green/against.gif) 0 45% no-repeat;
|
||||
.form_user_block input.submit,
|
||||
.form_user_unblock input.submit {
|
||||
background-image:url(../images/icons/twotone/green/shield.gif);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* NOTICES */
|
||||
.notices li.over {
|
||||
background-color:#fcfcfc;
|
||||
|
@ -195,9 +241,11 @@ background:transparent url(../images/icons/twotone/green/disfavourite.gif) no-re
|
|||
background:transparent url(../images/icons/twotone/green/trash.gif) no-repeat 0 45%;
|
||||
}
|
||||
|
||||
div.notice-options {
|
||||
opacity:0.3;
|
||||
.notices div.entry-content,
|
||||
.notices div.notice-options {
|
||||
opacity:0.4;
|
||||
}
|
||||
.notices li.hover div.entry-content,
|
||||
.notices li.hover div.notice-options {
|
||||
opacity:1;
|
||||
}
|
||||
|
@ -214,6 +262,10 @@ background-color:#fcfcfc;
|
|||
/*END: NOTICES */
|
||||
|
||||
|
||||
#groups #new_group a {
|
||||
background:transparent url(../images/icons/twotone/green/news.gif) no-repeat 0 45%;
|
||||
}
|
||||
|
||||
|
||||
.pagination .nav_prev a,
|
||||
.pagination .nav_next a {
|
||||
|
@ -227,19 +279,3 @@ background-position:0 45%;
|
|||
background-image:url(../images/icons/twotone/green/arrow-right.gif);
|
||||
background-position:100% 45%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#home #intro #guide_steps li a {
|
||||
border-color:#ccc;
|
||||
color:#F5FDFD;
|
||||
}
|
||||
#home #intro #step_join-now a {
|
||||
background-color:#f00;
|
||||
}
|
||||
#home #intro #step_start-a-group a {
|
||||
background-color:#0f0;
|
||||
}
|
||||
#home #intro #step_create-a-community a {
|
||||
background-color:#00f;
|
||||
}
|
Loading…
Reference in New Issue
Block a user