summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README24
-rw-r--r--actions/allrss.php4
-rw-r--r--actions/api.php5
-rw-r--r--actions/emailsettings.php14
-rw-r--r--actions/favoritesrss.php4
-rw-r--r--actions/grouprss.php5
-rw-r--r--actions/imsettings.php6
-rw-r--r--actions/noticesearchrss.php5
-rw-r--r--actions/publicrss.php4
-rw-r--r--actions/repliesrss.php3
-rw-r--r--actions/showfavorites.php2
-rw-r--r--actions/shownotice.php4
-rw-r--r--actions/smssettings.php6
-rw-r--r--actions/subscriptions.php16
-rw-r--r--actions/tagrss.php3
-rw-r--r--actions/twitapigroups.php97
-rw-r--r--actions/twittersettings.php6
-rw-r--r--actions/userrss.php5
-rw-r--r--classes/User_group.php41
-rw-r--r--config.php.sample9
-rw-r--r--db/074to080.sql2
-rw-r--r--db/074to080_pg.sql2
-rw-r--r--db/laconica.sql2
-rw-r--r--db/laconica_pg.sql2
-rw-r--r--doc-src/sms30
-rw-r--r--index.php4
-rw-r--r--install.php130
-rw-r--r--js/util.js38
-rw-r--r--lib/action.php17
-rw-r--r--lib/common.php6
-rw-r--r--lib/connectsettingsaction.php30
-rw-r--r--lib/htmloutputter.php7
-rw-r--r--lib/jsonsearchresultslist.php4
-rw-r--r--lib/mail.php40
-rw-r--r--lib/noticelist.php7
-rw-r--r--lib/router.php22
-rw-r--r--lib/twitterapi.php123
-rw-r--r--plugins/Autocomplete/Autocomplete.js19
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php4
-rw-r--r--plugins/FBConnect/README3
-rwxr-xr-xscripts/getvaliddaemons.php10
-rwxr-xr-xscripts/maildaemon.php6
-rw-r--r--theme/base/images/icons/icon_atom.pngbin820 -> 807 bytes
-rw-r--r--theme/base/images/icons/icon_rss.pngbin777 -> 763 bytes
-rw-r--r--theme/default/css/display.css2
-rw-r--r--theme/default/default-avatar-mini.pngbin646 -> 512 bytes
-rw-r--r--theme/default/default-avatar-profile.pngbin2853 -> 2234 bytes
-rw-r--r--theme/default/default-avatar-stream.pngbin1487 -> 1146 bytes
-rw-r--r--theme/default/logo.pngbin2228 -> 1691 bytes
-rw-r--r--theme/identica/css/display.css2
-rw-r--r--theme/identica/default-avatar-mini.pngbin646 -> 512 bytes
-rw-r--r--theme/identica/default-avatar-profile.pngbin2853 -> 2234 bytes
-rw-r--r--theme/identica/default-avatar-stream.pngbin1487 -> 1146 bytes
-rw-r--r--theme/identica/logo.pngbin4988 -> 4044 bytes
54 files changed, 616 insertions, 159 deletions
diff --git a/README b/README
index ef5a13934..12c465869 100644
--- a/README
+++ b/README
@@ -1228,6 +1228,30 @@ enabled: Set to true to enable. Default false.
server: a string with the hostname of the sphinx server.
port: an integer with the port number of the sphinx server.
+emailpost
+---------
+
+For post-by-email.
+
+enabled: Whether to enable post-by-email. Defaults to true. You will
+ also need to set up maildaemon.php.
+
+sms
+---
+
+For SMS integration.
+
+enabled: Whether to enable SMS integration. Defaults to true. Queues
+ should also be enabled.
+
+twitter
+-------
+
+For Twitter integration
+
+enabled: Whether to enable Twitter integration. Defaults to true.
+ Queues should also be enabled.
+
integration
-----------
diff --git a/actions/allrss.php b/actions/allrss.php
index 885a67f61..260667090 100644
--- a/actions/allrss.php
+++ b/actions/allrss.php
@@ -115,8 +115,8 @@ class AllrssAction extends Rss10Action
'link' => common_local_url('all',
array('nickname' =>
$user->nickname)),
- 'description' => sprintf(_('Feed for friends of %s'),
- $user->nickname));
+ 'description' => sprintf(_('Updates from %1$s and friends on %2$s!'),
+ $user->nickname, common_config('site', 'name')));
return $c;
}
diff --git a/actions/api.php b/actions/api.php
index 99ab262ad..6d226af7e 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -131,6 +131,8 @@ class ApiAction extends Action
'tags/timeline',
'oembed/oembed',
'groups/show',
+ 'groups/timeline',
+ 'groups/list_all',
'groups/timeline');
static $bareauth = array('statuses/user_timeline',
@@ -140,7 +142,8 @@ class ApiAction extends Action
'statuses/mentions',
'statuses/followers',
'favorites/favorites',
- 'friendships/show');
+ 'friendships/show',
+ 'groups/list_groups');
$fullname = "$this->api_action/$this->api_method";
diff --git a/actions/emailsettings.php b/actions/emailsettings.php
index 634388fdd..cdd092829 100644
--- a/actions/emailsettings.php
+++ b/actions/emailsettings.php
@@ -122,7 +122,7 @@ class EmailsettingsAction extends AccountSettingsAction
}
$this->elementEnd('fieldset');
- if ($user->email) {
+ if (common_config('emailpost', 'enabled') && $user->email) {
$this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
$this->element('legend',_('Incoming email'));
if ($user->incomingemail) {
@@ -173,11 +173,13 @@ class EmailsettingsAction extends AccountSettingsAction
_('Allow friends to nudge me and send me an email.'),
$user->emailnotifynudge);
$this->elementEnd('li');
- $this->elementStart('li');
- $this->checkbox('emailpost',
- _('I want to post notices by email.'),
- $user->emailpost);
- $this->elementEnd('li');
+ if (common_config('emailpost', 'enabled')) {
+ $this->elementStart('li');
+ $this->checkbox('emailpost',
+ _('I want to post notices by email.'),
+ $user->emailpost);
+ $this->elementEnd('li');
+ }
$this->elementStart('li');
$this->checkbox('emailmicroid',
_('Publish a MicroID for my email address.'),
diff --git a/actions/favoritesrss.php b/actions/favoritesrss.php
index c439a9a62..5dc09e5e8 100644
--- a/actions/favoritesrss.php
+++ b/actions/favoritesrss.php
@@ -111,8 +111,8 @@ class FavoritesrssAction extends Rss10Action
'link' => common_local_url('showfavorites',
array('nickname' =>
$user->nickname)),
- 'description' => sprintf(_('Feed of favorite notices of %s'),
- $user->nickname));
+ 'description' => sprintf(_('Updates favored by %1$s on %2$s!'),
+ $user->nickname, common_config('site', 'name')));
return $c;
}
diff --git a/actions/grouprss.php b/actions/grouprss.php
index 2bdcaafb2..e1e2d2018 100644
--- a/actions/grouprss.php
+++ b/actions/grouprss.php
@@ -132,9 +132,10 @@ class groupRssAction extends Rss10Action
$c = array('url' => common_local_url('grouprss',
array('nickname' =>
$group->nickname)),
- 'title' => $group->nickname,
+ 'title' => sprintf(_('%s timeline'), $group->nickname),
'link' => common_local_url('showgroup', array('nickname' => $group->nickname)),
- 'description' => sprintf(_('Microblog by %s group'), $group->nickname));
+ 'description' => sprintf(_('Updates from members of %1$s on %2$s!'),
+ $group->nickname, common_config('site', 'name')));
return $c;
}
diff --git a/actions/imsettings.php b/actions/imsettings.php
index e0f5ede3a..70a6f37d4 100644
--- a/actions/imsettings.php
+++ b/actions/imsettings.php
@@ -84,6 +84,12 @@ class ImsettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('xmpp', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('IM is not available.'));
+ return;
+ }
+
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
'id' => 'form_settings_im',
diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php
index 2a4b2060d..045531c5a 100644
--- a/actions/noticesearchrss.php
+++ b/actions/noticesearchrss.php
@@ -86,9 +86,10 @@ class NoticesearchrssAction extends Rss10Action
{
$q = $this->trimmed('q');
$c = array('url' => common_local_url('noticesearchrss', array('q' => $q)),
- 'title' => common_config('site', 'name') . sprintf(_(' Search Stream for "%s"'), $q),
+ 'title' => sprintf(_('Updates with "%s"'), $q),
'link' => common_local_url('noticesearch', array('q' => $q)),
- 'description' => sprintf(_('All updates matching search term "%s"'), $q));
+ 'description' => sprintf(_('Updates matching search term "%1$s" on %2$s!'),
+ $q, common_config('site', 'name')));
return $c;
}
diff --git a/actions/publicrss.php b/actions/publicrss.php
index 7e8df9625..5c08de641 100644
--- a/actions/publicrss.php
+++ b/actions/publicrss.php
@@ -86,9 +86,9 @@ class PublicrssAction extends Rss10Action
{
$c = array(
'url' => common_local_url('publicrss')
- , 'title' => sprintf(_('%s Public Stream'), common_config('site', 'name'))
+ , 'title' => sprintf(_('%s public timeline'), common_config('site', 'name'))
, 'link' => common_local_url('public')
- , 'description' => sprintf(_('All updates for %s'), common_config('site', 'name')));
+ , 'description' => sprintf(_('%s updates from everyone!'), common_config('site', 'name')));
return $c;
}
diff --git a/actions/repliesrss.php b/actions/repliesrss.php
index a87e2870d..580bb91f7 100644
--- a/actions/repliesrss.php
+++ b/actions/repliesrss.php
@@ -68,7 +68,8 @@ class RepliesrssAction extends Rss10Action
'link' => common_local_url('replies',
array('nickname' =>
$user->nickname)),
- 'description' => sprintf(_('Feed for replies to %s'), $user->nickname));
+ 'description' => sprintf(_('Replies to %1$s on %2$s!'),
+ $user->nickname, common_config('site', 'name')));
return $c;
}
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index 8efe9d30a..8b4926f01 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -173,7 +173,7 @@ class ShowfavoritesAction extends OwnerDesignAction
}
}
else {
- $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to thier favorites :)'), $this->user->nickname);
+ $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to their favorites :)'), $this->user->nickname);
}
$this->elementStart('div', 'guide');
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 8f73dc824..4b179bc72 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -97,8 +97,8 @@ class ShownoticeAction extends OwnerDesignAction
$this->user = User::staticGet('id', $this->profile->id);
- if (empty($this->user)) {
- $this->serverError(_('Not a local notice'), 500);
+ if (! $this->notice->is_local) {
+ common_redirect($this->notice->uri);
return false;
}
diff --git a/actions/smssettings.php b/actions/smssettings.php
index 922bab9a4..33b54abf6 100644
--- a/actions/smssettings.php
+++ b/actions/smssettings.php
@@ -80,6 +80,12 @@ class SmssettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('sms', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('SMS is not available.'));
+ return;
+ }
+
$user = common_current_user();
$this->elementStart('form', array('method' => 'post',
diff --git a/actions/subscriptions.php b/actions/subscriptions.php
index 42bdae10f..0724471ff 100644
--- a/actions/subscriptions.php
+++ b/actions/subscriptions.php
@@ -174,14 +174,26 @@ class SubscriptionsListItem extends SubscriptionListItem
return;
}
+ if (!common_config('xmpp', 'enabled') && !common_config('sms', 'enabled')) {
+ return;
+ }
+
$this->out->elementStart('form', array('id' => 'subedit-' . $this->profile->id,
'method' => 'post',
'class' => 'form_subscription_edit',
'action' => common_local_url('subedit')));
$this->out->hidden('token', common_session_token());
$this->out->hidden('profile', $this->profile->id);
- $this->out->checkbox('jabber', _('Jabber'), $sub->jabber);
- $this->out->checkbox('sms', _('SMS'), $sub->sms);
+ if (common_config('xmpp', 'enabled')) {
+ $this->out->checkbox('jabber', _('Jabber'), $sub->jabber);
+ } else {
+ $this->out->hidden('jabber', $sub->jabber);
+ }
+ if (common_config('sms', 'enabled')) {
+ $this->out->checkbox('sms', _('SMS'), $sub->sms);
+ } else {
+ $this->out->hidden('sms', $sub->sms);
+ }
$this->out->submit('save', _('Save'));
$this->out->elementEnd('form');
return;
diff --git a/actions/tagrss.php b/actions/tagrss.php
index f69374fca..c3c03b9cd 100644
--- a/actions/tagrss.php
+++ b/actions/tagrss.php
@@ -61,7 +61,8 @@ class TagrssAction extends Rss10Action
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
'title' => $tagname,
'link' => common_local_url('tagrss', array('tag' => $tagname)),
- 'description' => sprintf(_('Microblog tagged with %s'), $tagname));
+ 'description' => sprintf(_('Updates tagged with %1$s on %2$s!'),
+ $tagname, common_config('site', 'name')));
return $c;
}
diff --git a/actions/twitapigroups.php b/actions/twitapigroups.php
index 82604ebff..bebc07fa1 100644
--- a/actions/twitapigroups.php
+++ b/actions/twitapigroups.php
@@ -51,6 +51,103 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
class TwitapigroupsAction extends TwitterapiAction
{
+ function list_groups($args, $apidata)
+ {
+ parent::handle($args);
+
+ common_debug("in groups api action");
+
+ $this->auth_user = $apidata['user'];
+ $user = $this->get_user($apidata['api_arg'], $apidata);
+
+ if (empty($user)) {
+ $this->clientError('Not Found', 404, $apidata['content-type']);
+ return;
+ }
+
+ $page = (int)$this->arg('page', 1);
+ $count = (int)$this->arg('count', 20);
+ $max_id = (int)$this->arg('max_id', 0);
+ $since_id = (int)$this->arg('since_id', 0);
+ $since = $this->arg('since');
+ $group = $user->getGroups(($page-1)*$count,
+ $count, $since_id, $max_id, $since);
+
+ $sitename = common_config('site', 'name');
+ $title = sprintf(_("%s's groups"), $user->nickname);
+ $taguribase = common_config('integration', 'taguri');
+ $id = "tag:$taguribase:Groups";
+ $link = common_root_url();
+ $subtitle = sprintf(_("groups %s is a member of on %s"), $user->nickname, $sitename);
+
+ switch($apidata['content-type']) {
+ case 'xml':
+ $this->show_xml_groups($group);
+ break;
+ case 'rss':
+ $this->show_rss_groups($group, $title, $link, $subtitle);
+ break;
+ case 'atom':
+ $selfuri = common_root_url() . 'api/laconica/groups/list/' . $user->id . '.atom';
+ $this->show_atom_groups($group, $title, $id, $link,
+ $subtitle, $selfuri);
+ break;
+ case 'json':
+ $this->show_json_groups($group);
+ break;
+ default:
+ $this->clientError(_('API method not found!'), $code = 404);
+ break;
+ }
+ }
+
+ function list_all($args, $apidata)
+ {
+ parent::handle($args);
+
+ common_debug("in groups api action");
+
+ $page = (int)$this->arg('page', 1);
+ $count = (int)$this->arg('count', 20);
+ $max_id = (int)$this->arg('max_id', 0);
+ $since_id = (int)$this->arg('since_id', 0);
+ $since = $this->arg('since');
+
+ /* TODO:
+ Use the $page, $count, $max_id, $since_id, and $since parameters
+ */
+ $group = new User_group();
+ $group->orderBy('created DESC');
+ $group->find();
+
+ $sitename = common_config('site', 'name');
+ $title = sprintf(_("%s groups"), $sitename);
+ $taguribase = common_config('integration', 'taguri');
+ $id = "tag:$taguribase:Groups";
+ $link = common_root_url();
+ $subtitle = sprintf(_("groups on %s"), $sitename);
+
+ switch($apidata['content-type']) {
+ case 'xml':
+ $this->show_xml_groups($group);
+ break;
+ case 'rss':
+ $this->show_rss_groups($group, $title, $link, $subtitle);
+ break;
+ case 'atom':
+ $selfuri = common_root_url() . 'api/laconica/groups/list_all.atom';
+ $this->show_atom_groups($group, $title, $id, $link,
+ $subtitle, $selfuri);
+ break;
+ case 'json':
+ $this->show_json_groups($group);
+ break;
+ default:
+ $this->clientError(_('API method not found!'), $code = 404);
+ break;
+ }
+ }
+
function show($args, $apidata)
{
parent::handle($args);
diff --git a/actions/twittersettings.php b/actions/twittersettings.php
index 7fffa0af0..0859ab9d3 100644
--- a/actions/twittersettings.php
+++ b/actions/twittersettings.php
@@ -82,6 +82,12 @@ class TwittersettingsAction extends ConnectSettingsAction
function showContent()
{
+ if (!common_config('twitter', 'enabled')) {
+ $this->element('div', array('class' => 'error'),
+ _('Twitter is not available.'));
+ return;
+ }
+
$user = common_current_user();
$profile = $user->getProfile();
diff --git a/actions/userrss.php b/actions/userrss.php
index 8a940865f..a9f3fd5f8 100644
--- a/actions/userrss.php
+++ b/actions/userrss.php
@@ -88,9 +88,10 @@ class UserrssAction extends Rss10Action
$c = array('url' => common_local_url('userrss',
array('nickname' =>
$user->nickname)),
- 'title' => $user->nickname,
+ 'title' => sprintf(_('%s timeline'), $user->nickname),
'link' => $profile->profileurl,
- 'description' => sprintf(_('Microblog by %s'), $user->nickname));
+ 'description' => sprintf(_('Updates from %1$s on %2$s!'),
+ $user->nickname, common_config('site', 'name')));
return $c;
}
diff --git a/classes/User_group.php b/classes/User_group.php
index b1ab1c2d3..ea19cbb97 100644
--- a/classes/User_group.php
+++ b/classes/User_group.php
@@ -297,4 +297,45 @@ class User_group extends Memcached_DataObject
return $ids;
}
+
+ function asAtomEntry($namespace=false, $source=false)
+ {
+ $xs = new XMLStringer(true);
+
+ if ($namespace) {
+ $attrs = array('xmlns' => 'http://www.w3.org/2005/Atom',
+ 'xmlns:thr' => 'http://purl.org/syndication/thread/1.0');
+ } else {
+ $attrs = array();
+ }
+
+ $xs->elementStart('entry', $attrs);
+
+ if ($source) {
+ $xs->elementStart('source');
+ $xs->element('title', null, $profile->nickname . " - " . common_config('site', 'name'));
+ $xs->element('link', array('href' => $this->permalink()));
+ }
+
+ if ($source) {
+ $xs->elementEnd('source');
+ }
+
+ $xs->element('title', null, $this->nickname);
+ $xs->element('summary', null, $this->description);
+
+ $xs->element('link', array('rel' => 'alternate',
+ 'href' => $this->permalink()));
+
+ $xs->element('id', null, $this->permalink());
+
+ $xs->element('published', null, common_date_w3dtf($this->created));
+ $xs->element('updated', null, common_date_w3dtf($this->modified));
+
+ $xs->element('content', array('type' => 'html'), $this->description);
+
+ $xs->elementEnd('entry');
+
+ return $xs->getString();
+ }
}
diff --git a/config.php.sample b/config.php.sample
index 8efa6a6a1..c2dcf8516 100644
--- a/config.php.sample
+++ b/config.php.sample
@@ -164,6 +164,15 @@ $config['sphinx']['port'] = 3312;
// $config['memcached']['server'] = 'localhost';
// $config['memcached']['port'] = 11211;
+// Disable post-by-email
+// $config['emailpost']['enabled'] = false;
+
+// Disable SMS
+// $config['sms']['enabled'] = false;
+
+// Disable Twitter integration
+// $config['twitter']['enabled'] = false;
+
// Twitter integration source attribute. Note: default is Laconica
// $config['integration']['source'] = 'Laconica';
diff --git a/db/074to080.sql b/db/074to080.sql
index ff0819159..e667798eb 100644
--- a/db/074to080.sql
+++ b/db/074to080.sql
@@ -17,7 +17,7 @@ alter table user_group
create table file (
id integer primary key auto_increment,
- url varchar(255) comment 'destination URL after following redirections',
+ url varchar(2047) comment 'destination URL after following redirections',
mimetype varchar(50) comment 'mime type of resource',
size integer comment 'size of resource when available',
title varchar(255) comment 'title of resource when available',
diff --git a/db/074to080_pg.sql b/db/074to080_pg.sql
index 0a7171ae5..e1cb92c7f 100644
--- a/db/074to080_pg.sql
+++ b/db/074to080_pg.sql
@@ -36,7 +36,7 @@ alter table user_group
create sequence file_seq;
create table file (
id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */,
- url varchar(255) unique,
+ url varchar(2047) unique,
mimetype varchar(50),
size integer,
title varchar(255),
diff --git a/db/laconica.sql b/db/laconica.sql
index 2c04f680a..c1b76d1fa 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -433,7 +433,7 @@ create table group_inbox (
create table file (
id integer primary key auto_increment,
- url varchar(255) comment 'destination URL after following redirections',
+ url varchar(2047) comment 'destination URL after following redirections',
mimetype varchar(50) comment 'mime type of resource',
size integer comment 'size of resource when available',
title varchar(255) comment 'title of resource when available',
diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql
index ad34720a2..4fe223380 100644
--- a/db/laconica_pg.sql
+++ b/db/laconica_pg.sql
@@ -450,7 +450,7 @@ create index group_inbox_created_idx on group_inbox using btree(created);
create sequence file_seq;
create table file (
id bigint default nextval('file_seq') primary key /* comment 'unique identifier' */,
- url varchar(255) unique,
+ url varchar(2047) unique,
mimetype varchar(50),
size integer,
title varchar(255),
diff --git a/doc-src/sms b/doc-src/sms
index 1beb49786..1a3064318 100644
--- a/doc-src/sms
+++ b/doc-src/sms
@@ -44,24 +44,24 @@ You can use the following commands with %%site.name%%.
* on - turn on notifications
* off - turn off notifications
* help - show this help
-* follow <nickname> - subscribe to user
-* leave <nickname> - unsubscribe from user
-* d <nickname> <text> - direct message to user
-* get <nickname> - get last notice from user
-* whois <nickname> - get profile info on user
-* fav <nickname> - add user's last notice as a 'fave'
+* follow &lt;nickname&gt; - subscribe to user
+* leave &lt;nickname&gt; - unsubscribe from user
+* d &lt;nickname&gt; &lt;text&gt; - direct message to user
+* get &lt;nickname&gt; - get last notice from user
+* whois &lt;nickname&gt; - get profile info on user
+* fav &lt;nickname&gt; - add user's last notice as a 'fave'
* stats - get your stats
* stop - same as 'off'
* quit - same as 'off'
-* sub <nickname> - same as 'follow'
-* unsub <nickname> - same as 'leave'
-* last <nickname> - same as 'get'
-* on <nickname> - not yet implemented.
-* off <nickname> - not yet implemented.
-* nudge <nickname> - not yet implemented.
-* invite <phone number> - not yet implemented.
-* track <word> - not yet implemented.
-* untrack <word> - not yet implemented.
+* sub &lt;nickname&gt; - same as 'follow'
+* unsub &lt;nickname&gt; - same as 'leave'
+* last &lt;nickname&gt; - same as 'get'
+* on &lt;nickname&gt; - not yet implemented.
+* off &lt;nickname&gt; - not yet implemented.
+* nudge &lt;nickname&gt; - not yet implemented.
+* invite &lt;phone number&gt; - not yet implemented.
+* track &lt;word&gt; - not yet implemented.
+* untrack &lt;word&gt; - not yet implemented.
* track off - not yet implemented.
* untrack all - not yet implemented.
* tracks - not yet implemented.
diff --git a/index.php b/index.php
index 5f13064da..2e74d38fb 100644
--- a/index.php
+++ b/index.php
@@ -73,7 +73,7 @@ function handleError($error)
exit(-1);
}
-function checkMirror($action_obj)
+function checkMirror($action_obj, $args)
{
global $config;
@@ -198,7 +198,7 @@ function main()
} else {
$action_obj = new $action_class();
- checkMirror($action_obj);
+ checkMirror($action_obj, $args);
try {
if ($action_obj->prepare($args)) {
diff --git a/install.php b/install.php
index ea2135651..f02a06663 100644
--- a/install.php
+++ b/install.php
@@ -180,6 +180,9 @@ function handlePost()
$password = $_POST['password'];
$sitename = $_POST['sitename'];
$fancy = !empty($_POST['fancy']);
+ $server = $_SERVER['HTTP_HOST'];
+ $path = substr(dirname($_SERVER['PHP_SELF']), 1);
+
?>
<dl class="system_notice">
<dt>Page notice</dt>
@@ -219,20 +222,42 @@ function handlePost()
}
switch($dbtype) {
- case 'mysql': mysql_db_installer($host, $database, $username, $password, $sitename, $fancy);
- break;
- case 'pgsql': pgsql_db_installer($host, $database, $username, $password, $sitename, $fancy);
- break;
- default:
+ case 'mysql':
+ $db = mysql_db_installer($host, $database, $username, $password);
+ break;
+ case 'pgsql':
+ $db = pgsql_db_installer($host, $database, $username, $password);
+ break;
+ default:
+ }
+
+ if (!$db) {
+ // database connection failed, do not move on to create config file.
+ return false;
+ }
+
+ updateStatus("Writing config file...");
+ $res = writeConf($sitename, $server, $path, $fancy, $db);
+
+ if (!$res) {
+ updateStatus("Can't write config file.", true);
+ showForm();
+ return;
}
- if ($path) $path .= '/';
- updateStatus("You can visit your <a href='/$path'>new Laconica site</a>.");
+
+ /*
+ TODO https needs to be considered
+ */
+ $link = "http://".$server.'/'.$path;
+
+ updateStatus("Laconica has been installed at $link");
+ updateStatus("You can visit your <a href='$link'>new Laconica site</a>.");
?>
<?php
}
-function pgsql_db_installer($host, $database, $username, $password, $sitename, $fancy) {
+function pgsql_db_installer($host, $database, $username, $password) {
$connstring = "dbname=$database host=$host user=$username";
//No password would mean trust authentication used.
@@ -265,7 +290,7 @@ function pgsql_db_installer($host, $database, $username, $password, $sitename, $
if ($res === false) {
updateStatus("Can't run database script.", true);
showForm();
- return;
+ return false;
}
foreach (array('sms_carrier' => 'SMS carrier',
'notice_source' => 'notice source',
@@ -276,29 +301,24 @@ function pgsql_db_installer($host, $database, $username, $password, $sitename, $
if ($res === false) {
updateStatus(sprintf("Can't run %d script.", $name), true);
showForm();
- return;
+ return false;
}
}
pg_query($conn, 'COMMIT');
- updateStatus("Writing config file...");
if (empty($password)) {
$sqlUrl = "pgsql://$username@$host/$database";
}
else {
$sqlUrl = "pgsql://$username:$password@$host/$database";
}
- $res = writeConf($sitename, $sqlUrl, $fancy, 'pgsql');
- if (!$res) {
- updateStatus("Can't write config file.", true);
- showForm();
- return;
- }
- updateStatus("Done!");
-
+
+ $db = array('type' => 'pgsql', 'database' => $sqlUrl);
+
+ return $db;
}
-function mysql_db_installer($host, $database, $username, $password, $sitename, $fancy) {
+function mysql_db_installer($host, $database, $username, $password) {
updateStatus("Starting installation...");
updateStatus("Checking database...");
@@ -306,21 +326,21 @@ function mysql_db_installer($host, $database, $username, $password, $sitename, $
if (!$conn) {
updateStatus("Can't connect to server '$host' as '$username'.", true);
showForm();
- return;
+ return false;
}
updateStatus("Changing to database...");
$res = mysql_select_db($database, $conn);
if (!$res) {
updateStatus("Can't change to database.", true);
showForm();
- return;
+ return false;
}
updateStatus("Running database script...");
$res = runDbScript(INSTALLDIR.'/db/laconica.sql', $conn);
if ($res === false) {
updateStatus("Can't run database script.", true);
showForm();
- return;
+ return false;
}
foreach (array('sms_carrier' => 'SMS carrier',
'notice_source' => 'notice source',
@@ -331,35 +351,44 @@ function mysql_db_installer($host, $database, $username, $password, $sitename, $
if ($res === false) {
updateStatus(sprintf("Can't run %d script.", $name), true);
showForm();
- return;
+ return false;
}
}
- updateStatus("Writing config file...");
$sqlUrl = "mysqli://$username:$password@$host/$database";
- $res = writeConf($sitename, $sqlUrl, $fancy);
- if (!$res) {
- updateStatus("Can't write config file.", true);
- showForm();
- return;
- }
- updateStatus("Done!");
- }
-function writeConf($sitename, $sqlUrl, $fancy, $type='mysql')
+ $db = array('type' => 'mysql', 'database' => $sqlUrl);
+ return $db;
+}
+
+function writeConf($sitename, $server, $path, $fancy, $db)
{
- $res = file_put_contents(INSTALLDIR.'/config.php',
- "<?php\n".
- "if (!defined('LACONICA')) { exit(1); }\n\n".
- "\$config['site']['name'] = \"$sitename\";\n\n".
- ($fancy ? "\$config['site']['fancy'] = true;\n\n":'').
- "\$config['db']['database'] = \"$sqlUrl\";\n\n".
- ($type == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n" .
- "\$config['db']['type'] = \"$type\";\n\n" : '').
- "?>");
+ // assemble configuration file in a string
+ $cfg = "<?php\n".
+ "if (!defined('LACONICA')) { exit(1); }\n\n".
+
+ // site name
+ "\$config['site']['name'] = '$sitename';\n\n".
+
+ // site location
+ "\$config['site']['server'] = '$server';\n".
+ "\$config['site']['path'] = '$path'; \n\n".
+
+ // checks if fancy URLs are enabled
+ ($fancy ? "\$config['site']['fancy'] = true;\n\n":'').
+
+ // database
+ "\$config['db']['database'] = '{$db['database']}';\n\n".
+ ($type == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
+ "\$config['db']['type'] = '{$db['type']}';\n\n".
+
+ "?>";
+ // write configuration file out to install directory
+ $res = file_put_contents(INSTALLDIR.'/config.php', $cfg);
+
return $res;
}
-function runDbScript($filename, $conn, $type='mysql')
+function runDbScript($filename, $conn, $type = 'mysql')
{
$sql = trim(file_get_contents($filename));
$stmts = explode(';', $sql);
@@ -368,10 +397,15 @@ function runDbScript($filename, $conn, $type='mysql')
if (!mb_strlen($stmt)) {
continue;
}
- if ($type == 'mysql') {
- $res = mysql_query($stmt, $conn);
- } elseif ($type=='pgsql') {
- $res = pg_query($conn, $stmt);
+ switch ($type) {
+ case 'mysql':
+ $res = mysql_query($stmt, $conn);
+ break;
+ case 'pgsql':
+ $res = pg_query($conn, $stmt);
+ break;
+ default:
+ updateStatus("runDbScript() error: unknown database type ". $type ." provided.");
}
if ($res === false) {
updateStatus("FAILED SQL: $stmt");
diff --git a/js/util.js b/js/util.js
index ef147bef4..440701937 100644
--- a/js/util.js
+++ b/js/util.js
@@ -17,19 +17,41 @@
*/
$(document).ready(function(){
+ var counterBlackout = false;
+
// count character on keyup
function counter(event){
var maxLength = 140;
var currentLength = $("#notice_data-text").val().length;
var remaining = maxLength - currentLength;
var counter = $("#notice_text-count");
- counter.text(remaining);
+
+ if (remaining.toString() != counter.text()) {
+ if (!counterBlackout || remaining == 0) {
+ if (counter.text() != String(remaining)) {
+ counter.text(remaining);
+ }
- if (remaining < 0) {
- $("#form_notice").addClass("warning");
- } else {
- $("#form_notice").removeClass("warning");
- }
+ if (remaining < 0) {
+ $("#form_notice").addClass("warning");
+ } else {
+ $("#form_notice").removeClass("warning");
+ }
+ // Skip updates for the next 500ms.
+ // On slower hardware, updating on every keypress is unpleasant.
+ if (!counterBlackout) {
+ counterBlackout = true;
+ window.setTimeout(clearCounterBlackout, 500);
+ }
+ }
+ }
+ }
+
+ function clearCounterBlackout() {
+ // Allow keyup events to poke the counter again
+ counterBlackout = false;
+ // Check if the string changed since we last looked
+ counter(null);
}
function submitonreturn(event) {
@@ -255,10 +277,10 @@ function NoticeReply() {
function NoticeReplySet(nick,id) {
rgx_username = /^[0-9a-zA-Z\-_.]*$/;
if (nick.match(rgx_username)) {
- replyto = "@" + nick + " ";
var text = $("#notice_data-text");
if (text.length) {
- text.val(replyto + text.val());
+ replyto = "@" + nick + " ";
+ text.val(replyto + text.val().replace(RegExp(replyto, 'i'), ''));
$("#form_notice input#notice_in-reply-to").val(id);
if (text.get(0).setSelectionRange) {
var len = text.val().length;
diff --git a/lib/action.php b/lib/action.php
index 1c6170693..326edf3a0 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -402,6 +402,14 @@ class Action extends HTMLOutputter // lawsuit
function showPrimaryNav()
{
$user = common_current_user();
+ $connect = '';
+ if (common_config('xmpp', 'enabled')) {
+ $connect = 'imsettings';
+ } else if (common_config('sms', 'enabled')) {
+ $connect = 'smssettings';
+ } else if (common_config('twitter', 'enabled')) {
+ $connect = 'twittersettings';
+ }
$this->elementStart('dl', array('id' => 'site_nav_global_primary'));
$this->element('dt', null, _('Primary site navigation'));
@@ -413,12 +421,9 @@ class Action extends HTMLOutputter // lawsuit
_('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
$this->menuItem(common_local_url('profilesettings'),
_('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
- if (common_config('xmpp', 'enabled')) {
- $this->menuItem(common_local_url('imsettings'),
- _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
- } else {
- $this->menuItem(common_local_url('smssettings'),
- _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
+ if ($connect) {
+ $this->menuItem(common_local_url($connect),
+ _('Connect'), _('Connect to services'), false, 'nav_connect');
}
if (common_config('invite', 'enabled')) {
$this->menuItem(common_local_url('invite'),
diff --git a/lib/common.php b/lib/common.php
index becd250b0..645ae8c34 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -183,6 +183,12 @@ $config =
array('piddir' => '/var/run',
'user' => false,
'group' => false),
+ 'emailpost' =>
+ array('enabled' => true),
+ 'sms' =>
+ array('enabled' => true),
+ 'twitter' =>
+ array('enabled' => true),
'twitterbridge' =>
array('enabled' => false),
'integration' =>
diff --git a/lib/connectsettingsaction.php b/lib/connectsettingsaction.php
index 30629680e..02c468a35 100644
--- a/lib/connectsettingsaction.php
+++ b/lib/connectsettingsaction.php
@@ -99,25 +99,27 @@ class ConnectSettingsNav extends Widget
function show()
{
# action => array('prompt', 'title')
- $menu =
- array('imsettings' =>
- array(_('IM'),
- _('Updates by instant messenger (IM)')),
- 'smssettings' =>
- array(_('SMS'),
- _('Updates by SMS')),
- 'twittersettings' =>
- array(_('Twitter'),
- _('Twitter integration options')));
+ $menu = array();
+ if (common_config('xmpp', 'enabled')) {
+ $menu['imsettings'] =
+ array(_('IM'),
+ _('Updates by instant messenger (IM)'));
+ }
+ if (common_config('sms', 'enabled')) {
+ $menu['smssettings'] =
+ array(_('SMS'),
+ _('Updates by SMS'));
+ }
+ if (common_config('twitter', 'enabled')) {
+ $menu['twittersettings'] =
+ array(_('Twitter'),
+ _('Twitter integration options'));
+ }
$action_name = $this->action->trimmed('action');
$this->action->elementStart('ul', array('class' => 'nav'));
foreach ($menu as $menuaction => $menudesc) {
- if ($menuaction == 'imsettings' &&
- !common_config('xmpp', 'enabled')) {
- continue;
- }
$this->action->menuItem(common_local_url($menuaction),
$menudesc[0],
$menudesc[1],
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index f4445b44f..604597116 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -350,7 +350,7 @@ class HTMLOutputter extends XMLOutputter
function script($src, $type='text/javascript')
{
$url = parse_url($src);
- if(! ($url->scheme || $url->host || $url->query || $url->fragment))
+ if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
{
$src = common_path($src) . '?version=' . LACONICA_VERSION;
}
@@ -370,11 +370,8 @@ class HTMLOutputter extends XMLOutputter
*/
function cssLink($src,$theme=null,$media=null)
{
- if (!$theme) {
- $theme = common_config('site', 'theme');
- }
$url = parse_url($src);
- if(! ($url->scheme || $url->host || $url->query || $url->fragment))
+ if( empty($url->scheme) && empty($url->host) && empty($url->query) && empty($url->fragment))
{
if(file_exists(theme_file($src,$theme))){
$src = theme_path($src, $theme) . '?version=' . LACONICA_VERSION;
diff --git a/lib/jsonsearchresultslist.php b/lib/jsonsearchresultslist.php
index 7beea9328..34a3d530e 100644
--- a/lib/jsonsearchresultslist.php
+++ b/lib/jsonsearchresultslist.php
@@ -207,7 +207,7 @@ class ResultItem
$replier_profile = null;
if ($this->notice->reply_to) {
- $reply = Notice::staticGet(intval($notice->reply_to));
+ $reply = Notice::staticGet(intval($this->notice->reply_to));
if ($reply) {
$replier_profile = $reply->getProfile();
}
@@ -224,7 +224,7 @@ class ResultItem
$user = User::staticGet('id', $this->profile->id);
- $this->iso_language_code = $this->user->language;
+ $this->iso_language_code = $user->language;
$this->source = $this->getSourceLink($this->notice->source);
diff --git a/lib/mail.php b/lib/mail.php
index 16c1b0f30..33d1eb754 100644
--- a/lib/mail.php
+++ b/lib/mail.php
@@ -596,32 +596,44 @@ function mail_notify_attn($user, $notice)
$bestname = $sender->getBestName();
common_init_locale($user->language);
-
+
+ if ($notice->conversation != $notice->id) {
+ $conversationEmailText = "The full conversation can be read here:\n\n".
+ "\t%5\$s\n\n ";
+ $conversationUrl = common_local_url('conversation',
+ array('id' => $notice->conversation)).'#notice-'.$notice->id;
+ } else {
+ $conversationEmailText = "%5\$s";
+ $conversationUrl = null;
+ }
+
$subject = sprintf(_('%s sent a notice to your attention'), $bestname);
-
- $body = sprintf(_("%1\$s just sent a notice to your attention (an '@-reply') on %2\$s.\n\n".
+
+ $body = sprintf(_("%1\$s just sent a notice to your attention (an '@-reply') on %2\$s.\n\n".
"The notice is here:\n\n".
"\t%3\$s\n\n" .
"It reads:\n\n".
"\t%4\$s\n\n" .
+ $conversationEmailText .
"You can reply back here:\n\n".
- "\t%5\$s\n\n" .
+ "\t%6\$s\n\n" .
"The list of all @-replies for you here:\n\n" .
- "%6\$s\n\n" .
+ "%7\$s\n\n" .
"Faithfully yours,\n" .
"%2\$s\n\n" .
- "P.S. You can turn off these email notifications here: %7\$s\n"),
- $bestname,
- common_config('site', 'name'),
+ "P.S. You can turn off these email notifications here: %8\$s\n"),
+ $bestname,//%1
+ common_config('site', 'name'),//%2
common_local_url('shownotice',
- array('notice' => $notice->id)),
- $notice->content,
+ array('notice' => $notice->id)),//%3
+ $notice->content,//%4
+ $conversationUrl,//%5
common_local_url('newnotice',
- array('replyto' => $sender->nickname)),
+ array('replyto' => $sender->nickname)),//%6
common_local_url('replies',
- array('nickname' => $user->nickname)),
- common_local_url('emailsettings'));
-
+ array('nickname' => $user->nickname)),//%7
+ common_local_url('emailsettings'));//%8
+
common_init_locale();
mail_to_user($user, $subject, $body);
}
diff --git a/lib/noticelist.php b/lib/noticelist.php
index a8d5059ca..5429d943f 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -350,11 +350,10 @@ class NoticeListItem extends Widget
function showNoticeLink()
{
- $noticeurl = common_local_url('shownotice',
+ if($this->notice->is_local){
+ $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)) {
+ }else{
$noticeurl = $this->notice->uri;
}
$this->out->elementStart('a', array('rel' => 'bookmark',
diff --git a/lib/router.php b/lib/router.php
index 6651773c0..f03cfcf6d 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -413,6 +413,28 @@ class Router
'apiaction' => 'laconica'));
// Groups
+ //'list' has to be handled differently, as php will not allow a method to be named 'list'
+ $m->connect('api/laconica/groups/list/:argument',
+ array('action' => 'api',
+ 'method' => 'list_groups',
+ 'apiaction' => 'groups'));
+ foreach (array('xml', 'json', 'rss', 'atom') as $e) {
+ $m->connect('api/laconica/groups/list.' . $e,
+ array('action' => 'api',
+ 'method' => 'list_groups.' . $e,
+ 'apiaction' => 'groups'));
+ }
+
+ $m->connect('api/laconica/groups/:method',
+ array('action' => 'api',
+ 'apiaction' => 'statuses'),
+ array('method' => '(list_all|)(\.(atom|rss|xml|json))?'));
+
+ $m->connect('api/statuses/:method/:argument',
+ array('action' => 'api',
+ 'apiaction' => 'statuses'),
+ array('method' => '(|user_timeline|friends_timeline|replies|mentions|show|destroy|friends|followers)'));
+
$m->connect('api/laconica/groups/:method/:argument',
array('action' => 'api',
'apiaction' => 'groups'));
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index 4737c5874..a5dc2067f 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -233,6 +233,24 @@ class TwitterapiAction extends Action
return $twitter_group;
}
+ function twitter_rss_group_array($group)
+ {
+ $entry = array();
+ $entry['content']=$group->description;
+ $entry['title']=$group->nickname;
+ $entry['link']=$group->permalink();
+ $entry['published']=common_date_iso8601($group->created);
+ $entry['updated']==common_date_iso8601($group->modified);
+ $taguribase = common_config('integration', 'groupuri');
+ $entry['id'] = "group:$groupuribase:$entry[link]";
+
+ $entry['description'] = $entry['content'];
+ $entry['pubDate'] = common_date_rfc2822($group->created);
+ $entry['guid'] = $entry['link'];
+
+ return $entry;
+ }
+
function twitter_rss_entry_array($notice)
{
$profile = $notice->getProfile();
@@ -644,6 +662,65 @@ class TwitterapiAction extends Action
}
+ function show_rss_groups($group, $title, $link, $subtitle)
+ {
+
+ $this->init_document('rss');
+
+ $this->elementStart('channel');
+ $this->element('title', null, $title);
+ $this->element('link', null, $link);
+ $this->element('description', null, $subtitle);
+ $this->element('language', null, 'en-us');
+ $this->element('ttl', null, '40');
+
+ if (is_array($group)) {
+ foreach ($group as $g) {
+ $twitter_group = $this->twitter_rss_group_array($g);
+ $this->show_twitter_rss_item($twitter_group);
+ }
+ } else {
+ while ($group->fetch()) {
+ $twitter_group = $this->twitter_rss_group_array($group);
+ $this->show_twitter_rss_item($twitter_group);
+ }
+ }
+
+ $this->elementEnd('channel');
+ $this->end_twitter_rss();
+ }
+
+ function show_atom_groups($group, $title, $id, $link, $subtitle=null, $selfuri=null)
+ {
+
+ $this->init_document('atom');
+
+ $this->element('title', null, $title);
+ $this->element('id', null, $id);
+ $this->element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), null);
+
+ if (!is_null($selfuri)) {
+ $this->element('link', array('href' => $selfuri,
+ 'rel' => 'self', 'type' => 'application/atom+xml'), null);
+ }
+
+ $this->element('updated', null, common_date_iso8601('now'));
+ $this->element('subtitle', null, $subtitle);
+
+ if (is_array($group)) {
+ foreach ($group as $g) {
+ $this->raw($g->asAtomEntry());
+ }
+ } else {
+ while ($group->fetch()) {
+ $this->raw($group->asAtomEntry());
+ }
+ }
+
+ $this->end_document('atom');
+
+ }
+
function show_json_timeline($notice)
{
@@ -668,6 +745,52 @@ class TwitterapiAction extends Action
$this->end_document('json');
}
+ function show_json_groups($group)
+ {
+
+ $this->init_document('json');
+
+ $groups = array();
+
+ if (is_array($group)) {
+ foreach ($group as $g) {
+ $twitter_group = $this->twitter_group_array($g);
+ array_push($groups, $twitter_group);
+ }
+ } else {
+ while ($group->fetch()) {
+ $twitter_group = $this->twitter_group_array($group);
+ array_push($groups, $twitter_group);
+ }
+ }
+
+ $this->show_json_objects($groups);
+
+ $this->end_document('json');
+ }
+
+ function show_xml_groups($group)
+ {
+
+ $this->init_document('xml');
+ $this->elementStart('groups', array('type' => 'array'));
+
+ if (is_array($group)) {
+ foreach ($group as $g) {
+ $twitter_group = $this->twitter_group_array($g);
+ $this->show_twitter_xml_group($twitter_group);
+ }
+ } else {
+ while ($group->fetch()) {
+ $twitter_group = $this->twitter_group_array($group);
+ $this->show_twitter_xml_group($twitter_group);
+ }
+ }
+
+ $this->elementEnd('groups');
+ $this->end_document('xml');
+ }
+
function show_single_json_group($group)
{
$this->init_document('json');
diff --git a/plugins/Autocomplete/Autocomplete.js b/plugins/Autocomplete/Autocomplete.js
index 759ed60ae..e799c11e5 100644
--- a/plugins/Autocomplete/Autocomplete.js
+++ b/plugins/Autocomplete/Autocomplete.js
@@ -4,6 +4,7 @@ $(document).ready(function(){
$('#notice_data-text').autocomplete(friends, {
multiple: true,
multipleSeparator: " ",
+ minChars: 1,
formatItem: function(row, i, max){
return '@' + row.screen_name + ' (' + row.name + ')';
},
@@ -16,4 +17,22 @@ $(document).ready(function(){
});
}
);
+ $.getJSON($('address .url')[0].href+'/api/laconica/groups/list.json?user_id=' + current_user['id'] + '&callback=?',
+ function(groups){
+ $('#notice_data-text').autocomplete(groups, {
+ multiple: true,
+ multipleSeparator: " ",
+ minChars: 1,
+ formatItem: function(row, i, max){
+ return '!' + row.nickname + ' (' + row.fullname + ')';
+ },
+ formatMatch: function(row, i, max){
+ return '!' + row.nickname;
+ },
+ formatResult: function(row){
+ return '!' + row.nickname;
+ }
+ });
+ }
+ );
});
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 19b778c66..fd16d2bf1 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -116,13 +116,13 @@ class FBConnectPlugin extends Plugin
// but we actually do, for IE and Safari. Gar.
$html = sprintf('<script type="text/javascript">
- window.onload = function () {
+ $(document).ready(function () {
FB_RequireFeatures(
["XFBML"],
function() {
FB.init("%s", "../xd_receiver.html");
}
- ); }
+ ); });
function goto_login() {
window.location = "%s";
diff --git a/plugins/FBConnect/README b/plugins/FBConnect/README
index 914b774cb..11e5ce453 100644
--- a/plugins/FBConnect/README
+++ b/plugins/FBConnect/README
@@ -43,8 +43,7 @@ API key and secret to your Laconica config.php file:
Finally, to enable the plugin, add the following stanza to your
config.php:
- require_once(INSTALLDIR.'/plugins/FBConnect/FBConnectPlugin.php');
- $fbc = new FBConnectPlugin();
+ addPlugin('FBConnect');
To try out the plugin, fire up your browser and connect to:
diff --git a/scripts/getvaliddaemons.php b/scripts/getvaliddaemons.php
index 9a2b83329..f1d8d8116 100755
--- a/scripts/getvaliddaemons.php
+++ b/scripts/getvaliddaemons.php
@@ -43,8 +43,12 @@ if(common_config('twitterbridge','enabled')) {
echo "twitterstatusfetcher.php ";
}
echo "ombqueuehandler.php ";
-echo "twitterqueuehandler.php ";
-echo "synctwitterfriends.php ";
+if (common_config('twitter', 'enabled')) {
+ echo "twitterqueuehandler.php ";
+ echo "synctwitterfriends.php ";
+}
echo "facebookqueuehandler.php ";
echo "pingqueuehandler.php ";
-echo "smsqueuehandler.php ";
+if (common_config('sms', 'enabled')) {
+ echo "smsqueuehandler.php ";
+}
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php
index 3ef4d0638..91c257adb 100755
--- a/scripts/maildaemon.php
+++ b/scripts/maildaemon.php
@@ -385,5 +385,7 @@ class MailerDaemon
}
}
-$md = new MailerDaemon();
-$md->handle_message('php://stdin');
+if (common_config('emailpost', 'enabled')) {
+ $md = new MailerDaemon();
+ $md->handle_message('php://stdin');
+}
diff --git a/theme/base/images/icons/icon_atom.png b/theme/base/images/icons/icon_atom.png
index 6a001f11a..de63f1577 100644
--- a/theme/base/images/icons/icon_atom.png
+++ b/theme/base/images/icons/icon_atom.png
Binary files differ
diff --git a/theme/base/images/icons/icon_rss.png b/theme/base/images/icons/icon_rss.png
index 0ccd1ce25..e75778a9e 100644
--- a/theme/base/images/icons/icon_rss.png
+++ b/theme/base/images/icons/icon_rss.png
Binary files differ
diff --git a/theme/default/css/display.css b/theme/default/css/display.css
index 921a6b27b..646fb0445 100644
--- a/theme/default/css/display.css
+++ b/theme/default/css/display.css
@@ -66,7 +66,7 @@ div.notice-options input,
.entity_nudge p,
.form_settings input.form_action-primary,
.form_make_admin input.submit {
-color:#002E6E;
+color:#002FA7;
}
.notice,
diff --git a/theme/default/default-avatar-mini.png b/theme/default/default-avatar-mini.png
index 38b8692b4..6c7808616 100644
--- a/theme/default/default-avatar-mini.png
+++ b/theme/default/default-avatar-mini.png
Binary files differ
diff --git a/theme/default/default-avatar-profile.png b/theme/default/default-avatar-profile.png
index f8357d4fc..08ce4e48e 100644
--- a/theme/default/default-avatar-profile.png
+++ b/theme/default/default-avatar-profile.png
Binary files differ
diff --git a/theme/default/default-avatar-stream.png b/theme/default/default-avatar-stream.png
index 6b63baa70..f18994d75 100644
--- a/theme/default/default-avatar-stream.png
+++ b/theme/default/default-avatar-stream.png
Binary files differ
diff --git a/theme/default/logo.png b/theme/default/logo.png
index fdead6c4a..322cbe903 100644
--- a/theme/default/logo.png
+++ b/theme/default/logo.png
Binary files differ
diff --git a/theme/identica/css/display.css b/theme/identica/css/display.css
index 8af5644b6..0688db425 100644
--- a/theme/identica/css/display.css
+++ b/theme/identica/css/display.css
@@ -66,7 +66,7 @@ div.notice-options input,
.entity_nudge p,
.form_settings input.form_action-primary,
.form_make_admin input.submit {
-color:#002E6E;
+color:#002FA7;
}
.notice,
diff --git a/theme/identica/default-avatar-mini.png b/theme/identica/default-avatar-mini.png
index 38b8692b4..6c7808616 100644
--- a/theme/identica/default-avatar-mini.png
+++ b/theme/identica/default-avatar-mini.png
Binary files differ
diff --git a/theme/identica/default-avatar-profile.png b/theme/identica/default-avatar-profile.png
index f8357d4fc..08ce4e48e 100644
--- a/theme/identica/default-avatar-profile.png
+++ b/theme/identica/default-avatar-profile.png
Binary files differ
diff --git a/theme/identica/default-avatar-stream.png b/theme/identica/default-avatar-stream.png
index 6b63baa70..f18994d75 100644
--- a/theme/identica/default-avatar-stream.png
+++ b/theme/identica/default-avatar-stream.png
Binary files differ
diff --git a/theme/identica/logo.png b/theme/identica/logo.png
index 7c68b34f6..b32c6f951 100644
--- a/theme/identica/logo.png
+++ b/theme/identica/logo.png
Binary files differ