summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-19 13:35:17 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-01-19 13:35:17 +0000
commit12c475c101c070cbcc4c63f7b1049f6d3282b9ee (patch)
tree17852a7eb495117d372b0d059d3ed8405b590b92
parente703f5e347574c2f68c97a3884bec209f924602f (diff)
parent739baf0396b2e6796f07616cdb9d52d09cf6ed2f (diff)
Merge branch 'master' of /var/www/trunk
Conflicts: actions/facebookhome.php actions/facebooksettings.php
-rw-r--r--actions/facebookhome.php168
-rw-r--r--actions/facebookinvite.php9
-rw-r--r--actions/facebookremove.php2
-rw-r--r--actions/facebooksettings.php65
-rw-r--r--js/facebookapp.js18
-rw-r--r--lib/facebookaction.php228
-rw-r--r--lib/facebookutil.php189
-rwxr-xr-xscripts/update_facebook.php10
-rw-r--r--theme/base/css/facebookapp.base.css285
-rw-r--r--theme/identica/css/facebookapp.theme.css1177
-rw-r--r--theme/identica/facebookapp.css161
11 files changed, 2054 insertions, 258 deletions
diff --git a/actions/facebookhome.php b/actions/facebookhome.php
index d2ac7617d..ae29ee1f8 100644
--- a/actions/facebookhome.php
+++ b/actions/facebookhome.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-require_once(INSTALLDIR.'/lib/facebookaction.php');
+require_once INSTALLDIR.'/lib/facebookaction.php';
class FacebookhomeAction extends FacebookAction
{
@@ -34,9 +34,43 @@ class FacebookhomeAction extends FacebookAction
// Check to see whether there's already a Facebook link for this user
$flink = Foreign_link::getByForeignID($fbuid, FACEBOOK_SERVICE);
+ // 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')) {
+ $facebook->api_client->data_setUserPreference(
+ FACEBOOK_PROMPTED_UPDATE_PREF, 'true');
+ }
+
if ($flink) {
+
+ if ($_POST['submit'] == 'Send') {
+ $this->saveNewNotice($flink);
+ return;
+ }
+
+ $user = $flink->getUser();
+ common_set_user($user);
+
+ // If this is the first time the user has started the app
+ // prompt for Facebook status update permission
+ if (!$facebook->api_client->users_hasAppPermission('status_update')) {
+
+ if ($facebook->api_client->data_getUserPreference(
+ FACEBOOK_PROMPTED_UPDATE_PREF) != 'true') {
+ $this->getUpdatePermission();
+ return;
+ }
+ }
+
+ // Use is authenticated and has already been prompted once for
+ // Facebook status update permission? Then show the main page
+ // of the app
$this->showHome($flink, null);
+
} else {
+
+ // User hasn't authenticated yet, prompt for creds
$this->login($fbuid);
}
@@ -71,8 +105,10 @@ class FacebookhomeAction extends FacebookAction
// XXX: Do some error handling here
$this->setDefaults();
+ //$this->showHome($flink, _('You can now use Identi.ca from Facebook!'));
- $this->showHome($flink, _('You can now use Identi.ca from Facebook!'));
+ $this->getUpdatePermission();
+ return;
} else {
$msg = _('Incorrect username or password.');
@@ -80,6 +116,7 @@ class FacebookhomeAction extends FacebookAction
}
$this->showLoginForm($msg);
+
}
function setDefaults()
@@ -87,7 +124,10 @@ class FacebookhomeAction extends FacebookAction
$facebook = get_facebook();
// A default prefix string for notices
- $facebook->api_client->data_setUserPreference(1, 'dented: ');
+ $facebook->api_client->data_setUserPreference(
+ FACEBOOK_NOTICE_PREFIX, 'dented: ');
+ $facebook->api_client->data_setUserPreference(
+ FACEBOOK_PROMPTED_UPDATE_PREF, 'false');
}
function showHome($flink, $msg)
@@ -101,19 +141,16 @@ class FacebookhomeAction extends FacebookAction
$notice = $user->getCurrentNotice();
update_profile_box($facebook, $fbuid, $user, $notice);
+ $this->showHeader($msg);
+ $this->showNoticeForm($user);
+ $this->showNav('Home');
- $this->show_header('Home');
+ echo $this->showNotices($user);
- if ($msg) {
- $this->element('fb:success', array('message' => $msg));
- }
-
- echo $this->show_notices($user);
-
- $this->show_footer();
+ $this->showFooter();
}
- function show_notices($user)
+ function showNotices($user)
{
$page = $this->trimmed('page');
@@ -123,16 +160,113 @@ class FacebookhomeAction extends FacebookAction
$notice = $user->noticesWithFriends(($page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
- $cnt = $this->show_notice_list($notice);
+ $cnt = $this->showNoticeList($notice);
- common_pagination($page > 1, $cnt > NOTICES_PER_PAGE,
- $page, 'all', array('nickname' => $user->nickname));
+ facebookPagination($page > 1, $cnt > NOTICES_PER_PAGE,
+ $page, 'all', array('nickname' => $user->nickname));
}
- function show_notice_list($notice)
+ function showNoticeList($notice)
{
- $nl = new NoticeList($notice);
+ $nl = new FacebookNoticeList($notice);
return $nl->show();
}
+ function getUpdatePermission() {
+
+ $facebook = get_facebook();
+ $fbuid = $facebook->require_login();
+
+ startFBML();
+
+ $this->showStylesheets();
+ $this->showScripts();
+
+ $this->showLogo();
+
+ common_element_start('div', array('class' => 'content'));
+
+ // Figure what the URL of our app is.
+ $app_props = $facebook->api_client->Admin_getAppProperties(
+ array('canvas_name', 'application_name'));
+ $app_url = 'http://apps.facebook.com/' . $app_props['canvas_name'] . '/index.php';
+ $app_name = $app_props['application_name'];
+
+ $instructions = sprintf(_('If you would like the %s app to automatically update ' .
+ 'your Facebook status with your latest notice, you need ' .
+ 'to give it permission.'), $app_name);
+
+ common_element_start('p');
+ common_element('span', array('id' => 'permissions_notice'), $instructions);
+ common_element_end('p');
+
+ common_element_start('form', array('method' => 'post',
+ 'action' => $app_url,
+ 'id' => 'facebook-skip-permissions'));
+
+ common_element_start('ul', array('id' => 'fb-permissions-list'));
+ common_element_start('li', array('id' => 'fb-permissions-item'));
+ common_element_start('fb:prompt-permission', array('perms' => 'status_update',
+ 'next_fbjs' => 'document.setLocation(\'' . $app_url . '\')'));
+ common_element('span', array('class' => 'facebook-button'),
+ _('Allow Identi.ca to update my Facebook status'));
+ common_element_end('fb:prompt-permission');
+ common_element_end('li');
+
+ common_element_start('li', array('id' => 'fb-permissions-item'));
+ common_submit('skip', _('Skip'));
+ common_element_end('li');
+ common_element_end('ul');
+
+ common_element_end('form');
+ common_element_end('div');
+
+ common_end_xml();
+
+ }
+
+ function saveNewNotice($flink)
+ {
+
+ $user = $flink->getUser();
+
+ $content = $_POST['status_textarea'];
+
+ if (!$content) {
+ $this->showHome($flink, _('No content!'));
+ return;
+ } else {
+ $content_shortened = common_shorten_links($content);
+
+ if (mb_strlen($content_shortened) > 140) {
+ common_debug("Content = '$content_shortened'", __FILE__);
+ common_debug("mb_strlen(\$content) = " . mb_strlen($content_shortened), __FILE__);
+ $this->showHome($flink, _('That\'s too long. Max notice size is 140 chars.'));
+ return;
+ }
+ }
+
+ $inter = new CommandInterpreter();
+
+ $cmd = $inter->handle_command($user, $content_shortened);
+
+ if ($cmd) {
+ $cmd->execute(new WebChannel());
+ return;
+ }
+
+ $replyto = $this->trimmed('inreplyto');
+
+ $notice = Notice::saveNew($user->id, $content,
+ 'Facebook', 1, ($replyto == 'false') ? null : $replyto);
+
+ if (is_string($notice)) {
+ $this->showHome($flink, 'Error!');
+ return;
+ }
+
+ common_broadcast_notice($notice);
+ $this->showHome($flink, 'Success!');
+ }
+
}
diff --git a/actions/facebookinvite.php b/actions/facebookinvite.php
index 103d5a568..1e6f6496e 100644
--- a/actions/facebookinvite.php
+++ b/actions/facebookinvite.php
@@ -41,7 +41,7 @@ class FacebookinviteAction extends FacebookAction
$facebook = get_facebook();
$fbuid = $facebook->require_login();
- $this->show_header('Invite');
+ $this->showHeader('Invite');
$this->element('h2', null, _('Thanks for inviting your friends to use Identi.ca!'));
$this->element('p', null, _('Invitations have been sent to the following users:'));
@@ -60,7 +60,7 @@ class FacebookinviteAction extends FacebookAction
$this->elementEnd("ul");
- $this->show_footer();
+ $this->showFooter();
}
function showInviteForm()
@@ -69,7 +69,8 @@ class FacebookinviteAction extends FacebookAction
$facebook = get_facebook();
$fbuid = $facebook->require_login();
- $this->show_header('Invite');
+ $this->showHeader();
+ $this->showNav('Invite');
// Get a list of users who are already using the app for exclusion
$exclude_ids = $facebook->api_client->friends_getAppUsers();
@@ -104,7 +105,7 @@ class FacebookinviteAction extends FacebookAction
$this->elementEnd("ul");
- $this->show_footer();
+ $this->showFooter();
}
diff --git a/actions/facebookremove.php b/actions/facebookremove.php
index d0a0dd951..376e12a2e 100644
--- a/actions/facebookremove.php
+++ b/actions/facebookremove.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-require_once(INSTALLDIR.'/lib/facebookaction.php');
+require_once INSTALLDIR.'/lib/facebookaction.php';
class FacebookremoveAction extends FacebookAction
{
diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php
index 8b071353a..bc034bc46 100644
--- a/actions/facebooksettings.php
+++ b/actions/facebooksettings.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-require_once(INSTALLDIR.'/lib/facebookaction.php');
+require_once INSTALLDIR.'/lib/facebookaction.php';
class FacebooksettingsAction extends FacebookAction
{
@@ -29,13 +29,13 @@ class FacebooksettingsAction extends FacebookAction
parent::handle($args);
if ($this->arg('save')) {
- $this->save_settings();
+ $this->saveSettings();
} else {
- $this->show_form();
+ $this->showForm();
}
}
- function save_settings() {
+ function saveSettings() {
$noticesync = $this->arg('noticesync');
$replysync = $this->arg('replysync');
@@ -50,36 +50,25 @@ class FacebooksettingsAction extends FacebookAction
$flink->set_flags($noticesync, $replysync, false);
$result = $flink->update($original);
- $facebook->api_client->data_setUserPreference(1, substr($prefix, 0, 128));
+ $facebook->api_client->data_setUserPreference(FACEBOOK_NOTICE_PREFIX,
+ substr($prefix, 0, 128));
if ($result) {
- $this->show_form('Sync preferences saved.', true);
+ $this->showForm('Sync preferences saved.', true);
} else {
- $this->show_form('There was a problem saving your sync preferences!');
+ $this->showForm('There was a problem saving your sync preferences!');
}
}
- function show_form($msg = null, $success = false) {
+ function showForm($msg = null, $success = false) {
$facebook = get_facebook();
$fbuid = $facebook->require_login();
$flink = Foreign_link::getByForeignID($fbuid, FACEBOOK_SERVICE);
- $this->show_header('Settings', $msg, $success);
-
- $this->elementStart('fb:if-section-not-added', array('section' => 'profile'));
- $this->element('h2', null, _('Add an Identi.ca box to my profile'));
- $this->elementStart('p');
- $this->element('fb:add-section-button', array('section' => 'profile'));
- $this->elementEnd('p');
-
- $this->elementEnd('fb:if-section-not-added');
- $this->elementStart('p');
- $this->elementStart('fb:prompt-permission', array('perms' => 'status_update'));
- $this->element('h2', null, _('Allow Identi.ca to update my Facebook status'));
- $this->elementEnd('fb:prompt-permission');
- $this->elementEnd('p');
+ $this->showHeader($msg, $success);
+ $this->showNav('Settings');
if ($facebook->api_client->users_hasAppPermission('status_update')) {
@@ -91,13 +80,10 @@ class FacebooksettingsAction extends FacebookAction
$this->checkbox('noticesync', _('Automatically update my Facebook status with my notices.'),
($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND) : true);
- $this->checkbox('replysync', _('Send local "@" replies to Facebook.'),
+ $this->checkbox('replysync', _('Send "@" replies to Facebook.'),
($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) : true);
- // function $this->input($id, $label, $value=null,$instructions=null)
-
$prefix = $facebook->api_client->data_getUserPreference(1);
-
$this->input('prefix', _('Prefix'),
($prefix) ? $prefix : null,
@@ -106,9 +92,34 @@ class FacebooksettingsAction extends FacebookAction
$this->elementEnd('form');
+ } else {
+
+ // Figure what the URL of our app is.
+ $app_props = $facebook->api_client->Admin_getAppProperties(
+ array('canvas_name', 'application_name'));
+ $app_url = 'http://apps.facebook.com/' . $app_props['canvas_name'] . '/settings.php';
+ $app_name = $app_props['application_name'];
+
+ $instructions = sprintf(_('If you would like the %s app to automatically update ' .
+ 'your Facebook status with your latest notice, you need ' .
+ 'to give it permission.'), $app_name);
+
+ common_element_start('p');
+ common_element('span', array('id' => 'permissions_notice'), $instructions);
+ common_element_end('p');
+
+ common_element_start('ul', array('id' => 'fb-permissions-list'));
+ common_element_start('li', array('id' => 'fb-permissions-item'));
+ common_element_start('fb:prompt-permission', array('perms' => 'status_update',
+ 'next_fbjs' => 'document.setLocation(\'' . $app_url . '\')'));
+ common_element('span', array('class' => 'facebook-button'),
+ _('Allow Identi.ca to update my Facebook status'));
+ common_element_end('fb:prompt-permission');
+ common_element_end('li');
+ common_element_end('ul');
}
- $this->show_footer();
+ $this->showFooter();
}
}
diff --git a/js/facebookapp.js b/js/facebookapp.js
new file mode 100644
index 000000000..c7e8d6aa2
--- /dev/null
+++ b/js/facebookapp.js
@@ -0,0 +1,18 @@
+/*
+ * 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/>.
+ */
+ \ No newline at end of file
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index 3a00c71dd..cd43a2ccb 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -17,9 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('LACONICA')) {
+ exit(1);
+}
-require_once(INSTALLDIR.'/lib/facebookutil.php');
+require_once INSTALLDIR.'/lib/facebookutil.php';
class FacebookAction extends Action
{
@@ -29,33 +31,39 @@ class FacebookAction extends Action
parent::handle($args);
}
- function show_header($selected = 'Home', $msg = null, $success = false)
- {
+ function showLogo(){
- start_fbml();
+ global $xw;
- # Add a timestamp to the CSS file so Facebook cache wont ignore our changes
- $ts = filemtime(theme_file('facebookapp.css'));
- $cssurl = theme_path('facebookapp.css') . "?ts=$ts";
+ $this->showStylesheets();
+ $this->showScripts();
- common_element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => $cssurl));
+ common_element_start('a', array('class' => 'url home bookmark',
+ 'href' => common_local_url('public')));
+ if (common_config('site', 'logo') || file_exists(theme_file('logo.png'))) {
+ common_element('img', array('class' => 'logo photo',
+ 'src' => (common_config('site', 'logo')) ?
+ common_config('site', 'logo') : theme_path('logo.png'),
+ 'alt' => common_config('site', 'name')));
+ }
+
+ common_element('span', array('class' => 'fn org'), common_config('site', 'name'));
+ common_element_end('a');
+
+ }
- common_element('fb:dashboard');
- common_element_start('fb:tabs');
- common_element('fb:tab-item', array('title' => 'Home',
- 'href' => 'index.php',
- 'selected' => ($selected == 'Home')));
- common_element('fb:tab-item', array('title' => 'Invite',
- 'href' => 'invite.php',
- 'selected' => ($selected == 'Invite')));
- common_element('fb:tab-item', array('title' => 'Settings',
- 'href' => 'settings.php',
- 'selected' => ($selected == 'Settings')));
- common_element_end('fb:tabs');
+ function showHeader($msg = null, $success = false)
+ {
+ startFBML();
+ common_element_start('fb:if-section-not-added', array('section' => 'profile'));
+ common_element_start('span', array('id' => 'add_to_profile'));
+ common_element('fb:add-section-button', array('section' => 'profile'));
+ common_element_end('span');
+ common_element_end('fb:if-section-not-added');
+
+ $this->showLogo();
if ($msg) {
if ($success) {
@@ -65,47 +73,135 @@ class FacebookAction extends Action
}
}
- common_element_start('div', 'main_body');
+ common_element_start('div', 'main_body');
+
+ }
+
+ function showNav($selected = 'Home')
+ {
+
+ common_element_start('dl', array("id" => 'site_nav_local_views'));
+ common_element('dt', null, _('Local Views'));
+ common_element_start('dd');
+
+ common_element_start('ul', array('class' => 'nav'));
+
+ common_element_start('li', array('class' =>
+ ($selected == 'Home') ? 'current' : 'facebook_home'));
+ common_element('a',
+ array('href' => 'index.php', 'title' => _('Home')), _('Home'));
+ common_element_end('li');
+
+ common_element_start('li',
+ array('class' =>
+ ($selected == 'Invite') ? 'current' : 'facebook_invite'));
+ common_element('a',
+ array('href' => 'invite.php', 'title' => _('Invite')), _('Invite'));
+ common_element_end('li');
+
+ common_element_start('li',
+ array('class' =>
+ ($selected == 'Settings') ? 'current' : 'facebook_settings'));
+ common_element('a',
+ array('href' => 'settings.php',
+ 'title' => _('Settings')), _('Settings'));
+ common_element_end('li');
+
+ common_element_end('ul');
+
+ common_element_end('dd');
+ common_element_end('dl');
}
- function show_footer()
+ function showFooter()
{
common_element_end('div');
common_end_xml();
}
+
+ function showInstructions()
+ {
+ global $xw;
+
+ common_element_start('dl', array('class' => 'system_notice'));
+ common_element('dt', null, 'Page Notice');
+
+ $loginmsg_part1 = _('To use the %s Facebook Application you need to login ' .
+ 'with your username and password. Don\'t have a username yet? ');
+
+ $loginmsg_part2 = _(' a new account.');
+
+ common_element_start('dd');
+ common_element_start('p');
+ common_text(sprintf($loginmsg_part1, common_config('site', 'name')));
+ common_element('a',
+ array('href' => common_local_url('register')), _('Register'));
+ common_text($loginmsg_part2);
+ common_element_end('dd');
+ common_element_end('dl');
+ }
+
+
+ function showStylesheets()
+ {
+ global $xw;
+
+ common_element('link', array('rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => getFacebookBaseCSS()));
+
+ common_element('link', array('rel' => 'stylesheet',
+ 'type' => 'text/css',
+ 'href' => getFacebookThemeCSS()));
+ }
+
+ function showScripts()
+ {
+ global $xw;
+
+ common_element('script', array('type' => 'text/javascript',
+ 'src' => getFacebookJS()));
+
+ }
+
function showLoginForm($msg = null)
{
- start_fbml();
+ startFBML();
- common_element_start('a', array('href' => 'http://identi.ca'));
- common_element('img', array('src' => 'http://theme.identi.ca/identica/logo.png',
- 'alt' => 'Identi.ca',
- 'id' => 'logo'));
- common_element_end('a');
+ $this->showStylesheets();
+ $this->showScripts();
+
+ $this->showLogo();
+
+ common_element_start('div', array('class' => 'content'));
+ common_element('h1', null, _('Login'));
if ($msg) {
common_element('fb:error', array('message' => $msg));
}
- common_element("h2", null,
- _('To add the Identi.ca application, you need to log into your Identi.ca account.'));
+ $this->showInstructions();
+ common_element_start('div', array('id' => 'content_inner'));
- common_element_start('div', array('class' => 'instructions'));
- common_element_start('p');
- common_raw('Login with your username and password. Don\'t have a username yet?'
- .' <a href="http://identi.ca/main/register">Register</a> a new account.');
- common_element_end('p');
- common_element_end('div');
-
- common_element_start('div', array('id' => 'content'));
common_element_start('form', array('method' => 'post',
+ 'class' => 'form_settings',
'id' => 'login',
'action' => 'index.php'));
+
+ common_element_start('fieldset');
+ common_element('legend', null, _('Login to site'));
+
+ common_element_start('ul', array('class' => 'form_datas'));
+ common_element_start('li');
common_input('nickname', _('Nickname'));
+ common_element_end('li');
+ common_element_start('li');
common_password('password', _('Password'));
+ common_element_end('li');
+ common_element_end('ul');
common_submit('submit', _('Login'));
common_element_end('form');
@@ -114,6 +210,7 @@ class FacebookAction extends Action
common_element('a', array('href' => common_local_url('recoverpassword')),
_('Lost or forgotten password?'));
common_element_end('p');
+
common_element_end('div');
common_end_xml();
@@ -121,4 +218,53 @@ class FacebookAction extends Action
}
+ function showNoticeForm($user)
+ {
+
+ global $xw;
+
+ common_element_start('form', array('id' => 'form_notice',
+ 'method' => 'post',
+ 'action' => 'index.php'));
+
+ common_element_start('fieldset');
+ common_element('legend', null, 'Send a notice');
+
+ common_element_start('ul', 'form_datas');
+ common_element_start('li', array('id' => 'noticcommon_elemente_text'));
+ common_element('label', array('for' => 'notice_data-text'),
+ sprintf(_('What\'s up, %s?'), $user->nickname));
+
+ common_element('textarea', array('id' => 'notice_data-text',
+ 'cols' => 35,
+ 'rows' => 4,
+ 'name' => 'status_textarea'));
+ common_element_end('li');
+ common_element_end('ul');
+
+ common_element_start('dl', 'form_note');
+ common_element('dt', null, _('Available characters'));
+ common_element('dd', array('id' => 'notice_text-count'),
+ '140');
+ common_element_end('dl');
+
+ common_element_start('ul', array('class' => 'form_actions'));
+
+ common_element_start('li', array('id' => 'notice_submit'));
+
+ common_submit('submit', _('Send'));
+
+ /*
+ common_element('input', array('id' => 'notice_action-submit',
+ 'class' => 'submit',
+ 'name' => 'status_submit',
+ 'type' => 'submit',
+ 'value' => _('Send')));
+ */
+ common_element_end('li');
+ common_element_end('ul');
+ common_element_end('fieldset');
+ common_element_end('form');
+ }
+
}
diff --git a/lib/facebookutil.php b/lib/facebookutil.php
index 2529b8a4b..a133ce8ba 100644
--- a/lib/facebookutil.php
+++ b/lib/facebookutil.php
@@ -17,10 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-require_once(INSTALLDIR.'/extlib/facebook/facebook.php');
-require_once(INSTALLDIR.'/lib/noticelist.php');
+require_once INSTALLDIR.'/extlib/facebook/facebook.php';
+require_once INSTALLDIR.'/lib/noticelist.php';
define("FACEBOOK_SERVICE", 2); // Facebook is foreign_service ID 2
+define("FACEBOOK_NOTICE_PREFIX", 1);
+define("FACEBOOK_PROMPTED_UPDATE_PREF", 2);
// Gets all the notices from users with a Facebook link since a given ID
function get_facebook_notices($since)
@@ -42,7 +44,7 @@ function get_facebook()
return new Facebook($apikey, $secret);
}
-function start_fbml($indent = true)
+function startFBML($indent = true)
{
global $xw;
$xw = new XMLWriter();
@@ -94,7 +96,7 @@ function update_profile_box($facebook, $fbuid, $user, $notice)
$xw = new XMLWriter();
$xw->openMemory();
- $item = new NoticeListItem($notice);
+ $item = new FacebookNoticeListItem($notice);
$item->show();
$fbml = "<fb:wide>$style " . $xw->outputMemory(false) . "</fb:wide>";
@@ -104,3 +106,182 @@ function update_profile_box($facebook, $fbuid, $user, $notice)
$facebook->api_client->profile_setFBML(null, $fbuid, $fbml, null, null, $fbml_main);
}
+
+function getFacebookBaseCSS()
+{
+ # Add a timestamp to the CSS file so Facebook cache wont ignore our changes
+ $ts = filemtime(INSTALLDIR.'/theme/base/css/facebookapp.base.css');
+ $cssurl = INSTALLDIR.'/theme/base/css/facebookapp.base.css' . "?ts=$ts";
+ return $cssurl;
+}
+
+function getFacebookThemeCSS()
+{
+ # Add a timestamp to the CSS file so Facebook cache wont ignore our changes
+ $ts = filemtime(theme_file('css/facebookapp.theme.css'));
+ $cssurl = theme_path('css/facebookapp.theme.css') . "?ts=$ts";
+ return $cssurl;
+}
+
+function getFacebookJS() {
+
+ # Add a timestamp to the FBJS file so Facebook cache wont ignore our changes
+ $ts = filemtime(INSTALLDIR.'/js/facebookapp.js');
+ $jsurl = common_path('js/facebookapp.js') . "?ts=$ts";
+ return $jsurl;
+}
+
+
+// Does a little before-after block for next/prev page
+
+function facebookPagination($have_before, $have_after, $page, $action, $args=null)
+{
+
+ if ($have_before || $have_after) {
+ common_element_start('div', array('id' => 'pagination'));
+ common_element_start('ul', array('id' => 'nav_pagination'));
+ }
+
+ if ($have_before) {
+ $pargs = array('page' => $page-1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+
+ common_element_start('li', 'before');
+ common_element('a', array('href' => "index.php?page=$newargs[page]", 'rel' => 'prev'),
+ _('« After'));
+ common_element_end('li');
+ }
+
+ if ($have_after) {
+ $pargs = array('page' => $page+1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+ common_element_start('li', 'after');
+ common_element('a', array('href' => "index.php?page=$newargs[page]", 'rel' => 'next'),
+ _('Before »'));
+ common_element_end('li');
+ }
+
+ if ($have_before || $have_after) {
+ common_element_end('ul');
+ common_element_end('div');
+ }
+}
+
+
+class FacebookNoticeList extends NoticeList
+{
+ /**
+ * show the list of notices
+ *
+ * "Uses up" the stream by looping through it. So, probably can't
+ * be called twice on the same list.
+ *
+ * @return int count of notices listed.
+ */
+
+ function show()
+ {
+ common_element_start('div', array('id' =>'notices_primary'));
+ common_element('h2', null, _('Notices'));
+ common_element_start('ul', array('class' => 'notices'));
+
+ $cnt = 0;
+
+ while ($this->notice->fetch() && $cnt <= NOTICES_PER_PAGE) {
+ $cnt++;
+
+ if ($cnt > NOTICES_PER_PAGE) {
+ break;
+ }
+
+ $item = $this->newListItem($this->notice);
+ $item->show();
+ }
+
+ common_element_end('ul');
+ common_element_end('div');
+
+ return $cnt;
+ }
+
+ /**
+ * returns a new list item for the current notice
+ *
+ * Overridden to return a Facebook specific list item.
+ *
+ * @param Notice $notice the current notice
+ *
+ * @return FacebookNoticeListItem a list item for displaying the notice
+ * formatted for display in the Facebook App.
+ */
+
+ function newListItem($notice)
+ {
+ return new FacebookNoticeListItem($notice);
+ }
+
+}
+
+class FacebookNoticeListItem extends NoticeListItem
+{
+ /**
+ * recipe function for displaying a single notice in the Facebook App.
+ *
+ * Overridden to strip out some of the controls that we don't
+ * want to be available.
+ *
+ * @return void
+ */
+
+ function show()
+ {
+ $this->showStart();
+
+ common_element_start('div', 'entry-title');
+ $this->showAuthor();
+ $this->showContent();
+ common_element_end('div');
+
+ common_element_start('div', 'entry-content');
+ $this->showNoticeLink();
+ $this->showNoticeSource();
+ $this->showReplyTo();
+ common_element_end('div');
+
+ $this->showEnd();
+ }
+
+ function showStart()
+ {
+ // XXX: RDFa
+ // TODO: add notice_type class e.g., notice_video, notice_image
+ common_element_start('li', array('class' => 'hentry notice',
+ 'id' => 'notice-' . $this->notice->id));
+ }
+
+ function showNoticeLink()
+ {
+ $noticeurl = common_local_url('shownotice',
+ array('notice' => $this->notice->id));
+ // XXX: we need to figure this out better. Is this right?
+ if (strcmp($this->notice->uri, $noticeurl) != 0 &&
+ preg_match('/^http/', $this->notice->uri)) {
+ $noticeurl = $this->notice->uri;
+ }
+
+ common_element_start('dl', 'timestamp');
+ common_element('dt', null, _('Published'));
+ common_element_start('dd', null);
+ common_element_start('a', array('rel' => 'bookmark',
+ 'href' => $noticeurl));
+ $dt = common_date_iso8601($this->notice->created);
+ common_element('abbr', array('class' => 'published',
+ 'title' => $dt),
+ common_date_string($this->notice->created));
+ common_element_end('a');
+ common_element_end('dd');
+ common_element_end('dl');
+ }
+
+}
+
diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php
index 8c91df384..0c54cec7c 100755
--- a/scripts/update_facebook.php
+++ b/scripts/update_facebook.php
@@ -67,9 +67,13 @@ while($notice->fetch()) {
// If it's not a reply, or if the user WANTS to send replies...
if (!preg_match('/@[a-zA-Z0-9_]{1,15}\b/u', $content) ||
(($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY)) {
- update_status($fbuid, $content);
- update_profile_box($facebook, $fbuid, $user, $notice);
- $cnt++;
+
+ // Avoid a Loop
+ if ($notice->source != 'Facebook') {
+ update_status($fbuid, $content);
+ update_profile_box($facebook, $fbuid, $user, $notice);
+ $cnt++;
+ }
}
}
}
diff --git a/theme/base/css/facebookapp.base.css b/theme/base/css/facebookapp.base.css
new file mode 100644
index 000000000..eb7b47a12
--- /dev/null
+++ b/theme/base/css/facebookapp.base.css
@@ -0,0 +1,285 @@
+/* theme: identica */
+html {
+background-color:#ddd;
+}
+body {
+font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
+font-size:1em;
+background-color:#ddd;
+}
+input, textarea, select, option {
+font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
+}
+input, textarea, select {
+border-color:#aaa;
+}
+
+input:focus, textarea:focus, select:focus {
+border-color:#A9BF4F;
+}
+input.submit {
+background-color:#A9BF4F;
+color:#fff;
+}
+
+a {
+color:#002E6E;
+}
+a:active {
+background-color:#ddd;
+}
+.notice p.entry-content a:visited {
+background-color:#fcfcfc;
+border-radius:4px;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+}
+.notice p.entry-content .vcard a {
+background-color:#fcfffc;
+border-radius:4px;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+}
+
+
+
+#aside_primary {
+background-color:#CEE1E9;
+}
+
+#form_notice textarea {
+}
+
+#form_notice label {
+color:#88171A;
+}
+#notice_text-count {
+color:#333;
+}
+#form_notice.warning #notice_text-count {
+color:#000;
+background-color:#A9BF4F;
+}
+#form_notice.warning #notice_data-text {
+border-color:#A9BF4F;
+}
+
+#form_notice #notice_data-attach_view {
+background-image:url(../images/icons/twotone/green/paper-clip.gif);
+background-repeat:no-repeat;
+background-position:0 45%;
+background-color:transparent;
+}
+
+
+#site_nav_global_primary a {
+}
+#form_notice .form_actions input.submit {
+}
+#nav_register a {
+background-color:#A9BF4F;
+color:#fff;
+text-decoration:none;
+font-weight:bold;
+padding:2px 4px;
+
+}
+#nav_login a {
+}
+
+
+#site_nav_local_views a {
+border-color:#fff;
+background-color:rgba(255, 255, 255, 0.2);
+}
+#site_nav_local_views a:hover {
+background-color:rgba(255, 255, 255, 0.7);
+}
+
+
+#content,
+#site_nav_local_views .current a {
+background-color:#fff;
+}
+
+
+#page_notice .error {
+background-color:#F7E8E8;
+}
+#page_notice .success {
+background-color:#EFF3DC;
+}
+
+#export_data li a {
+background-repeat:no-repeat;
+background-position:0 45%;
+}
+#export_data li a.rss {
+background-image:url(../../base/images/icons/icon_rss.jpg);
+}
+#export_data li a.atom {
+background-image:url(../../base/images/icons/icon_atom.jpg);
+}
+#export_data li a.foaf {
+background-image:url(../../base/images/icons/icon_foaf.gif);
+}
+#export_data li a.export_vcard {
+background-image:url(../../base/images/icons/icon_vcard.gif);
+}
+
+
+/*user_actions*/
+#user_actions li {
+border-top-color:#eee;
+}
+#user_actions a {
+color:#000;
+}
+#user_subscribe a,
+#TB_window input.submit,
+.form_user_subscribe input.submit {
+background:#CEE1E9 url(../images/icons/twotone/green/shield.gif) 0 45% no-repeat;
+}
+.form_user_unsubscribe input.submit {
+background-color:#647819;
+color:#fff;
+}
+#user_send-a-message a {
+background:url(../images/icons/twotone/green/quote.gif) 0 45% no-repeat;
+}
+.form_user_nudge input.submit {
+background:url(../images/icons/twotone/green/mail.gif) 0 45% no-repeat;
+}
+.form_user_block input.submit {
+background:url(../images/icons/twotone/green/against.gif) 0 45% no-repeat;
+}
+
+
+.user_tags .mark_hash {
+color:#555;
+}
+
+
+
+.vcard .fn {
+}
+.vcard .fn:hover {
+}
+
+
+
+
+/* NOTICES */
+.notices li.over {
+background-color:#fcfcfc;
+}
+
+
+.notice div.entry-content a {
+
+}
+.notice div.entry-content a:hover {
+}
+
+
+.notice-data a span {
+background-color:transparent;
+background-repeat:no-repeat;
+background-position:0 45%;
+}
+.notice_video .notice-data a span {
+background-image:url(../images/icons/twotone/green/camera.gif);
+}
+.notice_audio .notice-data a span {
+background-image:url(../images/icons/twotone/green/music.gif);
+}
+.notice_image .notice-data a span {
+background-image:url(../images/icons/twotone/green/search.gif);
+}
+.notice_event .notice-data a span {
+background-image:url(../images/icons/twotone/green/calendar.gif);
+}
+.notice_location .notice-data a span {
+background-image:url(../images/icons/twotone/green/flag.gif);
+}
+.notice_document .notice-data a span {
+background-image:url(../images/icons/twotone/green/document.gif);
+}
+
+.notice-options .notice_reply a,
+.notice-options form input.submit {
+background-color:transparent;
+}
+.notice-options .notice_reply a {
+background:transparent url(../images/icons/twotone/green/reply.gif) no-repeat 0 45%;
+}
+.notice-options form.form_favor input.submit {
+background:transparent url(../images/icons/twotone/green/favourite.gif) no-repeat 0 45%;
+}
+.notice-options form.form_disfavor input.submit {
+background:transparent url(../images/icons/twotone/green/disfavourite.gif) no-repeat 0 45%;
+}
+.notice-options .notice_delete a {
+background:transparent url(../images/icons/twotone/green/trash.gif) no-repeat 0 45%;
+}
+
+div.notice-options {
+opacity:0.3;
+}
+
+div.entry-content {
+color:#333;
+}
+div.notice-options a,
+div.notice-options input {
+font-family:sans-serif;
+}
+div.notice-options input {
+color:#002E6E;
+
+}
+.notices li.hover {
+background-color:#fcfcfc;
+}
+.notices li.hover div.entry-content,
+.notices li.hover div.notice-options {
+opacity:1;
+}
+
+.form_settings .form_note {
+background-color:#A9BF4F;
+}
+
+/*END: NOTICES */
+
+
+
+.pagination .nav_prev a,
+.pagination .nav_next a {
+background-repeat:no-repeat;
+}
+.pagination .nav_prev a {
+background-image:url(../images/icons/twotone/green/arrow-left.gif);
+background-position:0 45%;
+}
+.pagination .nav_next a {
+background-image:url(../images/icons/twotone/green/arrow-right.gif);
+background-position:100% 45%;
+}
+
+
+
+#home #intro #guide_steps li a {
+border-color:#ccc;
+color:#fff;
+}
+#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;
+}
+
diff --git a/theme/identica/css/facebookapp.theme.css b/theme/identica/css/facebookapp.theme.css
new file mode 100644
index 000000000..716f3256f
--- /dev/null
+++ b/theme/identica/css/facebookapp.theme.css
@@ -0,0 +1,1177 @@
+/* theme: base */
+* { margin:0; padding:0; }
+img { display:block; border:0; }
+a abbr { cursor: pointer; border-bottom:0; }
+table { border-collapse:collapse; }
+ol { list-style-position:inside; }
+html { font-size: 87.5%; background-color:#fff; height:100%; }
+body {
+background-color:#fff;
+color:#000;
+font-family:sans-serif;
+font-size:1em;
+line-height:1.65;
+position:relative;
+margin:0 auto;
+width:1004px;
+width:71.714em;
+}
+h1,h2,h3,h4,h5,h6 {
+ text-transform:uppercase;
+ margin-bottom:7px;
+}
+h1 {
+font-size:1.4em;
+line-height:1;
+margin-bottom:18px;
+}
+h2 { font-size:1.3em; }
+h3 { font-size:1.2em; }
+h4 { font-size:1.1em; }
+h5 { font-size:1em; }
+h6 { font-size:0.9em; }
+
+caption {
+font-weight:bold;
+}
+.opened { display: block !important;}
+.closed { display: none !important;}
+
+legend {
+font-weight:bold;
+font-size:1.3em;
+text-transform:uppercase;
+}
+form {
+}
+input, textarea, select, option {
+padding:4px;
+font-family:sans-serif;
+font-size:1em;
+}
+input, textarea, select {
+border-width:2px;
+border-style: solid;
+border-radius:4px;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+}
+input.submit {
+font-weight:bold;
+}
+textarea {
+overflow:auto;
+}
+select, option {
+padding-bottom:0;
+}
+fieldset {
+padding:0;
+border:0;
+}
+form ul li {
+list-style-type:none;
+margin:0 0 18px 0;
+}
+form label {
+font-weight:bold;
+/*margin:0 0 11px 0;*/
+}
+form ul li input {
+}
+
+input.checkbox {
+position:relative;
+top:2px;
+left:0;
+border:0;
+}
+
+#page_notice .error,
+#page_notice .success {
+padding:4px 7px;
+border-radius:4px;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+}
+form label.submit {
+display:none;
+}
+.form_settings input.remove {
+margin-left:11px;
+}
+
+
+
+
+/* FORM SETTINGS */
+.form_settings fieldset {
+margin-bottom:29px;
+}
+
+.form_guide {
+font-style:italic;
+}
+
+
+.form_settings .form_datas li {
+width:100%;
+float:left;
+}
+
+.form_settings .form_datas label {
+float:left;
+}
+.form_settings .form_datas textarea,
+.form_settings .form_datas select,
+.form_settings .form_datas input {
+margin-left:11px;
+float:left;
+}
+
+.form_settings label {
+margin-top:2px;
+width:152px;
+}
+
+.form_actions label {
+display:none;
+}
+
+.form_settings #settings_autosubscribe label {
+display:inline;
+font-weight:bold;
+}
+
+#form_settings_profile legend,
+#form_login legend,
+#form_register legend {
+display:none;
+}
+
+.form_settings .form_datas p.form_guide {
+clear:both;
+margin-left:163px;
+margin-bottom:0;
+}
+
+.form_settings p {
+margin-bottom:11px;
+}
+
+.form_settings input.checkbox {
+margin-top:3px;
+margin-left:0;
+}
+.form_settings label.checkbox {
+font-weight:normal;
+margin-top:0;
+margin-right:0;
+margin-left:11px;
+float:left;
+width:90%;
+}
+
+#form_login p.form_guide,
+#form_register #settings_rememberme p.form_guide {
+margin-left:0;
+}
+
+
+.form_settings .form_note {
+border-radius:4px;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+padding:0 7px;
+}
+
+/* FORM SETTINGS */
+
+
+
+
+address {
+float:left;
+margin-bottom:18px;
+margin-left:18px;
+}
+address .fn,
+address .email {
+display:none;
+}
+
+
+
+#header {
+width:100%;
+position:relative;
+float:left;
+padding-top:18px;
+margin-bottom:29px;
+}
+
+#site_nav_global_primary {
+float:right;
+margin-right:18px;
+}
+#site_nav_global_primary ul li {
+display:inline;
+margin-left:11px;
+}
+
+
+.system_notice dt {
+font-weight:bold;
+text-transform:uppercase;
+display:none;
+}
+
+#site_notice {
+position:absolute;
+right:0;
+top:49px;
+float:right;
+width:322px;
+}
+#page_notice {
+clear:both;
+margin-bottom:18px;
+}
+
+
+
+
+#footer {
+float:left;
+width:64%;
+padding:18px;
+}
+
+
+
+#site_nav_local_views {
+width:100%;
+float:left;
+}
+#site_nav_local_views dt {
+display:none;
+}
+#site_nav_local_views li {
+float:left;
+margin-right:18px;
+list-style-type:none;
+}
+#site_nav_local_views a {
+float:left;
+text-decoration:none;
+padding:4px 11px;
+-moz-border-radius-topleft:4px;
+-moz-border-radius-topright:4px;
+-webkit-border-top-left-radius:4px;
+-webkit-border-top-right-radius:4px;
+border-width:1px;
+border-style:solid;
+border-bottom:0;
+text-shadow: 4px 4px 4px #ddd;
+font-weight:bold;
+}
+#site_nav_local_views .nav {
+float:left;
+width:100%;
+}
+
+
+#site_nav_global_primary dt,
+#site_nav_global_secondary dt {
+display:none;
+}
+/*
+#site_nav_global_primary .current a {
+font-weight:bold;
+border-style:solid;
+}
+*/
+#site_nav_global_secondary {
+margin-bottom:11px;
+}
+
+#site_nav_global_secondary ul li {
+display:inline;
+margin-right:11px;
+}
+#export_data li a {
+padding-left:20px;
+}
+#export_data li a.foaf {
+padding-left:30px;
+}
+#export_data li a.export_vcard {
+padding-left:28px;
+}
+
+
+
+#export_data ul {
+display:inline;
+}
+#export_data li {
+list-style-type:none;
+display:inline;
+margin-left:11px;
+}
+#export_data li:first-child {
+margin-left:0;
+}
+
+
+
+#licenses {
+font-size:0.9em;
+}
+
+#licenses dt {
+font-weight:bold;
+display:none;
+}
+#licenses dd {
+margin-bottom:11px;
+line-height:1.5;
+}
+
+#site_content_license_cc {
+margin-bottom:0;
+}
+#site_content_license_cc img {
+display:inline;
+vertical-align:top;
+margin-right:4px;
+}
+
+
+#wrap {
+ float:left;
+ margin:0 auto;
+ width:1004px;
+ width:71.714em;
+}
+
+
+#core {
+position:relative;
+width:100%;
+float:left;
+margin-bottom:1em;
+}
+
+#content {
+width:644px;
+padding:18px;
+float:left;
+border-radius:7px;
+-moz-border-radius:7px;
+-moz-border-radius-topleft:0;
+-webkit-border-radius:7px;
+-webkit-border-top-left-radius:0;
+}
+
+#content_inner {
+position:relative;
+width:100%;
+float;left;
+}
+
+#aside_primary {
+width:300px;
+float:left;
+margin-left:2px;
+padding:18px 4px 18px 18px;
+border-radius:7px;
+-moz-border-radius:7px;
+-webkit-border-radius:7px;
+}
+
+
+
+
+/*Start: FORM NOTICE*/
+#form_notice {
+width:384px;
+width:458px;
+float:left;
+margin-left:68px;
+position:relative;
+line-height:1;
+}
+#form_notice fieldset {
+border:0;
+padding:0;
+}
+#form_notice legend {
+display:none;
+}
+#form_notice textarea {
+border-radius:7px;
+-moz-border-radius:7px;
+-webkit-border-radius:7px;
+width:377px;
+width:370px;
+height:86px;
+line-height:1.5;
+padding:7px 7px 14px 7px;
+}
+#form_notice label {
+display:block;
+font-size:1.3em;
+margin-bottom:7px;
+}
+#form_notice .form_datas li {
+float:left;
+}
+
+#form_notice #notice_attach_file label,
+#form_notice #notice_submit label {
+display:none;
+}
+
+#form_notice #notice_attachment {
+margin-top:25px;
+margin-left:4px;
+}
+
+#form_notice .form_note {
+position:absolute;
+top:116px;
+right:98px;
+z-index:9;
+}
+
+#form_notice .form_note dt {
+font-weight:bold;
+display:none;
+}
+#notice_text-count {
+font-weight:bold;
+line-height:1.15;
+}
+
+#form_notice #notice_data-attach_view {
+/*position:absolute;*/
+top:25px;
+right:30px;
+margin-left:4px;
+padding:0;
+cursor:pointer;
+width:16px;
+height:16px;
+border:0;
+text-indent:-9999px;
+}
+#form_notice .form_actions {
+position:absolute;
+bottom:0;
+right:0;
+}
+#form_notice .form_actions input.submit {
+width:60px;
+padding:8px;
+}
+
+#form_notice li {
+margin-bottom:0;
+}
+/*end FORM NOTICE*/
+
+
+
+
+
+/* user_profile */
+#user_profile {
+position:relative;
+width:633px;
+min-height:123px;
+float:left;
+margin-bottom:17px;
+margin-left:0;
+}
+#user_profile dt,
+#user_statistics dt {
+font-weight:bold;
+}
+#user_profile .user_depiction {
+float:left;
+position:absolute;
+top:0;
+left:0;
+width:96px;
+}
+#user_profile .user_fn,
+#user_profile .user_nickname,
+#user_profile .user_location,
+#user_profile .user_url,
+#user_profile .user_note,
+#user_profile .user_tags {
+float:left;
+clear:left;
+margin-left:125px;
+width:322px;
+margin-bottom:4px;
+}
+
+#user_profile .user_fn,
+#user_profile .user_nickname {
+width:auto;
+clear:none;
+}
+#user_profile .user_nickname {
+margin-left:11px;
+}
+#user_profile .user_nickname .nickname {
+font-style:italic;
+font-weight:bold;
+margin-left:4px;
+margin-right:4px;
+}
+
+#user_profile .user_nickname dd:before {
+content: "(";
+}
+#user_profile .user_nickname dd:after {
+content: ")";
+}
+
+#user_profile dt {
+display:none;
+}
+#user_profile h2 {
+display:none;
+}
+/* user_profile */
+
+/*user_actions*/
+#user_actions {
+clear:left;
+float:left;
+position:absolute;
+top:0;
+right:0;
+}
+#user_actions h2 {
+display:none;
+}
+#user_actions ul {
+list-style-type:none;
+}
+#user_actions li {
+border-top-width:1px;
+border-top-style:dotted;
+}
+#user_actions li:first-child {
+border-top:0;
+}
+#user_actions fieldset {
+border:0;
+padding:0;
+}
+#user_actions legend {
+display:none;
+}
+
+#user_actions a,
+#user_actions input.submit {
+display:block;
+text-align:left;
+padding:4px 0 4px 19px;
+}
+#user_actions a {
+text-decoration:none;
+}
+#user_subscribe a,
+#TB_window input.submit,
+#user_actions input.submit {
+border:0;
+cursor:pointer;
+padding-left:16px;
+width:100%;
+font-size:0.9em;
+}
+
+#user_subscribe a {
+width:auto;
+padding-left:20px;
+}
+
+#user_subscribe a,
+#TB_window input.submit,
+.form_user_subscribe input.submit {
+font-weight:bold;
+}
+
+
+
+#user_send-a-message form {
+clear:left;
+width:322px;
+margin-top:18px;
+}
+
+#user_send-a-message textarea {
+width:96%;
+}
+
+.user_tags ul {
+list-style-type:none;
+}
+.user_tags li {
+display:inline;
+margin-right:1em;
+float:left;
+}
+
+
+
+.aside .section {
+margin-bottom:29px;
+clear:both;
+}
+.aside .section h2 {
+text-transform:uppercase;
+font-size:1em;
+}
+
+#user_statistics dt,
+#user_statistics dd {
+display:inline;
+}
+#user_statistics dt:after {
+content: ":";
+}
+
+
+#user_subscriptions,
+#user_subscriptions-common {
+float:left;
+}
+#user_subscriptions ul.users {
+width:220px;
+float:left;
+}
+#user_subscriptions .users li {
+list-style-type:none;
+float:left;
+margin-right:7px;
+margin-bottom:7px;
+}
+#user_subscriptions .users li .photo {
+width:24px;
+height:24px;
+margin-right:0;
+}
+#user_subscriptions .users li .fn {
+display:none;
+}
+.aside .section .more {
+clear:both;
+}
+
+
+
+
+
+/* NOTICE */
+.notice {
+position:relative;
+padding-top:18px;
+padding-bottom:18px;
+clear:both;
+float:left;
+width:644px;
+width:96.699%;
+width:100%;
+border-top:1px dashed #D1D9E4;
+/*-moz-border-radius:7px;*/
+}
+.notices li {
+list-style-type:none;
+/*margin-bottom:11px;*/
+}
+
+/* NOTICES */
+#notices_primary {
+float:left;
+width:644px;
+border-radius:7px;
+-moz-border-radius:7px;
+-webkit-border-radius:7px;
+}
+#notices_primary h2 {
+display:none;
+}
+.notice-data a span {
+display:block;
+padding-left:28px;
+}
+
+
+.notice .author {
+margin-right:11px;
+}
+.notice .author a {
+}
+.notice .author:after {
+/*content:":";*/
+}
+
+.vcard .photo {
+display:inline;
+margin-right:7px;
+margin-bottom:7px;
+float:left;
+}
+.vcard .url {
+text-decoration:none;
+}
+.vcard .url:hover {
+text-decoration:underline;
+}
+.vcard .fn {
+font-style:italic;
+}
+.vcard .fn:hover {
+
+}
+
+
+.notice .entry-title {
+float:left;
+width:100%;
+}
+.notice p.entry-content {
+display:inline;
+}
+
+.notice_video p.entry-content,
+.notice_audio p.entry-content,
+.notice_image p.entry-content,
+.notice_location p.entry-content,
+.notice_event p.entry-content,
+.notice_document p.entry-content {
+}
+#laconicat .notice p.entry-content {
+/*margin-left:199px;*/
+}
+.notice p.entry-content a {
+
+}
+.notice p.entry-content a:hover {
+
+}
+.notice p.entry-content .tag a {
+
+}
+.notice p.entry-content .tag a:hover {
+
+}
+
+
+.notice div.entry-content {
+/*border:1px solid blue;*/
+clear:left;
+float:left;
+width:48%;
+font-size:0.95em;
+}
+.notice div.entry-content a,
+.notice .notice-options a,
+.notice .notice-options input {
+
+}
+.notice .notice-options a,
+.notice .notice-options input {
+float:left;
+font-size:1.025em;
+}
+
+#laconicat .notice div.entry-content {
+/*margin-left:0;*/
+}
+
+.notice div.entry-content dl,
+.notice div.entry-content dt,
+.notice div.entry-content dd {
+display:inline;
+}
+.notice div.entry-content .timestamp dt,
+.notice div.entry-content .response dt {
+display:none;
+}
+.notice div.entry-content .timestamp a {
+display:inline-block;
+}
+.notice div.entry-content .device dt {
+text-transform:lowercase;
+}
+.notice div.entry-content a {
+
+}
+.notice div.entry-content a:hover {
+}
+
+
+
+.notice-data {
+position:absolute;
+top:18px;
+right:0;
+min-height:50px;
+margin-bottom:4px;
+}
+.notice .entry-content .notice-data dt {
+display:none;
+}
+
+.notice-data a {
+display:block;
+outline:none;
+}
+
+.notice-options {
+padding-left:2%;
+float:left;
+width:50%;
+position:relative;
+font-size:0.95em;
+}
+
+.notice-options a {
+float:left;
+}
+.notice-options .notice_delete,
+.notice-options .notice_reply,
+.notice-options .form_favor,
+.notice-options .form_disfavor {
+position:absolute;
+top:0;
+}
+.notice-options .form_favor,
+.notice-options .form_disfavor {
+left:0;
+}
+.notice-options .notice_reply {
+left:29px;
+}
+.notice-options .notice_delete {
+left:76px;
+}
+.notice-options .notice_reply dt {
+display:none;
+}
+
+.notice-options input,
+.notice-options a {
+text-indent:-9999px;
+outline:none;
+}
+
+.notice-options .notice_reply a,
+.notice-options form input.submit {
+display:block;
+border:0;
+}
+.notice-options .notice_reply a,
+.notice-options .notice_delete a {
+text-decoration:none;
+padding-left:16px;
+}
+
+.notice-options .notice_delete {
+
+}
+
+.notice-options form input.submit {
+cursor:pointer;
+width:16px;
+padding:2px 0;
+}
+
+.notice-options .notice_delete dt,
+.notice-options .form_favor legend,
+.notice-options .form_disfavor legend {
+display:none;
+}
+.notice-options .notice_delete fieldset,
+.notice-options .form_favor fieldset,
+.notice-options .form_disfavor fieldset {
+border:0;
+padding:0;
+}
+
+/*END: NOTICES */
+
+
+
+
+
+.pagination dt {
+font-weight:bold;
+display:none;
+}
+
+.pagination .nav {
+float:left;
+width:100%;
+list-style-type:none;
+}
+
+.pagination .nav_prev {
+float:left;
+}
+.pagination .nav_next {
+float:right;
+}
+
+.pagination a {
+display:block;
+text-decoration:none;
+font-weight:bold;
+padding:7px;
+border:1px dotted #D1D9E4;
+border-bottom:0;
+}
+
+.pagination .nav_prev a {
+-moz-border-radius-topright:7px;
+-webkit-border-top-right-radius:7px;
+padding-left:20px;
+border-left:0;
+}
+.pagination .nav_next a {
+-moz-border-radius-topleft:7px;
+-webkit-border-top-left-radius:7px;
+padding-right:20px;
+border-right:0;
+}
+
+
+/* END: NOTICE */
+
+
+
+
+
+
+
+/*START: LOAD ALONG WITH JS*/
+.notice .in-reply-to {
+ width:98%;
+ margin-left:2%;
+}
+.notice .in-reply-to li {
+background-color:#F7F9FB;
+}
+.notice .in-reply-to li .in-reply-to li {
+background-color:#E4E9F0;
+}
+.notice .in-reply-to li .in-reply-to li .in-reply-to li {
+background-color:#D1D9E4;
+}
+
+
+
+#user_actions #user_subscribe .form_note,
+#user_actions #user_subscribe .form_datas,
+#user_actions #user_subscribe .form_actions label {
+display:none;
+}
+#form_user-relationship .form_note,
+#form_user-relationship .form_datas,
+#form_user-relationship .form_actions label {
+display:block;
+}
+
+#user_actions #user-relationship_submit {
+margin-bottom:0;
+}
+#form_user-relationship .form_datas li label {
+margin-right:11px;
+}
+
+#user_relationship_xfn {
+/*z-index:1000;
+position:absolute;
+width:521px;
+height:322px;*/
+display:none;
+}
+#user_relationship_xfn fieldset {
+background-color:#fff;
+}
+
+/*END: LOAD ALONG WITH JS*/
+
+
+
+/* TOP_POSTERS */
+#top-posters caption {
+text-align:left;
+text-transform:uppercase;
+}
+
+#top-posters thead {
+display:none;
+}
+#top-poster_user {
+width:199px;
+}
+#top-poster_number-of-notices {
+width:123px;
+}
+#top-posters tbody td {
+padding-right:11px;
+padding-bottom:4px;
+}
+#top-posters img {
+margin-right:7px;
+height:24px;
+width:24px;
+}
+
+
+
+/* tagcloud */
+#tagcloud ul {
+list-style-type:none;
+}
+#tagcloud ul li {
+display:inline;
+margin-right:7px;
+line-height:1.4;
+}
+
+#tagcloud.section dt {
+text-transform:uppercase;
+font-weight:bold;
+}
+#tagcloud .weight_1 {
+font-size:1em;
+}
+#tagcloud .weight_2 {
+font-size:1.3em;
+}
+#tagcloud .weight_3 {
+font-size:1.6em;
+}
+#tagcloud .weight_4 {
+font-size:1.9em;
+}
+#tagcloud .weight_5 {
+font-size:2.2em;
+}
+
+
+
+#form_settings_photo .form_datas {
+clear:both;
+}
+
+
+
+
+#photo_original,
+#photo_preview {
+float:left;
+}
+#photo_preview,
+#settings_photo_action-crop {
+margin-left:29px;
+}
+#photo_preview_view {
+height:96px;
+width:96px;
+overflow:hidden;
+}
+
+
+
+
+.section .groups,
+#users_featured ul {
+list-style-type:none;
+}
+.section .groups li,
+#users_featured li {
+margin-top:11px;
+float:left;
+width:100%;
+}
+.section .groups li:first-child,
+#users_featured li:first-child {
+margin-top:0;
+}
+
+.section .groups .vcard,
+#users_featured .vcard {
+float:left;
+margin-bottom:-23px;
+}
+
+.section .groups dl,
+#users_featured dl {
+float:left;
+margin-left:63px;
+clear:left;
+}
+.section .groups dt,
+#users_featured dt {
+display:none;
+font-weight:bold;
+}
+
+
+
+#home.logged_out h1 {
+display:none;
+}
+
+#home #intro {
+margin-bottom:29px;
+float:left;
+width:100%;
+}
+
+#home #intro p {
+margin-bottom:18px;
+font-size:1.8em;
+}
+
+#home #intro #guide_steps {
+list-style-type:none;
+}
+#home #intro #guide_steps li {
+float:left;
+margin-left:18px;
+}
+#home #intro #guide_steps li:first-child {
+margin-left:0;
+}
+#home #intro #guide_steps li a {
+display:block;
+float:left;
+width:185px;
+height:109px;
+border-width:1px;
+border-style:dotted;
+text-decoration:none;
+border-radius:7px;
+-moz-border-radius:7px;
+-webkit-border-radius:7px;
+padding:7px;
+font-size:1.6em;
+font-weight:bold;
+text-align:center;
+}
+
+
+#testimonials {
+clear:both;
+}
diff --git a/theme/identica/facebookapp.css b/theme/identica/facebookapp.css
deleted file mode 100644
index b2bbbac51..000000000
--- a/theme/identica/facebookapp.css
+++ /dev/null
@@ -1,161 +0,0 @@
-
-/* XXX: Most of this just copied out of display.css -- need to factor out what we really neeed -- Zach */
-
-body {
- color: #193441;
-}
-
-a {
-color: #d1451a;
-text-decoration: none;
-}
-a:hover {
-text-decoration: underline;
-}
-img, img a {
-border: 0;
-}
-h1 {
-font-size: 14px;
-}
-
-#wrap {
-margin: 0 auto;
-padding: 0 20px;
-width: 760px;
-background: url(bg-header.gif) repeat-x #fbf2d7;
-}
-
-
-#notices {
-clear: both;
-margin: 0 auto;
-padding: 0;
-list-style-type: none;
-width: 600px;
-border-top: 1px solid #dec5b5;
-}
-#notices a:hover {
-text-decoration: underline;
-}
-.notice_single {
-clear: both;
-display: block;
-margin: 0;
-padding: 5px 5px 5px 0;
-min-height: 48px;
-font-family: Georgia, "Times New Roman", Times, serif;
-font-size: 13px;
-line-height: 16px;
-border-bottom: 1px solid #dec5b5;
-background-color:#FCFFF5;
-opacity:1;
-}
-.notice_single:hover {
-background-color: #f7ebcc;
-}
-.notice_single p {
-display: inline;
-margin: 0;
-padding: 0;
-}
-#notice_delete_form #confirmation_text {
- display: block;
-font-size: 14px;
-font-weight: bold;
-}
-
-input#submit_yes, input#submit_no {
-margin: 18px 10px 0px 0px;
-padding: 4px;
-font-weight: bold;
-color: #fff6d5;
-background-color: #F60;
-cursor: pointer;
-border: 0;
-width: 40px;
-}
-input#submit_yes:hover, input#submit_no:hover {
-background-color: #701238;
-}
-.avatar.stream {
-float: left;
-margin: 0 10px 0.5em 0;
-}
-p.time {
-display: block;
-font-family: Verdana, Arial, Helvetica, sans-serif;
-font-size: 10px;
-line-height: 15px;
-}
-p.time a {
-color: #dab134;
-}
-
-
-/* ----- Forms General Style ----- */
-form {
- margin: 0 auto;
- padding: 0;
- }
-form {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
-form label {
- display: block;
- font-size: 12px;
- font-weight: bold;
- line-height: 18px;
- }
-form input {
- border: 1px solid #dec5b5;
- width: 264px;
- }
-input#submit, input.submit {
- display: block;
- margin: 18px 0;
- padding: 4px;
- font-weight: bold;
- color: #fff6d5;
- background-color: #F60;
- cursor: pointer;
- border: 0;
- width: auto;
- }
-input#submit:hover, input.submit:hover {
- background-color: #701238;
- }
-input.checkbox {
- /*width: 14px;
- height: 14px;*/
- width: auto;
- border: 0;
- }
-
-label.checkbox_label {
- display: inline;
- font-weight: normal;
-}
-
-textarea, input {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- color: #701238;
- padding: 3px;
- }
-textarea:focus, input:focus {
- background-color: #f8ebc0;
- }
-textarea {
- width: 270px;
- border: 1px solid #D8E2D7;
- }
-.input_instructions {
- margin-top: 3px;
- display: block;
- font-size: 11px;
- line-height: 15px;
- color: #924959;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- }