Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x

This commit is contained in:
Brion Vibber 2010-03-04 14:44:38 -08:00
commit 2f41e93339
6 changed files with 409 additions and 384 deletions

216
README
View File

@ -5,10 +5,10 @@ README
StatusNet 0.9.0 ("Stand")
4 Mar 2010
This is the README file for StatusNet (formerly Laconica), the Open
Source microblogging platform. It includes installation instructions,
descriptions of options you can set, warnings, tips, and general info
for administrators. Information on using StatusNet can be found in the
This is the README file for StatusNet, the Open Source microblogging
platform. It includes installation instructions, descriptions of
options you can set, warnings, tips, and general info for
administrators. Information on using StatusNet can be found in the
"doc" subdirectory or in the "help" section on-line.
About
@ -78,15 +78,17 @@ New this version
================
This is a major feature release since version 0.8.3, released Feb 1
2010. It is the final release version of 0.9.0.
2010. It is the final release version of 0.9.0, replacing any beta
versions.
Notable changes this version:
- Support for the new distributed status update standard OStatus
<http://ostatus.org>, based on PubSubHubbub, Salmon, Webfinger,
and Activity Streams.
- Support for location. Notices are (optionally) marked with lat-long
information, and can be shown on a map.
- Support for location using the Geolocation API. Notices are (optionally)
marked with lat-long information with geo microformats, and can be shown
on a map.
- No fixed content size. Notice size is configurable, from 1 to
unlimited number of characters. Default is still 140!
- An authorization framework, allowing different levels of users.
@ -96,6 +98,8 @@ Notable changes this version:
- A flag system that lets users flag profiles for moderator review.
- Support for OAuth <http://oauth.net> authentication in the Twitter
API.
- User roles system that lets the owner of the site to assign
administrator and moderator roles to other users.
- A pluggable authentication system.
- An authentication plugin for LDAP servers.
- Many features that were core in 0.8.x are now plugins, such
@ -115,6 +119,8 @@ Notable changes this version:
- Plugin to support RSSCloud
- A framework for adding advertisements to a public site,
and plugins for Google AdSense and OpenX server
- Plugins to throttle excessive subscriptions and registrations.
- A plugin to blacklist particular URLs or nicknames.
There are also literally thousands of bugs fixed and minor features
added. A full changelog is available at http://status.net/wiki/StatusNet_0.9.0.
@ -160,6 +166,8 @@ For some functionality, you will also need the following extensions:
- Sphinx Search. A client for the sphinx server, an alternative
to MySQL or Postgresql fulltext search. You will also need a
Sphinx server to serve the search queries.
- bcmath or gmp. For Salmon signatures (part of OStatus). Needed
if you have OStatus configured.
You will almost definitely get 2-3 times better performance from your
site if you install a PHP bytecode cache/accelerator. Some well-known
@ -209,6 +217,9 @@ and the URLs are listed here for your convenience.
- PEAR Validate is an oEmbed dependency.
- PEAR Net_URL2 is an oEmbed dependency.
- Console_GetOpt for parsing command-line options.
- libomb. a library for implementing OpenMicroBlogging 0.1, the
predecessor to OStatus.
- HTTP_Request2, a library for making HTTP requests.
A design goal of StatusNet is that the basic Web functionality should
work on even the most restrictive commercial hosting services.
@ -226,9 +237,9 @@ especially if you've previously installed PHP/MySQL packages.
1. Unpack the tarball you downloaded on your Web server. Usually a
command like this will work:
tar zxf statusnet-0.8.2.tar.gz
tar zxf statusnet-0.9.0.tar.gz
...which will make a statusnet-0.8.2 subdirectory in your current
...which will make a statusnet-0.9.0 subdirectory in your current
directory. (If you don't have shell access on your Web server, you
may have to unpack the tarball on your local computer and FTP the
files to the server.)
@ -236,34 +247,34 @@ especially if you've previously installed PHP/MySQL packages.
2. Move the tarball to a directory of your choosing in your Web root
directory. Usually something like this will work:
mv statusnet-0.8.2 /var/www/mublog
mv statusnet-0.9.0 /var/www/statusnet
This will make your StatusNet instance available in the mublog path of
your server, like "http://example.net/mublog". "microblog" or
This will make your StatusNet instance available in the statusnet path of
your server, like "http://example.net/statusnet". "microblog" or
"statusnet" might also be good path names. If you know how to
configure virtual hosts on your web server, you can try setting up
"http://micro.example.net/" or the like.
3. Make your target directory writeable by the Web server.
chmod a+w /var/www/mublog/
chmod a+w /var/www/statusnet/
On some systems, this will probably work:
chgrp www-data /var/www/mublog/
chmod g+w /var/www/mublog/
chgrp www-data /var/www/statusnet/
chmod g+w /var/www/statusnet/
If your Web server runs as another user besides "www-data", try
that user's default group instead. As a last resort, you can create
a new group like "mublog" and add the Web server's user to the group.
a new group like "statusnet" and add the Web server's user to the group.
4. You should also take this moment to make your avatar, background, and
file subdirectories writeable by the Web server. An insecure way to do
this is:
chmod a+w /var/www/mublog/avatar
chmod a+w /var/www/mublog/background
chmod a+w /var/www/mublog/file
chmod a+w /var/www/statusnet/avatar
chmod a+w /var/www/statusnet/background
chmod a+w /var/www/statusnet/file
You can also make the avatar, background, and file directories
writeable by the Web server group, as noted above.
@ -286,16 +297,16 @@ especially if you've previously installed PHP/MySQL packages.
MySQL shell:
GRANT ALL on statusnet.*
TO 'lacuser'@'localhost'
IDENTIFIED BY 'lacpassword';
TO 'statusnetuser'@'localhost'
IDENTIFIED BY 'statusnetpassword';
You should change 'lacuser' and 'lacpassword' to your preferred new
You should change 'statusnetuser' and 'statusnetpassword' to your preferred new
username and password. You may want to test logging in to MySQL as
this new user.
7. In a browser, navigate to the StatusNet install script; something like:
http://yourserver.example.com/mublog/install.php
http://yourserver.example.com/statusnet/install.php
Enter the database connection information and your site name. The
install program will configure your site and install the initial,
@ -315,16 +326,16 @@ By default, StatusNet will use URLs that include the main PHP program's
name in them. For example, a user's home profile might be
found at:
http://example.org/mublog/index.php/mublog/fred
http://example.org/statusnet/index.php/statusnet/fred
On certain systems that don't support this kind of syntax, they'll
look like this:
http://example.org/mublog/index.php?p=mublog/fred
http://example.org/statusnet/index.php?p=statusnet/fred
It's possible to configure the software so it looks like this instead:
http://example.org/mublog/fred
http://example.org/statusnet/fred
These "fancy URLs" are more readable and memorable for users. To use
fancy URLs, you must either have Apache 2.x with .htaccess enabled and
@ -349,7 +360,7 @@ your server.
You should now be able to navigate to a "fancy" URL on your server,
like:
http://example.net/mublog/main/register
http://example.net/statusnet/main/register
If you changed your HTTP server configuration, you may need to restart
the server first.
@ -401,7 +412,7 @@ For this to work, there *must* be a domain or sub-domain for which all
1. Run the SQL script carrier.sql in your StatusNet database. This will
usually work:
mysql -u "lacuser" --password="lacpassword" statusnet < db/carrier.sql
mysql -u "statusnetuser" --password="statusnetpassword" statusnet < db/carrier.sql
This will populate your database with a list of wireless carriers
that support email SMS gateways.
@ -491,7 +502,7 @@ consider setting up queues and daemons.
Queues and daemons
------------------
Some activities that StatusNet needs to do, like broadcast OMB, SMS,
Some activities that StatusNet needs to do, like broadcast OStatus, SMS,
and XMPP messages, can be 'queued' and done by off-line bots instead.
For this to work, you must be able to run long-running offline
processes, either on your main Web server or on another server you
@ -517,14 +528,12 @@ server is probably a good idea for high-volume sites.
options, you'll need to create that user and/or group by hand.
They're not created automatically.
4. On the queues server, run the command scripts/startdaemons.sh. It
needs as a parameter the install path; if you run it from the
StatusNet dir, "." should suffice.
4. On the queues server, run the command scripts/startdaemons.sh.
This will run the queue handlers:
* queuedaemon.php - polls for queued items for inbox processing and
pushing out to OMB, SMS, XMPP, etc.
pushing out to OStatus, SMS, XMPP, etc.
* xmppdaemon.php - listens for new XMPP messages from users and stores
them as notices in the database; also pulls queued XMPP output from
queuedaemon.php to push out to clients.
@ -533,6 +542,9 @@ These two daemons will automatically restart in most cases of failure
including memory leaks (if a memory_limit is set), but may still die
or behave oddly if they lose connections to the XMPP or queue servers.
Additional daemons may be also started by this script for certain
plugins, such as the Twitter bridge.
It may be a good idea to use a daemon-monitoring service, like 'monit',
to check their status and keep them running.
@ -541,46 +553,11 @@ default. This can be useful for starting, stopping, and monitoring the
daemons.
Since version 0.8.0, it's now possible to use a STOMP server instead of
our kind of hacky home-grown DB-based queue solution. See the "queues"
config section below for how to configure to use STOMP. As of this
writing, the software has been tested with ActiveMQ.
our kind of hacky home-grown DB-based queue solution. This is strongly
recommended for best response time, especially when using XMPP.
Sitemaps
--------
Sitemap files <http://sitemaps.org/> are a very nice way of telling
search engines and other interested bots what's available on your site
and what's changed recently. You can generate sitemap files for your
StatusNet instance.
1. Choose your sitemap URL layout. StatusNet creates a number of
sitemap XML files for different parts of your site. You may want to
put these in a sub-directory of your StatusNet directory to avoid
clutter. The sitemap index file tells the search engines and other
bots where to find all the sitemap files; it *must* be in the main
installation directory or higher. Both types of file must be
available through HTTP.
2. To generate your sitemaps, run the following command on your server:
php scripts/sitemap.php -f index-file-path -d sitemap-directory -u URL-prefix-for-sitemaps
Here, index-file-path is the full path to the sitemap index file,
like './sitemapindex.xml'. sitemap-directory is the directory where
you want the sitemaps stored, like './sitemaps/' (make sure the dir
exists). URL-prefix-for-sitemaps is the full URL for the sitemap dir,
typically something like <http://example.net/mublog/sitemaps/>.
You can use several methods for submitting your sitemap index to
search engines to get your site indexed. One is to add a line like the
following to your robots.txt file:
Sitemap: /mublog/sitemapindex.xml
This is a good idea for letting *all* Web spiders know about your
sitemap. You can also submit sitemap files to major search engines
using their respective "Webmaster centres"; see sitemaps.org for links
to these resources.
See the "queues" config section below for how to configure to use STOMP.
As of this writing, the software has been tested with ActiveMQ 5.3.
Themes
------
@ -651,30 +628,26 @@ not visible to non-logged-in users. This might be useful for
workgroups who want to share a microblogging site for project
management, but host it on a public server.
Note that this is an experimental feature; total privacy is not
guaranteed or ensured. Also, privacy is all-or-nothing for a site; you
can't have some accounts or notices private, and others public.
Finally, the interaction of private sites with OStatus is
undefined. Remote users won't be able to subscribe to users on a
private site, but users of the private site may be able to subscribe
to users on a remote site. (Or not... it's not well tested.) The
"proper behaviour" hasn't been defined here, so handle with care.
Total privacy is not guaranteed or ensured. Also, privacy is
all-or-nothing for a site; you can't have some accounts or notices
private, and others public. The interaction of private sites
with OStatus is undefined.
Access to file attachments can also be restricted to logged-in users only.
1. Add a directory outside the web root where your file uploads will be
stored. Usually a command like this will work:
mkdir /var/www/mublog-files
mkdir /var/www/statusnet-files
2. Make the file uploads directory writeable by the web server. An
insecure way to do this is:
chmod a+x /var/www/mublog-files
chmod a+x /var/www/statusnet-files
3. Tell StatusNet to use this directory for file uploads. Add a line
like this to your config.php:
$config['attachments']['dir'] = '/var/www/mublog-files';
$config['attachments']['dir'] = '/var/www/statusnet-files';
Upgrading
=========
@ -689,7 +662,7 @@ with this situation.
If you've been using StatusNet 0.7, 0.6, 0.5 or lower, or if you've
been tracking the "git" version of the software, you will probably
want to upgrade and keep your existing data. There is no automated
upgrade procedure in StatusNet 0.8.2. Try these step-by-step
upgrade procedure in StatusNet 0.9.0. Try these step-by-step
instructions; read to the end first before trying them.
0. Download StatusNet and set up all the prerequisites as if you were
@ -709,8 +682,8 @@ instructions; read to the end first before trying them.
maildaemon.php file, and running something like "newaliases".
5. Once all writing processes to your site are turned off, make a
final backup of the Web directory and database.
6. Move your StatusNet directory to a backup spot, like "mublog.bak".
7. Unpack your StatusNet 0.8.2 tarball and move it to "mublog" or
6. Move your StatusNet directory to a backup spot, like "statusnet.bak".
7. Unpack your StatusNet 0.9.0 tarball and move it to "statusnet" or
wherever your code used to be.
8. Copy the config.php file and avatar directory from your old
directory to your new directory.
@ -723,10 +696,10 @@ instructions; read to the end first before trying them.
reversed. YOU CAN EASILY DESTROY YOUR SITE WITH THIS STEP. Don't
do it without a known-good backup!
If your database is at version 0.7.4, you can run a special upgrade
script:
If your database is at version 0.8.0 or above, you can run a
special upgrade script:
mysql -u<rootuser> -p<rootpassword> <database> db/074to080.sql
mysql -u<rootuser> -p<rootpassword> <database> db/08to09.sql
Otherwise, go to your StatusNet directory and AFTER YOU MAKE A
BACKUP run the rebuilddb.sh script like this:
@ -791,10 +764,17 @@ Configuration options
The main configuration file for StatusNet (excepting configurations for
dependency software) is config.php in your StatusNet directory. If you
edit any other file in the directory, like lib/common.php (where most
edit any other file in the directory, like lib/default.php (where most
of the defaults are defined), you will lose your configuration options
in any upgrade, and you will wish that you had been more careful.
Starting with version 0.9.0, a Web based configuration panel has been
added to StatusNet. The preferred method for changing config options is
to use this panel.
A command-line script, setconfig.php, can be used to set individual
configuration options. It's in the scripts/ directory.
Starting with version 0.7.1, you can put config files in the
/etc/statusnet/ directory on your server, if it exists. Config files
will be included in this order:
@ -820,7 +800,7 @@ This section is a catch-all for site-wide variables.
name: the name of your site, like 'YourCompany Microblog'.
server: the server part of your site's URLs, like 'example.net'.
path: The path part of your site's URLs, like 'mublog' or ''
path: The path part of your site's URLs, like 'statusnet' or ''
(installed in root).
fancy: whether or not your site uses fancy URLs (see Fancy URLs
section above). Default is false.
@ -972,11 +952,45 @@ stomp_server: "broker URI" for stomp server. Something like
possible; see your stomp server's documentation for
details.
queue_basename: a root name to use for queues (stomp only). Typically
something like '/queue/sitename/' makes sense.
something like '/queue/sitename/' makes sense. If running
multiple instances on the same server, make sure that
either this setting or $config['site']['nickname'] are
unique for each site to keep them separate.
stomp_username: username for connecting to the stomp server; defaults
to null.
stomp_password: password for connecting to the stomp server; defaults
to null.
stomp_persistent: keep items across queue server restart, if enabled.
softlimit: an absolute or relative "soft memory limit"; daemons will
restart themselves gracefully when they find they've hit
this amount of memory usage. Defaults to 90% of PHP's global
memory_limit setting.
inboxes: delivery of messages to receiver's inboxes can be delayed to
queue time for best interactive performance on the sender.
This may however be annoyingly slow when using the DB queues,
so you can set this to false if it's causing trouble.
breakout: for stomp, individual queues are by default grouped up for
best scalability. If some need to be run by separate daemons,
etc they can be manually adjusted here.
Default will share all queues for all sites within each group.
Specify as <group>/<queue> or <group>/<queue>/<site>,
using nickname identifier as site.
'main/distrib' separate "distrib" queue covering all sites
'xmpp/xmppout/mysite' separate "xmppout" queue covering just 'mysite'
max_retries: for stomp, drop messages after N failed attempts to process.
Defaults to 10.
dead_letter_dir: for stomp, optional directory to dump data on failed
queue processing events after discarding them.
license
-------
@ -1219,10 +1233,6 @@ profile
Profile management.
banned: an array of usernames and/or profile IDs of 'banned' profiles.
The site will reject any notices by these users -- they will
not be accepted at all. (Compare with blacklisted users above,
whose posts just won't show up in the public stream.)
biolimit: max character length of bio; 0 means no limit; null means to use
the site text limit default.
@ -1510,7 +1520,7 @@ repository (see below), and you get a compilation error ("unexpected
T_STRING") in the browser, check to see that you don't have any
conflicts in your code.
If you upgraded to StatusNet 0.8.2 without reading the "Notice
If you upgraded to StatusNet 0.9.0 without reading the "Notice
inboxes" section above, and all your users' 'Personal' tabs are empty,
read the "Notice inboxes" section above.
@ -1565,16 +1575,16 @@ There are several ways to get more information about StatusNet.
* The #statusnet IRC channel on freenode.net <http://www.freenode.net/>.
* The StatusNet wiki, http://status.net/wiki/
* The StatusNet blog, http://status.net/blog/
* The StatusNet status update, <http://status.status.net/status> (!)
* The StatusNet status update, <http://status.status.net/> (!)
Feedback
========
* Microblogging messages to http://identi.ca/evan are very welcome.
* StatusNet's Trac server has a bug tracker for any defects you may find,
or ideas for making things better. http://status.net/trac/
* e-mail to evan@status.net will usually be read and responded to very
quickly, unless the question is really hard.
* Microblogging messages to http://support.status.net/ are very welcome.
* The microblogging group http://identi.ca/group/statusnet is a good
place to discuss the software.
* StatusNet has a bug tracker for any defects you may find, or ideas for
making things better. http://status.net/bugs
Credits
=======

View File

@ -866,6 +866,19 @@ function registerInitialUser($nickname, $password, $email)
$user->grantRole('moderator');
$user->grantRole('administrator');
// Attempt to do a remote subscribe to update@status.net
// Will fail if instance is on a private network.
if (class_exists('Ostatus_profile')) {
try {
$oprofile = Ostatus_profile::ensureProfile('http://update.status.net/');
Subscription::start($user->getProfile(), $oprofile->localProfile());
updateStatus("Set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
} catch (Exception $e) {
updateStatus("Could not set up subscription to <a href='http://update.status.net/'>update@status.net</a>.");
}
}
return true;
}

View File

@ -22,7 +22,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
//exit with 200 response, if this is checking fancy from the installer
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
define('STATUSNET_VERSION', '0.9.0beta6+bugfix1');
define('STATUSNET_VERSION', '0.9.0');
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
define('STATUSNET_CODENAME', 'Stand');

View File

@ -46,6 +46,7 @@ position:relative;
.section .entity_actions {
margin-bottom:0;
margin-right:7px;
}
#entity_remote_subscribe .dialogbox {
@ -70,5 +71,4 @@ background-color:transparent;
background-position:0 -1183px;
padding:0 0 0 23px;
border:0;
}

View File

@ -364,15 +364,11 @@ width:100%;
}
body[id$=adminpanel] #site_nav_local_views {
float:right;
margin-right:18.9%;
margin-right:189px;
position:relative;
width:14.01%;
width:141px;
z-index:9;
float:right;
margin-right:10.65%;
width:22.25%;
}
body[id$=adminpanel] #site_nav_local_views li {
width:100%;
@ -381,7 +377,9 @@ margin-bottom:7px;
}
body[id$=adminpanel] #site_nav_local_views a {
display:block;
width:100%;
width:80%;
padding-right:10%;
padding-left:10%;
border-radius-toprleft:0;
-moz-border-radius-topleft:0;
-webkit-border-top-left-radius:0;

View File

@ -47,3 +47,7 @@ z-index:9999;
.notice .thumbnail img {
z-index:9999;
}
.form_settings fieldset fieldset legend {
line-height:auto;
}