init
This commit is contained in:
46
livejournal/doc/designnotes/multihomed_userprops.txt
Executable file
46
livejournal/doc/designnotes/multihomed_userprops.txt
Executable file
@@ -0,0 +1,46 @@
|
||||
Explanation of Multihomed Userprops
|
||||
|
||||
The LiveJournal code provides a directory service that enables users to search
|
||||
for other users based on various criteria, including AOL Instant Messenger
|
||||
screen name, ICQ number, Jabber address, and others. These values are all
|
||||
stored as userprops.
|
||||
|
||||
Userprops themselves can either be stored on the global database or on the
|
||||
user's cluster. Putting things on the cluster is generally better, especially
|
||||
when the things relate to the user in such an integral way. However, that
|
||||
doesn't work so well with the userprops that are used for searching, because
|
||||
then you'd have to hit every cluster and repeat the search, which causes a lot
|
||||
of extra work to be done. Therefore, the properties that are used for
|
||||
searching have remained on the global database.
|
||||
|
||||
This is a problem too, though, because while searching is done fairly often,
|
||||
most of the time properties are loaded for such purposes as displaying the
|
||||
user's profile page. This doesn't require a search through all data, so
|
||||
should really be done using just the user's cluster.
|
||||
|
||||
Thus, multihomed userprops were born. Basically, a multihomed userprop is one
|
||||
that is stored in two locations for the express purpose of making it easier to
|
||||
load these properties in the majority of cases. The two locations are on the
|
||||
global database on the "userprop" table and on the user clusters in the
|
||||
"userproplite2" tables.
|
||||
|
||||
When a property is defined as multihomed (multihomed = '1' in the userproplist
|
||||
table), LJ::set_userprop and LJ::load_user_props know how to deal with it. No
|
||||
differences in coding style are required. It's completely transparent to the
|
||||
rest of the system.
|
||||
|
||||
Pseudo-logic for saving a multihomed userprop goes like this:
|
||||
- Save data to global (standard behavior, empty values are not saved)
|
||||
- Save data to cluster (empty values ARE saved as '')
|
||||
|
||||
Pseudo-logic for loading a multihomed userprop goes like this:
|
||||
- Load data from cluster
|
||||
- If data not found, try loading from master
|
||||
- If we had to load from master, save data to cluster (empty values saved)
|
||||
|
||||
The only real difference between the old and new way of doing things is that
|
||||
empty userprops, which were previously just deleted from the table, are
|
||||
instead saved. This is to prevent hitting up the cluster and thinking that we
|
||||
have not gotten this property from the global before and hitting the global
|
||||
repeatedly. Instead, we save it locally as blank, and don't hit the global
|
||||
ever again.
|
||||
595
livejournal/doc/ljconfig.pl.txt
Executable file
595
livejournal/doc/ljconfig.pl.txt
Executable file
@@ -0,0 +1,595 @@
|
||||
#!/usr/bin/perl
|
||||
# -*-perl-*-
|
||||
|
||||
# LiveJournal configuration file. Copy this out of the documentation
|
||||
# directory to cgi-bin/ljconfig.pl and edit as necessary. The reason
|
||||
# it's not in the cgi-bin directory already is to protect it from
|
||||
# getting clobbered when you upgrade to the newest LiveJournal code in
|
||||
# the future.
|
||||
|
||||
# This should be the only file you need to change to get the
|
||||
# LiveJournal code to run on your site. If not, it's considered a bug
|
||||
# and you should report it.
|
||||
|
||||
{
|
||||
package LJ;
|
||||
|
||||
###
|
||||
### Site Information
|
||||
###
|
||||
|
||||
$HOME = $ENV{'LJHOME'};
|
||||
$HTDOCS = "$HOME/htdocs";
|
||||
$BIN = "$HOME/bin";
|
||||
$TEMP = "$HOME/temp";
|
||||
$VAR = "$HOME/var";
|
||||
|
||||
# human readable name of this site as well as shortened versions
|
||||
# CHANGE THIS
|
||||
$SITENAME = "Some LiveJournal Site";
|
||||
$SITENAMESHORT = "YourSite";
|
||||
$SITENAMEABBREV = "YS";
|
||||
|
||||
# the base domain of your site.
|
||||
# CHANGE THIS
|
||||
$DOMAIN = "ljsite.com";
|
||||
|
||||
# this is what gets prepended to all URLs
|
||||
$SITEROOT = "http://www.$DOMAIN";
|
||||
|
||||
# prefix for images
|
||||
$IMGPREFIX = "$SITEROOT/img";
|
||||
|
||||
# set this if you're running an FTP server that mirrors your htdocs/files
|
||||
#$FTPPREFIX = "ftp://ftp.$DOMAIN";
|
||||
|
||||
# where we set the cookies (note the period before the domain)
|
||||
# can be one value or an array ref (to accomodate certain old
|
||||
# broken browsers)
|
||||
$COOKIE_DOMAIN = ["", ".$DOMAIN"];
|
||||
$COOKIE_PATH = "/";
|
||||
|
||||
# email addresses
|
||||
$ADMIN_EMAIL = "webmaster\@$DOMAIN";
|
||||
$SUPPORT_EMAIL = "support\@$DOMAIN";
|
||||
$COMMUNITY_EMAIL = "community_invitation\@$DOMAIN";
|
||||
$BOGUS_EMAIL = "lj_dontreply\@$DOMAIN";
|
||||
|
||||
# news site support. if set, that journal loads on the main page.
|
||||
#$FRONTPAGE_JOURNAL = "news";
|
||||
|
||||
# if you define these, little help bubbles appear next to common
|
||||
# widgets to the URL you define:
|
||||
%HELPURL = (
|
||||
#"accounttype" => "",
|
||||
#"renaming" => "$SITEROOT/support/faqbrowse.bml?faqid=25",
|
||||
#"security" => "$SITEROOT/support/faqbrowse.bml?faqid=24",
|
||||
#"noautoformat" => "$SITEROOT/support/faqbrowse.bml?faqid=26",
|
||||
#"userpics" => "$SITEROOT/support/faqbrowse.bml?faqid=46",
|
||||
#"iplogging" => "$SITEROOT/support/faqbrowse.bml?faqid=66",
|
||||
#"s2propoff" => '$SITEROOT/support/faqbrowse.bml?faqid=145',
|
||||
#"userpic_inactive" => "$SITEROOT/support/faqbrowse.bml?faqid=46",
|
||||
#"textmessaging_about" => "$SITEROOT/support/faqbrowse.bml?faqid=30",
|
||||
#"linklist_support" => "$SITEROOT/manage/links.bml",
|
||||
);
|
||||
|
||||
|
||||
|
||||
###
|
||||
### Policy Options
|
||||
###
|
||||
|
||||
# collect birthdays to mark users as underage (under 13). note that you will
|
||||
# need to create a new cap class for underage users...
|
||||
$COPPA_CHECK = 0;
|
||||
#$UNDERAGE_BIT = ?;
|
||||
# and then set $UNDERAGE_BIT to be the bit number for the capability class to
|
||||
# put underage users in. off by default.
|
||||
|
||||
$TOS_CHECK = 1; # require users to agree to TOS
|
||||
#$UNIQ_COOKIES = 1; # give users uniq cookies to help fight abuse
|
||||
|
||||
%REQUIRED_TOS =
|
||||
(
|
||||
# revision must be found in first line of your htdocs/inc/legal-tos include file:
|
||||
# <!-- $Revision: 1.60 $ -->
|
||||
|
||||
# set required version to enable tos version requirement mechanism
|
||||
#rev => '1.0',
|
||||
|
||||
# these are the defaults and are used if no "domain"-specific
|
||||
# values are defined below
|
||||
title => 'Configurable Title for TOS requirement',
|
||||
html => 'Configurable HTML for TOS requirement',
|
||||
text => 'Configurable text error message for TOS requirement',
|
||||
|
||||
# text/html to use when message displayed for a login action
|
||||
login => {
|
||||
html => "Before logging in, you must update your TOS agreement",
|
||||
},
|
||||
|
||||
# ... an update action
|
||||
update => {
|
||||
html => "HTML to use in update.bml",
|
||||
},
|
||||
|
||||
# ... posting a comment (this will just use the defaults above)
|
||||
comment => {
|
||||
},
|
||||
|
||||
# ... protocol actions
|
||||
protocol => {
|
||||
text => "Please visit $LJ::SITEROOT/legal/tos.bml to update your TOS agreement",
|
||||
},
|
||||
|
||||
# ... support requests
|
||||
support => {
|
||||
html => "Text to use when viewing a support request",
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
# filter comments for spam using this list of regular expressions:
|
||||
#@TALKSPAM = (
|
||||
# "morphese",
|
||||
# );
|
||||
|
||||
# require new free acounts to be referred by an existing user?
|
||||
# NOTE: mostly ljcom-specific. some features unimplemented in
|
||||
# the livejournal-only tree.
|
||||
#$USE_ACCT_CODES = 1;
|
||||
|
||||
#$EVERYONE_PAID = 1; # are all users paid by default?
|
||||
#$EVERYONE_VALID = 1; # are all users validated by default?
|
||||
|
||||
|
||||
###
|
||||
### System Information
|
||||
###
|
||||
|
||||
# on a larger installation, it's useful to have multiple qbufferd.pl
|
||||
# processes, one for each command type. this is unecessary on a
|
||||
# small installation. you can also specify a delay between runs.
|
||||
#@QBUFFERD_ISOLATE = ('weblogscom', 'ljcom_newpost');
|
||||
#$QBUFFERD_DELAY = 10;
|
||||
|
||||
# MemCache information, if you have MemCache servers running
|
||||
#@MEMCACHE_SERVERS = ('hostname:port');
|
||||
#$MEMCACHE_COMPRESS_THRESHOLD = 1_000; # bytes
|
||||
|
||||
# path to sendmail and any necessary options
|
||||
$SENDMAIL = "/usr/sbin/sendmail -t";
|
||||
|
||||
# optional SMTP server if it is to be used instead of sendmail
|
||||
#$SMTP_SERVER = "127.0.0.1";
|
||||
|
||||
# command-line to spell checker, or undefined if you don't want spell checking
|
||||
#$SPELLER = "/usr/local/bin/ispell -a";
|
||||
#$SPELLER = "/usr/local/bin/aspell pipe --sug-mode=fast --ignore-case";
|
||||
|
||||
# to save bandwidth, should we compress pages before they go out?
|
||||
# require Compress::Zlib to be installed
|
||||
#$DO_GZIP = 1;
|
||||
|
||||
# Support signed PGP email for email posting?
|
||||
# Requires GnuPG::Interface and Mail::GnuPG to be installed.
|
||||
#$USE_PGP = 1;
|
||||
|
||||
# HINTS:
|
||||
# how far you can scroll back on lastn and friends pages.
|
||||
# big performance implications if you make these too high.
|
||||
# also, once you lower them, increasing them won't change anything
|
||||
# until there are new posts numbering the difference you increased
|
||||
# it by.
|
||||
$MAX_HINTS_LASTN = 100;
|
||||
$MAX_SCROLLBACK_LASTN = 400;
|
||||
|
||||
# do paid users get email addresses? username@$USER_DOMAIN ?
|
||||
# (requires additional mail system configuration)
|
||||
#$USER_EMAIL = 1;
|
||||
|
||||
# Support URLs of the form http://username.yoursite.com/ ?
|
||||
# If so, what's the part after "username." ?
|
||||
#$USER_VHOSTS = 1;
|
||||
#$USER_DOMAIN = $DOMAIN;
|
||||
|
||||
# If you ONLY want USER_VHOSTS to work and not the typical /users/USER and /community/USER
|
||||
# then set this option:
|
||||
#$ONLY_USER_VHOSTS = 1;
|
||||
|
||||
# Support updating of journals via email?
|
||||
# Users can post to user@$EMAIL_POST_DOMAIN.
|
||||
#$EMAIL_POST_DOMAIN = "post.$DOMAIN";
|
||||
|
||||
# This should be a path to a Maildir, matching the delivery
|
||||
# location of your MTA.
|
||||
# If you are using sendmail, you should deliver with procmail
|
||||
# (versions 3.14 and above) for Maildir support.
|
||||
#$MAILSPOOL = '/home/livejournal/mail';
|
||||
|
||||
# Allow users to point their own domains here?
|
||||
#OTHER_VHOSTS = 1;
|
||||
|
||||
# turns these from 0 to 1 to disable parts of the site that are
|
||||
# CPU & database intensive or that you simply don't want to use
|
||||
%DISABLED = (
|
||||
'interests-findsim' => 0,
|
||||
'directory' => 0,
|
||||
'stats-recentupdates' => 0,
|
||||
'stats-newjournals' => 0,
|
||||
'stats-postsbyday' => 0,
|
||||
'show-talkleft' => 0,
|
||||
'memories' => 0,
|
||||
'topicdir' => 0,
|
||||
'tellafriend' => 0,
|
||||
'feedster_search' => 0,
|
||||
'community-logins' => 0,
|
||||
);
|
||||
|
||||
# turn $SERVER_DOWN on while you do any maintenance
|
||||
$SERVER_TOTALLY_DOWN = 0;
|
||||
$SERVER_DOWN = 0;
|
||||
$SERVER_DOWN_SUBJECT = "Maintenance";
|
||||
$SERVER_DOWN_MESSAGE = "$SITENAME is down right now while we upgrade. It should be up in a few minutes.";
|
||||
$MSG_READONLY_USER = "This journal is in read-only mode right now while database maintenance is performed " .
|
||||
"on the server where the journal is located. Try again in several minutes.";
|
||||
$MSG_NO_POST = "Due to hardware maintenance, you cannot post at this time. Watch the news page for updates.";
|
||||
$MSG_NO_COMMENT = "Due to hardware maintenance, you cannot leave comments at this time. Watch the news " .
|
||||
"page for updates.";
|
||||
#$MSG_DB_UNAVAILABLE = "Sorry, database temporarily unavailable. Please see <a href='...'>...</a> for status updates.";
|
||||
|
||||
###
|
||||
### Language / Scheme support
|
||||
###
|
||||
|
||||
# schemes available to users.
|
||||
# schemes will be displayed according to their order in the array,
|
||||
# but the first item in the array is the default scheme
|
||||
# 'title' is the printed name, while 'scheme' is the scheme name.
|
||||
@SCHEMES = (
|
||||
{ scheme => 'lynx', title => 'Lynx',
|
||||
#thumb => [ 'schemethumb/lynx.png', 200, 166 ]
|
||||
},
|
||||
{ scheme => 'bluewhite', title => 'Blue White' },
|
||||
);
|
||||
|
||||
# supported languages
|
||||
#@LANGS = qw(en_LJ en_GB de da es fr it ru ja pt eo he nl hu ga is fi nb sv pl zh lv tr ms);
|
||||
|
||||
# support unicode (posts in multiple languages)? leave enabled.
|
||||
$UNICODE = 1;
|
||||
|
||||
|
||||
###
|
||||
### Database Configuration
|
||||
###
|
||||
|
||||
# database info. only the master is necessary.
|
||||
# you should probably CHANGE THIS
|
||||
%DBINFO = (
|
||||
'master' => { # master must be named 'master'
|
||||
'host' => "localhost",
|
||||
'port' => 3306,
|
||||
'user' => 'lj',
|
||||
'pass' => 'ljpass',
|
||||
'role' => {
|
||||
'cluster1' => 1,
|
||||
|
||||
# optionally, apache write its access logs to a mysql database
|
||||
#logs => 1,
|
||||
},
|
||||
},
|
||||
# example of a TCP-based DB connection
|
||||
#'somehostname' => {
|
||||
# 'host' => "somehost",
|
||||
# 'port' => 1234,
|
||||
# 'user' => 'username',
|
||||
# 'pass' => 'password',
|
||||
#},
|
||||
# example of a UNIX domain-socket DB connection
|
||||
#'otherhost' => {
|
||||
# 'sock' => "$HOME/var/mysqld.sock",
|
||||
# 'user' => 'username',
|
||||
# 'pass' => 'password',
|
||||
#},
|
||||
);
|
||||
|
||||
# if database logging is enabled above, should we log images or just page requests?
|
||||
#$DONT_LOG_IMAGES = 1;
|
||||
|
||||
# Turn on memory/cpu usage statistics generation for database logs (requires the
|
||||
# GTop module to be installed)
|
||||
#$LOG_GTOP = 1;
|
||||
|
||||
# directory optimizations
|
||||
$DIR_DB_HOST = "master"; # DB role to use when connecting to directory DB
|
||||
$DIR_DB = ""; # by default, hit the main database (bad for big sites!)
|
||||
#$DIRECTORY_SEPARATE = 1; # don't let the directory use master databases
|
||||
|
||||
# list of all clusters - each one needs a 'cluster$i' role in %DBINFO
|
||||
@CLUSTERS = (1); # eg: (1, 2, 3) (for scalability)
|
||||
|
||||
# if any of your clusters are InnoDB based, uncomment this and update the qw()
|
||||
# appropriately. this changes some locking behavior for those particular
|
||||
# clusters in some of the hot codepaths that use lots of locking.
|
||||
#%INNODB_DB = ( map { $_ => 1 } qw( 1 ) );
|
||||
|
||||
# can users choose which cluster they're assigned to? leave this off.
|
||||
$ALLOW_CLUSTER_SELECT = 0;
|
||||
|
||||
# which cluster(s) get new users?
|
||||
# if it's an arrayref, choose one of the listed clusters at random. you can weight
|
||||
# new users by repeating cluster numbers, e.g. [ 1, 1, 1, 2 ] puts 75% of people on
|
||||
# cluster 1, 25% of people on cluster 2. clusters are checked for validity before
|
||||
# being used.
|
||||
$DEFAULT_CLUSTER = [ 1 ];
|
||||
|
||||
# which cluster should syndication accounts live on?
|
||||
$SYND_CLUSTER = 1;
|
||||
|
||||
# Only turn this on if you are using MySQL replication between
|
||||
# multiple databases and have one or more slaves set to not
|
||||
# replicated the logtext and talktext tables. Turning this on
|
||||
# makes LJ duplicate all logtext & talktext rows into
|
||||
# recent_logtext & recent_talktext which is then replicated.
|
||||
# However, a cron job cleans up that table so it's never too big.
|
||||
# LJ will try the slaves first, then the master. This is the best
|
||||
# method of scaling your LJ installation, as disk seeks on the
|
||||
# database for journal text is the slowest part.
|
||||
$USE_RECENT_TABLES = 0;
|
||||
|
||||
|
||||
###
|
||||
### Account Information
|
||||
###
|
||||
|
||||
# initial friends for new accounts.
|
||||
# leave undefined if you don't want to use it.
|
||||
#@INITIAL_FRIENDS = qw(news);
|
||||
|
||||
# some system accounts have so many friends it is harmful to display
|
||||
# them. list these accounts here.
|
||||
#%FORCE_EMPTY_FRIENDS = (
|
||||
# '81752' => 'paidmembers'
|
||||
# );
|
||||
|
||||
# list of regular expressions matching usernames that people can't have.
|
||||
@PROTECTED_USERNAMES = ("^ex_", "^lj_");
|
||||
|
||||
# test accounts are special
|
||||
@TESTACCTS = qw(test);
|
||||
|
||||
# props users should have by default
|
||||
#%USERPROP_DEF = (
|
||||
# 's1_lastn_style' => 29,
|
||||
# 's1_friends_style' => 20,
|
||||
# 's1_calendar_style' => 2,
|
||||
# 's1_day_style' => 11,
|
||||
# );
|
||||
|
||||
|
||||
### User Capabilities Classes:
|
||||
|
||||
# default capability limits, used only when no other
|
||||
# class-specific limit below matches.
|
||||
%CAP_DEF = (
|
||||
'maxfriends' => 500,
|
||||
'userpics' => 1,
|
||||
'checkfriends_interval' => 60,
|
||||
'checkfriends' => 1,
|
||||
'styles' => 0,
|
||||
'todomax' => 25,
|
||||
'todosec' => 0,
|
||||
'friendsviewupdate' => 30,
|
||||
'findsim' => 1,
|
||||
'getselfemail' => 0,
|
||||
);
|
||||
|
||||
# capability class limits.
|
||||
# keys are bit numbers, from 0 .. 15. values are hashrefs
|
||||
# with limit names and values (see doc/capabilities.txt)
|
||||
# NOTE: you don't even need to have different capability classes!
|
||||
# all users can be the same if you want, just delete all
|
||||
# this. the important part then is %CAP_DEF, above.
|
||||
%CAP = (
|
||||
'0' => { # 0x01
|
||||
'_name' => 'new user',
|
||||
'userpics' => 1,
|
||||
},
|
||||
'1' => { # 0x02
|
||||
'_name' => 'free user',
|
||||
'userpics' => 3,
|
||||
},
|
||||
'2' => { # 0x04
|
||||
'_name' => 'early adopter',
|
||||
'userpics' => 5,
|
||||
'styles' => 1,
|
||||
},
|
||||
'3' => { # 0x08
|
||||
'_name' => 'paid user',
|
||||
'styles' => 1,
|
||||
'makepoll' => 1,
|
||||
'userpics' => 10,
|
||||
'paid' => 1,
|
||||
'useremail' => 1,
|
||||
'textmessaging' => 1,
|
||||
},
|
||||
'4' => { # 0x10
|
||||
'_name' => 'permanent account',
|
||||
'paid' => 1,
|
||||
'useremail' => 1,
|
||||
},
|
||||
# a capability class with a name of "_moveinprogress" is required
|
||||
# if you want to be able to move users between clusters with the
|
||||
# provided tool. further, this class must define 'readonly' => 1
|
||||
'5' => {
|
||||
'_name' => '_moveinprogress',
|
||||
'readonly' => 1,
|
||||
},
|
||||
);
|
||||
|
||||
# default capability class mask for new users:
|
||||
# (16 bit unsigned int ... each bit is capability class flag)
|
||||
$NEWUSER_CAPS = 2;
|
||||
|
||||
|
||||
### S1 style options
|
||||
|
||||
$SYN_LASTN_S1 = 1; # lastn style to use for syndication accounts
|
||||
$DONT_TOUCH_STYLES = 0; # don't touch existing styles
|
||||
|
||||
$DEFAULT_STYLE = {
|
||||
'core' => 'core1',
|
||||
'layout' => 'generator/layout',
|
||||
'i18n' => 'generator/en',
|
||||
};
|
||||
|
||||
### /admin/fileedit setup
|
||||
# If you are using the files in htdocs/inc and are frequently editing
|
||||
# those, you may wish to put all of these files into the database.
|
||||
# You can instruct BML to treat all <?_include?> statements as being
|
||||
# pulled from memcached (failover to the database) by uncommenting:
|
||||
# $FILEEDIT_VIA_DB = 1;
|
||||
# Alternately, you can specify that only particular files should be
|
||||
# kept in memcache and the database by doing:
|
||||
# %FILEEDIT_VIA_DB = ( 'support_links' => 1, );
|
||||
|
||||
### S2 Style Options
|
||||
|
||||
# which users' s2 layers should always run trusted un-cleaned?
|
||||
#%S2_TRUSTED = ( '2' => 'whitaker' ); # userid => username
|
||||
|
||||
|
||||
###
|
||||
### Portal Options
|
||||
###
|
||||
|
||||
# most of the portal options have sane default values, but if you
|
||||
# need to override them, here's the format:
|
||||
|
||||
#@PORTAL_COLS = qw(main right moz); # can also include left, if you want.
|
||||
#$PORTAL_URI = "/portal/"; # either "/" or "/portal/"
|
||||
|
||||
#$PORTAL_LOGGED_IN ||= {'main' => [
|
||||
# [ 'newtolj', ''],
|
||||
# [ 'update', 'mode=full'],
|
||||
# ],
|
||||
# 'right' => [
|
||||
# [ 'goat', '', ],
|
||||
# [ 'stats', '', ],
|
||||
# [ 'bdays', '', ],
|
||||
# [ 'memories', '', ],
|
||||
# [ 'popfaq', '', ],
|
||||
# ] };
|
||||
|
||||
#$PORTAL_LOGGED_OUT ||= {'main' => [
|
||||
# [ 'newtolj', ''],
|
||||
# [ 'update', 'mode='],
|
||||
# ],
|
||||
# 'right' => [
|
||||
# [ 'goat', '', ],
|
||||
# [ 'login', '', ],
|
||||
# [ 'stats', '', ],
|
||||
# [ 'randuser', '', ],
|
||||
# [ 'popfaq', '', ],
|
||||
# ],
|
||||
# 'moz' => [
|
||||
# [ 'login', '', ],
|
||||
# ],
|
||||
# };
|
||||
|
||||
# Setup support email address to not accept new emails. Basically if an
|
||||
# address is specified below, any user who emails it out of the blue will
|
||||
# be sent back a copy of the specified file along with their email. Users
|
||||
# will still be allowed to respond to emails from the support system, but
|
||||
# they can't open a request by emailing the address. The value part of
|
||||
# the hash is the name of an include file. It will be loaded out of
|
||||
# LJHOME/htdocs/inc. See %FILEEDIT_VIA_DB for how to make it read
|
||||
# from memcache/DB.
|
||||
#%DENY_REQUEST_FROM_EMAIL = (
|
||||
# "abuse\@$DOMAIN" => "bounce-abuse",
|
||||
#);
|
||||
|
||||
# Support diagnostics can be helpful if you are trying to track down a
|
||||
# bug that has been occurring. You can turn on and off various tracking
|
||||
# features here. Just uncomment any/all of the following lines. The
|
||||
# gathered information will be appended to requests that the user opens
|
||||
# through the web interface.
|
||||
%SUPPORT_DIAGNOSTICS = (
|
||||
# 'track_useragent' => 1,
|
||||
);
|
||||
|
||||
# If you want to change the limit on how many bans a user can make, uncomment
|
||||
# the following line. Default is 5000.
|
||||
#$MAX_BANS = 5000;
|
||||
|
||||
# If you are using MogileFS on your site for userpics or other purposes, you
|
||||
# will need to define the following hash and complete the information in it.
|
||||
#%MOGILEFS_CONFIG = (
|
||||
# hosts => [ '10.0.0.1:6001' ],
|
||||
# root => '/mnt/mogdata',
|
||||
# classes => {
|
||||
# 'your_class' => 3, # define any special MogileFS classes you need
|
||||
# },
|
||||
#);
|
||||
|
||||
# If you have multiple internal networks and would like the MogileFS libraries
|
||||
# to pick one network over the other, you can set the preferred IP list...
|
||||
#%MOGILEFS_PREF_IP = (
|
||||
# 10.0.0.1 => 10.10.0.1,
|
||||
#);
|
||||
#That says "if we try to connect to 10.0.0.1, instead try 10.10.0.1 first and
|
||||
#then fall back to 10.0.0.1".
|
||||
|
||||
# In addition to setting up MogileFS above, you need to enable some options
|
||||
# if you want to use MogileFS.
|
||||
#$CAPTCHA_MOGILEFS = 1; # turn this on to put captchas in MogileFS
|
||||
#$USERPIC_MOGILEFS = 1; # uncomment to put new userpics in MogileFS
|
||||
|
||||
# if you are using Perlbal to balance your web site, by default it uses
|
||||
# reproxying to distribute the files itself. however, in some situations
|
||||
# you may not want to do that. use this option to disable that on an
|
||||
# item by item basis.
|
||||
#%REPROXY_DISABLE = (
|
||||
# userpics => 1,
|
||||
# captchas => 1,
|
||||
#);
|
||||
|
||||
# Some people on portable devices may have troubles viewing the nice site
|
||||
# scheme you've setup, so you can specify that some user-agent prefixes
|
||||
# should instead use fallback presentation information.
|
||||
%MINIMAL_USERAGENT = (
|
||||
#'Foo' => 1, # if the user-agent field starts with "Foo" ...
|
||||
# note you can only put text here; no numbers, spaces, or symbols.
|
||||
);
|
||||
$MINIMAL_BML_SCHEME = 'lynx';
|
||||
%MINIMAL_STYLE = (
|
||||
'core' => 'core1', # default, but you can add more layers and styles... note
|
||||
# that they must be public styles
|
||||
);
|
||||
|
||||
# this is on in the default file here because most of the time you
|
||||
# want this flag to be on. if you have an existing site and you're
|
||||
# copying this file, make sure to only turn this flag on if you've
|
||||
# actually migrated everything.
|
||||
$S2COMPILED_MIGRATION_DONE = 1;
|
||||
|
||||
# optional LDAP support
|
||||
# required:
|
||||
# $LJ::LDAP_HOST = "ldap.example.com"; # anything that the Net::LDAP constructor takes
|
||||
# $LJ::LDAP_BASE = "ou=People,dc=exampleorg,dc=com";
|
||||
# optional:
|
||||
# $LJ::LDAP_UID = "uid"; # field containing the username. defaults to "uid".
|
||||
|
||||
# if you know that your installation is behind a proxy or other fence that inserts
|
||||
# X-Forwarded-For headers that you can trust, enable this. otherwise, don't!
|
||||
# $TRUST_X_HEADERS = 1;
|
||||
|
||||
# the following values allow you to control enabling your OpenID server and consumer
|
||||
# support.
|
||||
$OPENID_SERVER = 1;
|
||||
$OPENID_CONSUMER = 0;
|
||||
|
||||
}
|
||||
|
||||
1; # return true
|
||||
36
livejournal/doc/notes/user-statusvis.txt
Executable file
36
livejournal/doc/notes/user-statusvis.txt
Executable file
@@ -0,0 +1,36 @@
|
||||
"statusvis" stands for "status visibility" and is the basic way that
|
||||
accounts are marked with various statuses. This column in the user table
|
||||
is a single character and is taken from the list below:
|
||||
|
||||
|
||||
V - visible
|
||||
This is the normal status that applies to most accounts. Nothing special.
|
||||
|
||||
S - suspended
|
||||
Accounts that are suspended are effectively invisible. Normal people
|
||||
cannot see the contents of suspended journals. People with the 'canview'
|
||||
privilege have some access to see these accounts. (See information on that
|
||||
privilege.)
|
||||
|
||||
D - deleted
|
||||
When someone deletes their own account. Has much the same effects as being
|
||||
suspended, except the user is allowed to undelete their account.
|
||||
|
||||
X - expunged
|
||||
After an account has been deleted for a while it is expunged. This process
|
||||
removes all data for an account. At this point the account can no longer
|
||||
be undeleted.
|
||||
|
||||
R - renamed
|
||||
When a user is renamed a row is created in the user table with their OLD
|
||||
username and a statusvis of R. This means that any requests for this user
|
||||
need to be mapped to the username they renamed to.
|
||||
|
||||
M - memorial
|
||||
No changes from a normal account except that memorial accounts cannot have
|
||||
new posts added to them.
|
||||
|
||||
L - locked
|
||||
Accounts in this status are frozen. They cannot be logged in to, cannot
|
||||
receive comments or post comments, cannot post entries, cannot edit
|
||||
entries, and basically can't do anything on the site with this account.
|
||||
450
livejournal/doc/raw/appendices/gfdl.xml
Executable file
450
livejournal/doc/raw/appendices/gfdl.xml
Executable file
@@ -0,0 +1,450 @@
|
||||
<appendix id="appx.gfdl">
|
||||
<title>GNU Free Documentation License</title>
|
||||
<!-- - GNU Project - Free Software Foundation (FSF) -->
|
||||
<!-- LINK REV="made" HREF="mailto:webmasters@gnu.org" -->
|
||||
|
||||
|
||||
<!-- sect1>
|
||||
<title>GNU Free Documentation License</title -->
|
||||
|
||||
<para>Version 1.1, March 2000</para>
|
||||
|
||||
<blockquote>
|
||||
<para>Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.</para>
|
||||
</blockquote>
|
||||
|
||||
<sect1 id="appx.gfdl-0">
|
||||
<title>PREAMBLE</title>
|
||||
|
||||
<para>The purpose of this License is to make a manual, textbook,
|
||||
or other written document "free" in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or
|
||||
noncommercially. Secondarily, this License preserves for the
|
||||
author and publisher a way to get credit for their work, while not
|
||||
being considered responsible for modifications made by
|
||||
others.</para>
|
||||
|
||||
<para>This License is a kind of "copyleft", which means that
|
||||
derivative works of the document must themselves be free in the
|
||||
same sense. It complements the GNU General Public License, which
|
||||
is a copyleft license designed for free software.</para>
|
||||
|
||||
<para>We have designed this License in order to use it for manuals
|
||||
for free software, because free software needs free documentation:
|
||||
a free program should come with manuals providing the same
|
||||
freedoms that the software does. But this License is not limited
|
||||
to software manuals; it can be used for any textual work,
|
||||
regardless of subject matter or whether it is published as a
|
||||
printed book. We recommend this License principally for works
|
||||
whose purpose is instruction or reference.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-1">
|
||||
<title>APPLICABILITY AND DEFINITIONS</title>
|
||||
|
||||
<para>This License applies to any manual or other work that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. The "Document",
|
||||
below, refers to any such manual or work. Any member of the
|
||||
public is a licensee, and is addressed as "you".</para>
|
||||
|
||||
<para>A "Modified Version" of the Document means any work
|
||||
containing the Document or a portion of it, either copied
|
||||
verbatim, or with modifications and/or translated into another
|
||||
language.</para>
|
||||
|
||||
<para>A "Secondary Section" is a named appendix or a front-matter
|
||||
section of the Document that deals exclusively with the
|
||||
relationship of the publishers or authors of the Document to the
|
||||
Document's overall subject (or to related matters) and contains
|
||||
nothing that could fall directly within that overall subject.
|
||||
(For example, if the Document is in part a textbook of
|
||||
mathematics, a Secondary Section may not explain any mathematics.)
|
||||
The relationship could be a matter of historical connection with
|
||||
the subject or with related matters, or of legal, commercial,
|
||||
philosophical, ethical or political position regarding
|
||||
them.</para>
|
||||
|
||||
<para>The "Invariant Sections" are certain Secondary Sections
|
||||
whose titles are designated, as being those of Invariant Sections,
|
||||
in the notice that says that the Document is released under this
|
||||
License.</para>
|
||||
|
||||
<para>The "Cover Texts" are certain short passages of text that
|
||||
are listed, as Front-Cover Texts or Back-Cover Texts, in the
|
||||
notice that says that the Document is released under this
|
||||
License.</para>
|
||||
|
||||
<para>A "Transparent" copy of the Document means a
|
||||
machine-readable copy, represented in a format whose specification
|
||||
is available to the general public, whose contents can be viewed
|
||||
and edited directly and straightforwardly with generic text
|
||||
editors or (for images composed of pixels) generic paint programs
|
||||
or (for drawings) some widely available drawing editor, and that
|
||||
is suitable for input to text formatters or for automatic
|
||||
translation to a variety of formats suitable for input to text
|
||||
formatters. A copy made in an otherwise Transparent file format
|
||||
whose markup has been designed to thwart or discourage subsequent
|
||||
modification by readers is not Transparent. A copy that is not
|
||||
"Transparent" is called "Opaque".</para>
|
||||
|
||||
<para>Examples of suitable formats for Transparent copies include
|
||||
plain ASCII without markup, Texinfo input format, LaTeX input
|
||||
format, SGML or XML using a publicly available DTD, and
|
||||
standard-conforming simple HTML designed for human modification.
|
||||
Opaque formats include PostScript, PDF, proprietary formats that
|
||||
can be read and edited only by proprietary word processors, SGML
|
||||
or XML for which the DTD and/or processing tools are not generally
|
||||
available, and the machine-generated HTML produced by some word
|
||||
processors for output purposes only.</para>
|
||||
|
||||
<para>The "Title Page" means, for a printed book, the title page
|
||||
itself, plus such following pages as are needed to hold, legibly,
|
||||
the material this License requires to appear in the title page.
|
||||
For works in formats which do not have any title page as such,
|
||||
"Title Page" means the text near the most prominent appearance of
|
||||
the work's title, preceding the beginning of the body of the
|
||||
text.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-2">
|
||||
<title>VERBATIM COPYING</title>
|
||||
|
||||
<para>You may copy and distribute the Document in any medium,
|
||||
either commercially or noncommercially, provided that this
|
||||
License, the copyright notices, and the license notice saying this
|
||||
License applies to the Document are reproduced in all copies, and
|
||||
that you add no other conditions whatsoever to those of this
|
||||
License. You may not use technical measures to obstruct or
|
||||
control the reading or further copying of the copies you make or
|
||||
distribute. However, you may accept compensation in exchange for
|
||||
copies. If you distribute a large enough number of copies you
|
||||
must also follow the conditions in section 3.</para>
|
||||
|
||||
<para>You may also lend copies, under the same conditions stated
|
||||
above, and you may publicly display copies.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-3">
|
||||
<title>COPYING IN QUANTITY</title>
|
||||
|
||||
<para>If you publish printed copies of the Document numbering more
|
||||
than 100, and the Document's license notice requires Cover Texts,
|
||||
you must enclose the copies in covers that carry, clearly and
|
||||
legibly, all these Cover Texts: Front-Cover Texts on the front
|
||||
cover, and Back-Cover Texts on the back cover. Both covers must
|
||||
also clearly and legibly identify you as the publisher of these
|
||||
copies. The front cover must present the full title with all
|
||||
words of the title equally prominent and visible. You may add
|
||||
other material on the covers in addition. Copying with changes
|
||||
limited to the covers, as long as they preserve the title of the
|
||||
Document and satisfy these conditions, can be treated as verbatim
|
||||
copying in other respects.</para>
|
||||
|
||||
<para>If the required texts for either cover are too voluminous to
|
||||
fit legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto
|
||||
adjacent pages.</para>
|
||||
|
||||
<para>If you publish or distribute Opaque copies of the Document
|
||||
numbering more than 100, you must either include a
|
||||
machine-readable Transparent copy along with each Opaque copy, or
|
||||
state in or with each Opaque copy a publicly-accessible
|
||||
computer-network location containing a complete Transparent copy
|
||||
of the Document, free of added material, which the general
|
||||
network-using public has access to download anonymously at no
|
||||
charge using public-standard network protocols. If you use the
|
||||
latter option, you must take reasonably prudent steps, when you
|
||||
begin distribution of Opaque copies in quantity, to ensure that
|
||||
this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you
|
||||
distribute an Opaque copy (directly or through your agents or
|
||||
retailers) of that edition to the public.</para>
|
||||
|
||||
<para>It is requested, but not required, that you contact the
|
||||
authors of the Document well before redistributing any large
|
||||
number of copies, to give them a chance to provide you with an
|
||||
updated version of the Document.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-4">
|
||||
<title>MODIFICATIONS</title>
|
||||
|
||||
<para>You may copy and distribute a Modified Version of the
|
||||
Document under the conditions of sections 2 and 3 above, provided
|
||||
that you release the Modified Version under precisely this
|
||||
License, with the Modified Version filling the role of the
|
||||
Document, thus licensing distribution and modification of the
|
||||
Modified Version to whoever possesses a copy of it. In addition,
|
||||
you must do these things in the Modified Version:</para>
|
||||
|
||||
<orderedlist numeration="upperalpha">
|
||||
<listitem><para>Use in the Title Page
|
||||
(and on the covers, if any) a title distinct from that of the
|
||||
Document, and from those of previous versions (which should, if
|
||||
there were any, be listed in the History section of the
|
||||
Document). You may use the same title as a previous version if
|
||||
the original publisher of that version gives permission.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>List on the Title Page,
|
||||
as authors, one or more persons or entities responsible for
|
||||
authorship of the modifications in the Modified Version,
|
||||
together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has less than
|
||||
five).</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>State on the Title page
|
||||
the name of the publisher of the Modified Version, as the
|
||||
publisher.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Preserve all the
|
||||
copyright notices of the Document.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Add an appropriate
|
||||
copyright notice for your modifications adjacent to the other
|
||||
copyright notices.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Include, immediately
|
||||
after the copyright notices, a license notice giving the public
|
||||
permission to use the Modified Version under the terms of this
|
||||
License, in the form shown in the Addendum below.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Preserve in that license
|
||||
notice the full lists of Invariant Sections and required Cover
|
||||
Texts given in the Document's license notice.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Include an unaltered
|
||||
copy of this License.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Preserve the section
|
||||
entitled "History", and its title, and add to it an item stating
|
||||
at least the title, year, new authors, and publisher of the
|
||||
Modified Version as given on the Title Page. If there is no
|
||||
section entitled "History" in the Document, create one stating
|
||||
the title, year, authors, and publisher of the Document as given
|
||||
on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Preserve the network
|
||||
location, if any, given in the Document for public access to a
|
||||
Transparent copy of the Document, and likewise the network
|
||||
locations given in the Document for previous versions it was
|
||||
based on. These may be placed in the "History" section. You
|
||||
may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>In any section entitled
|
||||
"Acknowledgements" or "Dedications", preserve the section's
|
||||
title, and preserve in the section all the substance and tone of
|
||||
each of the contributor acknowledgements and/or dedications
|
||||
given therein.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Preserve all the
|
||||
Invariant Sections of the Document, unaltered in their text and
|
||||
in their titles. Section numbers or the equivalent are not
|
||||
considered part of the section titles.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Delete any section
|
||||
entitled "Endorsements". Such a section may not be included in
|
||||
the Modified Version.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Do not retitle any
|
||||
existing section as "Endorsements" or to conflict in title with
|
||||
any Invariant Section.</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>If the Modified Version includes new front-matter sections
|
||||
or appendices that qualify as Secondary Sections and contain no
|
||||
material copied from the Document, you may at your option
|
||||
designate some or all of these sections as invariant. To do this,
|
||||
add their titles to the list of Invariant Sections in the Modified
|
||||
Version's license notice. These titles must be distinct from any
|
||||
other section titles.</para>
|
||||
|
||||
<para>You may add a section entitled "Endorsements", provided it
|
||||
contains nothing but endorsements of your Modified Version by
|
||||
various parties--for example, statements of peer review or that
|
||||
the text has been approved by an organization as the authoritative
|
||||
definition of a standard.</para>
|
||||
|
||||
<para>You may add a passage of up to five words as a Front-Cover
|
||||
Text, and a passage of up to 25 words as a Back-Cover Text, to the
|
||||
end of the list of Cover Texts in the Modified Version. Only one
|
||||
passage of Front-Cover Text and one of Back-Cover Text may be
|
||||
added by (or through arrangements made by) any one entity. If the
|
||||
Document already includes a cover text for the same cover,
|
||||
previously added by you or by arrangement made by the same entity
|
||||
you are acting on behalf of, you may not add another; but you may
|
||||
replace the old one, on explicit permission from the previous
|
||||
publisher that added the old one.</para>
|
||||
|
||||
<para>The author(s) and publisher(s) of the Document do not by
|
||||
this License give permission to use their names for publicity for
|
||||
or to assert or imply endorsement of any Modified Version.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-5">
|
||||
<title>COMBINING DOCUMENTS</title>
|
||||
|
||||
<para>You may combine the Document with other documents released
|
||||
under this License, under the terms defined in section 4 above for
|
||||
modified versions, provided that you include in the combination
|
||||
all of the Invariant Sections of all of the original documents,
|
||||
unmodified, and list them all as Invariant Sections of your
|
||||
combined work in its license notice.</para>
|
||||
|
||||
<para>The combined work need only contain one copy of this
|
||||
License, and multiple identical Invariant Sections may be replaced
|
||||
with a single copy. If there are multiple Invariant Sections with
|
||||
the same name but different contents, make the title of each such
|
||||
section unique by adding at the end of it, in parentheses, the
|
||||
name of the original author or publisher of that section if known,
|
||||
or else a unique number. Make the same adjustment to the section
|
||||
titles in the list of Invariant Sections in the license notice of
|
||||
the combined work.</para>
|
||||
|
||||
<para>In the combination, you must combine any sections entitled
|
||||
"History" in the various original documents, forming one section
|
||||
entitled "History"; likewise combine any sections entitled
|
||||
"Acknowledgements", and any sections entitled "Dedications". You
|
||||
must delete all sections entitled "Endorsements."</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-6">
|
||||
<title>COLLECTIONS OF DOCUMENTS</title>
|
||||
|
||||
<para>You may make a collection consisting of the Document and
|
||||
other documents released under this License, and replace the
|
||||
individual copies of this License in the various documents with a
|
||||
single copy that is included in the collection, provided that you
|
||||
follow the rules of this License for verbatim copying of each of
|
||||
the documents in all other respects.</para>
|
||||
|
||||
<para>You may extract a single document from such a collection,
|
||||
and distribute it individually under this License, provided you
|
||||
insert a copy of this License into the extracted document, and
|
||||
follow this License in all other respects regarding verbatim
|
||||
copying of that document.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-7">
|
||||
<title>AGGREGATION WITH INDEPENDENT WORKS</title>
|
||||
|
||||
<para>A compilation of the Document or its derivatives with other
|
||||
separate and independent documents or works, in or on a volume of
|
||||
a storage or distribution medium, does not as a whole count as a
|
||||
Modified Version of the Document, provided no compilation
|
||||
copyright is claimed for the compilation. Such a compilation is
|
||||
called an "aggregate", and this License does not apply to the
|
||||
other self-contained works thus compiled with the Document, on
|
||||
account of their being thus compiled, if they are not themselves
|
||||
derivative works of the Document.</para>
|
||||
|
||||
<para>If the Cover Text requirement of section 3 is applicable to
|
||||
these copies of the Document, then if the Document is less than
|
||||
one quarter of the entire aggregate, the Document's Cover Texts
|
||||
may be placed on covers that surround only the Document within the
|
||||
aggregate. Otherwise they must appear on covers around the whole
|
||||
aggregate.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-8">
|
||||
<title>TRANSLATION</title>
|
||||
|
||||
<para>Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section
|
||||
4. Replacing Invariant Sections with translations requires
|
||||
special permission from their copyright holders, but you may
|
||||
include translations of some or all Invariant Sections in addition
|
||||
to the original versions of these Invariant Sections. You may
|
||||
include a translation of this License provided that you also
|
||||
include the original English version of this License. In case of
|
||||
a disagreement between the translation and the original English
|
||||
version of this License, the original English version will
|
||||
prevail.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-9">
|
||||
<title>TERMINATION</title>
|
||||
|
||||
<para>You may not copy, modify, sublicense, or distribute the
|
||||
Document except as expressly provided for under this License. Any
|
||||
other attempt to copy, modify, sublicense or distribute the
|
||||
Document is void, and will automatically terminate your rights
|
||||
under this License. However, parties who have received copies, or
|
||||
rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full
|
||||
compliance.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-10">
|
||||
<title>FUTURE REVISIONS OF THIS LICENSE</title>
|
||||
|
||||
<para>The Free Software Foundation may publish new, revised
|
||||
versions of the GNU Free Documentation License from time to time.
|
||||
Such new versions will be similar in spirit to the present
|
||||
version, but may differ in detail to address new problems or
|
||||
concerns. See <ulink
|
||||
url="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</ulink>.</para>
|
||||
|
||||
<para>Each version of the License is given a distinguishing
|
||||
version number. If the Document specifies that a particular
|
||||
numbered version of this License "or any later version" applies to
|
||||
it, you have the option of following the terms and conditions
|
||||
either of that specified version or of any later version that has
|
||||
been published (not as a draft) by the Free Software Foundation.
|
||||
If the Document does not specify a version number of this License,
|
||||
you may choose any version ever published (not as a draft) by the
|
||||
Free Software Foundation.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="appx.gfdl-11">
|
||||
<title>How to use this License for your documents</title>
|
||||
|
||||
<para>To use this License in a document you have written, include
|
||||
a copy of the License in the document and put the following
|
||||
copyright and license notices just after the title page:</para>
|
||||
|
||||
<blockquote><para>
|
||||
Copyright (c) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.1
|
||||
or any later version published by the Free Software Foundation;
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
</para></blockquote>
|
||||
|
||||
<para>If you have no Invariant Sections, write "with no Invariant
|
||||
Sections" instead of saying which ones are invariant. If you have
|
||||
no Front-Cover Texts, write "no Front-Cover Texts" instead of
|
||||
"Front-Cover Texts being LIST"; likewise for Back-Cover
|
||||
Texts.</para>
|
||||
|
||||
<para>If your document contains nontrivial examples of program
|
||||
code, we recommend releasing these examples in parallel under your
|
||||
choice of free software license, such as the GNU General Public
|
||||
License, to permit their use in free software.</para>
|
||||
</sect1>
|
||||
|
||||
</appendix>
|
||||
111
livejournal/doc/raw/build/api/api2db.pl
Executable file
111
livejournal/doc/raw/build/api/api2db.pl
Executable file
@@ -0,0 +1,111 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
my ($opt_include, $opt_exclude, $opt_book);
|
||||
die unless GetOptions(
|
||||
'include=s' => \$opt_include,
|
||||
'exclude=s' => \$opt_exclude,
|
||||
'book=s' => \$opt_book,
|
||||
);
|
||||
die "Unknown arguments.\n" if @ARGV;
|
||||
die "Can't exclude and include at same time!\n" if $opt_include && $opt_exclude;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
|
||||
chdir $ENV{'LJHOME'} or die "Can't cd to $ENV{'LJOME'}\n";
|
||||
|
||||
unless ($opt_book) { $opt_book = "ljp"; }
|
||||
|
||||
### apidoc.pl does all the hard work.
|
||||
my $VAR1;
|
||||
my $param;
|
||||
$param = "--include=$opt_include" if $opt_include;
|
||||
$param = "--exclude=$opt_exclude" if $opt_exclude;
|
||||
eval `$ENV{'LJHOME'}/bin/apidoc.pl --conf=$ENV{'LJHOME'}/doc/raw/build/api/apidoc.conf $param`;
|
||||
my $api = $VAR1;
|
||||
|
||||
print "<reference id=\"$opt_book.api.ref\">\n";
|
||||
print " <title>API Documentation</title>\n";
|
||||
|
||||
foreach my $func (sort keys %$api) {
|
||||
my $f = $api->{$func};
|
||||
my $argstring;
|
||||
|
||||
my $canonized = canonize("func" , $func, "", $opt_book);
|
||||
print " <refentry id=\"$canonized\">\n";
|
||||
|
||||
### name and short description:
|
||||
cleanse(\$f->{'des'}, $opt_book);
|
||||
print " <refnamediv>\n";
|
||||
print " <refname>$func</refname>\n";
|
||||
print " <refpurpose>$f->{'des'}</refpurpose>\n";
|
||||
print " </refnamediv>\n";
|
||||
|
||||
### usage:
|
||||
print " <refsynopsisdiv>\n";
|
||||
print " <title>Use</title>\n";
|
||||
print " <funcsynopsis>\n";
|
||||
print " <funcprototype>\n";
|
||||
print " <funcdef><function>$func</function></funcdef>\n";
|
||||
if (@{$f->{'args'}}) {
|
||||
foreach my $arg (@{$f->{'args'}}) {
|
||||
print " <paramdef><parameter>$arg->{'name'}</parameter></paramdef>\n";
|
||||
}
|
||||
}
|
||||
print " </funcprototype>\n";
|
||||
print " </funcsynopsis>\n";
|
||||
print " </refsynopsisdiv>\n";
|
||||
|
||||
### arguments:
|
||||
if (@{$f->{'args'}}) {
|
||||
print " <refsect1>\n";
|
||||
print " <title>Arguments</title>\n";
|
||||
print " <itemizedlist>\n";
|
||||
|
||||
foreach my $arg (@{$f->{'args'}}) {
|
||||
print " <listitem><formalpara>\n";
|
||||
print " <title>$arg->{'name'}</title>\n";
|
||||
my $des = $arg->{'des'};
|
||||
cleanse(\$des, $opt_book);
|
||||
print " <para>$des</para>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
}
|
||||
print " </itemizedlist>\n";
|
||||
print " </refsect1>\n";
|
||||
}
|
||||
|
||||
### info:
|
||||
if ($f->{'info'}) {
|
||||
cleanse(\$f->{'info'}, $opt_book);
|
||||
print " <refsect1>\n";
|
||||
print " <title>Info</title>\n";
|
||||
print " <para>$f->{'info'}</para>\n";
|
||||
print " </refsect1>\n";
|
||||
}
|
||||
|
||||
### source file:
|
||||
print " <refsect1>\n";
|
||||
print " <title>Source:</title>\n";
|
||||
print " <para><filename>$f->{'source'}</filename></para>\n";
|
||||
print " </refsect1>\n";
|
||||
|
||||
### returning:
|
||||
if ($f->{'returns'}) {
|
||||
cleanse(\$f->{'returns'}, $opt_book);
|
||||
print " <refsect1>\n";
|
||||
print " <title>Returns:</title>\n";
|
||||
print " <para>$f->{'returns'}</para>\n";
|
||||
print " </refsect1>\n";
|
||||
}
|
||||
|
||||
print " </refentry>\n";
|
||||
}
|
||||
|
||||
print "</reference>\n";
|
||||
19
livejournal/doc/raw/build/api/apidoc.conf
Executable file
19
livejournal/doc/raw/build/api/apidoc.conf
Executable file
@@ -0,0 +1,19 @@
|
||||
basedir $LJHOME
|
||||
dodir cgi-bin
|
||||
|
||||
class general General
|
||||
class api API
|
||||
class db Database
|
||||
class logging Logging
|
||||
class time Date & Time
|
||||
class component Components
|
||||
class s1 Style System v1
|
||||
class security Security
|
||||
class web Web Programming
|
||||
class text Text Processing
|
||||
|
||||
arg dbarg Deprecated; a master database handle ($dbh) or a master/slave set of database handles ($dbs).
|
||||
arg hookname Name of hook. See doc/hooks.txt.
|
||||
arg u A hashref of a row from the user table, sometimes called a "user object". Although only initially a row from the user table, gets a lot of tacked onto it from various other LJ API functions.
|
||||
arg remote Hashref of remote user containing \'user\' and \'userid\' keys if obtained from [func[LJ::get_remote]] or just \'user\' if untrusted and obtained from [func[LJ::get_remote_noauth]].
|
||||
arg dbcm Cluster master database handle
|
||||
15
livejournal/doc/raw/build/caps/cap-local.pl
Executable file
15
livejournal/doc/raw/build/caps/cap-local.pl
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
use vars qw(%cap_local);
|
||||
|
||||
$caps_local{'paid'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User has paid for their account type.',
|
||||
};
|
||||
$caps_local{'fastserver'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User has access to the faster (paid) servers.',
|
||||
};
|
||||
167
livejournal/doc/raw/build/caps/cap2db.pl
Executable file
167
livejournal/doc/raw/build/caps/cap2db.pl
Executable file
@@ -0,0 +1,167 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
use vars qw(%caps_general %caps_local);
|
||||
|
||||
my $LJHOME = $ENV{'LJHOME'};
|
||||
|
||||
require "$LJHOME/doc/raw/build/docbooklib.pl";
|
||||
|
||||
if (-e "$LJHOME/doc/raw/build/caps/cap-local.pl") {
|
||||
require "$LJHOME/doc/raw/build/caps/cap-local.pl";
|
||||
}
|
||||
|
||||
$caps_general{'checkfriends'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can use checkfriends.',
|
||||
};
|
||||
$caps_general{'checkfriends_interval'} = {
|
||||
type => 'integer',
|
||||
desc => 'Time before clients can call "checkfriends" (use min).',
|
||||
};
|
||||
$caps_general{'synd_create'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can create syndicated accounts.',
|
||||
};
|
||||
$caps_general{'findsim'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User is able to use the similar interests matching feature',
|
||||
};
|
||||
$caps_general{'friendsfriendsview'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User\'s "friends of friends" /friendsfriends view is enabled',
|
||||
};
|
||||
$caps_general{'friendsviewupdate'} = {
|
||||
type => 'integer',
|
||||
desc => 'After how many seconds user see new friends view items.',
|
||||
};
|
||||
$caps_general{'makepoll'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can user make a poll',
|
||||
};
|
||||
$caps_general{'maxfriends'} = {
|
||||
type => 'integer',
|
||||
desc => 'Maximum number of friends that are allowed per account',
|
||||
};
|
||||
$caps_general{'moodthemecreate'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can create new mood themes.',
|
||||
};
|
||||
$caps_general{'readonly'} = {
|
||||
type => 'boolean',
|
||||
desc => 'No writes to the database for this journal are permitted. '.
|
||||
'(this is used by cluster management tool: a journal is readonly '.
|
||||
'while it is being moved to another cluster)',
|
||||
};
|
||||
$caps_general{'styles'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can create & use their own styles.',
|
||||
};
|
||||
$caps_general{'textmessage'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User can use text messaging.',
|
||||
};
|
||||
$caps_general{'todomax'} = {
|
||||
type => 'integer',
|
||||
desc => 'Maximum number of todo items allowed',
|
||||
};
|
||||
$caps_general{'todosec'} = {
|
||||
type => 'boolean',
|
||||
desc => 'Can user make non-public todo items?',
|
||||
};
|
||||
$caps_general{'userdomain'} = {
|
||||
type => 'boolean',
|
||||
desc => 'Can view journal at http://user.$LJ::DOMAIN/',
|
||||
};
|
||||
$caps_general{'useremail'} = {
|
||||
type => 'boolean',
|
||||
desc => 'User has email address @$LJ::USER_DOMAIN',
|
||||
};
|
||||
$caps_general{'userpics'} = {
|
||||
type => 'integer',
|
||||
desc => 'Maximum number of user pictures allowed.',
|
||||
};
|
||||
$caps_general{'hide_email_after'} = {
|
||||
type => 'integer',
|
||||
desc => "Hide an account's email address who has not used the site in a time period longer than the given setting. ".
|
||||
"If 0, the email is never hidden. The time period is in days.",
|
||||
};
|
||||
$caps_general{'weblogscom'} = {
|
||||
type => 'boolean',
|
||||
desc => "Allow the account to ping weblogs.com with new updates",
|
||||
};
|
||||
$caps_general{'full_rss'} = {
|
||||
type => 'boolean',
|
||||
desc => "Show the full text in the RSS view",
|
||||
};
|
||||
$caps_general{'get_comments'} = {
|
||||
type => 'boolean',
|
||||
desc => "Can receive comments",
|
||||
};
|
||||
$caps_general{'leave_comments'} = {
|
||||
type => 'boolean',
|
||||
desc => "Can leave comments on other accounts",
|
||||
};
|
||||
$caps_general{'can_post'} = {
|
||||
type => 'boolean',
|
||||
desc => "Can post new entries",
|
||||
};
|
||||
$caps_general{'rateperiod-failed_login'} = {
|
||||
type => 'integer',
|
||||
desc => "The period of time an account can try to repeat logging in for",
|
||||
};
|
||||
$caps_general{'rateallowed-failed_login'} = {
|
||||
type => 'integer',
|
||||
desc => "How many times a period an account can try to log in for",
|
||||
};
|
||||
$caps_general{'s2everything'} = {
|
||||
type => 'boolean',
|
||||
desc => "Can use all properties of S2 layouts",
|
||||
};
|
||||
$caps_general{'friendspopwithfriends'} = {
|
||||
type => 'boolean',
|
||||
desc => "Can use <quote>Popular with Friends</quote> tool",
|
||||
};
|
||||
$caps_general{'emailpost'} = {
|
||||
type => 'boolean',
|
||||
desc => "User has ability to post via an email gateway.",
|
||||
};
|
||||
$caps_general{'disable_can_post'} = {
|
||||
type => "boolean",
|
||||
desc => "Posting new journal entries is disabled for this account, presumably because a trial period of some sort has expired.",
|
||||
};
|
||||
$caps_general{'disable_get_comments'} = {
|
||||
type => "boolean",
|
||||
desc => "Getting new comments in this journal is disabled, presumably because a trial period of some sort has expired.",
|
||||
};
|
||||
$caps_general{'disable_leave_comments'} = {
|
||||
type => "boolean",
|
||||
desc => "This account can no longer leave comments, presumably because a trial period of some sort has expired.",
|
||||
};
|
||||
|
||||
|
||||
sub dump_caps
|
||||
{
|
||||
my $title = shift;
|
||||
my $caps = shift;
|
||||
print "<variablelist>\n <title>$title Capabilities</title>\n";
|
||||
foreach my $cap (sort keys %$caps)
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
print " <term><literal role=\"cap.class\">$cap</literal></term>\n";
|
||||
print " <listitem><para>\n";
|
||||
print " (<emphasis>$caps->{$cap}->{'type'}</emphasis>) - $caps->{$cap}->{'desc'}\n";
|
||||
print " </para></listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print "</variablelist>\n";
|
||||
}
|
||||
|
||||
dump_caps("General", \%caps_general);
|
||||
if (%caps_local) { dump_caps("Local", \%caps_local); }
|
||||
13
livejournal/doc/raw/build/chunk.xsl
Executable file
13
livejournal/doc/raw/build/chunk.xsl
Executable file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="xsl-docbook/html/chunk.xsl"/>
|
||||
|
||||
<xsl:include href="ljdocs2html.xsl"/>
|
||||
|
||||
<xsl:param name="chunk.section.depth" select="1"/>
|
||||
|
||||
<xsl:param name="chunk.first.sections" select="1"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
39
livejournal/doc/raw/build/console/console2db.pl
Executable file
39
livejournal/doc/raw/build/console/console2db.pl
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/console.pl";
|
||||
my $ret;
|
||||
|
||||
$ret .= "<variablelist><title>Administrative Console Commands</title>\n";
|
||||
foreach my $cmdname (sort keys %LJ::Con::cmd) {
|
||||
my $cmd = $LJ::Con::cmd{$cmdname};
|
||||
next if ($cmd->{'hidden'});
|
||||
$ret .= "<varlistentry>\n";
|
||||
$ret .= " <term><literal role=\"console.command\">$cmdname</literal></term>\n";
|
||||
my $des = $cmd->{'des'};
|
||||
cleanse(\$des);
|
||||
$ret .= " <listitem><para>\n$des\n";
|
||||
if ($cmd->{'args'}) {
|
||||
$ret .= " <itemizedlist>\n <title>Arguments:</title>\n";
|
||||
my @args = @{$cmd->{'args'}};
|
||||
while (my ($argname, $argdes) = splice(@args, 0, 2)) {
|
||||
$ret .= " <listitem><formalpara>";
|
||||
$ret .= "<title>$argname</title>\n";
|
||||
cleanse(\$argdes);
|
||||
$ret .= " <para>$argdes</para>\n";
|
||||
$ret .= " </formalpara></listitem>\n";
|
||||
}
|
||||
$ret .= " </itemizedlist>\n";
|
||||
}
|
||||
$ret .= " </para></listitem>\n";
|
||||
$ret .= "</varlistentry>\n";
|
||||
}
|
||||
$ret .= "</variablelist>\n";
|
||||
print $ret;
|
||||
87
livejournal/doc/raw/build/db/db2ref.xsl
Executable file
87
livejournal/doc/raw/build/db/db2ref.xsl
Executable file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!-- LiveJournal XSLT stylesheet created by Tribeless Nomad (AJW) -->
|
||||
<!-- converts DB schema documentation from custom XML to DocBook XML -->
|
||||
<!-- The source document should comply with dbschema.dtd version 1.0.4. -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<xsl:for-each select="dbschema/dbtbl">
|
||||
<refentry><xsl:attribute name="id"><xsl:text>ljp.dbschema.</xsl:text><xsl:value-of select="@id"/></xsl:attribute>
|
||||
<refnamediv>
|
||||
<refname><database class="table"><xsl:value-of select="name"/></database></refname>
|
||||
<refpurpose><xsl:apply-templates select="description/node()"/></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title><database class="table"><xsl:value-of select="name"/></database></title>
|
||||
<informaltable><tgroup cols="5">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Column name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Null</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="dbcol">
|
||||
<row>
|
||||
<entry><database class="field"><xsl:value-of select="name"/></database></entry>
|
||||
<entry><type><xsl:value-of select="@type"/></type></entry>
|
||||
<entry align="center"><xsl:if test="@required[.='false']">YES</xsl:if></entry>
|
||||
<entry align="center"><xsl:if test="@default"><literal role="value"><xsl:value-of select="@default"/></literal></xsl:if></entry>
|
||||
<entry><xsl:apply-templates select="description/node()"/></entry>
|
||||
</row>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</tgroup></informaltable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="dbkey">
|
||||
<informaltable><tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Key name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Column(s)</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="dbkey">
|
||||
<row>
|
||||
<entry>
|
||||
<database class="key1"><xsl:value-of select="@name"/></database>
|
||||
</entry>
|
||||
<entry>
|
||||
<type><xsl:value-of select="@type"/></type>
|
||||
</entry>
|
||||
<entry>
|
||||
<xsl:for-each select="@colids">
|
||||
<database class="field"><xsl:value-of select="name"/></database>
|
||||
|
||||
<xsl:if test="position() != last()">, </xsl:if>
|
||||
</xsl:for-each>
|
||||
</entry>
|
||||
</row>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</tgroup></informaltable>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<para>No keys defined.</para>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="dbtblref"><link><xsl:attribute name="linkend"><xsl:text>ljp.dbschema.</xsl:text><xsl:value-of select="@tblid"/></xsl:attribute><database class="table"><xsl:value-of select="."/></database></link></xsl:template>
|
||||
<xsl:template match="dbcolref"><database class="field"><xsl:value-of select="."/></database></xsl:template>
|
||||
|
||||
<!-- I don't think the following template should be necessary, but in IE5 it is: -->
|
||||
<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
23
livejournal/doc/raw/build/db/dbschema.dtd
Executable file
23
livejournal/doc/raw/build/db/dbschema.dtd
Executable file
@@ -0,0 +1,23 @@
|
||||
<!ELEMENT dbschema (dbtbl+)>
|
||||
|
||||
<!ELEMENT dbtbl (name, description?, dbcol+, dbkey*, data?)>
|
||||
<!ATTLIST dbtbl id ID #IMPLIED public_browsable (0|1) #IMPLIED>
|
||||
|
||||
<!ELEMENT dbcol (name, description?)>
|
||||
<!ATTLIST dbcol type CDATA #REQUIRED size CDATA #IMPLIED required (true|false) #REQUIRED default CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT dbkey EMPTY>
|
||||
<!ATTLIST dbkey name NMTOKEN #IMPLIED type (INDEX|UNIQUE|PRIMARY) #REQUIRED colids IDREFS #REQUIRED>
|
||||
|
||||
<!ELEMENT data ANY>
|
||||
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
|
||||
<!ELEMENT description (#PCDATA | dbtblref | dbcolref)*>
|
||||
|
||||
<!ELEMENT dbtblref (#PCDATA)>
|
||||
<!ATTLIST dbtblref tblid IDREF #REQUIRED>
|
||||
|
||||
<!ELEMENT dbcolref (#PCDATA)>
|
||||
<!ATTLIST dbcolref colid IDREF #REQUIRED>
|
||||
|
||||
125
livejournal/doc/raw/build/db/dbschema.pl
Executable file
125
livejournal/doc/raw/build/db/dbschema.pl
Executable file
@@ -0,0 +1,125 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my $dbr = LJ::get_dbh("slave", "master");
|
||||
my $sth;
|
||||
|
||||
sub magic_links
|
||||
{
|
||||
my $des = shift;
|
||||
$$des =~ s!<!<!g;
|
||||
$$des =~ s!>!>!g;
|
||||
$$des =~ s!\[dbtable\[(\w+?)\]\]!<dbtblref tblid="$1">$1</dbtblref>!g;
|
||||
}
|
||||
|
||||
sub dump_xml
|
||||
{
|
||||
my $tables = shift;
|
||||
|
||||
print "<?xml version=\"1.0\" ?>\n";
|
||||
print "<!DOCTYPE dbschema SYSTEM \"dbschema.dtd\">\n";
|
||||
print "<dbschema>\n";
|
||||
foreach my $table (sort keys %$tables)
|
||||
{
|
||||
print "<dbtbl id=\"$table\">\n";
|
||||
|
||||
# table name
|
||||
print "<name>$table</name>\n";
|
||||
|
||||
# description of table
|
||||
if ($tables->{$table}->{'des'}) {
|
||||
my $des = $tables->{$table}->{'des'};
|
||||
magic_links(\$des);
|
||||
print "<description>$des</description>\n";
|
||||
}
|
||||
|
||||
# columns
|
||||
foreach my $col (@{$tables->{$table}->{'cols'}})
|
||||
{
|
||||
print "<dbcol id=\"$table.$col->{'name'}\" type=\"$col->{'type'}\" required=\"$col->{'required'}\" default=\"$col->{'default'}\">\n";
|
||||
print "<name>$col->{'name'}</name>\n";
|
||||
if ($col->{'des'}) {
|
||||
my $des = $col->{'des'};
|
||||
magic_links(\$des);
|
||||
print "<description>$des</description>\n";
|
||||
}
|
||||
print "</dbcol>\n";
|
||||
}
|
||||
|
||||
# indexes
|
||||
foreach my $indexname (sort keys %{$tables->{$table}->{'index'}})
|
||||
{
|
||||
my $index = $tables->{$table}->{'index'}->{$indexname};
|
||||
|
||||
print "<dbkey name=\"$indexname\" type=\"$index->{'type'}\" colids=\"", join(" ", @{$index->{'cols'}}), "\" />\n";
|
||||
}
|
||||
|
||||
print "</dbtbl>\n";
|
||||
}
|
||||
print "</dbschema>\n";
|
||||
}
|
||||
|
||||
my %table;
|
||||
my %coldes;
|
||||
|
||||
foreach (`$ENV{'LJHOME'}/bin/upgrading/update-db.pl --listtables`) {
|
||||
chomp;
|
||||
$table{$_} = {};
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SELECT tablename, public_browsable, des FROM schematables");
|
||||
$sth->execute;
|
||||
while (my ($name, $public, $des) = $sth->fetchrow_array) {
|
||||
next unless (defined $table{$name});
|
||||
$table{$name} = { 'public' => $public, 'des' => $des };
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SELECT tablename, colname, des FROM schemacols");
|
||||
$sth->execute;
|
||||
while (my ($table, $col, $des) = $sth->fetchrow_array) {
|
||||
next unless (defined $table{$table});
|
||||
$coldes{$table}->{$col} = $des;
|
||||
}
|
||||
|
||||
foreach my $table (sort keys %table)
|
||||
{
|
||||
$sth = $dbr->prepare("DESCRIBE $table");
|
||||
$sth->execute;
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
my $col = {};
|
||||
$col->{'name'} = $r->{'Field'};
|
||||
|
||||
my $type = $r->{'Type'};
|
||||
$type =~ s/int\(\d+\)/int/g;
|
||||
if ($r->{'Extra'} eq "auto_increment") {
|
||||
$type .= " auto_increment";
|
||||
}
|
||||
$col->{'type'} = $type;
|
||||
|
||||
$col->{'default'} = $r->{'Default'};
|
||||
$col->{'required'} = $r->{'Null'} eq "YES" ? "false" : "true";
|
||||
|
||||
$col->{'des'} = $coldes{$table}->{$r->{'Field'}};
|
||||
|
||||
push @{$table{$table}->{'cols'}}, $col;
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SHOW INDEX FROM $table");
|
||||
$sth->execute;
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
my $name = $r->{'Key_name'};
|
||||
my $type = $r->{'Non_unique'} ? "INDEX" : "UNIQUE";
|
||||
if ($name eq "PRIMARY") { $type = "PRIMARY"; }
|
||||
|
||||
$table{$table}->{'index'}->{$name}->{'type'} = $type;
|
||||
push @{$table{$table}->{'index'}->{$name}->{'cols'}}, "$table.$r->{'Column_name'}";
|
||||
}
|
||||
}
|
||||
|
||||
dump_xml(\%table);
|
||||
56
livejournal/doc/raw/build/docbooklib.pl
Executable file
56
livejournal/doc/raw/build/docbooklib.pl
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my %special = (
|
||||
'logprops' => '<xref linkend="ljp.csp.proplist" />',
|
||||
'ljhome' => '<envar><link linkend="lj.install.ljhome">\$LJHOME</link></envar>',
|
||||
'helpurls' => '<xref linkend="lj.install.ljconfig.helpurls" />',
|
||||
'disabled' => '<xref linkend="lj.install.ljconfig.disabled" />',
|
||||
'reluser' => '<xref linkend="ljp.db.reluser" />',
|
||||
'cspversion' => '<xref linkend="ljp.csp.versions" />',
|
||||
);
|
||||
|
||||
sub cleanse
|
||||
{
|
||||
my $text = shift;
|
||||
# Escape bare ampersands
|
||||
$$text =~ s/&(?!(?:[a-zA-Z0-9]+|#\d+);)/&/g;
|
||||
# Escape HTML
|
||||
$$text =~ s/</</g;
|
||||
$$text =~ s/>/>/g;
|
||||
# Convert intended markup to docbook
|
||||
$$text =~ s/<b>(.+?)<\/b>/<emphasis role='bold'>$1<\/emphasis>/ig;
|
||||
$$text =~ s/<tt>(.+?)<\/tt>/<literal>$1<\/literal>/ig;
|
||||
$$text =~ s/<i>(.+?)<\/i>/<replaceable type='parameter'>$1<\/replaceable>/ig;
|
||||
$$text =~ s/<u>(.+?)<\/u>/<emphasis>$1<\/emphasis>/ig;
|
||||
xlinkify($text);
|
||||
}
|
||||
|
||||
sub canonize
|
||||
{
|
||||
my $type = lc(shift);
|
||||
my $name = shift;
|
||||
my $function = shift;
|
||||
my $string = lc($name);
|
||||
if ($type eq "func") {
|
||||
$string =~ s/::/./g;
|
||||
my $format = "ljp.api.$string";
|
||||
$string = $function eq "link" ? "<link linkend=\"$format\">$name</link>" : $format;
|
||||
} elsif($type eq "dbtable") {
|
||||
$string = "<link linkend=\"ljp.dbschema.$string\">$name</link>";
|
||||
} elsif($type eq "special") {
|
||||
$string = %special->{$string};
|
||||
} elsif($type eq "ljconfig") {
|
||||
$string = "<xref linkend=\"ljconfig.$string\" />";
|
||||
} elsif($type eq "var") {
|
||||
$string = "<xref linkend=\"ljp.styles.s1.$string\" />";
|
||||
}
|
||||
}
|
||||
|
||||
sub xlinkify
|
||||
{
|
||||
my $a = shift;
|
||||
$$a =~ s/\[(\S+?)\[(\S+?)\]\]/canonize($1, $2, "link")/ge;
|
||||
}
|
||||
185
livejournal/doc/raw/build/generate.pl
Executable file
185
livejournal/doc/raw/build/generate.pl
Executable file
@@ -0,0 +1,185 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
|
||||
my $XSL_VERSION_RECOMMENDED = "1.55.0";
|
||||
|
||||
my $opt_clean;
|
||||
my ($opt_myxsl, $opt_getxsl, $opt_single);
|
||||
exit 1 unless GetOptions('clean' => \$opt_clean,
|
||||
'myxsl' => \$opt_myxsl,
|
||||
'getxsl' => \$opt_getxsl,
|
||||
'single' => \$opt_single,
|
||||
);
|
||||
|
||||
my $home = $ENV{'LJHOME'};
|
||||
require "$home/cgi-bin/ljlib.pl";
|
||||
$ENV{'SGML_CATALOG_FILES'} = $LJ::CATALOG_FILES || "/usr/share/sgml/docbook/dtd/xml/4.1/docbook.cat";
|
||||
|
||||
unless (-e $ENV{'SGML_CATALOG_FILES'}) {
|
||||
die "Catalog files don't exist. Either set \$LJ::CATALOG_FILES, install docbook-xml (on Debian), or symlink $ENV{'SGML_CATALOG_FILES'} to XML DocBook 4.1's docbook.cat.";
|
||||
}
|
||||
|
||||
die "Siteroot not set" unless $LJ::SITEROOT;
|
||||
open F, "> $home/doc/raw/entities/pregen.ent" or die "Can't open pregen.ent : $!";
|
||||
{
|
||||
print F "<!ENTITY siteroot '$LJ::SITEROOT'>\n";
|
||||
}
|
||||
close F;
|
||||
|
||||
if ($opt_getxsl) {
|
||||
chdir "$home/doc/raw/build" or die "Where is build dir?";
|
||||
unlink "xsl-docbook.tar.gz";
|
||||
my $fetched = 0;
|
||||
my $url = "http://www.livejournal.org/misc/xsl-docbook.tar.gz";
|
||||
my @fetcher = ([ 'wget', "wget $url", ],
|
||||
[ 'lynx', "lynx -source $url > xsl-docbook.tar.gz", ],
|
||||
[ 'GET', "GET $url > xsl-docbook.tar.gz", ]);
|
||||
foreach my $fet (@fetcher) {
|
||||
next if $fetched;
|
||||
print "Looking for $fet->[0] ...\n";
|
||||
next unless `which $fet->[0]`;
|
||||
print "RUNNING: $fet->[1]\n";
|
||||
system($fet->[1])
|
||||
and die "Error running $fet->[0]. Interrupted?\n";
|
||||
$fetched = 1;
|
||||
}
|
||||
unless ($fetched) {
|
||||
die "Couldn't find a program to download things from the web. I looked for:\n\t".
|
||||
join(", ", map { $_->[0] } @fetcher) . "\n";
|
||||
}
|
||||
system("tar", "zxvf", "xsl-docbook.tar.gz")
|
||||
and die "Error extracting xsl-doxbook.tar.gz; have GNU tar?\n";
|
||||
}
|
||||
|
||||
my $output_dir = "$home/htdocs/doc/server";
|
||||
my $docraw_dir = "$home/doc/raw";
|
||||
my $XSL = "$docraw_dir/build/xsl-docbook";
|
||||
my $stylesheet = "$XSL/html/chunk.xsl";
|
||||
open (F, "$XSL/VERSION");
|
||||
my $XSL_VERSION;
|
||||
{
|
||||
local $/ = undef; my $file = <F>;
|
||||
$XSL_VERSION = $1 if $file =~ /VERSION.+\>(.+?)\</;
|
||||
}
|
||||
close F;
|
||||
my $download;
|
||||
if ($XSL_VERSION && $XSL_VERSION ne $XSL_VERSION_RECOMMENDED && ! $opt_myxsl) {
|
||||
print "\nUntested DocBook XSL found at $XSL.\n";
|
||||
print " Your version: $XSL_VERSION.\n";
|
||||
print " Recommended: $XSL_VERSION_RECOMMENDED.\n\n";
|
||||
print "Options at this point. Re-run with:\n";
|
||||
print " --myxsl to proceed with yours, or\n";
|
||||
print " --getxsl to install recommended XSL\n\n";
|
||||
exit 1;
|
||||
}
|
||||
if (! $XSL_VERSION) {
|
||||
print "\nDocBook XSL not found at $XSL.\n\nEither symlink that dir to the right ";
|
||||
print "place (preferrably at version $XSL_VERSION_RECOMMENDED),\nor re-run with --getxsl ";
|
||||
print "for me to do it for you.\n\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
chdir "$docraw_dir/build" or die;
|
||||
|
||||
print "Generating API reference\n";
|
||||
system("api/api2db.pl --exclude=BML:: --book=ljp > $docraw_dir/ljp.book/api/api.gen.xml")
|
||||
and die "Errror generating General API reference.\n";
|
||||
system("api/api2db.pl --include=BML:: --book=bml > $docraw_dir/bml.book/api.gen.xml")
|
||||
and die "Errror generating BML API reference.\n";
|
||||
|
||||
print "Generating DB Schema reference\n";
|
||||
chdir "$docraw_dir/build/db" or die;
|
||||
system("./dbschema.pl > dbschema.gen.xml")
|
||||
and die "Error generating DB schema\n";
|
||||
|
||||
my $err = system("xsltproc", "-o", "$docraw_dir/ljp.book/db/schema.gen.xml",
|
||||
"db2ref.xsl", "dbschema.gen.xml");
|
||||
if ($err == -1) { die "Error; Package 'xsltproc' not installed?\n"; }
|
||||
elsif ($err) { $err<<8; die "Error transforming DB schema. (error=$err)\n"; }
|
||||
|
||||
unlink "dbschema.gen.xml";
|
||||
|
||||
print "Generating XML-RPC protocol reference\n";
|
||||
chdir "$docraw_dir/build/protocol" or die;
|
||||
system("xsltproc", "-o", "$docraw_dir/ljp.book/csp/xml-rpc/protocol.gen.xml",
|
||||
"xml-rpc2db.xsl", "xmlrpc.xml")
|
||||
and die "Error processing protocol reference.\n";
|
||||
|
||||
print "Generating Flat protocol reference\n";
|
||||
system("./flat2db.pl > $docraw_dir/ljp.book/csp/flat/protocol.gen.xml")
|
||||
and die "Error processing protocol reference.\n";
|
||||
|
||||
print "Generating Log Prop List\n";
|
||||
system("./proplist2db.pl > $docraw_dir/ljp.book/csp/proplist.ref.gen.xml")
|
||||
and die "Error generating log prop list\n";
|
||||
|
||||
print "Generating Privilege list reference\n";
|
||||
chdir "$docraw_dir/build/priv" or die;
|
||||
system("./priv2db.pl > $docraw_dir/lj.book/admin/privs.ref.gen.xml")
|
||||
and die "Error generating privilege list\n";
|
||||
|
||||
print "Generating Console Command Reference\n";
|
||||
chdir "$docraw_dir/build/console" or die;
|
||||
system("./console2db.pl > $docraw_dir/lj.book/admin/console.ref.gen.xml")
|
||||
and die "Error generating console reference\n";
|
||||
|
||||
print "Generating Capability Class Reference\n";
|
||||
chdir "$docraw_dir/build/caps" or die;
|
||||
system("./cap2db.pl > $docraw_dir/lj.book/admin/cap.ref.gen.xml")
|
||||
and die "Error generating caps reference\n";
|
||||
system("./cap2db.pl > $docraw_dir/ljp.book/int/cap.ref.gen.xml")
|
||||
and die "Error generating caps reference\n";
|
||||
|
||||
print "Generating Hook Function Reference\n";
|
||||
chdir "$docraw_dir/build/hooks" or die;
|
||||
system("./hooks2db.pl > $docraw_dir/lj.book/customize/hooks.ref.gen.xml")
|
||||
and die "Error generating hooks reference\n";
|
||||
system("./hooks2db.pl > $docraw_dir/ljp.book/int/hooks.ref.gen.xml")
|
||||
and die "Error generating hooks reference\n";
|
||||
|
||||
print "Generating Configuration Variable Reference\n";
|
||||
chdir "$docraw_dir/build/ljconfig" or die;
|
||||
system("./ljconfig2db.pl > $docraw_dir/lj.book/install/ljconfig.vars.gen.xml")
|
||||
and die "Error generating ljconfig.pl variable reference\n";
|
||||
|
||||
print "Generating S1 Variable Reference\n";
|
||||
chdir "$docraw_dir/s1" or die;
|
||||
system("./s1ref2db.pl > $docraw_dir/ljp.book/styles/s1/ref.gen.xml")
|
||||
and die "Error generating s1 variable reference\n";
|
||||
|
||||
print "Generating Perl Module List\n";
|
||||
chdir "$docraw_dir/build/install" or die;
|
||||
system("./modulelist2db.pl > $docraw_dir/lj.book/install/perl.module.gen.xml")
|
||||
and die "Error generating perl module list\n";
|
||||
|
||||
print "Converting to HTML\n";
|
||||
mkdir $output_dir, 0755 unless -d $output_dir;
|
||||
chdir $output_dir or die "Couldn't chdir to $output_dir\n";
|
||||
|
||||
my $cssparam;
|
||||
if (-e "$docraw_dir/build/style.css") {
|
||||
$cssparam = "--stringparam html.stylesheet style.css";
|
||||
system("cp", "$docraw_dir/build/style.css", "$output_dir")
|
||||
and die "Error copying stylesheet.\n";
|
||||
}
|
||||
|
||||
system("xsltproc --nonet --catalogs $cssparam ".
|
||||
"$docraw_dir/build/chunk.xsl $docraw_dir/index.xml")
|
||||
and die "Error generating chunked HTML.\n";
|
||||
|
||||
if ($opt_single)
|
||||
{
|
||||
system("xsltproc --nonet --catalogs --output manual.html $cssparam ".
|
||||
"$docraw_dir/build/nochunk.xsl $docraw_dir/index.xml")
|
||||
and die "Error generating single HTML.\n";
|
||||
}
|
||||
|
||||
if ($opt_clean) {
|
||||
print "Removing Auto-generated files\n";
|
||||
system("find $docraw_dir -name '*.gen.*' -exec rm {} \;");
|
||||
}
|
||||
404
livejournal/doc/raw/build/hooks/hooks2db.pl
Executable file
404
livejournal/doc/raw/build/hooks/hooks2db.pl
Executable file
@@ -0,0 +1,404 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
use vars qw(%hooks);
|
||||
|
||||
my $LJHOME = $ENV{'LJHOME'};
|
||||
|
||||
require "$LJHOME/doc/raw/build/docbooklib.pl";
|
||||
|
||||
$hooks{'canonicalize_url'} = {
|
||||
desc => "Cleans up a <abbrev>URL</abbrev> into its canonical form.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "<abbrev>URL</abbrev> to be cleaned",
|
||||
'name' => "\$url",
|
||||
}
|
||||
],
|
||||
source => ["bin/maint/stats.pl"],
|
||||
};
|
||||
|
||||
$hooks{'emailconfirmed'} = {
|
||||
desc => "After a user has confirmed their email address, this hook is called ".
|
||||
"with a dbs/dbh and a user object. This is useful to update a ".
|
||||
"database alias table which you also have your mail system using for ".
|
||||
"address lookups.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Either a dbs or dbh resource object.",
|
||||
'name' => "\$dbarg",
|
||||
},
|
||||
{
|
||||
'desc' => "User object.",
|
||||
'name' => "\$u",
|
||||
},
|
||||
],
|
||||
source => ["htdocs/register.bml"],
|
||||
};
|
||||
|
||||
$hooks{'login_formopts'} = {
|
||||
desc => "Returns extra <abbrev>HTML</abbrev> for login options on login.bml",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "Scalar return reference",
|
||||
'name' => "ret",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/login.bml"],
|
||||
};
|
||||
|
||||
$hooks{'modify_login_menu'} = {
|
||||
desc => "Modifies or resets entirely the web menu data structure that is sent to the client.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "Menu item",
|
||||
'name' => "menu",
|
||||
},
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
{
|
||||
'desc' => "Resource object",
|
||||
'name' => "dbs",
|
||||
},
|
||||
{
|
||||
'desc' => "Username string",
|
||||
'name' => "user",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljprotocol.pl"],
|
||||
};
|
||||
|
||||
$hooks{'post_login'} = {
|
||||
desc => "Action to take after logging in, before HTML is sent to ".
|
||||
"to client (possible to print HTTP headers directly)",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
{
|
||||
'desc' => "Hash of form elements",
|
||||
'name' => "form",
|
||||
},
|
||||
{
|
||||
'desc' => "Used for cookies. Can either be a unix timestamp, or '0' for session cookies.",
|
||||
'name' => "expiretime",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/login.bml", "htdocs/talkread_do.bml"],
|
||||
};
|
||||
|
||||
$hooks{'post_changepassword'} = {
|
||||
desc => "Action to take after changing password, before HTML is sent to ".
|
||||
"to client (possible to print HTTP headers directly)",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
{
|
||||
'desc' => "Resource object",
|
||||
'name' => "dbs",
|
||||
},
|
||||
{
|
||||
'desc' => "New password.",
|
||||
'name' => "newpassword",
|
||||
},
|
||||
{
|
||||
'desc' => "Old password.",
|
||||
'name' => "oldpassword",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/changepassword.bml"],
|
||||
};
|
||||
|
||||
$hooks{'post_create'} = {
|
||||
desc => "Action to take after creating an account.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "Resource object",
|
||||
'name' => "dbs",
|
||||
},
|
||||
{
|
||||
'desc' => "Username string",
|
||||
'name' => "user",
|
||||
},
|
||||
{
|
||||
'desc' => "Integer",
|
||||
'name' => "userid",
|
||||
},
|
||||
{
|
||||
'desc' => "Auth code, if in use",
|
||||
'name' => "code",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljlib.pl"],
|
||||
};
|
||||
|
||||
$hooks{'userinfo_html_by_user'} = {
|
||||
desc => "Extra <abbrev>HTML</abbrev> to show next to username & id on <filename>userinfo.bml</filename>",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "Scalar return reference",
|
||||
'name' => "ret",
|
||||
},
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/userinfo.bml"],
|
||||
};
|
||||
|
||||
$hooks{'userinfo_rows'} = {
|
||||
desc => "Returns a two-element arrayref for a row on a userinfo page, ".
|
||||
"containing first the left side label, then the body.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "Resource Object (read-only)",
|
||||
'name' => "dbr",
|
||||
},
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
{
|
||||
'desc' => "Remote user object",
|
||||
'name' => "remote",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/userinfo.bml"],
|
||||
};
|
||||
|
||||
$hooks{'validate_get_remote'} = {
|
||||
desc => "This hook lets you ignore the remote user's cookies or flag them ".
|
||||
"as intentionally forged to LJ::get_remote(). If you return a ".
|
||||
"true value, no action is taken. If you return false, <function>LJ::get_remote()</function> ".
|
||||
"returns undef. You can optionally set <literal>\$\$criterr</literal> to something true as well.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Hash of arguments",
|
||||
'name' => "\%args",
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "May be an empty string or undef",
|
||||
'name' => "user",
|
||||
},
|
||||
{
|
||||
'desc' => "May be 0",
|
||||
'name' => "userid",
|
||||
},
|
||||
{
|
||||
'desc' => "Resource object",
|
||||
'name' => "dbs",
|
||||
},
|
||||
{
|
||||
'desc' => "Capabilities",
|
||||
'name' => "caps",
|
||||
},
|
||||
{
|
||||
'desc' => "Scalar error reference",
|
||||
'name' => "criterr",
|
||||
},
|
||||
{
|
||||
'desc' => "Sub reference which takes a cookie name and returns its value",
|
||||
'name' => "cookiesource",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljlib.pl"],
|
||||
};
|
||||
|
||||
$hooks{'bad_password'} = {
|
||||
desc => "Check the given password, and either return a string explaining why ".
|
||||
"the password is bad, or undef if the password is ok.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Password to check",
|
||||
'name' => "\$password",
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljprotocol.pl","htdocs/changepassword.bml","htdocs/create.bml","htdocs/update.bml"],
|
||||
};
|
||||
|
||||
$hooks{'name_caps'} = {
|
||||
desc => "Returns the long name of the given capability bit.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Capability bit to check",
|
||||
'name' => "\$cap",
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljlib.pl"],
|
||||
};
|
||||
|
||||
$hooks{'name_caps_short'} = {
|
||||
desc => "Returns the short name of the given capability bit.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "Capability bit to check",
|
||||
'name' => "\$cap",
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/ljlib.pl"],
|
||||
};
|
||||
|
||||
$hooks{'login_add_opts'} = {
|
||||
desc => "Appends options to the cookie value. Each option should be short, and preceeded by a period.",
|
||||
args => [
|
||||
{
|
||||
'desc' => "",
|
||||
'name' => '%args',
|
||||
'keys' => [
|
||||
{
|
||||
'desc' => "User object",
|
||||
'name' => "u",
|
||||
},
|
||||
{
|
||||
'desc' => "Login form elements",
|
||||
'name' => "form",
|
||||
},
|
||||
{
|
||||
'desc' => "Hash reference of options to append to login cookie",
|
||||
'name' => "opts",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
source => ["htdocs/login.bml"],
|
||||
};
|
||||
|
||||
$hooks{'set_s2bml_lang'} = {
|
||||
desc => "Given an S2 Context, return the correct BML language id",
|
||||
args => [
|
||||
{
|
||||
'desc' => "S2 Context",
|
||||
'name' => '$ctx',
|
||||
},
|
||||
{
|
||||
'desc' => "Language id reference",
|
||||
'name' => '\$langref',
|
||||
},
|
||||
],
|
||||
source => ["cgi-bin/LJ/S2.pm"],
|
||||
};
|
||||
|
||||
sub hooks
|
||||
{
|
||||
my $hooks = shift;
|
||||
my $arg;
|
||||
print "<variablelist>\n";
|
||||
foreach my $hook (sort keys %$hooks)
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
print " <term><literal role=\"hook\">$hook</literal></term>\n";
|
||||
print " <listitem><formalpara><title>Synopsis:</title><para>\n";
|
||||
print " <funcsynopsis>\n";
|
||||
print " <funcprototype><funcdef><function>$hook</function></funcdef>\n";
|
||||
if (@{$hooks->{$hook}->{'args'}})
|
||||
{
|
||||
print " <paramdef>\n";
|
||||
foreach $arg (@{$hooks->{$hook}->{'args'}})
|
||||
{
|
||||
print " <parameter>$arg->{'name'}</parameter>\n";
|
||||
}
|
||||
print " </paramdef>\n";
|
||||
} else {
|
||||
print " <void/>";
|
||||
}
|
||||
print " </funcprototype>\n";
|
||||
print " </funcsynopsis>\n";
|
||||
print " $hooks->{$hook}->{'desc'}\n";
|
||||
print " </para></formalpara>\n";
|
||||
if (@{$hooks->{$hook}->{'args'}})
|
||||
{
|
||||
print " <formalpara><title>Arguments:</title><para>\n";
|
||||
print " <variablelist>\n";
|
||||
foreach $arg (@{$hooks->{$hook}->{'args'}})
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
print " <term><literal>$arg->{'name'}</literal></term>\n";
|
||||
print " <listitem>\n";
|
||||
print " <para>$arg->{'desc'}</para>\n";
|
||||
if ($arg->{'keys'})
|
||||
{
|
||||
print " <itemizedlist><title>Keys</title>\n";
|
||||
foreach my $key (@{$arg->{'keys'}})
|
||||
{
|
||||
print " <listitem><simpara><literal>$key->{'name'}</literal>";
|
||||
print " — $key->{'desc'}</simpara></listitem>\n";
|
||||
}
|
||||
print " </itemizedlist>";
|
||||
}
|
||||
print " </listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print " </variablelist>\n";
|
||||
print " </para></formalpara>\n";
|
||||
}
|
||||
print " <formalpara><title>Source:</title>\n";
|
||||
print " <para><itemizedlist>";
|
||||
foreach my $i ( 0 .. $#{ $hooks->{$hook}->{'source'} } ) {
|
||||
print "<listitem><simpara><filename>";
|
||||
print $hooks->{$hook}->{'source'}[$i];
|
||||
print "</filename></simpara></listitem>";
|
||||
}
|
||||
print " </itemizedlist></para></formalpara>\n";
|
||||
print " </listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print "</variablelist>\n";
|
||||
}
|
||||
|
||||
hooks(\%hooks);
|
||||
112
livejournal/doc/raw/build/install/modulelist2db.pl
Executable file
112
livejournal/doc/raw/build/install/modulelist2db.pl
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
my $LJHOME = $ENV{'LJHOME'};
|
||||
my (%modules, @debs, $line);
|
||||
require "$LJHOME/doc/raw/build/docbooklib.pl";
|
||||
require "$LJHOME/cgi-bin/ljlib.pl";
|
||||
|
||||
my @modules;
|
||||
my $indoc; my $curmod;
|
||||
open (CFG, "$LJHOME/bin/checkconfig.pl") or return 0;
|
||||
while ($line = <CFG>)
|
||||
{
|
||||
$line = LJ::trim($line);
|
||||
next if $line =~ /^\},/;
|
||||
if ($line =~ /\Qmy %modules\E/) { $indoc = 1; next; }
|
||||
if ($indoc && $line =~ /\Q);\E/) { $indoc = 0; next; }
|
||||
if ($indoc) {
|
||||
if ($line =~ /^\"(.+?)\"/) {
|
||||
push @modules, $curmod if $curmod->{'name'};
|
||||
$curmod = {};
|
||||
$curmod->{'name'} = $1;
|
||||
}
|
||||
if ($line =~ /\'deb\' \=> \'(.+?)\'/) { $curmod->{'deb'} = $1; }
|
||||
if ($line =~ /^\'opt\' \=> [\'\"](.+?)[\'\"]/) { $curmod->{'opt'} = $1; }
|
||||
} elsif ($curmod->{'name'}) {
|
||||
push @modules, $curmod if $curmod->{'name'};
|
||||
$curmod = {};
|
||||
}
|
||||
}
|
||||
close CFG;
|
||||
|
||||
# Print reference
|
||||
|
||||
print "<table frame='none'>\n <title>Required Modules</title>\n";
|
||||
print " <tgroup cols='2'>\n <tbody>\n";
|
||||
foreach my $module ( @modules )
|
||||
{
|
||||
print " <row><entry>$module->{'name'}</entry><entry>$module->{'deb'}</entry></row>\n" unless $module->{'opt'};
|
||||
}
|
||||
print " </tbody>\n </tgroup>\n</table>";
|
||||
print "<variablelist>\n <title>Optional modules</title>\n";
|
||||
foreach my $module ( @modules )
|
||||
{
|
||||
print " <varlistentry><term>$module->{'name'}</term><term>$module->{'deb'}</term><listitem><simpara>$module->{'opt'}</simpara></listitem></varlistentry>\n" if $module->{'opt'};
|
||||
}
|
||||
print "</variablelist>";
|
||||
|
||||
print "<formalpara><title>Debian Install</title><para>";
|
||||
print "If you're using Debian the following command should retrieve and build every required module:</para></formalpara>";
|
||||
print "<screen><prompt>#</prompt> <userinput>apt-get install ";
|
||||
my $i = 0;
|
||||
foreach my $module ( @modules ) {
|
||||
next if $module->{'opt'};
|
||||
if ($i == 3) { print "\\\n"; $i = 0; } $i++;
|
||||
print "$module->{'deb'} ";
|
||||
}
|
||||
print "</userinput></screen>
|
||||
|
||||
<simpara>And likewise for the optional modules:</simpara>
|
||||
|
||||
<screen><prompt>#</prompt> <userinput>apt-get install ";
|
||||
$i = 0;
|
||||
foreach my $module ( @modules ) {
|
||||
next unless $module->{'opt'};
|
||||
if ($i == 3) { print "\\\n"; $i = 0; } $i++;
|
||||
print "$module->{'deb'} ";
|
||||
}
|
||||
|
||||
print "</userinput></screen>
|
||||
|
||||
<formalpara>
|
||||
<title>Using CPAN</title>
|
||||
<para>
|
||||
Otherwise you'll want to use CPAN to install the modules by performing the following steps:
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara>From the root prompt on your server, invoke the CPAN shell:</simpara>
|
||||
<screen><prompt>#</prompt> <userinput>perl -MCPAN -e shell</userinput></screen>
|
||||
|
||||
<simpara>
|
||||
Once the Perl interpreter has loaded (and been configured), you can install
|
||||
modules by issuing the command <literal>install <replaceable>MODULENAME</replaceable></literal>.
|
||||
</simpara>
|
||||
<simpara>The first thing you should do is upgrade your CPAN:</simpara>
|
||||
|
||||
<screen><prompt>cpan></prompt> <userinput>install Bundle::CPAN</userinput></screen>
|
||||
|
||||
<simpara>Once it's done, type:</simpara>
|
||||
|
||||
<screen><prompt>cpan></prompt> <userinput>reload cpan</userinput></screen>
|
||||
|
||||
<simpara>Now, enter the following command to retrieve all of the required modules:</simpara>
|
||||
|
||||
<screen>";
|
||||
foreach my $module ( @modules ) {
|
||||
print "<prompt>cpan></prompt> <userinput>install $module->{'name'}</userinput>\n" unless $module->{'opt'};
|
||||
}
|
||||
print "</screen>
|
||||
<simpara>And likewise for the optional modules:</simpara>
|
||||
|
||||
<screen>";
|
||||
foreach my $module ( @modules ) {
|
||||
print "<prompt>cpan></prompt> <userinput>install $module->{'name'}</userinput>\n" if $module->{'opt'};
|
||||
}
|
||||
print "</screen>";
|
||||
488
livejournal/doc/raw/build/ljconfig/ljconfig2db.pl
Executable file
488
livejournal/doc/raw/build/ljconfig/ljconfig2db.pl
Executable file
@@ -0,0 +1,488 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
my $LJHOME = $ENV{'LJHOME'};
|
||||
require "$LJHOME/doc/raw/build/docbooklib.pl";
|
||||
|
||||
my %ljconfig =
|
||||
(
|
||||
'user' => {
|
||||
'name' => 'User-Configurable',
|
||||
'desc' => "New installations will probably want to set these variables. Some are ".
|
||||
"automatically set by ljdefaults.pl based on your other settings, but it ".
|
||||
"wouldn't hurt to specify them all explicitly.",
|
||||
|
||||
'domain' => {
|
||||
'name' => 'Domain Related',
|
||||
'sitename' => {
|
||||
'desc' => "The name of the site",
|
||||
},
|
||||
'sitenameshort' => {
|
||||
'desc' => "The shortened name of the site, for brevity purposes.",
|
||||
'default' => "LiveJournal",
|
||||
},
|
||||
'sitenameabbrev' => {
|
||||
'desc' => "The abbreviated version of the name of the site.",
|
||||
'default' => "LJ",
|
||||
},
|
||||
'siteroot' => {
|
||||
'desc' => "The URL prefix to construct canonical pages. This can include the port number, if 80 is not in use.",
|
||||
'default' => "http://www.\$DOMAIN:8011/",
|
||||
},
|
||||
'imgprefix' => {
|
||||
'desc' => "The URL prefix of the image directory or subdomain.",
|
||||
'default' => '$SITEROOT/img',
|
||||
},
|
||||
'statprefix' => {
|
||||
'desc' => "The URL prefix to the static content directory or subdomain.",
|
||||
'default' => '$SITEROOT/stc',
|
||||
},
|
||||
'userpic_root' => {
|
||||
'desc' => "The URL prefix to the userpic directory or subdomain.",
|
||||
'default' => '$SITEROOT/userpic',
|
||||
},
|
||||
'domain' => {
|
||||
'desc' => "The minimal domain of the site, excluding the 'www.' prefix if applicable.",
|
||||
},
|
||||
'domain_web' => {
|
||||
'desc' => "Optional. If defined and different from [ljconfig[domain]], any GET requests to [ljconfig[domain]] will be redirected to [ljconfig[domain_web]].",
|
||||
},
|
||||
'cookie_domain' => {
|
||||
'desc' => "Cookie domains should simply be set to .\$domain.com, based on the Netscape Cookie Spec, ".
|
||||
"but some older browsers don't adhere to the specs too well. [ljconfig[cookie_domain]] can ".
|
||||
"be a single string value, or it can be a perl array ref.",
|
||||
'example' => '["", ".$DOMAIN"]',
|
||||
'default' => ".\$DOMAIN",
|
||||
},
|
||||
#'cookie_path' => {
|
||||
# 'desc' => "According to the RFCs concerning cookies, the cookie path needs to be explicitly set as well. If LiveJournal is installed ".
|
||||
# "underneath a directory other than the top level domain directory, this needs to be set accordingly.",
|
||||
# 'default' => "/",
|
||||
#},
|
||||
'server_name' => {
|
||||
'desc' => "Optional. If using db-based web logging, this field is stored in the database in the server column, so you can see later how well each server performed. ".
|
||||
"To share the same ljconfig.pl on each host (say, over NFS), you can put something like this in your ljconfig.pl: It's kinda ugly, but it works. ",
|
||||
'example' => 'chomp($SERVER_NAME = `hostname`);',
|
||||
},
|
||||
'frontpage_journal' => {
|
||||
'desc' => "If set, the main page of the site loads the specified journal, not the default index page. ".
|
||||
"Use this if you're running a news site where there's only one journal, or one journal is dominant.",
|
||||
},
|
||||
'tos_check' => {
|
||||
'desc' => "If set, the account creation dialog shows a checkbox, asking users if they agree to the site's Terms of Service, ".
|
||||
"and won't allow them to create an account if they refuse. This depends on a few files being located in the proper directories, ".
|
||||
"namely <filename>tos.bml</filename> and <filename>tos-mini.bml</filename> under <filename><envar>\$LJHOME</envar>/htdocs/legal/</filename>. ".
|
||||
"The account creation dialog can also check for new instances of the Terms of Service if the Terms of Service text is located in a ".
|
||||
"CVS managed include file (<filename><envar>\$LJHOME</envar>/htdocs/inc/legal-tos</filename>), ".
|
||||
"and if the include file includes the following line at the top: <programlisting><![CDATA[<!-- \$Revision\$ -->]]></programlisting>",
|
||||
},
|
||||
'coppa_check' => {
|
||||
'desc' => "If set, the account creation dialog shows a checkbox, asking users if they're under 13 years old and won't let them create an account if they check it.",
|
||||
},
|
||||
},
|
||||
|
||||
'database' => {
|
||||
'name' => "Database Related",
|
||||
'dbinfo' => {
|
||||
'desc' => "This is a hash that contains the necessary information to connect to your database, as well as ".
|
||||
"the configuration for multiple database clusters, if your installation supports them. ".
|
||||
"Consult [special[dbinfo]] for more details.",
|
||||
'type' => "hash",
|
||||
},
|
||||
'clusters' => {
|
||||
'default' => "(1)",
|
||||
'desc' => "This is an array that contains the names of the clusters that your configuration uses.",
|
||||
'example' => 'qw(fast slow)',
|
||||
'type' => "array",
|
||||
},
|
||||
'default_cluster' => {
|
||||
'desc' => "The default cluster to choose when creating new accounts.",
|
||||
'default' => "1",
|
||||
},
|
||||
'dir_db' => {
|
||||
'desc' => "This setting tells the installation which database to read from for directory usage. ".
|
||||
"By default this is left blank, meaning that it will use the main database. This can make larger installations work much slower.",
|
||||
},
|
||||
'dir_db_host' => {
|
||||
'desc' => "The database role to use when connecting to the directory database.",
|
||||
'example' => "master",
|
||||
},
|
||||
},
|
||||
|
||||
'system_tools' => {
|
||||
'name' => "System Tools",
|
||||
'sendmail' => {
|
||||
'desc' => "The system path to the sendmail program, along with any necessary parameters.",
|
||||
'example' => '"/usr/bin/sendmail -t"',
|
||||
},
|
||||
'speller' => {
|
||||
'desc' => "The system path to a spell checking binary, along with any necessary parameters.",
|
||||
'example' => '"/usr/local/bin/aspell pipe --sug-mode=fast --ignore-case"',
|
||||
},
|
||||
'smtp_server' => {
|
||||
'desc' => "This the recommended system to use for sending email. This requires the perl Net::SMTP module to work properly.",
|
||||
'example' => "10.2.0.1",
|
||||
},
|
||||
},
|
||||
|
||||
'optimizations' => {
|
||||
'name' => "Optimization",
|
||||
'max_hints_lastn' => {
|
||||
'desc' => "Sets how many entries a user can have on their <literal>LASTN</literal> page. A higher value can majorly affect the speed of the installation.",
|
||||
'default' => "100",
|
||||
},
|
||||
'max_scrollback_friends' => {
|
||||
'desc' => "Sets how far back someone can go on a user's <literal>FRIENDS</literal> page. A higher value can majorly affect the speed of the installation.",
|
||||
'default' => "1000",
|
||||
},
|
||||
'use_recent_tables' => {
|
||||
'desc' => "Only turn this on if you are using MySQL replication between multiple databases and have one or more slaves set to not ".
|
||||
"replicated the logtext and talktext tables. Turning this on makes LJ duplicate all logtext & talktext rows into ".
|
||||
"recent_logtext & recent_talktext which is then replicated. However, a cron job cleans up that table so it's never too big. ".
|
||||
"LJ will try the slaves first, then the master. This is the best method of scaling your LJ installation, as disk seeks on the ".
|
||||
"database for journal text is the slowest part.",
|
||||
},
|
||||
'do_gzip' => {
|
||||
'desc' => "Boolean setting that when enabled, signals to the installation to use gzip encoding wherever possible. In most cases this is known ".
|
||||
"to cut bandwidth usage in half. Requires the Compress::Zlib perl module.",
|
||||
},
|
||||
'msg_readonly_user' => {
|
||||
'desc' => "Message to send to users if their account becomes readonly during maintenance.",
|
||||
'example' => "This journal is in read-only mode right now while database maintenance is being performed. Try again in a few minutes.",
|
||||
},
|
||||
'compress_text' => {
|
||||
'desc' => "Boolean setting that compresses log and comment text in the database, to save disk space.",
|
||||
}
|
||||
},
|
||||
|
||||
'syndication' => {
|
||||
'name' => "Syndicated Account Options",
|
||||
'syn_lastn_s1' => {
|
||||
'desc' => "When set to an appropriate <literal>LASTN</literal> style, all syndicated accounts on this installation will use this style.",
|
||||
},
|
||||
'synd_cluster' => {
|
||||
'desc' => "Syndicated accounts tend to have more database traffic than normal accounts, so its a good idea to set up a seperate cluster for them.".
|
||||
"If set to a cluster (defined by [ljconfig[clusters]]), all newly created syndicated accounts will reside on that cluster.",
|
||||
},
|
||||
},
|
||||
|
||||
'debug' => {
|
||||
'name' => "Development/Debugging Options",
|
||||
'allow_cluster_select' => {
|
||||
'desc' => "When set true, the journal creation page will display a drop-down list of clusters (from [ljconfig[clusters]]) along ".
|
||||
"with the old 'cluster 0' which used the old db schema and the user creating an account can choose where they go. ".
|
||||
"In reality, there's no use for this, it's only useful when working on the code.",
|
||||
},
|
||||
'nodb_msg' => {
|
||||
'desc' => "Message to send to users when the database is unavailable",
|
||||
'default' => "Database temporarily unavailable. Try again shortly.",
|
||||
},
|
||||
'server_down' => {
|
||||
'desc' => "Set true when performing maintenance that requires user activity to be minimum, such as database defragmentation and cluster movements.",
|
||||
'default' => "0",
|
||||
},
|
||||
'server_down_subject' => {
|
||||
'desc' => "While [ljconfig[server_down]] is set true, a message with this subject is displayed for anyone trying to access the LiveJournal installation.",
|
||||
'example' => "Maintenance",
|
||||
},
|
||||
'server_down_message' => {
|
||||
'desc' => "While [ljconfig[server_down]] is set true, this message will be displayed for anyone trying to access the LiveJournal installation.",
|
||||
'example' => '$SITENAME is down right now while we upgrade. It should be up in a few minutes.',
|
||||
},
|
||||
'is_dev_server' => {
|
||||
'desc' => "Enable this option to signify that the server running the LiveJournal software is being used as a development server.",
|
||||
},
|
||||
},
|
||||
|
||||
'email_addresses' => {
|
||||
'name' => "Contact email addresses",
|
||||
'admin_email' => {
|
||||
'desc' => "Given as the administrative address for functions like changing passwords or information.",
|
||||
},
|
||||
'support_email' => {
|
||||
'desc' => "Used as a contact method for people to report problems with the LiveJournal installation.",
|
||||
},
|
||||
'bogus_email' => {
|
||||
'desc' => "Used for automated notices like comment replies and general support request messages. It should be encouraged <emphasis>not</emphasis> to reply to this address.",
|
||||
},
|
||||
},
|
||||
|
||||
'caps' => {
|
||||
'name' => "Capabilities/User Options",
|
||||
'newuser_caps' => {
|
||||
'desc' => "The default capability class mask for new users.",
|
||||
},
|
||||
'cap_def' => {
|
||||
'desc' => "The default capability limits, used only when no other class-specific limit below matches.",
|
||||
'type' => "hash",
|
||||
},
|
||||
'cap' => {
|
||||
'desc' => "A hash that defines the capability class limits. The keys are bit numbers, from 0 .. 15, and the values ".
|
||||
"are hashrefs with limit names and values. Consult [special[cabalities]] for more information.",
|
||||
'type' => "hash",
|
||||
},
|
||||
'user_email' => {
|
||||
'desc' => "Do certain users get a forwarding email address, such as user\@\$DOMAIN?. This requires additional mail system configuration.",
|
||||
},
|
||||
'user_vhosts' => {
|
||||
'desc' => "If enabled, the LiveJournal installation will support username URLs of the form http://username.yoursite.com/",
|
||||
},
|
||||
'user_domain' => {
|
||||
'desc' => "If [ljconfig[user_vhosts]] is enabled, this will is the part of the URL that follows 'username'.",
|
||||
'example' => '$DOMAIN',
|
||||
},
|
||||
'email_post_domain' => {
|
||||
'desc' => "If set, and your MTA is configured, users can post to their account via username@\$EMAIL_POST_DOMAIN.",
|
||||
'example' => 'post.$DOMAIN',
|
||||
},
|
||||
'default_style' => {
|
||||
'desc' => "A hash that defines the default S2 layers to use for accounts.",
|
||||
'default' => "{
|
||||
'core' => 'core1',
|
||||
'layout' => 'generator/layout',
|
||||
'i18n' => 'generator/en',
|
||||
};",
|
||||
},
|
||||
'allow_pics_over_quota' => {
|
||||
'desc' => "By default, when a user's account expires, their least often used userpics will get marked ".
|
||||
"as inactive and will not be available for use. Turning this boolean setting true will circumvent this behavior.",
|
||||
},
|
||||
'userprop_def' => {
|
||||
'desc' => "This option defines the userproperties that users should have by default.",
|
||||
'type' => "hash",
|
||||
'example' => '%USERPROP_DEF = (
|
||||
"s1_lastn_style" => 29,
|
||||
"s1_friends_style" => 20,
|
||||
"s1_calendar_style" => 2,
|
||||
"s1_day_style" => 11,
|
||||
);',
|
||||
},
|
||||
},
|
||||
'misc' => {
|
||||
'name' => "Miscellaneous settings",
|
||||
'helpurls' => {
|
||||
'desc' => "A hash of URLs. If defined, little help bubbles appear next to common widgets to the URL you define. ".
|
||||
"Consult [special[helpurls]] for more information.",
|
||||
'example' => '%HELPURLS = (
|
||||
"accounttype" => "http://www.example.com/doc/faq/",
|
||||
"security" => "http://www.example.com/doc/security",
|
||||
);',
|
||||
'type' => "hash",
|
||||
},
|
||||
'use_acct_codes' => {
|
||||
'desc' => "A boolean setting that makes the LiveJournal installation require an invitation code before anyone can create an account.".
|
||||
"Consult [special[invitecodes]] for more information.",
|
||||
},
|
||||
'disabled' => {
|
||||
'desc' => "Boolean hash, signifying that separate parts of this LiveJournal installation are working and are avaiable to use. ".
|
||||
"Consult [special[disabled]] for more information.",
|
||||
'type' => "hash",
|
||||
},
|
||||
'protected_usernames' => {
|
||||
'desc' => "This is a list of regular expressions matching usernames that users on this LiveJournal installation can't create on their own.",
|
||||
'type' => "array",
|
||||
'example' => '("^ex_", "^lj_")',
|
||||
},
|
||||
'initial_friends' => {
|
||||
'desc' => "This is a list of usernames that will be added to the friends list of all newly created accounts on this installation.",
|
||||
'type' => "array",
|
||||
'example' => "qw(news)",
|
||||
},
|
||||
'testaccts' => {
|
||||
'desc' => "A list of usernames used for testing purposes. The password to these accounts cannot be changed through the user interface.",
|
||||
'type' => "array",
|
||||
'example' => "qw(test test2);",
|
||||
},
|
||||
'no_password_check' => {
|
||||
'desc' => "Set this option true if you are running an installation using ljcom code and if you haven't installed the Crypt::Cracklib perl module.",
|
||||
},
|
||||
'schemes' => {
|
||||
'desc' => "An array of hashes with keys being a BML scheme name and the values being the scheme description. When set, users can change their ".
|
||||
"default BML scheme to the scheme of their choice.",
|
||||
'type' => "array",
|
||||
'example' => "(
|
||||
{ scheme => 'bluewhite', title => 'Blue White' },
|
||||
{ scheme => 'lynx', title => 'Lynx' },
|
||||
{ scheme => 'opalcat', title => 'Opalcat' },
|
||||
);",
|
||||
},
|
||||
'force_empty_friends' => {
|
||||
'desc' => "A hash of userids whose friends views should be disabled for performance reasons. This is useful if new accounts are auto-added to ".
|
||||
"another account upon creation (described in [ljconfig[initial_friends]]), as in most situations building a friends view for those ".
|
||||
"accounts would be superflous and taxing on your installation.",
|
||||
'type' => "hash",
|
||||
'example' => "(
|
||||
234 => 1,
|
||||
232252 => 1,
|
||||
);",
|
||||
},
|
||||
'anti_squatter' => {
|
||||
'desc' => "Set true if your installation is a publically available development server and if you would like ".
|
||||
"beta testers to ensure that they understand as such. If left alone your installation might become susceptible to ".
|
||||
"hordes of squatter accounts.",
|
||||
},
|
||||
's2_trusted' => {
|
||||
'desc' => "Allows a specific user's S2 layers to run javascript, something that is considered a potential security risk and is disabled for all accounts. The hash structure is a series of userid => username pairs. Note that the system account is trusted by default, so it is not necessary to add to this hash.",
|
||||
'type' => "hash",
|
||||
'example' => "( '2' => 'whitaker', '3' => 'test', );",
|
||||
},
|
||||
'dynamic_ljuser' => {
|
||||
'desc' => "Boolean variable that defines whether the user-types of users is looked up when [func[LJ::ljuser]] is called. This is not recommended unless the site is using memcached.",
|
||||
},
|
||||
'hide_friendof_via_ban' => {
|
||||
'desc' => "Allows a user to hide usernames from appearing on their 'friend-of' list via use of the 'ban' mechanism.",
|
||||
},
|
||||
},
|
||||
|
||||
'portal' => {
|
||||
'name' => "Portal Configuration",
|
||||
'portal_cols' => {
|
||||
'desc' => 'This is a list that specifies which columns can be used for the portal pages.',
|
||||
'type' => 'array',
|
||||
'default' => 'qw(main right moz)',
|
||||
},
|
||||
'portal_uri' => {
|
||||
'desc' => "The URI to the portal. Only two options are supported at this time, '/portal/' and '/'.",
|
||||
'default' => "/portal/",
|
||||
},
|
||||
'portal_logged_in' => {
|
||||
'desc' => "The default positions for portal boxes that a user will see when they are logged in.",
|
||||
'default' => "{'main' => [
|
||||
[ 'update', 'mode=full'],
|
||||
],
|
||||
'right' => [
|
||||
[ 'stats', '', ],
|
||||
[ 'bdays', '', ],
|
||||
[ 'popfaq', '', ],
|
||||
] };",
|
||||
},
|
||||
'portal_logged_out' => {
|
||||
'desc' => "The default positions for portal boxes that a user will see when they are logged out.",
|
||||
'default' => "{'main' => [
|
||||
[ 'update', 'mode='],
|
||||
],
|
||||
'right' => [
|
||||
[ 'login', '', ],
|
||||
[ 'stats', '', ],
|
||||
[ 'randuser', '', ],
|
||||
[ 'popfaq', '', ],
|
||||
],
|
||||
'moz' => [
|
||||
[ 'login', '', ],
|
||||
],
|
||||
};",
|
||||
},
|
||||
},
|
||||
'blob' => {
|
||||
'name' => "Blob Server",
|
||||
'blobinfo' => {
|
||||
'desc' => "Hash that contains the details for a number of blob servers. The format of the paramater is 'cluster' => 'director'. The webserver user also needs to be able to the directory given as the directory. If you wish to use Captcha Image and Audio Generation for Human Checks, then this is a necessary paramater",
|
||||
'type' => "hash",
|
||||
'example' => '%BLOBINFO = (
|
||||
"clusters" => {
|
||||
"1" => "/path/to/some/directory/",
|
||||
},
|
||||
);'
|
||||
},
|
||||
'userpric_blobserver' => {
|
||||
'desc' => "If set to true, userpics are store as a file on the server rather than in the database. This depends on a Blob Server being setup in the [ljconfig[blobinfo]] section",
|
||||
},
|
||||
},
|
||||
'captcha' => {
|
||||
'name' => "Human Checks",
|
||||
'human_check' => {
|
||||
'desc' => 'This option enables human checks at various places throughout the site. Enabling this requires a "Blob Server" setup (for details of setting one up, refer to the [ljconfig[blobinfo]] section of the document.) Currently, the only option is "create"',
|
||||
'type' => "hash",
|
||||
'example' => "('create' => 1);",
|
||||
},
|
||||
},
|
||||
},
|
||||
'auto' => {
|
||||
'name' => 'Auto-Configured',
|
||||
'desc' => "These <varname>\$LJ::</varname> settings are automatically set in ".
|
||||
"<filename>ljdefaults.pl</filename>. They're only documented here for ".
|
||||
"people interested in extending LiveJournal. Or, you can define them in ".
|
||||
"<filename>ljconfig.pl</filename> ahead of time so you can use them in ".
|
||||
"definitions of future variables. ",
|
||||
|
||||
'directories' => {
|
||||
'name' => "Configuration Directories",
|
||||
'home' => {
|
||||
'desc' => "Set to the same value as [special[ljhome]]",
|
||||
'default' => "\$ENV{'LJHOME'}",
|
||||
},
|
||||
'htdocs' => {
|
||||
'desc' => "Points to the htdocs directory under [special[ljhome]]",
|
||||
'default' => "\$HOME/htdocs",
|
||||
},
|
||||
'bin' => {
|
||||
'desc' => "Points to the under bin directory under [special[ljhome]]",
|
||||
'default' => "\$HOME/bin",
|
||||
},
|
||||
'temp' => {
|
||||
'desc' => "Points to the temp directory under [special[ljhome]]",
|
||||
'default' => "\$HOME/temp",
|
||||
},
|
||||
'var' => {
|
||||
'desc' => "Points to the var directory under [special[ljhome]]",
|
||||
'default' => "\$HOME/var",
|
||||
},
|
||||
},
|
||||
|
||||
'i18n' => {
|
||||
'name' => "Internationalization",
|
||||
'unicode' => {
|
||||
'desc' => "Boolean setting that allows UTF-8 support. This is enabled by default.",
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
for my $type ( keys %ljconfig )
|
||||
{
|
||||
print " <section id='lj.install.ljconfig.vars.$type'>\n";
|
||||
print " <title>" . %ljconfig->{$type}->{'name'} . "</title>\n";
|
||||
print " <simpara>" . %ljconfig->{$type}->{'desc'} . "</simpara>\n";
|
||||
for my $list ( sort keys %{%ljconfig->{$type}} ) {
|
||||
next if ($list eq "name" || $list eq "desc");
|
||||
print " <variablelist>\n";
|
||||
print " <title>" . %ljconfig->{$type}->{$list}->{'name'} . "</title>\n";
|
||||
foreach my $var ( sort keys %{%ljconfig->{$type}->{$list}} ) {
|
||||
next if $var eq "name";
|
||||
my $vartype = '$';
|
||||
if (%ljconfig->{$type}->{$list}->{$var}->{'type'} eq "hash") { $vartype = '%'; }
|
||||
if (%ljconfig->{$type}->{$list}->{$var}->{'type'} eq "array") { $vartype = '@'; }
|
||||
print " <varlistentry id='ljconfig.$var'>\n";
|
||||
print " <term><varname role='ljconfig.variable'>" . $vartype . "LJ::" . uc($var) . "</varname></term>\n";
|
||||
my $des = %ljconfig->{$type}->{$list}->{$var}->{'desc'};
|
||||
$des =~ s/&(?!(?:[a-zA-Z0-9]+|#\d+);)/&/g;
|
||||
xlinkify(\$des);
|
||||
print " <listitem><simpara>$des</simpara>\n";
|
||||
if (%ljconfig->{$type}->{$list}->{$var}->{'example'})
|
||||
{
|
||||
print " <para><emphasis>Example:</emphasis> ";
|
||||
print "<informalexample><programlisting>";
|
||||
print %ljconfig->{$type}->{$list}->{$var}->{'example'};
|
||||
print "</programlisting></informalexample></para>\n";
|
||||
}
|
||||
if (%ljconfig->{$type}->{$list}->{$var}->{'default'})
|
||||
{
|
||||
print " <para><emphasis>Default:</emphasis> ";
|
||||
print "<informalexample><programlisting>";
|
||||
print %ljconfig->{$type}->{$list}->{$var}->{'default'};
|
||||
print "</programlisting></informalexample></para>\n";
|
||||
}
|
||||
print " </listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print " </variablelist>\n";
|
||||
}
|
||||
print " </section>\n";
|
||||
}
|
||||
|
||||
#hooks();
|
||||
141
livejournal/doc/raw/build/ljdocs2html.xsl
Executable file
141
livejournal/doc/raw/build/ljdocs2html.xsl
Executable file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="xsl-docbook/html/chunk.xsl"/>
|
||||
|
||||
<xsl:include href="titlepage.xsl"/>
|
||||
|
||||
<!-- canonical URL support -->
|
||||
<xsl:param name="use.id.as.filename" select="1"/>
|
||||
|
||||
<!-- More inline with perl style docs -->
|
||||
<xsl:param name="funcsynopsis.style" select="ansi"/>
|
||||
|
||||
<!-- Label sections -->
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
|
||||
<xsl:param name="chunk.section.depth" select="1"/>
|
||||
|
||||
<xsl:param name="chunk.first.sections" select="1"/>
|
||||
|
||||
<xsl:param name="navig.showtitles">1</xsl:param>
|
||||
|
||||
<xsl:param name="html.cleanup" select="1"/>
|
||||
|
||||
<xsl:param name="refentry.generate.title" select="1"/>
|
||||
|
||||
<xsl:param name="refentry.generate.name" select="0"/>
|
||||
|
||||
<xsl:template name="anchor">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:param name="conditional" select="1"/>
|
||||
<xsl:variable name="id">
|
||||
<xsl:call-template name="object.id">
|
||||
<xsl:with-param name="object" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<!-- Only write a self referring link if there is an explicit id -->
|
||||
<xsl:if test="$node/@id">
|
||||
<a class="linkhere" href="#{$id}">»</a> <a name="{$id}"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="question">
|
||||
<xsl:variable name="deflabel">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor-or-self::*[@defaultlabel]">
|
||||
<xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
|
||||
/@defaultlabel"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="qanda.defaultlabel"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<tr class="{name(.)}">
|
||||
<td align="left" valign="top">
|
||||
<xsl:call-template name="anchor">
|
||||
<xsl:with-param name="node" select=".."/>
|
||||
<xsl:with-param name="conditional" select="0"/>
|
||||
</xsl:call-template>
|
||||
<!-- Why do they call this twice?
|
||||
<xsl:call-template name="anchor">
|
||||
<xsl:with-param name="conditional" select="0"/>
|
||||
</xsl:call-template> -->
|
||||
|
||||
<b>
|
||||
<xsl:apply-templates select="." mode="label.markup"/>
|
||||
<xsl:text>. </xsl:text> <!-- FIXME: Hack!!! This should be in the locale! -->
|
||||
</b>
|
||||
</td>
|
||||
<td align="left" valign="top">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$deflabel = 'none' and not(label)">
|
||||
<b><xsl:apply-templates select="*[name(.) != 'label']"/></b>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="*[name(.) != 'label']"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ulink" name="ulink">
|
||||
<xsl:variable name="link">
|
||||
<a>
|
||||
<xsl:if test="@id">
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
|
||||
<xsl:if test="$ulink.target != ''">
|
||||
<xsl:attribute name="target">
|
||||
<xsl:value-of select="$ulink.target"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::node())=0">
|
||||
<xsl:value-of select="@url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<span class="ulink"> <img src="/img/globe.gif" alt="[o]" />»</span>
|
||||
</a>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="$link"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="guibutton">
|
||||
<span class="guibutton">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="guilabel">
|
||||
<span class="guilabel">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="xref">
|
||||
<l:template name="chapter" text="Chapter %n: %t"/>
|
||||
</l:context>
|
||||
<l:context name="section-xref-numbered">
|
||||
<l:template name="section" text="Section %n: %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
</xsl:stylesheet>
|
||||
11
livejournal/doc/raw/build/nochunk.xsl
Executable file
11
livejournal/doc/raw/build/nochunk.xsl
Executable file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!-- This file is kind of lame, but necessary -->
|
||||
|
||||
<xsl:import href="xsl-docbook/html/docbook.xsl"/>
|
||||
|
||||
<xsl:include href="ljdocs2html.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
53
livejournal/doc/raw/build/priv/priv2db.pl
Executable file
53
livejournal/doc/raw/build/priv/priv2db.pl
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) {
|
||||
die "\$LJHOME not set.\n";
|
||||
}
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my $dbr = LJ::get_dbh("slave", "master");
|
||||
my $sth;
|
||||
|
||||
sub dump_privs
|
||||
{
|
||||
my $privs = shift;
|
||||
|
||||
print "<variablelist>\n <title>User Privileges</title>\n";
|
||||
foreach my $priv (sort keys %$privs)
|
||||
{
|
||||
|
||||
my ($des, $args) = split(/arg=/, $privs->{$priv}->{'des'});
|
||||
my $scope = $privs->{$priv}->{'scope'};
|
||||
|
||||
print "<varlistentry>\n";
|
||||
print "<term><literal role=\"priv\">$priv</literal>";
|
||||
print " -- (scope: $scope)" if $scope eq "local";
|
||||
print "</term>\n";
|
||||
|
||||
print "<listitem><formalpara>\n";
|
||||
print "<title>$privs->{$priv}->{'name'}</title>\n";
|
||||
cleanse(\$des);
|
||||
print "<para>$des</para>\n";
|
||||
|
||||
print "<para><emphasis>Argument:</emphasis> $args</para>\n" if $args;
|
||||
print "</formalpara></listitem>\n";
|
||||
|
||||
print "</varlistentry>\n";
|
||||
}
|
||||
print "</variablelist>\n";
|
||||
}
|
||||
|
||||
my %privs;
|
||||
|
||||
$sth = $dbr->prepare("SELECT * FROM priv_list");
|
||||
$sth->execute;
|
||||
while (my ($prlid, $privcode, $privname, $des, $is_public, $scope) = $sth->fetchrow_array) {
|
||||
$privs{$privcode} = { 'public' => $is_public, 'name' => $privname, 'des' => $des, 'scope' => $scope};
|
||||
}
|
||||
|
||||
dump_privs(\%privs);
|
||||
36
livejournal/doc/raw/build/protocol/authinfo.ent.xml
Executable file
36
livejournal/doc/raw/build/protocol/authinfo.ent.xml
Executable file
@@ -0,0 +1,36 @@
|
||||
<key name="username" count="1">
|
||||
<scalar><des>
|
||||
Username of user logging in.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_method" count="opt">
|
||||
<scalar><des>
|
||||
Authentication method used for this request. The default value is "clear", for plain-text authentication. "cookie" and any of the challenge / response methods are also acceptable.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="password" count="opt">
|
||||
<scalar><des>
|
||||
DEPRECATED. Password of user logging in in plaintext. If using the "clear" authentication method, either this or "hpassword" must be present.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="hpassword" count="opt">
|
||||
<scalar><des>
|
||||
DEPRECATED. MD5 digest of user's password. Not much more secure than password, but at least it's not in plain text.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_challenge" count="opt">
|
||||
<scalar><des>
|
||||
If using challenge / response authentication, this should be the challenge that was issued to you by the server.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_response" count="opt">
|
||||
<scalar><des>
|
||||
If using challenge / response authentication, this should be the response hash that you generate, based on the formula required for your challenge.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="ver" count="opt">
|
||||
<scalar><des>
|
||||
Protocol version supported by the client; assumed to be 0 if not specified. See <link id="ljp.csp.versions" /> for details on the protocol version
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
109
livejournal/doc/raw/build/protocol/checkfriends.mode.xml
Executable file
109
livejournal/doc/raw/build/protocol/checkfriends.mode.xml
Executable file
@@ -0,0 +1,109 @@
|
||||
<method name="checkfriends">
|
||||
<shortdes>
|
||||
Checks to see if your friends list has been updated since a specified time.
|
||||
</shortdes>
|
||||
<des>
|
||||
Mode that clients can use to poll the server to see if their friends list has been updated. This request is extremely quick, and is the preferred way for users to see when their friends list is updated, rather than pounding on reload in their browser, which is stressful on the serves.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastupdate" count="1"><scalar><des>
|
||||
The time that this mode request returned last time you called it. If this is the first time you've ever called it (since your client has been running), leave this blank. It's strongly recommended that you do not remember this value across invocations of your client, as it's very likely your friends will update since the client was running so the notification is pointless... the user probably read his/her friends page already before starting the client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mask" count="opt"><scalar><des>
|
||||
The friend group(s) in which the client is checking for new entries, represented as a 32-bit unsigned int. Turn on any combination of bits 1-30 to check for entries by friends in the respective friend groups. Turn on bit 0, or leave the mask off entirely, to check for entries by any friends.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 481
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.checkfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>lastupdate</name>
|
||||
<value><string></string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="new"><scalar><des>
|
||||
This is what you should use to determine if there are new entries. Its value is "1" if there is new stuff, or "0" if there isn't. Note that once this values becomes "1" and you alert the user, <emphasis>stop polling!</emphasis> It'd be pointless to have the client hitting the server all night while the user slept. Once the user acknowleges the notifcation (double-clicks the system tray or panel applet or whatnot), then resume your polling.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="interval"><scalar><des>
|
||||
How many seconds you <emphasis>must</emphasis> wait before polling the server again. If your client disobeys, this protocol will just return error messages saying "slow down, bad client!" instead of giving you the data you were trying to cheat to obtain. Note that this also means your client should have an option to disable polling for updates, since some users run multiple operating systems with multiple LiveJournal clients, and both would be fighting each other.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 358
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:49:07 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>lastupdate</name>
|
||||
<value><string>2002-07-16 14:22:16</string></value>
|
||||
</member>
|
||||
<member><name>new</name>
|
||||
|
||||
<value><int>0</int></value>
|
||||
</member>
|
||||
<member><name>interval</name>
|
||||
<value><int>90</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
176
livejournal/doc/raw/build/protocol/consolecommand.mode.xml
Executable file
176
livejournal/doc/raw/build/protocol/consolecommand.mode.xml
Executable file
@@ -0,0 +1,176 @@
|
||||
<method name="consolecommand">
|
||||
<shortdes>
|
||||
Run an administrative command.
|
||||
</shortdes>
|
||||
<des>
|
||||
The LiveJournal server has a text-based shell-like admininistration
|
||||
console where less-often used commands can be entered. There's a web
|
||||
interface to this shell online, and this is another gateway to that.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="commands" count="1"><list count="1">
|
||||
<scalar count="0more"><des>
|
||||
The commands to send, with double quotes around any arguments with spaces,
|
||||
and double quotes escaped by backslashes, and backslashes escaped with
|
||||
backslashes. Optionally, you can send a listref instead of a string
|
||||
for this argument, in which case, we'll use your argument separation
|
||||
and not parse it ourselves.
|
||||
</des></scalar>
|
||||
</list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.consolecommand</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>commands</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string>help print</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="results" count="1">
|
||||
<list count="1"><des>
|
||||
One stuct returned for each command run,
|
||||
that struct containing both the overall return value,
|
||||
and the line-by-line output of the command, with
|
||||
each line of output being tagged by type (think
|
||||
stdout vs. stderr, but with stdinfo also). The web interface
|
||||
shows 'error' with red, '' (stdout) with black, and 'info'
|
||||
with green. Clients are encouraged to also, if possible.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="success" count="1">
|
||||
<scalar><des>
|
||||
Return status of nth command. 0 or 1.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="output" count="1">
|
||||
<list count="1">
|
||||
<scalar count="1"><des>
|
||||
Type of output line. Either "" (normal output), "error", or "info",
|
||||
something to be emphasized over normal output.
|
||||
</des></scalar>
|
||||
<scalar count="1"><des>
|
||||
The text of that line.
|
||||
</des></scalar>
|
||||
</list>
|
||||
</key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1189
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:59:33 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>results</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>success</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>output</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><string></string></value>
|
||||
<value><string>print ...</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> This is a debugging function. Given an arbitrary number of</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> meaningless arguments, it'll print each one back to you. If an</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> argument begins with a bang (!) then it'll be printed to the error</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> stream instead.</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
184
livejournal/doc/raw/build/protocol/editevent.mode.xml
Executable file
184
livejournal/doc/raw/build/protocol/editevent.mode.xml
Executable file
@@ -0,0 +1,184 @@
|
||||
<method name="editevent">
|
||||
<shortdes>
|
||||
Edit or delete a user's past journal entry
|
||||
</shortdes>
|
||||
<des>
|
||||
Modify an already created event. If fields are empty, it will delete the event.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique ItemID of the item being modified or deleted.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The revised event/log text the user is submitting. Or, to delete an entry, just send no text at all. Carriage returns are okay (0x0A, 0x0A0D, or 0x0D0A), although 0x0D are removed internally to make everything into Unix-style line-endings (just \ns). Posts may also contain HTML, but be aware that the LiveJournal server converts newlines to HTML <BR>s when displaying them, so your client should not try to insert these itself.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (
|
||||
0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-form
|
||||
atted text, and it does the conversion by removing all \r characters. If you're sending a
|
||||
multi-line event on Mac, you have to be sure and send a lineendings value of mac or you
|
||||
r line endings will be removed. PC and Unix clients can ignore this setting, or you can s
|
||||
end it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="1"><scalar><des>
|
||||
The subject for this post. Limited to 255 characters. No newlines.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="opt"><scalar><des>
|
||||
Specifies who can read this post. Valid values are <emphasis>public</emphasis> (default), <emphasis>private</emphasis> and <emphasis>usemask</emphasis>. When value is usemask, viewability is controlled by the allowmask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt">
|
||||
<des>
|
||||
Set arbitrary (but restricted) meta-data properties to this log item. See <link id="ljp.csp.proplist" />
|
||||
for the documentation of the keys and value data types.
|
||||
</des>
|
||||
<list count="1">
|
||||
<des>The following 'struct' should have property names as the keys, and the values should be a scalar data type.</des>
|
||||
<struct count="0more"/>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
<key name="usejournal" count="opt"><scalar><des>
|
||||
If editing a shared journal entry, include this key and the username you wish to edit the entry in. By default, you edit the entry as if it were in user "user"'s journal, as specified above.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="1"><scalar><des>
|
||||
If modifying only, the 4-digit year of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mon" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit month of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit day of the month of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="hour" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit hour from 0 to 23 of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="min" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit minute of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 1032
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editevent</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1959</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>This &lt;strike&gt;is&lt;/strike&gt; was a test post.
|
||||
</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Test</string></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>pc</string></value>
|
||||
</member>
|
||||
<member><name>year</name>
|
||||
<value><int>2002</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>mon</name>
|
||||
<value><int>7</int></value>
|
||||
</member>
|
||||
<member><name>day</name>
|
||||
|
||||
<value><int>13</int></value>
|
||||
</member>
|
||||
<member><name>hour</name>
|
||||
<value><int>20</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>min</name>
|
||||
<value><int>35</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique ItemID of the item being modified or deleted.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="anum" count="1"><scalar><des>
|
||||
The authentication number generated for this entry. It can be used by the client to generate URLs, but that is not recommended. (See the returned 'url' element if you want to link to a post.)
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="url" count="1"><scalar><des>
|
||||
The permanent link address to this post. This is an opaque string--you should store it as is. While it will generally follow a predictable pattern, there is no guarantee of any particular format for these, and it may change in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 267
|
||||
Content-Type: text/xml
|
||||
Date: Sat, 13 Jul 2002 23:57:17 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>anum</name>
|
||||
<value><int>141</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
|
||||
<value><int>1959</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
119
livejournal/doc/raw/build/protocol/editfriendgroups.mode.xml
Executable file
119
livejournal/doc/raw/build/protocol/editfriendgroups.mode.xml
Executable file
@@ -0,0 +1,119 @@
|
||||
<method name="editfriendgroups">
|
||||
<shortdes>
|
||||
Edit the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given several optional lists, will add/delete/update/rename the friends groups for a user.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="groupmasks" count="opt"><struct count="1">
|
||||
<des>
|
||||
A structure of friend userids. The values of each are a string representing an unsigned 32-bit integer with bit 0 set (or the server will force it on anyway), bits 1-30 set for each group the friend belongs to, and bit 31 unset (reserved for future use).
|
||||
</des>
|
||||
</struct></key>
|
||||
|
||||
<key name="set" count="opt"><struct count="1">
|
||||
<des>
|
||||
Given the bit of a friend group, the value contains a structure of information on it.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="name" count="1"><scalar><des>
|
||||
Create or rename the friend group by sending this key. The value is the name of the group.
|
||||
</des></scalar></key>
|
||||
<key name="sort" count="opt"><scalar><des>
|
||||
This field should be sent to indicate the sorting order of this group. The value must be in the range of 0-255. The default is 50.
|
||||
</des></scalar></key>
|
||||
<key name="public" count="opt"><scalar><des>
|
||||
If this is "1", then this group is marked as public. If public, other users can see the name of the group and the people that are in it.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</struct></key>
|
||||
|
||||
<key name="delete" count="opt"><list count="1"><scalar count="0more"><des>
|
||||
A number of a friend group to delete (which can be from 1-30, inclusive). The server will modify all old entries that allow access to that friend group, so a new friend group using that number won't have access to old non-related entries, and unset the bit for that friend group on the groupmask of each friend, unless your client sends the friend's new groupmask explicitly.
|
||||
</des></scalar></list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 780
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editfriendgroups</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>set</name>
|
||||
<value><struct>
|
||||
<member><name>1</name>
|
||||
<value><struct>
|
||||
|
||||
<member><name>name</name>
|
||||
<value><string>Good Friends</string></value>
|
||||
</member>
|
||||
<member><name>sort</name>
|
||||
|
||||
<value><int>25</int></value>
|
||||
</member>
|
||||
<member><name>public</name>
|
||||
<value><boolean>1</boolean></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 132
|
||||
Content-Type: text/xml
|
||||
Date: Mon, 15 Jul 2002 23:16:33 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
147
livejournal/doc/raw/build/protocol/editfriends.mode.xml
Executable file
147
livejournal/doc/raw/build/protocol/editfriends.mode.xml
Executable file
@@ -0,0 +1,147 @@
|
||||
<method name="editfriends">
|
||||
<shortdes>
|
||||
Add, edit, or delete friends from the user's friends list.
|
||||
</shortdes>
|
||||
<des>
|
||||
Takes up to two lists, one of friends to delete and one of friends to add. Several options are allowed to be specified when adding a friend. It returns a verbose list of the friends added, if any were.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="delete" count="opt"><list count="1">
|
||||
<des>
|
||||
A list of variable of this form removes the friend users from the user's friend list. It is not an error to delete an already non-existant friend. The value should just be 1.
|
||||
</des>
|
||||
<scalar count="0more"><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar>
|
||||
</list></key>
|
||||
|
||||
<key name="add" count="opt"><list count="1">
|
||||
<des>
|
||||
To add friends, send a variable list of this form.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="username" count="1"><scalar><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar></key>
|
||||
<key name="fgcolor" count="opt"><scalar><des>
|
||||
Sets the text color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #000000, black.
|
||||
</des></scalar></key>
|
||||
<key name="bgcolor" count="opt"><scalar><des>
|
||||
Sets the background color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #FFFFFF, white.
|
||||
</des></scalar></key>
|
||||
<key name="groupmask" count="opt"><scalar><des>
|
||||
Sets this user's groupmask. Only use this in clients if you've very recently loaded the friend groups. If your client has been loaded on the end user's desktop for days and you haven't loaded friend groups since it started, they may be inaccurate if they've modified their friend groups through the website or another client. In general, don't use this key unless you know what you're doing.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 774
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>add</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
|
||||
<value><string>bradfitz</string></value>
|
||||
</member>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="added" count="opt"><des>
|
||||
A list of the users who have been added with this transaction.
|
||||
</des>
|
||||
<list count="1"><struct count="0more">
|
||||
<key name="username"><scalar><des>
|
||||
The username of the friend that was added.
|
||||
</des></scalar></key>
|
||||
<key name="fullname"><scalar><des>
|
||||
The full name of the friend that was added.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 420
|
||||
Content-Type: text/xml
|
||||
Date: Mon, 15 Jul 2002 23:52:18 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>added</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>bradfitz</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Brad Fitzpatrick</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
64
livejournal/doc/raw/build/protocol/flat2db.pl
Executable file
64
livejournal/doc/raw/build/protocol/flat2db.pl
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) { die "\$LJHOME not set.\n"; }
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/propparse.pl";
|
||||
|
||||
my @vars;
|
||||
LJ::load_objects_from_file("$ENV{'LJHOME'}/htdocs/protocol.dat", \@vars);
|
||||
|
||||
foreach my $mode (sort { $a->{'name'} cmp $b->{'name'} } @vars)
|
||||
{
|
||||
my $name = $mode->{'name'};
|
||||
my $des = $mode->{'props'}->{'des'};
|
||||
cleanse(\$des);
|
||||
|
||||
unshift (@{$mode->{'props'}->{'request'}},
|
||||
{ 'name' => "mode", 'props' => { 'des' => "The protocol request mode: <tt>$name</tt>", } },
|
||||
{ 'name' => "user", 'props' => { 'des' => "Username. Leading and trailing whitespace is ignored, as is case.", } },
|
||||
{ 'name' => "auth_method", 'props' => { 'des' => "The authentication method used for this request. Default is 'clear', for plain-text authentication. 'cookie' or any of the challenge / response methods are also acceptable.", } },
|
||||
{ 'name' => "password", 'props' => { 'des' => "DEPRECATED. Password in plain-text. For the default authentication method, either this needs to be sent, or <tt>hpassword</tt>.", } },
|
||||
{ 'name' => "hpassword", 'props' => { 'des' => "DEPRECATED. Alternative to plain-text <tt>password</tt>. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.", } },
|
||||
{ 'name' => "auth_challenge", 'props' => { 'des' => "If using challenge / response authentication, this should be the challenge that was generated for your client.", } },
|
||||
{ 'name' => "auth_response", 'props' => { 'des' => "If using challenge / response authentication, this should be the response hash you generate based on the challenge's formula.", } },
|
||||
{ 'name' => "ver", 'props' => { 'des' => "Protocol version supported by the client; assumed to be 0 if not specified. See [special[cspversion]] for details on the protocol version.", 'optional' => 1, } },
|
||||
) unless $name eq "getchallenge";
|
||||
unshift (@{$mode->{'props'}->{'response'}},
|
||||
{ 'name' => "success", 'props' => { 'des' => "<b><tt>OK</tt></b> on success or <b><tt>FAIL</tt></b> when there's an error. When there's an error, see <tt>errmsg</tt> for the error text. The absence of this variable should also be considered an error.", } },
|
||||
{ 'name' => "errmsg", 'props' => { 'des' => "The error message if <tt>success</tt> was <tt>FAIL</tt>, not present if <tt>OK</tt>. If the success variable isn't present, this variable most likely won't be either (in the case of a server error), and clients should just report \"Server Error, try again later.\".", } },
|
||||
);
|
||||
print "<refentry id=\"ljp.csp.flat.$name\">\n";
|
||||
print " <refnamediv>\n <refname>$name</refname>\n";
|
||||
print " <refpurpose>$des</refpurpose>\n </refnamediv>\n";
|
||||
|
||||
print " <refsect1>\n <title>Mode Description</title>\n";
|
||||
print " <para>$des</para>\n </refsect1>\n";
|
||||
foreach my $rr (qw(request response))
|
||||
{
|
||||
print "<refsect1>\n";
|
||||
my $title = $rr eq "request" ? "Arguments" : "Return Values";
|
||||
print " <title>$title</title>\n";
|
||||
print " <variablelist>\n";
|
||||
foreach (@{$mode->{'props'}->{$rr}})
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
cleanse(\$_->{'name'});
|
||||
print " <term><literal>$_->{'name'}</literal></term>\n";
|
||||
print " <listitem><para>\n";
|
||||
if ($_->{'props'}->{'optional'}) {
|
||||
print "<emphasis>(Optional)</emphasis>\n";
|
||||
}
|
||||
cleanse(\$_->{'props'}->{'des'});
|
||||
print "$_->{'props'}->{'des'}\n";
|
||||
print " </para></listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print " </variablelist>\n";
|
||||
print "</refsect1>\n";
|
||||
}
|
||||
print "</refentry>\n";
|
||||
}
|
||||
21
livejournal/doc/raw/build/protocol/friendgroups.ent.xml
Executable file
21
livejournal/doc/raw/build/protocol/friendgroups.ent.xml
Executable file
@@ -0,0 +1,21 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id" count="1"><scalar><des>
|
||||
The bit number for this friend group, from 1-30.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="name" count="1"><scalar><des>
|
||||
The name of this friend group.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="sortorder" count="1"><scalar><des>
|
||||
The sort integer for this friend group, from 0-255.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="public" count="1"><scalar><des>
|
||||
Either '0' or '1' for if this friend group is public.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
122
livejournal/doc/raw/build/protocol/friendof.mode.xml
Executable file
122
livejournal/doc/raw/build/protocol/friendof.mode.xml
Executable file
@@ -0,0 +1,122 @@
|
||||
<method name="friendof">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users list this user as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a "friends of" list for a specified user. An optional limit of returned friends can be supplied.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="friendoflimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 475
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.friendof</methodName>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>friendoflimit</name>
|
||||
<value><int>2</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendofs" count="1">
|
||||
<des>
|
||||
The list of people who list this user as a friend.
|
||||
</des>
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 936
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:53:15 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>friendofs</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>aisha_plushie</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Stripe</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>badcharlotte</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Charlotte</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
29
livejournal/doc/raw/build/protocol/friendslist.ent.xml
Executable file
29
livejournal/doc/raw/build/protocol/friendslist.ent.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="username" count="1"><scalar><des>
|
||||
The username of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fullname" count="1"><scalar><des>
|
||||
The full name of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="type" count="opt"><scalar><des>
|
||||
The type of journal the friend item is. This value can be one of 'community', 'syndicated', 'news', or 'shared', depending on the journaltype of the account in question. The account is a normal personal account when this value is not sent.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fgcolor" count="1"><scalar><des>
|
||||
The foreground color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="bgcolor" count="1"><scalar><des>
|
||||
The background color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="groupmask" count="1"><scalar><des>
|
||||
If the group mask is not "1" (just bit 0 set), then this variable is returned with an 32-bit unsigned integer with a bit 0 always set, and bits 1-30 set for each group this friend is a part of. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
81
livejournal/doc/raw/build/protocol/getchallenge.mode.xml
Executable file
81
livejournal/doc/raw/build/protocol/getchallenge.mode.xml
Executable file
@@ -0,0 +1,81 @@
|
||||
<method name="getchallenge">
|
||||
<shortdes>
|
||||
Generate a server challenge string for authentication.
|
||||
</shortdes>
|
||||
<des>
|
||||
Generate a one-time, quick expiration challenge to be used in challenge/response authentication methods.
|
||||
</des>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 97
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getchallenge</methodName>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="auth_scheme" count="1"><scalar><des>
|
||||
You can ignore this for now. By default this is the highest version of our
|
||||
authentication schemes, if in the future if we implement other auth schemes or change the default.
|
||||
In that case we'd add a new capabilities exchange: your client could say, "I know c0 and c1", and
|
||||
our server would then say, "Use c1, it's the best."
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="challenge" count="1"><scalar><des>
|
||||
An opaque cookie to generate a hashed response from.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="expire_time" count="1"><scalar><des>
|
||||
The expiration time of the challenge, as measured in seconds since the Unix epoch.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="server_time" count="1"><scalar><des>
|
||||
The server time when the challenge was generated, as measured in seconds since the Unix epoch.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 557
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:30:01 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>auth_scheme</name>
|
||||
<value><string>c0</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>challenge</name>
|
||||
<value><string>c0:1073113200:2831:60:2TCbFBYR72f2jhVDuowz:0fba728f5964ea54160a5b18317d92df</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>expire_time</name>
|
||||
<value><int>1073116091</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>server_time</name>
|
||||
<value><int>1073116031</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
143
livejournal/doc/raw/build/protocol/getdaycounts.mode.xml
Executable file
143
livejournal/doc/raw/build/protocol/getdaycounts.mode.xml
Executable file
@@ -0,0 +1,143 @@
|
||||
<method name="getdaycounts">
|
||||
<shortdes>
|
||||
This mode retrieves the number of journal entries per day.
|
||||
</shortdes>
|
||||
<des>
|
||||
This mode retrieves the number of journal entries per day. Useful for populating calendar widgets in GUI clients. Optionally a journal can be specified. It returns a list of the dates and accompanied counts.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the day counts of a shared journal, include this key and the username you wish to get the counts of. By default, you load the counts of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 403
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getdaycounts</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="daycounts" count="1"><list count="1"><struct count="0more"><des>
|
||||
For each day that the user has posted a journal entry, a struct is returned in the list.
|
||||
</des>
|
||||
<key name="date"><scalar><des>The date, in yyyy-dd-mm format.</des></scalar></key>
|
||||
<key name="count"><scalar><des>The number of journal entries on that date.</des></scalar></key>
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 70580
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 20:50:28 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>daycounts</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
|
||||
<member><name>date</name>
|
||||
<value><string>1995-05-01</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
|
||||
<value><string>1997-05-01</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
<value><string>1999-05-03</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>17</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
<value><string>1999-05-04</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
...
|
||||
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
|
||||
<value><string>2020-02-20</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
235
livejournal/doc/raw/build/protocol/getevents.mode.xml
Executable file
235
livejournal/doc/raw/build/protocol/getevents.mode.xml
Executable file
@@ -0,0 +1,235 @@
|
||||
<method name="getevents">
|
||||
<shortdes>
|
||||
Download parts of the user's journal.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given a set of specifications, will return a segment of entries up to a limit set by the server. Has a set of options for less, extra, or special data to be returned.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="truncate" count="opt"><scalar><des>
|
||||
A value that if greater than or equal to 4, truncates the length of the returned events (after being decoded) to the value specified. Entries less than or equal to this length are left untouched. Values greater than this length are truncated to the specified length minus 3, and then have "... " appended to them, bringing the total length back up to what you specified. This is good for populating list boxes where only the beginning of the entry is important, and you'll double-click it to bring up the full entry.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="prefersubject" count="opt"><scalar><des>
|
||||
If this setting is set to true (1 ), then no subjects are returned, and the events are actually subjects if they exist, or if not, then they're the real events. This is useful when clients display history and need to give the user something to double-click. The subject is shorter and often more informative, so it'd be best to download only this.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="noprops" count="opt"><scalar><des>
|
||||
If this setting is set to true (1), then no meta-data properties are returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="selecttype" count="1"><scalar><des>
|
||||
Determines how you want to specify what part of the journal to download. Valid values are <emphasis>day</emphasis> to download one entire day, <emphasis>lastn</emphasis> to get the most recent n entries (where n is specified in the howmany field), <emphasis>one</emphasis> to download just one specific entry, or <emphasis>syncitems</emphasis> to get some number of items (which the server decides) that have changed since a given time (specified in the lastsync parameter>). Not that because the server decides what items to send, you may or may not be getting everything that's changed. You should use the syncitems selecttype in conjuntions with the syncitems protocol mode.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>syncitems</emphasis>, the date (in "yyyy-mm-dd hh:mm:ss" format) that you want to get updates since.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 4-digit year of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="month" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit day of the month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="howmany" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, how many entries to get. Defaults to 20. Maximum is 50.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="beforedate" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, you can optionally include this variable and restrict all entries returned to be before the date you specify, which must be of the form <emphasis>yyyy-mm-dd hh:mm:ss</emphasis>.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="itemid" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>one</emphasis>, the journal entry's unique ItemID for which you want to retrieve. Or, to retrieve the most recent entry, use the value -1. Using -1 has the added effect that the data is retrieved from the master database instead of a replicated slave. Clients with an "Edit last entry" feature might want to send -1, to make sure the data that comes back up is accurate, in case a slave database is a few seconds behind in replication.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the history of a shared journal, include this key and the username you wish to get the history of. By default, you load the history of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 786
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getevents</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>truncate</name>
|
||||
<value><int>20</int></value>
|
||||
</member>
|
||||
<member><name>selecttype</name>
|
||||
|
||||
<value><string>lastn</string></value>
|
||||
</member>
|
||||
<member><name>howmany</name>
|
||||
<value><int>2</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>noprops</name>
|
||||
<value><boolean>1</boolean></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>unix</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="events" count="1"><list count="1"><des>
|
||||
A list of structs for all of the returned events.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique integer ItemID of the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="eventtime" count="1"><scalar><des>
|
||||
The time the user posted (or said they posted, rather, since users can back-date posts) the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="1"><scalar><des>
|
||||
If this variable is not returned, then the security of the post is <emphasis>public</emphasis>, otherwise this value will be <emphasis>private</emphasis> or usemask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
If security is <emphasis>usemask</emphasis> then this is defined with the 32-bit unsigned int bit-mask of who is allowed to access this post.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="opt"><scalar><des>
|
||||
The subject of the journal entry. This won't be returned if "prefersubjects" is set, instead the subjects will show up as the events.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The event text itself. This value is first truncated if the truncate variable is set, and then it is URL-encoded (alphanumerics stay the same, weird symbols to %hh, and spaces to + signs, just like URLs or post request). This allows posts with line breaks to come back on one line.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="anum" count="1"><scalar><des>
|
||||
The authentication number generated for this entry. It can be used by the client to generate URLs, but that is not recommended. (See the returned 'url' element if you want to link to a post.)
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="url" count="1"><scalar><des>
|
||||
The permanent link address to this post. This is an opaque string--you should store it as is. While it will generally follow a predictable pattern, there is no guarantee of any particular format for these, and it may change in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="poster" count="opt"><scalar><des>
|
||||
If the poster of this event is different from the <emphasis>user</emphasis> value sent above, then this key will be included and will specify the username of the poster of this event. If this key is not present, then it is safe to assume that the poster of this event is none other than <emphasis>user</emphasis>.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt"><struct count="0more"><des>
|
||||
Properties and their values for the item being returned.
|
||||
</des></struct></key>
|
||||
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1002
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:30:01 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>events</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>eventtime</name>
|
||||
<value><string>2020-02-20 02:20:00</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>yes its true its ...</string></value>
|
||||
</member>
|
||||
<member><name>anum</name>
|
||||
|
||||
<value><int>108</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1965</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>eventtime</name>
|
||||
<value><string>2002-07-14 11:17:00</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>Yes, Yes, YES!</string></value>
|
||||
</member>
|
||||
<member><name>anum</name>
|
||||
|
||||
<value><int>66</int></value>
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Is this private?</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1964</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
100
livejournal/doc/raw/build/protocol/getfriendgroups.mode.xml
Executable file
100
livejournal/doc/raw/build/protocol/getfriendgroups.mode.xml
Executable file
@@ -0,0 +1,100 @@
|
||||
<method name="getfriendgroups">
|
||||
<shortdes>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 406
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getfriendgroups</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 536
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 01:03:10 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>friendgroups</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>sortorder</name>
|
||||
<value><int>25</int></value>
|
||||
</member>
|
||||
|
||||
<member><name>id</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>public</name>
|
||||
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>name</name>
|
||||
<value><string>Good Friends</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
156
livejournal/doc/raw/build/protocol/getfriends.mode.xml
Executable file
156
livejournal/doc/raw/build/protocol/getfriends.mode.xml
Executable file
@@ -0,0 +1,156 @@
|
||||
<method name="getfriends">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users this user lists as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a verbose list of information on friends a user has listed. Optionally able to include their friends of list, the friends group associated with each user, and a limit on the number of friends to return.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="includefriendof" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "friendof" mode. Some clients show friends and friendof data in separate tabs/panes. If you're always going to load both, then use this flag (as opposed to a tabbed dialog approach, where the user may not go to the second tab and thus would not need to load the friendof data.) friendof request variables can be used.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="includegroups" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "getfriendgroups" mode. See above for the reason why this would be useful.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendlimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 401
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
<key name="friendofs">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
<key name="friends">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1377
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:44:23 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>friends</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
|
||||
<member><name>username</name>
|
||||
<value><string>bradfitz</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Brad Fitzpatrick</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#ffffff</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#efcfff</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>ljfresno</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Fresno LJ users</string></value>
|
||||
</member>
|
||||
<member><name>type</name>
|
||||
<value><string>community</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#520155</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
|
||||
<value><string>webkin</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Ellen Stafford</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#fcddff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
198
livejournal/doc/raw/build/protocol/login.mode.xml
Executable file
198
livejournal/doc/raw/build/protocol/login.mode.xml
Executable file
@@ -0,0 +1,198 @@
|
||||
<method name="login">
|
||||
<shortdes>
|
||||
validate user's password and get base information needed for client to function
|
||||
</shortdes>
|
||||
<des>
|
||||
Login to the server, while announcing your client version. The server returns with whether the password is good or not, the user's name, an optional message to be displayed to the user, the list of the user's friend groups, and other things.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="clientversion" count="opt"><scalar><des>
|
||||
Although optional, this <emphasis>should</emphasis> be a string of the form <literal>Platform-ProductName/ClientVersionMajor.Minor.Rev</literal>, like <emphasis>Win32-MFC/1.2.7</emphasis> or <emphasis>Gtk-LoserJabber/1.0.4</emphasis>. Note in this case that "Gtk" is not a platform, but rather a toolkit, since the toolkit is multi-platform (Linux, FreeBSD, Solaris, Windows...). You make the judge what is best to send, but if it's of this form, we'll give you cool statistics about your users.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmoods" count="opt"><scalar><des>
|
||||
If your client supports moods, send this key with a value of the highest mood ID you have cached/stored on the user's computer. For example, if you logged in last time with and got mood IDs 1, 2, 4, and 5, then send "5" as the value of "getmoods". The server will return every new mood that has an internal MoodID greater than 5. If you've never downloaded moods before, send "0". If you don't care about getting any moods at all (if your client doesn't support them), then don't send this key at all.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmenus" count="opt"><scalar><des>
|
||||
Send something for this key if you want to get a list/tree of web jump menus to show in your client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickws" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and you want to receive that list, send something for this key, like "1", and you'll receieve the list of picture keywords the user has defined.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickwurls" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and can also display the pictures somehow, send something for this key, like "1", and you'll receieve the list of picture keyword URLs that correspond to the picture keywords as well as the URL for the default picture. You must send getpickws for this option to even matter.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 396
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.login</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="fullname" count="1"><scalar><des>
|
||||
The user's full name. Often, clients use this to change the top-level window's title bar text to say something like "LiveJournal - User name". You can just ignore this if you'd like.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="message" count="opt"><scalar><des>
|
||||
A message that <emphasis>should</emphasis> be displayed in a dialog box (or to the screen in a console application). The message is rarely present but when used notifies the user of software updates they've requested to hear about, problems with their account (if mail is bouncing to them, we'd like them to give us a current email address), etc. To test this if you're developing a client, use the user account <literal role="username">test</literal> with the password <literal>test</literal> and a message will always be returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
<key name="usejournals" count="opt">
|
||||
&useJournals;
|
||||
</key>
|
||||
|
||||
<key name="moods" count="opt">
|
||||
<des>
|
||||
If you sent the 'getmoods' key in your request, this is returned. The contents are the new moods that have been added on the server since you last requested the list. Your client should cache the mood list on the client's computer to avoid requesting the whole list everytime.
|
||||
</des>
|
||||
&moods;
|
||||
</key>
|
||||
|
||||
<key name="pickws" count="opt">
|
||||
<des>
|
||||
This is requrned if you set "getpickws" in your request. Picture keywords are used to identify which userpic (100x100 icon) to use for that particular post. For instance, the user may have "Angry", "Happy", and "Sleepy" picture keywords which map to certain pictures. The client should also do a case-insensitive compare on this list when a mood is selected or entered, and auto-select the current picture keyword. That way it seems that selecting a mood also sets their corresponding picture.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture keyword.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="pickwurls" count="opt">
|
||||
<des>
|
||||
The URLs of the user pictures. They correspond with the list of
|
||||
picture keywords returned. Note that the content behind these URLs
|
||||
can never change, so if your client downloads these to display, just
|
||||
cache them locally and never hit the servers again to re-download them
|
||||
or to even check if they've been modified.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture URL.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="defaultpicurl" count="opt"><scalar><des>
|
||||
The URL of the default picture (if you sent the 'getpickwurls' key). Note that the content behind this URL can never change, so you can cache it locally; also note that the default picture might have no keyword associated with it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fastserver" count="opt"><scalar><des>
|
||||
LiveJournal sites may have priority servers for paying customers. If this key is both present and set to value "1", then the client has permission to set the "ljfastserver" cookie in subsequent requests. The HTTP request header to send is "Cookie: ljfastserver=1". If you send this header without getting permission from the login mode, your requests will fail. That is, you'll trick the load balancer into directing your request towards the priority servers, but the server you end up hitting won't be happy that you're trying to scam faster access and will deny your request.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="userid" count="1"><scalar><des>
|
||||
The userid of this user on the system. Not required for any other requests to
|
||||
the server, but some developers have wanted it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="menus" count="opt">
|
||||
<des>Returned if you set "getmenus" in your request.</des>
|
||||
<list count="1">
|
||||
<des>List of menu items in order that should be in the LiveJournal web menu in the client application.</des>
|
||||
<struct count="0more">
|
||||
<key name="text" count="1"><scalar><des>
|
||||
The text of the menu item, or "-" for a separator.
|
||||
</des></scalar></key>
|
||||
<key name="url" count="opt"><scalar><des>
|
||||
The URL the menu item should launch, present for all menu items
|
||||
except separators and submenus.
|
||||
</des></scalar></key>
|
||||
<key name="sub" count="opt"><des>
|
||||
If this is present, this menu item is a submenu.
|
||||
</des><list count="0more">
|
||||
<des>Same format as top-level menu structure</des>
|
||||
<struct></struct>
|
||||
</list></key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 755
|
||||
Content-Type: text/xml
|
||||
Date: Sun, 14 Jul 2002 23:45:59 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>userid</name>
|
||||
<value><int>3</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>message</name>
|
||||
<value><string>You need to validate your new email address.
|
||||
Your old one was good, but since you've changed it, you need to re-validate the new one.
|
||||
Visit the support area for more information.</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Test Account</string></value>
|
||||
</member>
|
||||
<member><name>friendgroups</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
<member><name>usejournals</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><string>test2</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
15
livejournal/doc/raw/build/protocol/moods.ent.xml
Executable file
15
livejournal/doc/raw/build/protocol/moods.ent.xml
Executable file
@@ -0,0 +1,15 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id"><scalar><des>
|
||||
The integer moodid.
|
||||
</des></scalar></key>
|
||||
<key name="name"><scalar><des>
|
||||
The mood name.
|
||||
</des></scalar></key>
|
||||
<key name="parent"><scalar><des>
|
||||
The mood's parent (base) moodid.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
178
livejournal/doc/raw/build/protocol/postevent.mode.xml
Executable file
178
livejournal/doc/raw/build/protocol/postevent.mode.xml
Executable file
@@ -0,0 +1,178 @@
|
||||
<method name="postevent">
|
||||
<shortdes>
|
||||
The most important mode, this is how a user actually submits a new log entry to the server.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given all of the require information on a post, optioanlly adding security or meta data, will create a new entry. Will return the itemid of the new post.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The event/log text the user is submitting. Carriage returns are okay (0x0A, 0x0A0D, or 0x0D0A), although 0x0D are removed internally to make everything into Unix-style line-endings (just \ns). Posts may also contain HTML, but be aware that the LiveJournal server converts newlines to HTML <BR>s when displaying them, so your client should not try to insert these itself.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="1"><scalar><des>
|
||||
The subject for this post. Limited to 255 characters. No newlines.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="opt"><scalar><des>
|
||||
Specifies who can read this post. Valid values are <emphasis>public</emphasis> (default), <emphasis>private</emphasis> and <emphasis>usemask</emphasis>. When value is usemask, viewability is controlled by the allowmask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="1"><scalar><des>
|
||||
The current 4-digit year (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mon" count="1"><scalar><des>
|
||||
The current 1- or 2-digit month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="1"><scalar><des>
|
||||
The current 1- or 2-digit day of the month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="hour" count="1"><scalar><des>
|
||||
The current 1- or 2-digit hour from 0 to 23 (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="min" count="1"><scalar><des>
|
||||
The current 1- or 2-digit minute (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt">
|
||||
<des>
|
||||
Set arbitrary (but restricted) meta-data properties to this log item. See <link id="ljp.csp.proplist" />
|
||||
for the documentation of the keys and value data types.
|
||||
</des>
|
||||
<list count="1">
|
||||
<des>The following 'struct' should have property names as the keys, and the values should be a scalar data type.</des>
|
||||
<struct count="0more"/>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If posting to a shared journal, include this key and the username you wish to post to. By default, you post to the journal of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 927
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.postevent</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>This is a test post.
|
||||
</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Test</string></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>pc</string></value>
|
||||
</member>
|
||||
<member><name>year</name>
|
||||
<value><int>2002</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>mon</name>
|
||||
<value><int>7</int></value>
|
||||
</member>
|
||||
<member><name>day</name>
|
||||
|
||||
<value><int>13</int></value>
|
||||
</member>
|
||||
<member><name>hour</name>
|
||||
<value><int>20</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>min</name>
|
||||
<value><int>35</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="anum" count="1"><scalar><des>
|
||||
The key number used to calculate the public itemid ID number for URLs.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique number the server assigned to this post. Currently nothing else in the protocol requires the use of this number so it's pretty much useless, but somebody requested it be returned, so it is.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="anum" count="1"><scalar><des>
|
||||
The authentication number generated for this entry. It can be used by the client to generate URLs, but that is not recommended. (See the returned 'url' element if you want to link to a post.)
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="url" count="1"><scalar><des>
|
||||
The permanent link address to this post. This is an opaque string--you should store it as is. While it will generally follow a predictable pattern, there is no guarantee of any particular format for these, and it may change in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: closer
|
||||
Content-length: 239
|
||||
Content-Type: text/xml
|
||||
Date: Sat, 13 Jul 2002 23:49:53 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
<member><name>anum</name>
|
||||
<value><int>141</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
|
||||
<value><int>1959</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
35
livejournal/doc/raw/build/protocol/proplist2db.pl
Executable file
35
livejournal/doc/raw/build/protocol/proplist2db.pl
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my $dbr = LJ::get_dbh("slave", "master");
|
||||
my $sth;
|
||||
|
||||
my $sth = $dbr->prepare("SELECT * FROM logproplist ORDER BY sortorder");
|
||||
$sth->execute;
|
||||
|
||||
print "<variablelist>\n";
|
||||
print " <title>Log Prop List</title>\n\n";
|
||||
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
print " <term><literal role='log.prop'>$r->{'name'}</literal></term>\n";
|
||||
print " <listitem><formalpara><title>$r->{'prettyname'}</title>\n";
|
||||
print " <para>$r->{'des'}</para>\n";
|
||||
print " <itemizedlist>\n";
|
||||
print " <listitem><formalpara><title>Datatype</title>\n";
|
||||
print " <para>$r->{'datatype'}</para>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " <listitem><formalpara><title>Scope</title>\n";
|
||||
print " <para>$r->{'scope'}</para>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " </itemizedlist>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " </varlistentry>\n\n";
|
||||
}
|
||||
|
||||
print "</variablelist>\n";
|
||||
89
livejournal/doc/raw/build/protocol/sessionexpire.mode.xml
Executable file
89
livejournal/doc/raw/build/protocol/sessionexpire.mode.xml
Executable file
@@ -0,0 +1,89 @@
|
||||
<method name="sessionexpire">
|
||||
<shortdes>
|
||||
Expires session cookies.
|
||||
</shortdes>
|
||||
<des>
|
||||
Using this request mode, you can expire previously generated sessions, whether you
|
||||
generated them using the sessiongenerate call or the user logged in on the web site.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="expireall" count="opt">
|
||||
<scalar><des>
|
||||
If present and true, then all of the user's sessions will be expired.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
<key name="expire" count="opt">
|
||||
<list>
|
||||
<scalar count="0more"><des>
|
||||
Given a list of session ids, will expire each one individually. Session ids can be
|
||||
obtained from previous calls to sessiongenerate--notably, the id is the third field
|
||||
in the session.
|
||||
</des></scalar>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.sessionexpire</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>expireall</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1189
|
||||
Content-Type: text/xml
|
||||
Date: Fri, 26 Mar 2004 18:39:38 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct/></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
108
livejournal/doc/raw/build/protocol/sessiongenerate.mode.xml
Executable file
108
livejournal/doc/raw/build/protocol/sessiongenerate.mode.xml
Executable file
@@ -0,0 +1,108 @@
|
||||
<method name="sessiongenerate">
|
||||
<shortdes>
|
||||
Generate a session cookie.
|
||||
</shortdes>
|
||||
<des>
|
||||
In order to interact with some web based parts of the site, such as the
|
||||
comment exporter, it is often useful to be able to generate a login cookie
|
||||
without having to actually post login information to the login.bml page.
|
||||
This mode will, with proper authentication, provide you with a session
|
||||
cookie to use for authentication purposes.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="expiration" count="opt">
|
||||
<scalar><des>
|
||||
Sessions can either expire in a short amount of time or last for a long period
|
||||
of time. You can specify either "short" or "long" as the value of this parameter.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
<key name="ipfixed" count="opt">
|
||||
<scalar><des>
|
||||
If specified and true, this will cause the server to generate a session that is
|
||||
only valid from the IP address the sessiongenerate request was sent from. If you
|
||||
leave out this value, it will default to allowing any IP address to use this
|
||||
session information.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.sessiongenerate</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>expiration</name>
|
||||
<value><string>long</string></value>
|
||||
</member>
|
||||
|
||||
<member><name>ipfixed</name>
|
||||
<value><string>1</string></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="ljsession" count="1">
|
||||
<scalar><des>
|
||||
The session generated.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 228
|
||||
Content-Type: text/xml
|
||||
Date: Fri, 26 Mar 2004 18:14:17 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
<member><name>ljsession</name>
|
||||
<value><string>ws:test:124:zfFG136kSz</string>
|
||||
</value></member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
259
livejournal/doc/raw/build/protocol/syncitems.mode.xml
Executable file
259
livejournal/doc/raw/build/protocol/syncitems.mode.xml
Executable file
@@ -0,0 +1,259 @@
|
||||
<method name="syncitems">
|
||||
<shortdes>
|
||||
Returns a list of all the items that have been created or updated for a user.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a list (or part of a list) of all the items (journal entries, to-do items, comments) that have been created or updated on LiveJournal since you last downloaded them. Note that the items themselves are not returned --- only the item type and the item number. After you get this you have to go fetch the items using another protocol mode. For journal entries (type "L"), use the getevents mode with a selecttype of "syncitems".
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
The date you last downloaded synced, in "yyyy-mm-dd hh:mm:ss" format. <emphasis>Note</emphasis>: do not make this date up from the client's local computer... send the date from this mode's response of the newest item you have saved on disk.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 495
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.syncitems</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>lastsync</name>
|
||||
<value><string>2002-07-13 00:00:00</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="syncitems" count="1"><list count="1"><struct count="0more">
|
||||
<key name="item" count="1"><scalar><des>
|
||||
The nth item, in the form "Type-Number". Type can be one of "L" for log entries (journal entries), "C" for comments (not implemented), "T" for to-do items (not implemented), or many other things presumably. If your client doesn't know how to fetch an item of a certain type, just ignore them. A new version of your client could later see that it has never downloaded anything of type "T" and go back and fetch everything of that type from the beginning.
|
||||
</des></scalar></key>
|
||||
<key name="action" count="1"><scalar><des>
|
||||
Either "create" or "update". This field isn't too useful, but you may want to make your client verbose and tell the user what it's doing. For example, "Downloading entry 5 of 17: Updated".
|
||||
</des></scalar></key>
|
||||
<key name="time" count="1"><scalar><des>
|
||||
The server time (in the form "yyyy-mm-dd hh:mm:ss") that this creation or update took place. Remember in your local store the most recent for each item type ("L", "T", "C", etc...). This is what you send in subsequent requests in lastsync.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 3360
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:39:30 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>total</name>
|
||||
<value><int>11</int></value>
|
||||
</member>
|
||||
<member><name>count</name>
|
||||
|
||||
<value><int>11</int></value>
|
||||
</member>
|
||||
<member><name>syncitems</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1947</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-13 00:06:26</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>del</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1954</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-13 00:09:05</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>del</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1958</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-13 02:01:07</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1948</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-13 08:27:56</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>update</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1960</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 02:52:18</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1961</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:07:55</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1962</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-14 03:08:14</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1963</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:13:26</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1964</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:17:03</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1959</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-14 14:25:07</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>update</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1965</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-16 04:36:15</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>update</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
3
livejournal/doc/raw/build/protocol/usejournal.ent.xml
Executable file
3
livejournal/doc/raw/build/protocol/usejournal.ent.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<scalar count="1"><des>
|
||||
Journal username that authenticating user has 'usejournal' access in, as given in the 'login' mode.
|
||||
</des></scalar>
|
||||
7
livejournal/doc/raw/build/protocol/usejournals.ent.xml
Executable file
7
livejournal/doc/raw/build/protocol/usejournals.ent.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<des>
|
||||
List of shared/news/community journals that the user has permission
|
||||
to post in.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
Username of community journal.
|
||||
</des></scalar></list>
|
||||
129
livejournal/doc/raw/build/protocol/xml-rpc2db.xsl
Executable file
129
livejournal/doc/raw/build/protocol/xml-rpc2db.xsl
Executable file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
|
||||
|
||||
<xsl:template match="/"><xsl:apply-templates/></xsl:template>
|
||||
<xsl:template match="ljxmlrpc"><xsl:apply-templates/></xsl:template>
|
||||
|
||||
<xsl:template match="method">
|
||||
<refentry><xsl:attribute name="id"><xsl:text>ljp.csp.xml-rpc.</xsl:text><xsl:value-of select="@name"/></xsl:attribute>
|
||||
<refnamediv>
|
||||
<refname><xsl:value-of select="@name"/></refname>
|
||||
<refpurpose><xsl:value-of select="shortdes"/></refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Mode Description</title>
|
||||
<para>
|
||||
<xsl:value-of select="des"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Arguments</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="arguments">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
|
||||
<example>
|
||||
<title>Sample call to <literal>LJ.XMLRPC.<xsl:value-of select="@name"/></literal></title>
|
||||
<para><programlisting>
|
||||
<xsl:value-of select="expost"/>
|
||||
</programlisting></para>
|
||||
</example>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Return Values</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="returns">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
|
||||
<example>
|
||||
<title>Sample return value for <literal>LJ.XMLRPC.<xsl:value-of select="@name"/></literal></title>
|
||||
<para><programlisting>
|
||||
<xsl:value-of select="exreturn"/>
|
||||
</programlisting></para>
|
||||
</example>
|
||||
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<xref><xsl:attribute name="linkend"><xsl:value-of select="@id"/></xsl:attribute></xref>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct">
|
||||
<listitem><para>
|
||||
<emphasis>[struct]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:for-each select="des">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</para><para>
|
||||
Containing keys:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="scalar">
|
||||
<listitem><para>
|
||||
<emphasis>[scalar]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="key">
|
||||
<listitem><para>
|
||||
<emphasis role="bold"><xsl:value-of select="@name"/></emphasis>
|
||||
<xsl:call-template name="count"/>:
|
||||
<xsl:for-each select="des">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list">
|
||||
<listitem><para>
|
||||
<emphasis>[array]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:value-of select="des"/>
|
||||
Containing items:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="scalar|struct|list">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="count">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@count='1'">(required)</xsl:when>
|
||||
<xsl:when test="@count='opt'">(optional)</xsl:when>
|
||||
<xsl:when test="@count='1more'">(required; multiple allowed)</xsl:when>
|
||||
<xsl:when test="@count='0more'">(optional; multiple allowed)</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
41
livejournal/doc/raw/build/protocol/xmlrpc.dtd
Executable file
41
livejournal/doc/raw/build/protocol/xmlrpc.dtd
Executable file
@@ -0,0 +1,41 @@
|
||||
<!-- the 'count' attribute indicates how many times it appears in its
|
||||
parent container. either:
|
||||
1 (once always),
|
||||
opt (optionally once),
|
||||
1more (1 or more times),
|
||||
0more (0 or more times) -->
|
||||
<!ENTITY % countatt "count (1|opt|1more|0more) '1'">
|
||||
|
||||
<!-- presence of keys are either there or optionally there,
|
||||
can't be more than 1: -->
|
||||
<!ENTITY % keycountatt "count (1|opt) '1'">
|
||||
|
||||
<!ELEMENT ljxmlrpc (method*)>
|
||||
|
||||
<!ELEMENT method (shortdes?, des?, arguments, returns, expost, exreturn)>
|
||||
<!ATTLIST method name NMTOKEN #REQUIRED>
|
||||
|
||||
<!-- arguments and return both have a list of values, either structs, lists, or scalars -->
|
||||
<!ELEMENT arguments (struct | list | scalar)*>
|
||||
<!ELEMENT returns (struct | list | scalar)*>
|
||||
|
||||
<!ELEMENT scalar (des?)>
|
||||
<!ATTLIST scalar %countatt;>
|
||||
|
||||
<!ELEMENT struct (key*)>
|
||||
<!ATTLIST struct %countatt;>
|
||||
|
||||
<!ELEMENT key (des?, (scalar | struct | list))>
|
||||
<!ATTLIST key name NMTOKEN #REQUIRED %keycountatt;>
|
||||
|
||||
<!ELEMENT list (des?, (struct | list | scalar)*)>
|
||||
<!ATTLIST list %countatt;>
|
||||
|
||||
<!ELEMENT shortdes (#PCDATA)>
|
||||
<!ELEMENT des (#PCDATA|link)*>
|
||||
|
||||
<!ELEMENT link (#PCDATA)>
|
||||
<!ATTLIST link id NMTOKEN #REQUIRED>
|
||||
|
||||
<!ELEMENT expost (#PCDATA)>
|
||||
<!ELEMENT exreturn (#PCDATA)>
|
||||
47
livejournal/doc/raw/build/protocol/xmlrpc.xml
Executable file
47
livejournal/doc/raw/build/protocol/xmlrpc.xml
Executable file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE ljxmlrpc SYSTEM "xmlrpc.dtd" [
|
||||
|
||||
<!ENTITY authInfo SYSTEM "authinfo.ent.xml">
|
||||
<!ENTITY useJournals SYSTEM "usejournals.ent.xml">
|
||||
<!ENTITY useJournal SYSTEM "usejournal.ent.xml">
|
||||
<!ENTITY friendGroups SYSTEM "friendgroups.ent.xml">
|
||||
<!ENTITY moods SYSTEM "moods.ent.xml">
|
||||
<!ENTITY friendsList SYSTEM "friendslist.ent.xml">
|
||||
|
||||
<!ENTITY mode.checkfriends SYSTEM "checkfriends.mode.xml">
|
||||
<!ENTITY mode.consolecommand SYSTEM "consolecommand.mode.xml">
|
||||
<!ENTITY mode.editevent SYSTEM "editevent.mode.xml">
|
||||
<!ENTITY mode.editfriendgroups SYSTEM "editfriendgroups.mode.xml">
|
||||
<!ENTITY mode.editfriends SYSTEM "editfriends.mode.xml">
|
||||
<!ENTITY mode.friendof SYSTEM "friendof.mode.xml">
|
||||
<!ENTITY mode.getchallenge SYSTEM "getchallenge.mode.xml">
|
||||
<!ENTITY mode.getdaycounts SYSTEM "getdaycounts.mode.xml">
|
||||
<!ENTITY mode.getevents SYSTEM "getevents.mode.xml">
|
||||
<!ENTITY mode.getfriendgroups SYSTEM "getfriendgroups.mode.xml">
|
||||
<!ENTITY mode.getfriends SYSTEM "getfriends.mode.xml">
|
||||
<!ENTITY mode.login SYSTEM "login.mode.xml">
|
||||
<!ENTITY mode.postevent SYSTEM "postevent.mode.xml">
|
||||
<!ENTITY mode.sessionexpire SYSTEM "sessionexpire.mode.xml">
|
||||
<!ENTITY mode.sessiongenerate SYSTEM "sessiongenerate.mode.xml">
|
||||
<!ENTITY mode.syncitems SYSTEM "syncitems.mode.xml">
|
||||
]>
|
||||
<ljxmlrpc>
|
||||
|
||||
&mode.checkfriends;
|
||||
&mode.consolecommand;
|
||||
&mode.editevent;
|
||||
&mode.editfriendgroups;
|
||||
&mode.editfriends;
|
||||
&mode.friendof;
|
||||
&mode.getchallenge;
|
||||
&mode.getdaycounts;
|
||||
&mode.getevents;
|
||||
&mode.getfriends;
|
||||
&mode.getfriendgroups;
|
||||
&mode.login;
|
||||
&mode.postevent;
|
||||
&mode.sessionexpire;
|
||||
&mode.sessiongenerate;
|
||||
&mode.syncitems;
|
||||
|
||||
</ljxmlrpc>
|
||||
66
livejournal/doc/raw/build/titlepage.xsl
Executable file
66
livejournal/doc/raw/build/titlepage.xsl
Executable file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:template match="abstract" mode="titlepage.mode">
|
||||
<div class="{name(.)}">
|
||||
<h3>Abstract</h3>
|
||||
<p><xsl:apply-templates mode="titlepage.mode"/></p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="authorgroup" mode="titlepage.mode">
|
||||
<div class="{name(.)}">
|
||||
<h3>Authors</h3>
|
||||
<p>
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="author" mode="titlepage.mode">
|
||||
<b class="{name(.)}"><xsl:call-template name="person.name"/></b>
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
|
||||
<br />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="editor" mode="titlepage.mode">
|
||||
<b class="{name(.)}">Editor: <xsl:call-template name="person.name"/></b>
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
|
||||
<br />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="address" mode="titlepage.mode">
|
||||
<xsl:param name="suppress-numbers" select="'0'"/>
|
||||
|
||||
<xsl:variable name="rtf">
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$suppress-numbers = '0'
|
||||
and @linenumbering = 'numbered'
|
||||
and $use.extensions != '0'
|
||||
and $linenumbering.extension != '0'">
|
||||
<div class="{name(.)}">
|
||||
<p>
|
||||
<xsl:call-template name="number.rtf.lines">
|
||||
<xsl:with-param name="rtf" select="$rtf"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</div>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="affiliation" mode="titlepage.mode">
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
23
livejournal/doc/raw/entities/authors.ent
Executable file
23
livejournal/doc/raw/entities/authors.ent
Executable file
@@ -0,0 +1,23 @@
|
||||
<!ENTITY author.jproulx "
|
||||
<author>
|
||||
<firstname>Jesse</firstname>
|
||||
<surname>Proulx</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>jproulx@livejournal.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
">
|
||||
|
||||
<!ENTITY author.bradfitz "
|
||||
<author>
|
||||
<firstname>Brad</firstname>
|
||||
<surname>Fitzpatrick</surname>
|
||||
<affiliation>
|
||||
<address>
|
||||
<email>bradfitz@livejournal.com</email>
|
||||
</address>
|
||||
</affiliation>
|
||||
</author>
|
||||
">
|
||||
30
livejournal/doc/raw/entities/books.ent
Executable file
30
livejournal/doc/raw/entities/books.ent
Executable file
@@ -0,0 +1,30 @@
|
||||
<!ENTITY % lj.book SYSTEM "lj.book.ent">
|
||||
<!ENTITY % ljp.book SYSTEM "ljp.book.ent">
|
||||
<!ENTITY % bml.book SYSTEM "../bml.book/book.ent">
|
||||
<!-- Legal Notice should cover both books adequately -->
|
||||
<!ENTITY legalnotice "
|
||||
<legalnotice>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version
|
||||
1.1 or any later version published by the Free Software
|
||||
Foundation; with no invariant sections, nor Front-Cover/Back-Cover
|
||||
Texts.
|
||||
A copy of the license is included in <xref linkend='appx.gfdl'/>
|
||||
</para>
|
||||
</legalnotice>
|
||||
">
|
||||
<!ENTITY copyright '
|
||||
<copyright>
|
||||
<year>1999</year>
|
||||
<year>2000</year>
|
||||
<year>2001</year>
|
||||
<year>2002</year>
|
||||
<year>2003</year>
|
||||
<year>2004</year>
|
||||
<holder><ulink url="http://www.livejournal.com/">LiveJournal</ulink></holder>
|
||||
</copyright>
|
||||
'>
|
||||
%lj.book;
|
||||
%ljp.book;
|
||||
%bml.book;
|
||||
6
livejournal/doc/raw/entities/content.ent
Executable file
6
livejournal/doc/raw/entities/content.ent
Executable file
@@ -0,0 +1,6 @@
|
||||
<!ENTITY % books SYSTEM "books.ent">
|
||||
<!ENTITY % authors SYSTEM "authors.ent">
|
||||
<!ENTITY % pregen SYSTEM "pregen.ent">
|
||||
%books;
|
||||
%authors;
|
||||
%pregen;
|
||||
1
livejournal/doc/raw/entities/entities.xml
Executable file
1
livejournal/doc/raw/entities/entities.xml
Executable file
@@ -0,0 +1 @@
|
||||
<!ENTITY lj "LiveJournal">
|
||||
61
livejournal/doc/raw/entities/lj.book.ent
Executable file
61
livejournal/doc/raw/entities/lj.book.ent
Executable file
@@ -0,0 +1,61 @@
|
||||
<!ENTITY lj.index SYSTEM "../lj.book/index.xml">
|
||||
<!ENTITY lj.preface SYSTEM "../lj.book/preface.xml">
|
||||
|
||||
<!-- Introduction to the System -->
|
||||
|
||||
<!ENTITY lj.intro.index SYSTEM "../lj.book/intro/index.xml">
|
||||
<!ENTITY lj.intro.why SYSTEM "../lj.book/intro/why.xml">
|
||||
<!ENTITY lj.intro.what_is SYSTEM "../lj.book/intro/what_is.xml">
|
||||
<!ENTITY lj.intro.story SYSTEM "../lj.book/intro/story.xml">
|
||||
<!ENTITY lj.intro.goat SYSTEM "../lj.book/intro/goat.xml">
|
||||
|
||||
<!-- Installation Procedures -->
|
||||
|
||||
<!ENTITY lj.install.index SYSTEM "../lj.book/install/index.xml">
|
||||
<!ENTITY lj.install.reqs SYSTEM "../lj.book/install/reqs.xml">
|
||||
<!ENTITY lj.install.general_setup SYSTEM "../lj.book/install/general_setup.xml">
|
||||
<!ENTITY lj.install.apache_setup SYSTEM "../lj.book/install/apache_setup.xml">
|
||||
<!ENTITY lj.install.perl_setup SYSTEM "../lj.book/install/perl_setup.xml">
|
||||
<!ENTITY lj.install.perl.module.list SYSTEM "../lj.book/install/perl.module.gen.xml">
|
||||
<!ENTITY lj.install.mysql_setup SYSTEM "../lj.book/install/mysql_setup.xml">
|
||||
<!ENTITY lj.install.ljconfig SYSTEM "../lj.book/install/ljconfig.xml">
|
||||
<!ENTITY lj.install.ljconfig.vars SYSTEM "../lj.book/install/ljconfig.vars.xml">
|
||||
<!ENTITY lj.install.ljconfig.vars.gen SYSTEM "../lj.book/install/ljconfig.vars.gen.xml">
|
||||
<!ENTITY lj.install.ljconfig.helpurls SYSTEM "../lj.book/install/ljconfig.helpurls.xml">
|
||||
<!ENTITY lj.install.ljconfig.disabled SYSTEM "../lj.book/install/ljconfig.disabled.xml">
|
||||
<!ENTITY lj.install.ljconfig.dbinfo SYSTEM "../lj.book/install/ljconfig.dbinfo.xml">
|
||||
<!ENTITY lj.install.ljconfig.caps SYSTEM "../lj.book/install/ljconfig.caps.xml">
|
||||
<!ENTITY lj.install.schedule_tasks SYSTEM "../lj.book/install/schedule_tasks.xml">
|
||||
<!ENTITY lj.install.finishing SYSTEM "../lj.book/install/finishing.xml">
|
||||
|
||||
<!-- Customization -->
|
||||
|
||||
<!ENTITY lj.customize.index SYSTEM "../lj.book/customize/index.xml">
|
||||
<!ENTITY lj.customize.local_cvs SYSTEM "../lj.book/customize/local_cvs.xml">
|
||||
<!ENTITY lj.customize.images SYSTEM "../lj.book/customize/images.xml">
|
||||
<!ENTITY lj.customize.limits SYSTEM "../lj.book/customize/limits.xml">
|
||||
<!ENTITY lj.customize.layout SYSTEM "../lj.book/customize/layout.xml">
|
||||
<!ENTITY lj.customize.text SYSTEM "../lj.book/customize/text.xml">
|
||||
<!ENTITY lj.customize.tasks SYSTEM "../lj.book/customize/tasks.xml">
|
||||
<!ENTITY lj.customize.hooks SYSTEM "../lj.book/customize/hooks.xml">
|
||||
<!ENTITY lj.customize.hooks.ref SYSTEM "../lj.book/customize/hooks.ref.gen.xml">
|
||||
|
||||
<!-- Administration -->
|
||||
|
||||
<!ENTITY lj.admin.index SYSTEM "../lj.book/admin/index.xml">
|
||||
<!ENTITY lj.admin.createusers SYSTEM "../lj.book/admin/create_users.xml">
|
||||
<!ENTITY lj.admin.caps SYSTEM "../lj.book/admin/caps_list.xml">
|
||||
<!ENTITY lj.admin.cap_list SYSTEM "../lj.book/admin/cap.ref.gen.xml">
|
||||
<!ENTITY lj.admin.privs SYSTEM "../lj.book/admin/privs.xml">
|
||||
<!ENTITY lj.admin.privs.ref SYSTEM "../lj.book/admin/privs.ref.gen.xml">
|
||||
<!ENTITY lj.admin.console SYSTEM "../lj.book/admin/console.xml">
|
||||
<!ENTITY lj.admin.console.ref SYSTEM "../lj.book/admin/console.ref.gen.xml">
|
||||
<!ENTITY lj.admin.sysban SYSTEM "../lj.book/admin/sysban.xml">
|
||||
|
||||
<!-- Features -->
|
||||
|
||||
<!ENTITY lj.features.index SYSTEM "../lj.book/features/index.xml">
|
||||
<!ENTITY lj.features.support SYSTEM "../lj.book/features/support.xml">
|
||||
<!ENTITY lj.features.topics SYSTEM "../lj.book/features/topics.xml">
|
||||
|
||||
<!ENTITY appx.gfdl SYSTEM "../appendices/gfdl.xml">
|
||||
68
livejournal/doc/raw/entities/ljp.book.ent
Executable file
68
livejournal/doc/raw/entities/ljp.book.ent
Executable file
@@ -0,0 +1,68 @@
|
||||
<!ENTITY ljp.index SYSTEM "../ljp.book/index.xml">
|
||||
|
||||
<!-- Internals Chapters -->
|
||||
|
||||
<!ENTITY ljp.int.index SYSTEM "../ljp.book/int/index.xml">
|
||||
<!ENTITY ljp.int.bml.faq SYSTEM "../ljp.book/int/bml_faq.xml">
|
||||
<!ENTITY ljp.int.cap_classes SYSTEM "../ljp.book/int/cap_classes.xml">
|
||||
<!ENTITY ljp.int.cap_list SYSTEM "../ljp.book/int/cap.ref.gen.xml">
|
||||
|
||||
<!-- Client/Server Protocol Reference -->
|
||||
|
||||
<!ENTITY ljp.csp.index SYSTEM "../ljp.book/csp/index.xml">
|
||||
<!ENTITY ljp.csp.guide SYSTEM "../ljp.book/csp/cs.xml">
|
||||
<!ENTITY ljp.csp.auth SYSTEM "../ljp.book/csp/auth.xml">
|
||||
<!ENTITY ljp.csp.proplist SYSTEM "../ljp.book/csp/proplist.xml">
|
||||
<!ENTITY ljp.csp.proplist.ref SYSTEM "../ljp.book/csp/proplist.ref.gen.xml">
|
||||
<!ENTITY ljp.csp.versions SYSTEM "../ljp.book/csp/versions.xml">
|
||||
<!ENTITY ljp.csp.appx.faq SYSTEM "../ljp.book/csp/appx.faq.xml">
|
||||
<!ENTITY ljp.csp.blogger SYSTEM "../ljp.book/csp/blogger.xml">
|
||||
|
||||
<!-- Flat Protocol -->
|
||||
|
||||
<!ENTITY ljp.csp.flat.index SYSTEM "../ljp.book/csp/flat/index.xml">
|
||||
<!ENTITY ljp.csp.flat.protocol SYSTEM "../ljp.book/csp/flat/protocol.gen.xml">
|
||||
|
||||
<!-- XML-RPC Protocol -->
|
||||
|
||||
<!ENTITY ljp.csp.xml-rpc.index SYSTEM "../ljp.book/csp/xml-rpc/index.xml">
|
||||
<!ENTITY ljp.csp.xml-rpc.protocol SYSTEM "../ljp.book/csp/xml-rpc/protocol.gen.xml">
|
||||
|
||||
<!-- Programming Guidelines Chapters -->
|
||||
|
||||
<!ENTITY ljp.prog-guide.index SYSTEM "../ljp.book/prog-guide/index.xml">
|
||||
<!ENTITY ljp.prog-guide.security SYSTEM "../ljp.book/prog-guide/security.xml">
|
||||
<!ENTITY ljp.prog-guide.database SYSTEM "../ljp.book/prog-guide/database.xml">
|
||||
<!ENTITY ljp.prog-guide.general SYSTEM "../ljp.book/prog-guide/general.xml">
|
||||
<!ENTITY ljp.prog-guide.performance SYSTEM "../ljp.book/prog-guide/performance.xml">
|
||||
<!ENTITY ljp.prog-guide.patches SYSTEM "../ljp.book/prog-guide/patches.xml">
|
||||
<!ENTITY ljp.prog-guide.perl_style SYSTEM "../ljp.book/prog-guide/perl_style.xml">
|
||||
|
||||
<!-- Style Systems -->
|
||||
|
||||
<!ENTITY ljp.styles.index SYSTEM "../ljp.book/styles/index.xml">
|
||||
<!ENTITY ljp.styles.compare SYSTEM "../ljp.book/styles/compare.xml">
|
||||
|
||||
<!-- S1 -->
|
||||
<!ENTITY ljp.styles.s1 SYSTEM "../ljp.book/styles/s1/index.xml">
|
||||
<!ENTITY ljp.styles.s1.history SYSTEM "../ljp.book/styles/s1/history.xml">
|
||||
<!ENTITY ljp.styles.s1.design SYSTEM "../ljp.book/styles/s1/design.xml">
|
||||
<!ENTITY ljp.styles.s1.ref.gen SYSTEM "../ljp.book/styles/s1/ref.gen.xml">
|
||||
|
||||
<!-- S2-->
|
||||
<!ENTITY ljp.styles.s2 SYSTEM "../ljp.book/styles/s2/index.xml">
|
||||
<!ENTITY ljp.styles.s2.history SYSTEM "../ljp.book/styles/s2/history.xml">
|
||||
<!ENTITY ljp.styles.s2.design SYSTEM "../ljp.book/styles/s2/design.xml">
|
||||
|
||||
<!-- Database Schema -->
|
||||
|
||||
<!ENTITY ljp.dbschema.index SYSTEM "../ljp.book/db/index.xml">
|
||||
<!ENTITY ljp.dbschema.ref SYSTEM "../ljp.book/db/schema.gen.xml">
|
||||
<!ENTITY ljp.dbschema.reluser SYSTEM "../ljp.book/db/reluser.xml">
|
||||
|
||||
<!-- Application Programming Interface -->
|
||||
|
||||
<!ENTITY ljp.api.index SYSTEM "../ljp.book/api/index.xml">
|
||||
<!ENTITY ljp.api.ref SYSTEM "../ljp.book/api/api.gen.xml">
|
||||
|
||||
<!ENTITY appx.gfdl SYSTEM "../appendices/gfdl.xml">
|
||||
372
livejournal/doc/raw/http-interface.txt
Executable file
372
livejournal/doc/raw/http-interface.txt
Executable file
@@ -0,0 +1,372 @@
|
||||
accountstatus.bml
|
||||
GET
|
||||
authas
|
||||
POST
|
||||
statusvis
|
||||
|
||||
allpics.bml
|
||||
GET
|
||||
user
|
||||
|
||||
betatest.bml - 11/24
|
||||
POST
|
||||
yes
|
||||
no
|
||||
|
||||
changepassword.bml - 11/24
|
||||
POST
|
||||
user
|
||||
password
|
||||
newpass1
|
||||
newpass2
|
||||
mode
|
||||
|
||||
comment_post.bml - dead page
|
||||
Form
|
||||
user
|
||||
month
|
||||
|
||||
comment_recv.bml - dead page
|
||||
Form
|
||||
user
|
||||
month
|
||||
|
||||
create.bml - 11/24
|
||||
GET
|
||||
code
|
||||
POST
|
||||
mode
|
||||
code
|
||||
user
|
||||
name
|
||||
email
|
||||
password1
|
||||
password2
|
||||
under13
|
||||
over13
|
||||
agree_tos
|
||||
code
|
||||
cluster_id
|
||||
agree_tos
|
||||
initial_optional_friend_$friend
|
||||
|
||||
delcomment.bml
|
||||
GET
|
||||
journal
|
||||
id
|
||||
POST
|
||||
ban
|
||||
|
||||
directory.bml 11/24
|
||||
GET
|
||||
opt_sort
|
||||
opt_format
|
||||
int_like
|
||||
s_com
|
||||
|
||||
POST
|
||||
s_com
|
||||
|
||||
editinfo.bml
|
||||
GET
|
||||
authas
|
||||
POST
|
||||
unban
|
||||
name
|
||||
name_absent
|
||||
country
|
||||
zip
|
||||
stateother
|
||||
statedrop
|
||||
city
|
||||
year
|
||||
month
|
||||
day
|
||||
email
|
||||
use_txtmsg
|
||||
txtmsg_provider
|
||||
txtmsg_number
|
||||
url
|
||||
bio_absent
|
||||
allow_infosho
|
||||
allow_getljnews
|
||||
opt_showtalklinks
|
||||
opt_gettalkemail
|
||||
opt_htmlemail
|
||||
opt_mangleemail
|
||||
opt_whocanreply
|
||||
allow_contactshow
|
||||
contact_showsec
|
||||
oldenc
|
||||
journaltitle
|
||||
journalsubtitle
|
||||
friendspagetitle
|
||||
opt_stylemine
|
||||
opt_blockrobots
|
||||
opt_bdaymail
|
||||
opt_hidefriendsofs
|
||||
opt_nctalklinks
|
||||
opt_weblogscom
|
||||
opt_whoscreened
|
||||
sidx_bdate
|
||||
sidx_loc
|
||||
state
|
||||
howhear
|
||||
bio
|
||||
txtmsg_security
|
||||
interests_absent
|
||||
interests
|
||||
|
||||
editjournal.bml
|
||||
GET
|
||||
authas
|
||||
usejournal
|
||||
journal
|
||||
itemid
|
||||
POST
|
||||
usejournal
|
||||
itemid
|
||||
$_
|
||||
prop_current_mood
|
||||
secuirty
|
||||
custom_bit_$bit
|
||||
selecttype
|
||||
howmany
|
||||
|
||||
editpics.bml
|
||||
GET
|
||||
authas
|
||||
POST
|
||||
action:save
|
||||
delete_$pic->{'picid'}
|
||||
defaultpic
|
||||
src
|
||||
urlpic
|
||||
userpic
|
||||
make_default
|
||||
|
||||
export.bml
|
||||
GET
|
||||
authas
|
||||
|
||||
export_do.bml
|
||||
GET
|
||||
authas
|
||||
POST
|
||||
year
|
||||
month
|
||||
encid
|
||||
encoding
|
||||
field_${f}
|
||||
field_currents
|
||||
format
|
||||
header
|
||||
notranslation
|
||||
|
||||
go.bml 11/25
|
||||
GET
|
||||
redir_type
|
||||
redir_user
|
||||
redir_vhost
|
||||
redir_key
|
||||
itemid
|
||||
journal
|
||||
dir
|
||||
|
||||
index.bml 11/25
|
||||
GET
|
||||
frank
|
||||
|
||||
interests.bml
|
||||
GET
|
||||
view
|
||||
mode
|
||||
intid
|
||||
user
|
||||
authas
|
||||
fromuser
|
||||
POST
|
||||
mode
|
||||
allintids
|
||||
int_$fromint
|
||||
fromuser
|
||||
|
||||
login.bml
|
||||
GET
|
||||
authas
|
||||
ret
|
||||
POST
|
||||
user
|
||||
expire
|
||||
bindip
|
||||
password
|
||||
action:change
|
||||
action:login
|
||||
action:logout
|
||||
ref
|
||||
|
||||
logout.bml 11/25
|
||||
GET
|
||||
user
|
||||
sessid
|
||||
POST
|
||||
user
|
||||
sessid
|
||||
POST
|
||||
action:killall
|
||||
|
||||
lostinfo.bml
|
||||
POST
|
||||
lostpass
|
||||
email_p
|
||||
user
|
||||
lostuser
|
||||
email_u
|
||||
|
||||
modify.bml
|
||||
GET
|
||||
authas
|
||||
user
|
||||
POST
|
||||
journaldomain
|
||||
moodthemeid
|
||||
opt_forcemoodtheme
|
||||
themetype
|
||||
themeid
|
||||
theme_cust:$_
|
||||
themecolors_dig
|
||||
theme_cust:$col->[0]
|
||||
overrides
|
||||
opt_usesharedpic
|
||||
s1_${view}_style
|
||||
$uprop
|
||||
|
||||
meme.bml 11/25
|
||||
GET
|
||||
url
|
||||
skip
|
||||
|
||||
moodlist.bml 11/25
|
||||
GET
|
||||
moodtheme
|
||||
hidederived
|
||||
details
|
||||
|
||||
multisearch.bml 11/25
|
||||
GET
|
||||
type
|
||||
q
|
||||
POST
|
||||
type
|
||||
q
|
||||
|
||||
pupkey.bml
|
||||
GET
|
||||
user
|
||||
|
||||
register.bml
|
||||
POST
|
||||
action:Send
|
||||
|
||||
talkmulti.bml
|
||||
POST
|
||||
mode
|
||||
journal
|
||||
ditemid
|
||||
|
||||
talkpost.bml
|
||||
Form
|
||||
itemid
|
||||
replyto
|
||||
journal
|
||||
prop_picture_keyword
|
||||
|
||||
talkpost_do.bml
|
||||
FORM
|
||||
body
|
||||
submitpreview
|
||||
usertype
|
||||
|
||||
talkread.bml
|
||||
GET
|
||||
itemid
|
||||
journal
|
||||
thread
|
||||
viewall
|
||||
page
|
||||
view
|
||||
|
||||
talkscreen.bml 11/25
|
||||
GET
|
||||
mode
|
||||
talkid
|
||||
journal
|
||||
confirm
|
||||
POST
|
||||
mode
|
||||
talkid
|
||||
journal
|
||||
confirm
|
||||
|
||||
unsubscribe.bml 11/25
|
||||
GET
|
||||
aaid
|
||||
auth
|
||||
POST
|
||||
aaid
|
||||
auth
|
||||
confirm
|
||||
|
||||
update.bml
|
||||
GET
|
||||
altlogin
|
||||
mode
|
||||
user
|
||||
subject
|
||||
event
|
||||
POST
|
||||
do_spellcheck
|
||||
event
|
||||
user
|
||||
altlogin
|
||||
password
|
||||
showform
|
||||
webversion
|
||||
hpassword
|
||||
security
|
||||
custom_bit_$bit
|
||||
usejournal
|
||||
$_
|
||||
prop_opt_$_
|
||||
prop_current_mood
|
||||
year
|
||||
mon
|
||||
day
|
||||
hour
|
||||
min
|
||||
subject
|
||||
event
|
||||
prop_opt_$prop
|
||||
prop_picture_keyword
|
||||
prop_current_mood
|
||||
prop_current_moodid
|
||||
prop_current_music
|
||||
|
||||
userinfo.bml
|
||||
GET
|
||||
mode
|
||||
user
|
||||
userid
|
||||
viewall
|
||||
|
||||
utf8convert.bml 11/25
|
||||
GET
|
||||
authas
|
||||
mode
|
||||
area
|
||||
encid
|
||||
forceview
|
||||
POST
|
||||
mode
|
||||
area
|
||||
encid
|
||||
27
livejournal/doc/raw/index.xml
Executable file
27
livejournal/doc/raw/index.xml
Executable file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE set SYSTEM "/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd" [
|
||||
<!ENTITY % content SYSTEM "entities/content.ent">
|
||||
%content;
|
||||
]>
|
||||
<set id="index" status="prelim" lang="en">
|
||||
<setinfo>
|
||||
<title>LiveJournal Server</title>
|
||||
<subtitle>Technical Info</subtitle>
|
||||
<authorgroup>
|
||||
&author.jproulx;
|
||||
&author.bradfitz;
|
||||
</authorgroup>
|
||||
<abstract>
|
||||
<para>
|
||||
This documentation intends to cover everything related to
|
||||
installing, administrating, and programming the LiveJournal
|
||||
Server software.
|
||||
</para>
|
||||
</abstract>
|
||||
©right;
|
||||
&legalnotice;
|
||||
</setinfo>
|
||||
&lj.index;
|
||||
&bml.index;
|
||||
&ljp.index;
|
||||
</set>
|
||||
92
livejournal/doc/raw/int/db/db2ref.xsl
Executable file
92
livejournal/doc/raw/int/db/db2ref.xsl
Executable file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!-- LiveJournal XSLT stylesheet created by Tribeless Nomad (AJW) -->
|
||||
<!-- converts DB schema documentation from custom XML to DocBook XML -->
|
||||
<!-- The source document should comply with dbschema.dtd version 1.0.4. -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" indent="yes" />
|
||||
|
||||
<xsl:template match="/">
|
||||
|
||||
<!-- W3C-compliant processors emit an XML declaration by default. -->
|
||||
|
||||
<reference>
|
||||
<title>Schema Browser</title>
|
||||
<xsl:for-each select="dbschema/dbtbl">
|
||||
<refentry><xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
||||
<refnamediv>
|
||||
<refname><database class="table"><xsl:value-of select="name"/></database></refname>
|
||||
<refpurpose><xsl:apply-templates select="description/node()"/></refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title><database class="table"><xsl:value-of select="name"/></database></title>
|
||||
<informaltable><tgroup cols="5">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Column name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Null</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="dbcol">
|
||||
<row>
|
||||
<entry><database class="field"><xsl:value-of select="name"/></database></entry>
|
||||
<entry><type><xsl:value-of select="@type"/></type></entry>
|
||||
<entry align="center"><xsl:if test="@required[.='false']">YES</xsl:if></entry>
|
||||
<entry align="center"><xsl:if test="@default"><literal role="value"><xsl:value-of select="@default"/></literal></xsl:if></entry>
|
||||
<entry><xsl:apply-templates select="description/node()"/></entry>
|
||||
</row>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</tgroup></informaltable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="dbkey">
|
||||
<informaltable><tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Key name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Column(s)</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:for-each select="dbkey">
|
||||
<row>
|
||||
<entry>
|
||||
<database class="key1"><xsl:value-of select="@name"/></database>
|
||||
</entry>
|
||||
<entry>
|
||||
<type><xsl:value-of select="@type"/></type>
|
||||
</entry>
|
||||
<entry>
|
||||
<xsl:for-each select="id(@colids)">
|
||||
<database class="field"><xsl:value-of select="name"/></database>
|
||||
|
||||
<xsl:if test="position() != last()">, </xsl:if>
|
||||
</xsl:for-each>
|
||||
</entry>
|
||||
</row>
|
||||
</xsl:for-each>
|
||||
</tbody>
|
||||
</tgroup></informaltable>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<para>No keys defined.</para>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</xsl:for-each>
|
||||
</reference>
|
||||
</xsl:template>
|
||||
<xsl:template match="dbtblref"><link><xsl:attribute name="linkend"><xsl:value-of select="@tblid"/></xsl:attribute><database class="table"><xsl:value-of select="."/></database></link></xsl:template>
|
||||
<xsl:template match="dbcolref"><database class="field"><xsl:value-of select="."/></database></xsl:template>
|
||||
|
||||
<!-- I don't think the following template should be necessary, but in IE5 it is: -->
|
||||
<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
35
livejournal/doc/raw/int/db/dbschema.dtd
Executable file
35
livejournal/doc/raw/int/db/dbschema.dtd
Executable file
@@ -0,0 +1,35 @@
|
||||
<!-- DTD for LiveJournal database schema documentation in XML -->
|
||||
<!-- draft version created by Tribeless Nomad (AJW), April 30, 2001 -->
|
||||
<!-- Send questions and comments to: tribelessnomad (at) att.net -->
|
||||
|
||||
<!-- Revision history:
|
||||
1.0.2 2001 May 1 AJW modified dbtbl, dbcol, dbkey, dbtblref, dbcolref
|
||||
1.0.1 2001 May 1 AJW added dbkey, modified dbtbl, dbcol
|
||||
1.0.0 2001 Apr 30 AJW released first draft version
|
||||
-->
|
||||
|
||||
<!-- Documents are expected to use 'dbschema' as the root element. -->
|
||||
|
||||
<!ELEMENT dbschema (dbtbl+)>
|
||||
|
||||
<!ELEMENT dbtbl (name, description?, dbcol+, dbkey*, data?)>
|
||||
<!ATTLIST dbtbl id ID #IMPLIED public_browsable (0|1) #IMPLIED>
|
||||
|
||||
<!ELEMENT dbcol (name, description?)>
|
||||
<!ATTLIST dbcol type CDATA #REQUIRED size CDATA #IMPLIED required (true|false) #REQUIRED default CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT dbkey EMPTY>
|
||||
<!ATTLIST dbkey name NMTOKEN #IMPLIED type (INDEX|UNIQUE|PRIMARY) #REQUIRED colids IDREFS #REQUIRED>
|
||||
|
||||
<!ELEMENT data ANY>
|
||||
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
|
||||
<!ELEMENT description (#PCDATA | dbtblref | dbcolref)*>
|
||||
|
||||
<!ELEMENT dbtblref (#PCDATA)>
|
||||
<!ATTLIST dbtblref tblid IDREF #REQUIRED>
|
||||
|
||||
<!ELEMENT dbcolref (#PCDATA)>
|
||||
<!ATTLIST dbcolref colid IDREF #REQUIRED>
|
||||
|
||||
126
livejournal/doc/raw/int/db/dbschema.pl
Executable file
126
livejournal/doc/raw/int/db/dbschema.pl
Executable file
@@ -0,0 +1,126 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my $dbr = LJ::get_dbh("slave", "master");
|
||||
my $sth;
|
||||
|
||||
sub magic_links
|
||||
{
|
||||
my $des = shift;
|
||||
$$des =~ s!table\[(\w+?)\]!<dbtblref tblid="_$1">$1</dbtblref>!g;
|
||||
}
|
||||
|
||||
sub dump_xml
|
||||
{
|
||||
my $tables = shift;
|
||||
|
||||
print "<?xml version=\"1.0\" ?>\n";
|
||||
print "<!DOCTYPE dbschema SYSTEM \"dbschema.dtd\">\n";
|
||||
print "<dbschema>\n";
|
||||
foreach my $table (sort keys %$tables)
|
||||
{
|
||||
print "<dbtbl id=\"_$table\">\n";
|
||||
|
||||
# table name
|
||||
print "<name>$table</name>\n";
|
||||
|
||||
# description of table
|
||||
if ($tables->{$table}->{'des'}) {
|
||||
my $des = $tables->{$table}->{'des'};
|
||||
&magic_links(\$des);
|
||||
print "<description>$des</description>\n";
|
||||
}
|
||||
|
||||
# columns
|
||||
foreach my $col (@{$tables->{$table}->{'cols'}})
|
||||
{
|
||||
print "<dbcol id=\"_$table.$col->{'name'}\" type=\"$col->{'type'}\" required=\"$col->{'required'}\" default=\"$col->{'default'}\">\n";
|
||||
print "<name>$col->{'name'}</name>\n";
|
||||
if ($col->{'des'}) {
|
||||
my $des = $col->{'des'};
|
||||
&magic_links(\$des);
|
||||
print "<description>$des</description>\n";
|
||||
}
|
||||
print "</dbcol>\n";
|
||||
}
|
||||
|
||||
# indexes
|
||||
foreach my $indexname (sort keys %{$tables->{$table}->{'index'}})
|
||||
{
|
||||
my $index = $tables->{$table}->{'index'}->{$indexname};
|
||||
|
||||
print "<dbkey name=\"$indexname\" type=\"$index->{'type'}\" colids=\"", join(" ", @{$index->{'cols'}}), "\" />\n";
|
||||
}
|
||||
|
||||
print "</dbtbl>\n";
|
||||
}
|
||||
print "</dbschema>\n";
|
||||
}
|
||||
|
||||
my %table;
|
||||
my %coldes;
|
||||
|
||||
$sth = $dbr->prepare("SHOW TABLES");
|
||||
$sth->execute;
|
||||
while (my ($table) = $sth->fetchrow_array) {
|
||||
$table{$table} = {};
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SELECT tablename, public_browsable, des FROM schematables");
|
||||
$sth->execute;
|
||||
while (my ($name, $public, $des) = $sth->fetchrow_array) {
|
||||
next unless (defined $table{$name});
|
||||
$table{$name} = { 'public' => $public, 'des' => $des };
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SELECT tablename, colname, des FROM schemacols");
|
||||
$sth->execute;
|
||||
while (my ($table, $col, $des) = $sth->fetchrow_array) {
|
||||
next unless (defined $table{$table});
|
||||
$coldes{$table}->{$col} = $des;
|
||||
}
|
||||
|
||||
foreach my $table (sort keys %table)
|
||||
{
|
||||
$sth = $dbr->prepare("DESCRIBE $table");
|
||||
$sth->execute;
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
my $col = {};
|
||||
$col->{'name'} = $r->{'Field'};
|
||||
|
||||
my $type = $r->{'Type'};
|
||||
$type =~ s/int\(\d+\)/int/g;
|
||||
if ($r->{'Extra'} eq "auto_increment") {
|
||||
$type .= " auto_increment";
|
||||
}
|
||||
$col->{'type'} = $type;
|
||||
|
||||
$col->{'default'} = $r->{'Default'};
|
||||
$col->{'required'} = $r->{'Null'} eq "YES" ? "false" : "true";
|
||||
|
||||
$col->{'des'} = $coldes{$table}->{$r->{'Field'}};
|
||||
|
||||
push @{$table{$table}->{'cols'}}, $col;
|
||||
}
|
||||
|
||||
$sth = $dbr->prepare("SHOW INDEX FROM $table");
|
||||
$sth->execute;
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
my $name = $r->{'Key_name'};
|
||||
my $type = $r->{'Non_unique'} ? "INDEX" : "UNIQUE";
|
||||
if ($name eq "PRIMARY") { $type = "PRIMARY"; }
|
||||
|
||||
$table{$table}->{'index'}->{$name}->{'type'} = $type;
|
||||
push @{$table{$table}->{'index'}->{$name}->{'cols'}}, "_$table.$r->{'Column_name'}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
&dump_xml(\%table);
|
||||
9
livejournal/doc/raw/int/db/schema.xml
Executable file
9
livejournal/doc/raw/int/db/schema.xml
Executable file
@@ -0,0 +1,9 @@
|
||||
<chapter>
|
||||
<?dbhtml filename="schema.html"?>
|
||||
<title>Database Schema</title>
|
||||
|
||||
<para>
|
||||
FIXME: Since a reference can't go in a chapter (?), this has nothing here. Go look at the reference in the book. :P
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
204
livejournal/doc/raw/int/programming-guidelines.xml
Executable file
204
livejournal/doc/raw/int/programming-guidelines.xml
Executable file
@@ -0,0 +1,204 @@
|
||||
<chapter>
|
||||
<?dbhtml filename="programming-guidelines.html"?>
|
||||
<title>Programming Guidelines</title>
|
||||
|
||||
<para>
|
||||
If you're contributing code back into LiveJournal, be sure to follow
|
||||
the following guidelines:
|
||||
</para>
|
||||
|
||||
<!-- SECURITY -->
|
||||
<itemizedlist>
|
||||
<title>
|
||||
Security
|
||||
</title>
|
||||
<listitem><para>
|
||||
all GET/POST form values go into %FORM into BML, but check
|
||||
<function>LJ::did_post()</function> on critical actions. GET requests can be easily
|
||||
spoofed, or hidden in images, etc.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
never read in arbitrary amounts of input
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
never use unsanitized data in a command or SQL
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- GENERAL -->
|
||||
<itemizedlist>
|
||||
<title>
|
||||
General
|
||||
</title>
|
||||
<listitem><para>
|
||||
BML pages shouldn't interface with the database much. Use the
|
||||
LJ::* API & the protocol handler.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
always use the <function>LJ::</function> functions that take an explicit database
|
||||
handle. don't use the old <function>main::</function> functions that use the global
|
||||
$dbh.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
all files should have <sgmltag><LJDEP></sgmltag> edge dependency somewhere, usually
|
||||
at the bottom.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
using userids (integers) for things is better than using
|
||||
users (strings), except in URL arguments, where pretty
|
||||
is more important than speed.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
in BML page, use BML blocks defined in global.look:
|
||||
LJUSER, P, H1, H2, STANDOUT, HR, etc...
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
all HTML should be XHTML compliant.:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
lower case tags, <sgmltag><BR></sgmltag> ⇒ <sgmltag><br /></sgmltag>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
quotes around attributes <font face="helvetica">
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
no bare & chars ... always escape them: &amp; and
|
||||
<a href="foo.bml?a=1&amp;b=2">...</a>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
use of multiple files to do one function is deprecated. there
|
||||
should no longer be "foo.bml" and "foo_do.bml" like there used
|
||||
to. that's ugly.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
tab is a formatting command, not a character. (TODO: add note
|
||||
about save hooks for emacs & vi) there should be spaces in the
|
||||
files, not tab characters
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- DATABASE -->
|
||||
|
||||
<itemizedlist>
|
||||
<title>Database</title>
|
||||
<listitem><para>
|
||||
check your db index usage... mysql's "EXPLAIN" is your friend.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
between LOCK TABLES & UNLOCK TABLES, never call a subroutine.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
check the DB error code after an SQL statement. just because
|
||||
it worked once and the SQL is correct, that doesn't mean the
|
||||
table might not go corrupt, a disk might fill up, or index
|
||||
space within the file might not fill up. errors happen.
|
||||
deal with them.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
preferred way to break up a long SQL query:
|
||||
<programlisting>
|
||||
$sth = $dbh->prepare("SELECT cola, colb, colc, cold FROM foo ".
|
||||
"WHERE colb<>cola AND colc=22");
|
||||
</programlisting>
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Note on variable naming:
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><computeroutput>$sth</computeroutput></entry>
|
||||
<entry>statement handle</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$dbh</computeroutput></entry>
|
||||
<entry>one database handle (usually the master)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$dbs</computeroutput></entry>
|
||||
<entry>set of database handles [master(, slave)]</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$dbr</computeroutput></entry>
|
||||
<entry>read-only slave db handle (used for selects)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$dbarg</computeroutput></entry>
|
||||
<entry>argument that can take a $dbh/r or $dbs</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$remote</computeroutput></entry>
|
||||
<entry>
|
||||
hashref of remote user, based on cookies. will contain 'userid' and
|
||||
'user' params, unless faster get_remote_noauth was used, in which case
|
||||
only 'user' will be present.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><computeroutput>$u</computeroutput></entry>
|
||||
<entry>a user 'object' (a hashref)</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- Performance and Scalability -->
|
||||
|
||||
<itemizedlist>
|
||||
<title>Performance & Scalability</title>
|
||||
<listitem><para>
|
||||
Large chunks of code should be preloaded in libraries. Code
|
||||
in BML pages is re-evaled on every request, so it should
|
||||
be small. If you need a lot of code, put it in a library
|
||||
and load it in cgi-bin/lj-bml-(init|local).pl
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
don't write temporary files to disk... all LJ code should be able
|
||||
to run on a cluster of web servers with no session persistence
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
if you're calling a function with a $dbarg parameter and you
|
||||
have both a <computeroutput>$dbs</computeroutput> and <computeroutput>$dbh</computeroutput> available, call the function with
|
||||
your <computeroutput>$dbs</computeroutput> ... otherwise the function and all its callees
|
||||
can't ever use the slave databases.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- Patches -->
|
||||
|
||||
<itemizedlist>
|
||||
<title>Patches</title>
|
||||
<listitem><para>
|
||||
all patches sent in should be in diff -u format
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
don't send in patches that comment out old code. if
|
||||
we want the old code, we'll go get it from CVS.. that's
|
||||
what it's for
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- Perl Style -->
|
||||
|
||||
<itemizedlist>
|
||||
<title>Perl Style</title>
|
||||
<listitem><para>
|
||||
<computeroutput>foo()</computeroutput> looks prettier than
|
||||
<computeroutput>&foo()</computeroutput>. let perl 4 die.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
lines longer than 80 characters are okay, but not great.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
if you're in package LJ and calling an LJ::* API function,
|
||||
go ahead and type the extra four characters (LJ::) even
|
||||
if they're not necessary... being explicit is nice for
|
||||
the reader.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
</chapter>
|
||||
14
livejournal/doc/raw/int/protocol/Makefile
Executable file
14
livejournal/doc/raw/int/protocol/Makefile
Executable file
@@ -0,0 +1,14 @@
|
||||
all: reference.gen testbook.html
|
||||
|
||||
reference.gen: to_docbook.xsl xmlrpc.xml
|
||||
(xsltproc to_docbook.xsl xmlrpc.xml > reference.gen~) || true
|
||||
mv reference.gen~ reference.gen
|
||||
|
||||
xmlrpc.xml: xmlrpc.dtd authinfo.ent.xml checkfriends.mode.xml editevent.mode.xml editfriendgroups.mode.xml editfriends.mode.xml friendgroups.ent.xml friendof.mode.xml friendslist.ent.xml getdaycounts.mode.xml getevents.mode.xml getfriendgroups.mode.xml getfriends.mode.xml login.mode.xml moods.ent.xml postevent.mode.xml syncitems.mode.xml usejournal.ent.xml usejournals.ent.xml
|
||||
|
||||
testbook.html: reference.gen testbook.xml
|
||||
xsltproc $(LJHOME)/doc/raw/docbook-xsl-1.45/html/docbook.xsl testbook.xml > testbook.html~ || true
|
||||
mv testbook.html~ testbook.html
|
||||
|
||||
clean:
|
||||
rm reference.gen testbook.html
|
||||
16
livejournal/doc/raw/int/protocol/authinfo.ent.xml
Executable file
16
livejournal/doc/raw/int/protocol/authinfo.ent.xml
Executable file
@@ -0,0 +1,16 @@
|
||||
<key name="username" count="1">
|
||||
<scalar><des>
|
||||
Username of user logging in.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="password" count="opt">
|
||||
<scalar><des>
|
||||
Password of user logging in in plaintext. Either this or "hpassword" must be present.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="hpassword" count="opt">
|
||||
<scalar><des>
|
||||
MD5 digest of user's password. Not much more secure than password, but at least it's not in plain text.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
42
livejournal/doc/raw/int/protocol/checkfriends.mode.xml
Executable file
42
livejournal/doc/raw/int/protocol/checkfriends.mode.xml
Executable file
@@ -0,0 +1,42 @@
|
||||
<method name="checkfriends">
|
||||
<shortdes>
|
||||
Checks to see if your friends list has been updated since a specified time.
|
||||
</shortdes>
|
||||
<des>
|
||||
Mode that clients can use to poll the server to see if their friends list has been updated. This request is extremely quick, and is the preferred way for users to see when their friends list is updated, rather than pounding on reload in their browser, which is stressful on the serves.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastupdate" count="1"><scalar><des>
|
||||
The time that this mode request returned last time you called it. If this is the first time you've ever called it (since your client has been running), leave this blank. It's strongly recommended that you do not remember this value across invocations of your client, as it's very likely your friends will update since the client was running so the notification is pointless... the user probably read his/her friends page already before starting the client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mask" count="opt"><scalar><des>
|
||||
The friend group(s) in which the client is checking for new entries, represented as a 32-bit unsigned int. Turn on any combination of bits 1-30 to check for entries by friends in the respective friend groups. Turn on bit 0, or leave the mask off entirely, to check for entries by any friends.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="new"><scalar><des>
|
||||
This is what you should use to determine if there are new entries. Its value is "1" if there is new stuff, or "0" if there isn't. A few people requested that this return the number of new entries, but that's a lot more resource intensive, and this protocol mode is supposed to be very quick and painless. In the future we may add a "new_count" response value that says how many new items there are. Note that once this values becomes "1" and you alert the user, <emphasis>stop polling!</emphasis> It'd be pointless to have the client hitting the server all night while the user slept. Once the user acknowleges the notifcation (double-clicks the system tray or panel applet or whatnot), then resume your polling.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="interval"><scalar><des>
|
||||
How many seconds you <emphasis>must</emphasis> wait before polling the server again. If your client disobeys, this protocol will just return error messages saying "slow down, bad client!" instead of giving you the data you were trying to cheat to obtain. Note that this also means your client should have an option to disable polling for updates, since some users run multiple operating systems with multiple LiveJournal clients, and both would be fighting each other.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
61
livejournal/doc/raw/int/protocol/consolecommand.mode.xml
Executable file
61
livejournal/doc/raw/int/protocol/consolecommand.mode.xml
Executable file
@@ -0,0 +1,61 @@
|
||||
<method name="consolecommand">
|
||||
<shortdes>
|
||||
Run an administrative command.
|
||||
</shortdes>
|
||||
<des>
|
||||
The LiveJournal server has a text-based shell-like admininistration
|
||||
console where less-often used commands can be entered. There's a web
|
||||
interface to this shell online, and this is another gateway to that.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="commands" count="1"><list count="1">
|
||||
<scalar count="0more"><des>
|
||||
The commands to send, with double quotes around any arguments with spaces,
|
||||
and double quotes escaped by backslashes, and backslashes escaped with
|
||||
backslashes. Optionally, you can send a listref instead of a string
|
||||
for this argument, in which case, we'll use your argument separation
|
||||
and not parse it ourselves.
|
||||
</des></scalar>
|
||||
</list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="results" count="1">
|
||||
<list count="1"><des>
|
||||
One stuct returned for each command run,
|
||||
that struct containing both the overall return value,
|
||||
and the line-by-line output of the command, with
|
||||
each line of output being tagged by type (think
|
||||
stdout vs. stderr, but with stdinfo also). The web interface
|
||||
shows 'error' with red, '' (stdout) with black, and 'info'
|
||||
with green. Clients are encouraged to also, if possible.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="success" count="1">
|
||||
<scalar><des>
|
||||
Return status of nth command. 0 or 1.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="output" count="1">
|
||||
<list count="1">
|
||||
<scalar count="1"><des>
|
||||
Type of output line. Either "" (normal output), "error", or "info",
|
||||
something to be emphasized over normal output.
|
||||
</des></scalar>
|
||||
<scalar count="1"><des>
|
||||
The text of that line.
|
||||
</des></scalar>
|
||||
</list>
|
||||
</key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
79
livejournal/doc/raw/int/protocol/editevent.mode.xml
Executable file
79
livejournal/doc/raw/int/protocol/editevent.mode.xml
Executable file
@@ -0,0 +1,79 @@
|
||||
<method name="editevent">
|
||||
<shortdes>
|
||||
Edit or delete a user's past journal entry
|
||||
</shortdes>
|
||||
<des>
|
||||
Modify an already created event. If fields are empty, it will delete the event.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique ItemID of the item being modified or deleted.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The revised event/log text the user is submitting. Or, to delete an entry, just send no text at all. Carriage returns are okay (0x0A, 0x0A0D, or 0x0D0A), although 0x0D are removed internally to make everything into Unix-style line-endings (just \ns). Posts may also contain HTML, but be aware that the LiveJournal server converts newlines to HTML <BR>s when displaying them, so your client should not try to insert these itself.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (
|
||||
0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-form
|
||||
atted text, and it does the conversion by removing all \r characters. If you're sending a
|
||||
multi-line event on Mac, you have to be sure and send a lineendings value of mac or you
|
||||
r line endings will be removed. PC and Unix clients can ignore this setting, or you can s
|
||||
end it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="1"><scalar><des>
|
||||
The subject for this post. Limited to 255 characters. No newlines.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="opt"><scalar><des>
|
||||
Specifies who can read this post. Valid values are <emphasis>public</emphasis> (default), <emphasis>private</emphasis> and <emphasis>usemask</emphasis>. When value is usemask, viewability is controlled by the allowmask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt"><struct count="0more"><des>
|
||||
Properties and their values for the item being returned.
|
||||
</des></struct></key>
|
||||
|
||||
<key name="usejournal" count="opt"><scalar><des>
|
||||
If editing a shared journal entry, include this key and the username you wish to edit the entry in. By default, you edit the entry as if it were in user "user"'s journal, as specified above.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="1"><scalar><des>
|
||||
If modifying only, the 4-digit year of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mon" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit month of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit day of the month of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="hour" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit hour from 0 to 23 of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="min" count="1"><scalar><des>
|
||||
If modifying only, the 1- or 2-digit minute of the event (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique ItemID of the item being modified or deleted.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
45
livejournal/doc/raw/int/protocol/editfriendgroups.mode.xml
Executable file
45
livejournal/doc/raw/int/protocol/editfriendgroups.mode.xml
Executable file
@@ -0,0 +1,45 @@
|
||||
<method name="editfriendgroups">
|
||||
<shortdes>
|
||||
Edit the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given several optional lists, will add/delete/update/rename the friends groups for a user.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="groupmasks" count="opt"><struct count="1">
|
||||
<des>
|
||||
A structure of friend userids. The values of each are a string representing an unsigned 32-bit integer with bit 0 set (or the server will force it on anyway), bits 1-30 set for each group the friend belongs to, and bit 31 unset (reserved for future use).
|
||||
</des>
|
||||
</struct></key>
|
||||
|
||||
<key name="set" count="opt"><struct count="1">
|
||||
<des>
|
||||
Given the bit of a friend group, the value contains a structure of information on it.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="name" count="1"><scalar><des>
|
||||
Create or rename the friend group by sending this key. The value is the name of the group.
|
||||
</des></scalar></key>
|
||||
<key name="sort" count="opt"><scalar><des>
|
||||
This field should be sent to indicate the sorting order of this group. The value must be in the range of 0-255. The default is 50.
|
||||
</des></scalar></key>
|
||||
<key name="public" count="opt"><scalar><des>
|
||||
If this is "1", then this group is marked as public. If public, other users can see the name of the group and the people that are in it.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</struct></key>
|
||||
|
||||
<key name="delete" count="opt"><list count="1"><scalar count="0more"><des>
|
||||
A number of a friend group to delete (which can be from 1-30, inclusive). The server will modify all old entries that allow access to that friend group, so a new friend group using that number won't have access to old non-related entries. However, it is the client's responsibility to modify each friend's groupmask to remove them from the group as it's deleted.
|
||||
</des></scalar></list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
59
livejournal/doc/raw/int/protocol/editfriends.mode.xml
Executable file
59
livejournal/doc/raw/int/protocol/editfriends.mode.xml
Executable file
@@ -0,0 +1,59 @@
|
||||
<method name="editfriends">
|
||||
<shortdes>
|
||||
Add, edit, or delete friends from the user's friends list.
|
||||
</shortdes>
|
||||
<des>
|
||||
Takes up to two lists, one of friends to delete and one of friends to add. Several options are allowed to be specified when adding a friend. It returns a verbose list of the friends added, if any were.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="delete" count="opt"><list count="1">
|
||||
<des>
|
||||
A list of variable of this form removes the friend users from the user's friend list. It is not an error to delete an already non-existant friend. The value should just be 1.
|
||||
</des>
|
||||
<scalar count="0more"><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar>
|
||||
</list></key>
|
||||
|
||||
<key name="add" count="opt"><list count="1">
|
||||
<des>
|
||||
To add friends, send a variable list of this form.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="username" count="1"><scalar><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar></key>
|
||||
<key name="fgcolor" count="opt"><scalar><des>
|
||||
Sets the text color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #000000, black.
|
||||
</des></scalar></key>
|
||||
<key name="bgcolor" count="opt"><scalar><des>
|
||||
Sets the background color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #FFFFFF, white.
|
||||
</des></scalar></key>
|
||||
<key name="groupmask" count="opt"><scalar><des>
|
||||
Sets this user's groupmask. Only use this in clients if you've very recently loaded the friend groups. If your client has been loaded on the end user's desktop for days and you haven't loaded friend groups since it started, they may be inaccurate if they've modified their friend groups through the website or another client. In general, don't use this key unless you know what you're doing.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="added" count="opt"><des>
|
||||
A list of the users who have been added with this transaction.
|
||||
</des>
|
||||
<list count="1"><struct count="0more">
|
||||
<key name="username"><scalar><des>
|
||||
The username of the friend that was added.
|
||||
</des></scalar></key>
|
||||
<key name="fullname"><scalar><des>
|
||||
The full name of the friend that was added.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
21
livejournal/doc/raw/int/protocol/friendgroups.ent.xml
Executable file
21
livejournal/doc/raw/int/protocol/friendgroups.ent.xml
Executable file
@@ -0,0 +1,21 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id" count="1"><scalar><des>
|
||||
The bit number for this friend group, from 1-30.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="name" count="1"><scalar><des>
|
||||
The name of this friend group.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="sortorder" count="1"><scalar><des>
|
||||
The sort integer for this friend group, from 0-255.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="public" count="1"><scalar><des>
|
||||
Either '0' or '1' for if this friend group is public.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
29
livejournal/doc/raw/int/protocol/friendof.mode.xml
Executable file
29
livejournal/doc/raw/int/protocol/friendof.mode.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<method name="friendof">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users list this user as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a "friends of" list for a specified user. An optional limit of returned friends can be supplied.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="friendoflimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendofs" count="1">
|
||||
<des>
|
||||
The list of people who list this user as a friend.
|
||||
</des>
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
29
livejournal/doc/raw/int/protocol/friendslist.ent.xml
Executable file
29
livejournal/doc/raw/int/protocol/friendslist.ent.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="username" count="1"><scalar><des>
|
||||
The username of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fullname" count="1"><scalar><des>
|
||||
The full name of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="journaltype" count="1"><scalar><des>
|
||||
The type of journal the friend item is.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fgcolor" count="1"><scalar><des>
|
||||
The foreground color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="bgcolor" count="1"><scalar><des>
|
||||
The background color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="groupmask" count="1"><scalar><des>
|
||||
If the group mask is not "1" (just bit 0 set), then this variable is returned with an 32-bit unsigned integer with a bit 0 always set, and bits 1-30 set for each group this friend is a part of. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
33
livejournal/doc/raw/int/protocol/getdaycounts.mode.xml
Executable file
33
livejournal/doc/raw/int/protocol/getdaycounts.mode.xml
Executable file
@@ -0,0 +1,33 @@
|
||||
<method name="getdaycounts">
|
||||
<shortdes>
|
||||
This mode retrieves the number of journal entries per day.
|
||||
</shortdes>
|
||||
<des>
|
||||
This mode retrieves the number of journal entries per day. Useful for populating calendar widgets in GUI clients. Optionally a journal can be specified. It returns a list of the dates and accompanied counts.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the day counts of a shared journal, include this key and the username you wish to get the counts of. By default, you load the counts of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="daycounts" count="1"><list count="1"><struct count="0more"><des>
|
||||
For each day that the user has posted a journal entry, a struct is returned in the list.
|
||||
</des>
|
||||
<key name="date"><scalar><des>The date, in yyyy-dd-mm format.</des></scalar></key>
|
||||
<key name="count"><scalar><des>The number of journal entries on that date.</des></scalar></key>
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
109
livejournal/doc/raw/int/protocol/getevents.mode.xml
Executable file
109
livejournal/doc/raw/int/protocol/getevents.mode.xml
Executable file
@@ -0,0 +1,109 @@
|
||||
<method name="getevents">
|
||||
<shortdes>
|
||||
Download parts of the user's journal.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given a set of specifications, will return a segment of entries up to a limit set by the server. Has a set of options for less, extra, or special data to be returned.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="truncate" count="opt"><scalar><des>
|
||||
A value that if greater than or equal to 4, truncates the length of the returned events (after being decoded) to the value specified. Entries less than or equal to this length are left untouched. Values greater than this length are truncated to the specified length minus 3, and then have "... " appended to them, bringing the total length back up to what you specified. This is good for populating list boxes where only the beginning of the entry is important, and you'll double-click it to bring up the full entry.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="prefersubject" count="opt"><scalar><des>
|
||||
If this setting is set to true (1 ), then no subjects are returned, and the events are actually subjects if they exist, or if not, then they're the real events. This is useful when clients display history and need to give the user something to double-click. The subject is shorter and often more informative, so it'd be best to download only this.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="noprops" count="opt"><scalar><des>
|
||||
If this setting is set to true (1), then no meta-data properties are returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="selecttype" count="1"><scalar><des>
|
||||
Determines how you want to specify what part of the journal to download. Valid values are <emphasis>day</emphasis> to download one entire day, <emphasis>lastn</emphasis> to get the most recent n entries (where n is specified in the howmany field), <emphasis>one</emphasis> to download just one specific entry, or <emphasis>syncitems</emphasis> to get some number of items (which the server decides) that have changed since a given time (specified in the lastsync parameter>). Not that because the server decides what items to send, you may or may not be getting everything that's changed. You should use the syncitems selecttype in conjuntions with the syncitems protocol mode.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>syncitems</emphasis>, the date (in "yyyy-mm-dd hh:mm:ss" format) that you want to get updates since.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 4-digit year of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="month" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit day of the month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="howmany" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, how many entries to get. Defaults to 20. Maximum is 50.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="beforedate" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, you can optionally include this variable and restrict all entries returned to be before the date you specify, which must be of the form <emphasis>yyyy-mm-dd hh:mm:ss</emphasis>.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="itemid" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>one</emphasis>, the journal entry's unique ItemID for which you want to retrieve. Or, to retrieve the most recent entry, use the value -1. Using -1 has the added effect that the data is retrieved from the master database instead of a replicated slave. Clients with an "Edit last entry" feature might want to send -1, to make sure the data that comes back up is accurate, in case a slave database is a few seconds behind in replication.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the history of a shared journal, include this key and the username you wish to get the history of. By default, you load the history of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="events" count="1"><list count="1"><des>
|
||||
A list of structs for all of the returned events.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique integer ItemID of the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="eventtime" count="1"><scalar><des>
|
||||
The time the user posted (or said they posted, rather, since users can back-date posts) the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="1"><scalar><des>
|
||||
If this variable is not returned, then the security of the post is <emphasis>public</emphasis>, otherwise this value will be <emphasis>private</emphasis> or usemask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
If security is <emphasis>usemask</emphasis> then this is defined with the 32-bit unsigned int bit-mask of who is allowed to access this post.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="opt"><scalar><des>
|
||||
The subject of the journal entry. This won't be returned if "prefersubjects" is set, instead the subjects will show up as the events.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The event text itself. This value is first truncated if the truncate variable is set, and then it is URL-encoded (alphanumerics stay the same, weird symbols to %hh, and spaces to + signs, just like URLs or post request). This allows posts with line breaks to come back on one line.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt"><struct count="0more"><des>
|
||||
Properties and their values for the item being returned.
|
||||
</des></struct></key>
|
||||
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
22
livejournal/doc/raw/int/protocol/getfriendgroups.mode.xml
Executable file
22
livejournal/doc/raw/int/protocol/getfriendgroups.mode.xml
Executable file
@@ -0,0 +1,22 @@
|
||||
<method name="getfriendgroups">
|
||||
<shortdes>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
40
livejournal/doc/raw/int/protocol/getfriends.mode.xml
Executable file
40
livejournal/doc/raw/int/protocol/getfriends.mode.xml
Executable file
@@ -0,0 +1,40 @@
|
||||
<method name="getfriends">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users this user lists as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a verbose list of information on friends a user has listed. Optionally able to include their friends of list, the friends group associated with each user, and a limit on the number of friends to return.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="includefriendof" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "friendof" mode. Some clients show friends and friendof data in separate tabs/panes. If you're always going to load both, then use this flag (as opposed to a tabbed dialog approach, where the user may not go to the second tab and thus would not need to load the friendof data.) friendof request variables can be used.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="includegroups" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "getfriendgroups" mode. See above for the reason why this would be useful.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendlimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
&friendGroups;
|
||||
|
||||
<key name="friendofs">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
<key name="friends">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
118
livejournal/doc/raw/int/protocol/login.mode.xml
Executable file
118
livejournal/doc/raw/int/protocol/login.mode.xml
Executable file
@@ -0,0 +1,118 @@
|
||||
<method name="login">
|
||||
<shortdes>
|
||||
validate user's password and get base information needed for client to function
|
||||
</shortdes>
|
||||
<des>
|
||||
Login to the server, while announcing your client version. The server returns with whether the password is good or not, the user's name, an optional message to be displayed to the user, the list of the user's friend groups, and other things.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="clientversion" count="opt"><scalar><des>
|
||||
Although optional, this <emphasis>should</emphasis> be a string of the form <literal>Platform-ProductName/ClientVersionMajor.Minor.Rev</literal>, like <emphasis>Win32-MFC/1.2.7</emphasis> or <emphasis>Gtk-LoserJabber/1.0.4</emphasis>. Note in this case that "Gtk" is not a platform, but rather a toolkit, since the toolkit is multi-platform (Linux, FreeBSD, Solaris, Windows...). You make the judge what is best to send, but if it's of this form, we'll give you cool statistics about your users.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmoods" count="opt"><scalar><des>
|
||||
If your client supports moods, send this key with a value of the highest mood ID you have cached/stored on the user's computer. For example, if you logged in last time with and got mood IDs 1, 2, 4, and 5, then send "5" as the value of "getmoods". The server will return every new mood that has an internal MoodID greater than 5. If you've never downloaded moods before, send "0". If you don't care about getting any moods at all (if your client doesn't support them), then don't send this key at all.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmenus" count="opt"><scalar><des>
|
||||
Send something for this key if you want to get a list/tree of web jump menus to show in your client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickws" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and you want to receive that list, send something for this key, like "1", and you'll receieve the list of picture keywords the user has defined.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickwurls" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and can also display the pictures somehow, send something for this key, like "1", and you'll receieve the list of picture keyword URLs that correspond to the picture keywords as well as the URL for the default picture. You must send getpickws for this option to even matter.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="name" count="1"><scalar><des>
|
||||
The user's full name. Often, clients use this to change the top-level window's title bar text to say something like "LiveJournal - User name". You can just ignore this if you'd like.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="message" count="opt"><scalar><des>
|
||||
A message that <emphasis>should</emphasis> be displayed in a dialog box (or to the screen in a console application). The message is rarely present but when used notifies the user of software updates they've requested to hear about, problems with their account (if mail is bouncing to them, we'd like them to give us a current email address), etc. To test this if you're developing a client, use the user account <literal role="username">test</literal> with the password <literal>test</literal> and a message will always be returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendgrounds" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
<key name="usejournals" count="opt">
|
||||
&useJournals;
|
||||
</key>
|
||||
|
||||
<key name="moods" count="opt">
|
||||
<des>
|
||||
If you sent the 'getmoods' key in your request, this is returned. The contents are the new moods that have been added on the server since you last requested the list. Your client should cache the mood list on the client's computer to avoid requesting the whole list everytime.
|
||||
</des>
|
||||
&moods;
|
||||
</key>
|
||||
|
||||
<key name="pickws" count="opt">
|
||||
<des>
|
||||
This is requrned if you set "getpickws" in your request. Picture keywords are used to identify which userpic (100x100 icon) to use for that particular post. For instance, the user may have "Angry", "Happy", and "Sleepy" picture keywords which map to certain pictures. The client should also do a case-insensitive compare on this list when a mood is selected or entered, and auto-select the current picture keyword. That way it seems that selecting a mood also sets their corresponding picture.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture keyword.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="pickwurls" count="opt">
|
||||
<des>
|
||||
The URLs of the user pictures. They correspond with the list of
|
||||
picture keywords returned. Note that the content behind these URLs
|
||||
can never change, so if your client downloads these to display, just
|
||||
cache them locally and never hit the servers again to re-download them
|
||||
or to even check if they've been modified.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture URL.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="defaultpicurl" count="opt"><scalar><des>
|
||||
The URL of the default picture (if you sent the 'getpickwurls' key). Note that the content behind this URL can never change, so you can cache it locally; also note that the default picture might have no keyword associated with it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fastserver" count="opt"><scalar><des>
|
||||
LiveJournal sites may have priority servers for paying customers. If this key is both present and set to value "1", then the client has permission to set the "ljfastserver" cookie in subsequent requests. The HTTP request header to send is "Cookie: ljfastserver=1". If you send this header without getting permission from the login mode, your requests will fail. That is, you'll trick the load balancer into directing your request towards the priority servers, but the server you end up hitting won't be happy that you're trying to scam faster access and will deny your request.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="userid" count="1"><scalar><des>
|
||||
The userid of this user on the system. Not required for any other requests to
|
||||
the server, but some developers have wanted it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="menus" count="opt">
|
||||
<des>Returned if you set "getmenus" in your request.</des>
|
||||
<list count="1">
|
||||
<des>List of menu items in order that should be in the LiveJournal web menu in the client application.</des>
|
||||
<struct count="0more">
|
||||
<key name="text" count="1"><scalar><des>
|
||||
The text of the menu item, or "-" for a separator.
|
||||
</des></scalar></key>
|
||||
<key name="url" count="opt"><scalar><des>
|
||||
The URL the menu item should launch, present for all menu items
|
||||
except separators and submenus.
|
||||
</des></scalar></key>
|
||||
<key name="sub" count="opt"><des>
|
||||
If this is present, this menu item is a submenu.
|
||||
</des><list count="0more">
|
||||
<des>Same format as top-level menu structure</des>
|
||||
<struct></struct>
|
||||
</list></key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
15
livejournal/doc/raw/int/protocol/moods.ent.xml
Executable file
15
livejournal/doc/raw/int/protocol/moods.ent.xml
Executable file
@@ -0,0 +1,15 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id"><scalar><des>
|
||||
The integer moodid.
|
||||
</des></scalar></key>
|
||||
<key name="name"><scalar><des>
|
||||
The mood name.
|
||||
</des></scalar></key>
|
||||
<key name="parent"><scalar><des>
|
||||
The mood's parent (base) moodid.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
74
livejournal/doc/raw/int/protocol/postevent.mode.xml
Executable file
74
livejournal/doc/raw/int/protocol/postevent.mode.xml
Executable file
@@ -0,0 +1,74 @@
|
||||
<method name="postevent">
|
||||
<shortdes>
|
||||
The most important mode, this is how a user actually submits a new log entry to the server.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given all of the require information on a post, optioanlly adding security or meta data, will create a new entry. Will return the itemid of the new post.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The event/log text the user is submitting. Carriage returns are okay (0x0A, 0x0A0D, or 0x0D0A), although 0x0D are removed internally to make everything into Unix-style line-endings (just \ns). Posts may also contain HTML, but be aware that the LiveJournal server converts newlines to HTML <BR>s when displaying them, so your client should not try to insert these itself.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lineendings" count="1"><scalar><des>
|
||||
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="1"><scalar><des>
|
||||
The subject for this post. Limited to 255 characters. No newlines.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="opt"><scalar><des>
|
||||
Specifies who can read this post. Valid values are <emphasis>public</emphasis> (default), <emphasis>private</emphasis> and <emphasis>usemask</emphasis>. When value is usemask, viewability is controlled by the allowmask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="1"><scalar><des>
|
||||
The current 4-digit year (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mon" count="1"><scalar><des>
|
||||
The current 1- or 2-digit month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="1"><scalar><des>
|
||||
The current 1- or 2-digit day of the month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="hour" count="1"><scalar><des>
|
||||
The current 1- or 2-digit hour from 0 to 23 (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="min" count="1"><scalar><des>
|
||||
The current 1- or 2-digit minute (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="1"><des>
|
||||
Set an arbitrary (but restricted) meta-data property to this log item. See the document on properties for the discussion of them and the list of valid names. You may send zero or more keys like this, one for each property you're setting.
|
||||
</des>
|
||||
</key>
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If posting to a shared journal, include this key and the username you wish to post to. By default, you post to the journal of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique number the server assigned to this post. Currently nothing else in the protocol requires the use of this number so it's pretty much useless, but somebody requested it be returned, so it is.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
42
livejournal/doc/raw/int/protocol/syncitems.mode.xml
Executable file
42
livejournal/doc/raw/int/protocol/syncitems.mode.xml
Executable file
@@ -0,0 +1,42 @@
|
||||
<method name="syncitems">
|
||||
<shortdes>
|
||||
Returns a list of all the items that have been created or updated for a user.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a list (or part of a list) of all the items (journal entries, to-do items, comments) that have been created or updated on LiveJournal since you last downloaded them. Note that the items themselves are not returned --- only the item type and the item number. After you get this you have to go fetch the items using another protocol mode. For journal entries (type "L"), use the getevents mode with a selecttype of "syncitems".
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
The date you last downloaded synced, in "yyyy-mm-dd hh:mm:ss" format. <emphasis>Note</emphasis>: do not make this date up from the client's local computer... send the date from this mode's response of the newest item you have saved on disk.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></arguments>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="syncitems" count="1"><list count="1"><struct count="0more">
|
||||
<key name="item" count="1"><scalar><des>
|
||||
The nth item, in the form "Type-Number". Type can be one of "L" for log entries (journal entries), "C" for comments (not implemented), "T" for to-do items (not implemented), or many other things presumably. If your client doesn't know how to fetch an item of a certain type, just ignore them. A new version of your client could later see that it has never downloaded anything of type "T" and go back and fetch everything of that type from the beginning.
|
||||
</des></scalar></key>
|
||||
<key name="action" count="1"><scalar><des>
|
||||
Either "create" or "update". This field isn't too useful, but you may want to make your client verbose and tell the user what it's doing. For example, "Downloading entry 5 of 17: Updated".
|
||||
</des></scalar></key>
|
||||
<key name="time" count="1"><scalar><des>
|
||||
The server time (in the form "yyyy-mm-dd hh:mm:ss") that this creation or update took place. Remember in your local store the most recent for each item type ("L", "T", "C", etc...). This is what you send in subsequent requests in lastsync.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
</method>
|
||||
13
livejournal/doc/raw/int/protocol/testbook.xml
Executable file
13
livejournal/doc/raw/int/protocol/testbook.xml
Executable file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
|
||||
"docbook/dtd/xml/4.1.2/docbookx.dtd"
|
||||
[
|
||||
<!ENTITY ref SYSTEM "reference.gen">
|
||||
]>
|
||||
<book>
|
||||
|
||||
<title>xmlrpc ref test</title>
|
||||
|
||||
&ref;
|
||||
|
||||
</book>
|
||||
108
livejournal/doc/raw/int/protocol/to_docbook.xsl
Executable file
108
livejournal/doc/raw/int/protocol/to_docbook.xsl
Executable file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" indent="no"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="ljxmlrpc">
|
||||
<reference>
|
||||
<title>XML/RPC Protocol Reference</title>
|
||||
<xsl:apply-templates/>
|
||||
</reference>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="method">
|
||||
<refentry>
|
||||
<refnamediv>
|
||||
<refname><xsl:value-of select="@name"/></refname>
|
||||
<refpurpose><xsl:value-of select="shortdes"/></refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Mode Description</title>
|
||||
<para>
|
||||
<xsl:value-of select="des"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Arguments</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="arguments">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Return Values</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="returns">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct">
|
||||
<listitem><para>
|
||||
<emphasis>[struct]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
Containing keys:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="scalar">
|
||||
<listitem><para>
|
||||
<emphasis>[scalar]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:value-of select="des"/>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="key">
|
||||
<listitem><para>
|
||||
<emphasis role="bold"><xsl:value-of select="@name"/></emphasis>:
|
||||
<itemizedlist>
|
||||
<xsl:value-of select="./des"/>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list">
|
||||
<listitem><para>
|
||||
<emphasis>[list]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:value-of select="des"/>
|
||||
Containing items:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="scalar|struct|list">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="count">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@count='1'">(required)</xsl:when>
|
||||
<xsl:when test="@count='opt'">(optional)</xsl:when>
|
||||
<xsl:when test="@count='1more'">(required; multiple allowed)</xsl:when>
|
||||
<xsl:when test="@count='0more'">(optional; multiple allowed)</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
3
livejournal/doc/raw/int/protocol/usejournal.ent.xml
Executable file
3
livejournal/doc/raw/int/protocol/usejournal.ent.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<scalar count="1"><des>
|
||||
Journal username that authenticating user has 'usejournal' access in, as given in the 'login' mode.
|
||||
</des></scalar>
|
||||
7
livejournal/doc/raw/int/protocol/usejournals.ent.xml
Executable file
7
livejournal/doc/raw/int/protocol/usejournals.ent.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<des>
|
||||
List of shared/news/community journals that the user has permission
|
||||
to post in.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
Username of community journal.
|
||||
</des></scalar></list>
|
||||
37
livejournal/doc/raw/int/protocol/xmlrpc.dtd
Executable file
37
livejournal/doc/raw/int/protocol/xmlrpc.dtd
Executable file
@@ -0,0 +1,37 @@
|
||||
<!-- the 'count' attribute indicates how many times it appears in its
|
||||
parent container. either:
|
||||
1 (once always),
|
||||
opt (optionally once),
|
||||
1more (1 or more times),
|
||||
0more (0 or more times) -->
|
||||
<!ENTITY % countatt "count (1|opt|1more|0more) '1'">
|
||||
|
||||
<!-- presence of keys are either there or optionally there,
|
||||
can't be more than 1: -->
|
||||
<!ENTITY % keycountatt "count (1|opt) '1'">
|
||||
|
||||
<!ELEMENT ljxmlrpc (method*)>
|
||||
|
||||
<!ELEMENT method (shortdes?, des?, arguments, returns)>
|
||||
<!ATTLIST method name NMTOKEN #REQUIRED>
|
||||
|
||||
<!-- arguments and return both have a list of values, either structs, lists, or scalars -->
|
||||
<!ELEMENT arguments (struct | list | scalar)*>
|
||||
<!ELEMENT returns (struct | list | scalar)*>
|
||||
|
||||
<!ELEMENT scalar (des?)>
|
||||
<!ATTLIST scalar %countatt;>
|
||||
|
||||
<!ELEMENT struct (key*)>
|
||||
<!ATTLIST struct %countatt;>
|
||||
|
||||
<!ELEMENT key (des?, (scalar | struct | list))>
|
||||
<!ATTLIST key name NMTOKEN #REQUIRED %keycountatt;>
|
||||
|
||||
<!ELEMENT list (des?, (struct | list | scalar)*)>
|
||||
<!ATTLIST list %countatt;>
|
||||
|
||||
<!ELEMENT shortdes (#PCDATA)>
|
||||
<!ELEMENT des (#PCDATA)>
|
||||
|
||||
|
||||
41
livejournal/doc/raw/int/protocol/xmlrpc.xml
Executable file
41
livejournal/doc/raw/int/protocol/xmlrpc.xml
Executable file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE ljxmlrpc SYSTEM "xmlrpc.dtd" [
|
||||
|
||||
<!ENTITY authInfo SYSTEM "authinfo.ent.xml">
|
||||
<!ENTITY useJournals SYSTEM "usejournals.ent.xml">
|
||||
<!ENTITY useJournal SYSTEM "usejournal.ent.xml">
|
||||
<!ENTITY friendGroups SYSTEM "friendgroups.ent.xml">
|
||||
<!ENTITY moods SYSTEM "moods.ent.xml">
|
||||
<!ENTITY friendsList SYSTEM "friendslist.ent.xml">
|
||||
|
||||
<!ENTITY mode.checkfriends SYSTEM "checkfriends.mode.xml">
|
||||
<!ENTITY mode.consolecommand SYSTEM "consolecommand.mode.xml">
|
||||
<!ENTITY mode.editevent SYSTEM "editevent.mode.xml">
|
||||
<!ENTITY mode.editfriendgroups SYSTEM "editfriendgroups.mode.xml">
|
||||
<!ENTITY mode.editfriends SYSTEM "editfriends.mode.xml">
|
||||
<!ENTITY mode.friendof SYSTEM "friendof.mode.xml">
|
||||
<!ENTITY mode.getdaycounts SYSTEM "getdaycounts.mode.xml">
|
||||
<!ENTITY mode.getevents SYSTEM "getevents.mode.xml">
|
||||
<!ENTITY mode.getfriendgroups SYSTEM "getfriendgroups.mode.xml">
|
||||
<!ENTITY mode.getfriends SYSTEM "getfriends.mode.xml">
|
||||
<!ENTITY mode.login SYSTEM "login.mode.xml">
|
||||
<!ENTITY mode.postevent SYSTEM "postevent.mode.xml">
|
||||
<!ENTITY mode.syncitems SYSTEM "syncitems.mode.xml">
|
||||
]>
|
||||
<ljxmlrpc>
|
||||
|
||||
&mode.login;
|
||||
&mode.postevent;
|
||||
&mode.editevent;
|
||||
&mode.editfriendgroups;
|
||||
&mode.editfriends;
|
||||
&mode.getevents;
|
||||
&mode.getfriends;
|
||||
&mode.friendof;
|
||||
&mode.getfriendgroups;
|
||||
&mode.getdaycounts;
|
||||
&mode.syncitems;
|
||||
&mode.checkfriends;
|
||||
&mode.consolecommand;
|
||||
|
||||
</ljxmlrpc>
|
||||
52
livejournal/doc/raw/lj.book/admin/caps_list.xml
Executable file
52
livejournal/doc/raw/lj.book/admin/caps_list.xml
Executable file
@@ -0,0 +1,52 @@
|
||||
<chapter id="lj.admin.caps">
|
||||
<chapterinfo>
|
||||
<title>Capabilities Classes</title>
|
||||
</chapterinfo>
|
||||
<title>Capabilities Classes</title>
|
||||
<section id="lj.admin.caps.intro">
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
To introduce user limitations as defined on a per site basis, LiveJournal has implemented
|
||||
the use of <quote>capabilities</quote> — customizable limits that can be defined én massé, or
|
||||
split between different user <quote>types</quote>.
|
||||
</para>
|
||||
<para>
|
||||
Completing the idea of <quote>per site definitions</quote>, we've implemented a system where
|
||||
capabilities can be defined in classes, and classes can either be turned <quote>on</quote> or
|
||||
<quote>off</quote> for each account.
|
||||
</para>
|
||||
<para>
|
||||
Capability classes are most effectively used when making distinctions between <quote>normal</quote>
|
||||
user accounts and <quote>privileged</quote> user accounts; for example, on LiveJournal.com, we make
|
||||
a distinction between <quote>normal</quote> accounts, <quote>early adopter</quote> accounts, and
|
||||
<quote>paid</quote> accounts, (with a couple of variations on the latter) — the purpose of the
|
||||
distinction being to give paying members a better incentive to stick around and help fund the site.
|
||||
</para>
|
||||
</section>
|
||||
<section id="lj.admin.caps.usage">
|
||||
<title>Setting Capabilities</title>
|
||||
<para>
|
||||
<xref linkend="lj.install.ljconfig.caps" /> explains how to initially set the capability defaults, and
|
||||
how to setup capability classes that you can use to define different account types.
|
||||
</para>
|
||||
<para>
|
||||
If there comes a need where a user's account should change classes, then it is easy to administrate from
|
||||
the <abbrev>URI</abbrev> <filename>/admin/capedit.bml</filename>. Simply login as the system account,
|
||||
and apply (or unapply) the different classes as necessary for a specific user.
|
||||
</para>
|
||||
<formalpara><title>Setting the same capability twice</title><para>
|
||||
If two capability classes set the same capability, and an account is defined under both classes, then
|
||||
the conflicting capability values are compared against each other, and the optimal setting is used
|
||||
where appropriate.
|
||||
</para></formalpara>
|
||||
</section>
|
||||
<section id="lj.admin.caps.list">
|
||||
<title>Capabilities Reference</title>
|
||||
<para>
|
||||
The following is a list of capabilities that you can define per class.
|
||||
If you have any capabilities that you have defined locally, then they will
|
||||
be listed here as well.
|
||||
</para>
|
||||
&lj.admin.cap_list;
|
||||
</section>
|
||||
</chapter>
|
||||
50
livejournal/doc/raw/lj.book/admin/console.xml
Executable file
50
livejournal/doc/raw/lj.book/admin/console.xml
Executable file
@@ -0,0 +1,50 @@
|
||||
<chapter id="lj.admin.console" status="draft">
|
||||
<title>The Administrative Console</title>
|
||||
<para>
|
||||
If you would consider <abbrev>BML</abbrev> pages to be the <abbrev>GUI</abbrev>
|
||||
of LiveJournal, then the administrative console would be the command line interface.
|
||||
</para>
|
||||
<section id="lj.admin.console.intro">
|
||||
<title>Taking control of the Console</title>
|
||||
<para>
|
||||
The administrative console (or <quote>console</quote>, for the sake of brevity) is
|
||||
a text only interface to LiveJournal that allows you to perform certain administrative
|
||||
tasks not accessibly anywhere else in your installation. The console, located at the
|
||||
<abbrev>URI</abbrev> <filename>/admin/console/</filename> of a working LiveJournal
|
||||
installation, works very similarly to a <acronym>DOS</acronym> or <acronym>bash</acronym>
|
||||
prompt, in that it reads commands and arguments seperated by whitespace.
|
||||
</para>
|
||||
<formalpara><title>Inputting Comands</title><para>
|
||||
The first word inputted is the command you would like to perform. Every word after that
|
||||
is an argument to that command, and whitespace delimits multiple arguments. If an argument
|
||||
requires a space, such as writing suspension notes, it needs to be wrapped in quotation marks.
|
||||
If an argument requires spaces <emphasis>and</emphasis> quotation marks, then the quotation marks
|
||||
can be <quote>escaped</quote> with a leading backslash, like: <userinput>\"</userinput>. If
|
||||
an explicit backslash is required when writing an argument in quotation marks, it can be escaped
|
||||
with a leading backslash, like <userinput>\\</userinput>.
|
||||
<example>
|
||||
<title>Using the console to suspend a user</title>
|
||||
<para>
|
||||
To cover all points, here is a typical input line that suspends
|
||||
<quote>username</quote> with a complex suspension note:
|
||||
</para>
|
||||
<userinput>suspend username "Indefinite suspension \\ might become \"permanent\" \\ harassment and libel"</userinput>
|
||||
</example>
|
||||
</para></formalpara>
|
||||
</section>
|
||||
<section id="lj.admin.console.ref">
|
||||
<title>Console Command Reference</title>
|
||||
<para>
|
||||
Arguments are defined on a per command basis, and some arguments are required for the command to work.
|
||||
If you're ever stuck, you can simply type <userinput>help <replaceable>command</replaceable></userinput>
|
||||
in the console for a short explanation of <replaceable>command</replaceable>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Included with the installation is a live reference located at the <abbrev>URI</abbrev>
|
||||
<filename>/admin/console/reference.bml</filename>
|
||||
</para>
|
||||
</note>
|
||||
&lj.admin.console.ref;
|
||||
</section>
|
||||
</chapter>
|
||||
20
livejournal/doc/raw/lj.book/admin/create_users.xml
Executable file
20
livejournal/doc/raw/lj.book/admin/create_users.xml
Executable file
@@ -0,0 +1,20 @@
|
||||
<chapter id="lj.admin.creatingusers">
|
||||
<chapterinfo>
|
||||
<title>Creating Users</title>
|
||||
</chapterinfo>
|
||||
<title>Creating Users</title>
|
||||
<para>
|
||||
Once you have your LiveJournal server tuned and tweaked, you're probably going to want to create some users and communitiies.
|
||||
</para>
|
||||
<para>
|
||||
Creating users is relatively simple, and depends on which options you are using in your <filename>cgi-bin/ljconfig.pl</filename>.
|
||||
<note>
|
||||
<para>
|
||||
If you are not using this file for your setup, then the default options defined in <filename>cgi-bin/ljdefaults.pl</filename> will be assumed.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
If your service is live, simple visit <filename>create.bml</filename> in your <filename>htdocs/</filename> directory. With this page, you can create as many users as you'd like.
|
||||
</para>
|
||||
</chapter>
|
||||
20
livejournal/doc/raw/lj.book/admin/creating_users.xml
Executable file
20
livejournal/doc/raw/lj.book/admin/creating_users.xml
Executable file
@@ -0,0 +1,20 @@
|
||||
<chapter id="lj.admin.creatingusers">
|
||||
<chapterinfo>
|
||||
<title>Creating Users</title>
|
||||
</chapterinfo>
|
||||
<title>Creating Users</title>
|
||||
<para>
|
||||
Once you have your LiveJournal server tuned and tweaked, you're probably going to want to create some users and communitiies.
|
||||
</para>
|
||||
<para>
|
||||
Creating users is relatively simple, and depends on which options you are using in your <filename>cgi-bin/ljconfig.pl</filename>.
|
||||
<note>
|
||||
<para>
|
||||
If you are not using this file for your setup, then the default options defined in <filename>cgi-bin/ljdefaults.pl</filename> will be assumed.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
If your service is live, simple visit <filename>create.bml</filename> in your <filename>htdocs/<filename> directory. With this page, you can create as many users as you'd like.
|
||||
</para>
|
||||
</chapter>
|
||||
17
livejournal/doc/raw/lj.book/admin/index.xml
Executable file
17
livejournal/doc/raw/lj.book/admin/index.xml
Executable file
@@ -0,0 +1,17 @@
|
||||
<part id="lj.admin.index" status="prelim">
|
||||
<title>Administering a LiveJournal Site</title>
|
||||
<partintro>
|
||||
<simpara>Part III covers all of the information necessary to fine-tune and run your LiveJournal site.</simpara>
|
||||
</partintro>
|
||||
&lj.admin.createusers;
|
||||
&lj.admin.caps;
|
||||
&lj.admin.privs;
|
||||
&lj.admin.console;
|
||||
&lj.admin.sysban;
|
||||
</part>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode:sgml
|
||||
sgml-parent-document: ("../index.xml" "book" "part")
|
||||
End:
|
||||
-->
|
||||
29
livejournal/doc/raw/lj.book/admin/privs.xml
Executable file
29
livejournal/doc/raw/lj.book/admin/privs.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<chapter id="lj.admin.privs">
|
||||
<chapterinfo>
|
||||
<title>Administrating Privileges</title>
|
||||
</chapterinfo>
|
||||
<title>Administrating Privileges</title>
|
||||
<para>
|
||||
Privileges on LiveJournal are used to delegate responsibilities to other users,
|
||||
without having to modify access files or setting explicit file permissions on
|
||||
<filename>.bml</filename> files.
|
||||
</para>
|
||||
<section id="lj.admin.privs.intro">
|
||||
<title>Using privs effectively</title>
|
||||
<para>
|
||||
All privileges can be administered through the privilege portal, located at the
|
||||
<abbrev>URI</abbrev> <filename>/admin/priv/</filename> in installations of LiveJournal.
|
||||
To start administrating privs, you should login as the system account you created in
|
||||
<xref linkend="lj.install.finishing" /><footnote><para>
|
||||
The script <filename>bin/upgrading/make_system.pl</filename> creates the system account,
|
||||
and grants it the <literal>admin</literal> priv with the argument of <quote>all</quote>.
|
||||
</para></footnote>. By visiting the <filename>/admin/priv</filename> portal, you can start
|
||||
assigning privs either by username or privilege name.
|
||||
</para>
|
||||
</section>
|
||||
<section id="lj.admin.privs.ref">
|
||||
<title>A list of all Privs</title>
|
||||
<para>The following is a complete privilege reference.</para>
|
||||
&lj.admin.privs.ref;
|
||||
</section>
|
||||
</chapter>
|
||||
55
livejournal/doc/raw/lj.book/admin/sysban.xml
Executable file
55
livejournal/doc/raw/lj.book/admin/sysban.xml
Executable file
@@ -0,0 +1,55 @@
|
||||
<chapter id="lj.admin.sysban">
|
||||
<title>Banning Users</title>
|
||||
<para>The LiveJournal <quote>sysban</quote> mechanism provides the means for generic bans on
|
||||
site functionality given a block type and value. The type is what
|
||||
is being checked (IP address, email address, etc) and the value is the value which
|
||||
causes the block to activate. (<literal>10.0.0.10</literal>, for example)</para>
|
||||
<para>A tool is available to create and modify bans: <filename><envar>$LJHOME</envar>/htdocs/admin/sysban.bml</filename>.
|
||||
This tool requires the <varname>sysban</varname> privilege.</para>
|
||||
<variablelist>
|
||||
<para>There are three <literal>statushistory</literal> types tied to the sysban tool:</para>
|
||||
<varlistentry>
|
||||
<term><varname>sysban_add</varname></term>
|
||||
<listitem><simpara>Logs the creation of new bans</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>sysban_mod</varname></term>
|
||||
<listitem><simpara>Logs the modification of bans</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>sysban_trig</varname></term>
|
||||
<listitem><simpara>Logs when bans are triggered</simpara></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>The most notable of the three is the <varname>sysban_trig</varname> type. The data it
|
||||
logs varies depending on the type of ban and the information
|
||||
available when it was triggered. If a userid is available, it
|
||||
will be logged and the notes column will contain a short description
|
||||
of what caused the trigger along with a number of variables that
|
||||
may be useful in investigation of the situation.</para>
|
||||
<para>Below are the ban types that exist as of now. More can and will be added
|
||||
as necessary:</para>
|
||||
<variablelist>
|
||||
<title>General</title>
|
||||
<varlistentry>
|
||||
<term><varname>ip</varname></term>
|
||||
<listitem><simpara>Blocked from site if IP address matches</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><varname>email</varname></term>
|
||||
<listitem><para>Blocked if email matches.<variablelist>
|
||||
<varlistentry>
|
||||
<term><filename>/create.bml</filename></term>
|
||||
<listitem><simpara>Return a fake <quote>503 Service Unavailable</quote> message to a user
|
||||
who tries to create a new account with the given email address.</simpara></listitem>
|
||||
</varlistentry>
|
||||
</variablelist></para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</chapter>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode:sgml
|
||||
sgml-parent-document: ("index.xml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
65
livejournal/doc/raw/lj.book/customize/hooks.xml
Executable file
65
livejournal/doc/raw/lj.book/customize/hooks.xml
Executable file
@@ -0,0 +1,65 @@
|
||||
<chapter id="lj.customize.hooks">
|
||||
<title>Setting Site-Specific Hooks</title>
|
||||
<abstract>
|
||||
<para>
|
||||
The LiveJournal code provides a number of hooks, which you can use to
|
||||
alter or extend the functionality of the code, tailored for your own site.
|
||||
You're free to implement as few or as many as you want.
|
||||
<tip><para>
|
||||
If there's a hook you want but don't see, email us at <email>dev@livejournal.com</email>
|
||||
or file an issue in our
|
||||
<ulink url="http://zilla.livejournal.org">Bug and Project Tracking System</ulink>
|
||||
and we'll be more than happy to add it in.
|
||||
</para></tip>
|
||||
</para>
|
||||
<para>
|
||||
One of the reasons for implementing hooks on LiveJournal came from a
|
||||
need to make distinctions between account status types, without leaving
|
||||
a lot of kludge in the code base, and without having to write extensive
|
||||
code libraries in the ljcom <abbrev>CVS</abbrev> repository.
|
||||
</para>
|
||||
<para>
|
||||
Hooks are code references, subroutines that perform functions or return information
|
||||
based on objects passed to the subroutine. Some programming knowledge is necessary
|
||||
to write your own hooks.
|
||||
</para>
|
||||
</abstract>
|
||||
<section id="lj.customize.hooks.setup">
|
||||
<title>Writing Hooks</title>
|
||||
<para>
|
||||
Hooks are written either in your <filename>cgi-bin/ljconfig.pl</filename> file, or in a seperate
|
||||
site-specific library file. Hooks are defined by the function <function>LJ::register_hook()</function>,
|
||||
which takes two arguments: the name of the hook, and the hook's perl coderef.
|
||||
</para>
|
||||
<para>
|
||||
Most hook coderefs are passed a single hash of various objects as their argument, though there are a few
|
||||
exceptions. Consult <xref linkend="lj.customize.hooks.ref" /> for more information.
|
||||
</para>
|
||||
<example>
|
||||
<title>Sample hook: userinfo_html_by_user</title>
|
||||
<simpara>
|
||||
To give you an idea of how a hook is set up, a smaller hook is sampled below:
|
||||
</simpara>
|
||||
<programlisting><![CDATA[LJ::register_hook("userinfo_html_by_user", sub {
|
||||
my $o = shift;
|
||||
my $r = $o->{'ret'};
|
||||
my $u = $o->{'u'};
|
||||
return unless (LJ::get_cap($u, "normal"));
|
||||
$$r .= "<img src='$LJ::IMGPREFIX/talk/sm08_star.gif' width='20' height='18' alt='⋆' style='vertical-align: middle; border: 0;' />";
|
||||
});]]></programlisting>
|
||||
<simpara>
|
||||
<varname>$o</varname> is the argument hash that is passed to the hook's subroutine,
|
||||
and consists of the scalar reference member <varname>$o->{'r'}</varname> and the user object
|
||||
member <varname>$o->{'u'}</varname>. The subroutine then checks to see if the user
|
||||
is part of the capability class <quote>normal</quote>, and if so it will pass the
|
||||
<abbrev>HTML</abbrev> image directive as the scalar reference. Now when someone loads
|
||||
a user information page for a <quote>normal</quote> user, a small star will appear
|
||||
next to their username and userid.
|
||||
</simpara>
|
||||
</example>
|
||||
</section>
|
||||
<section id="lj.customize.hooks.ref">
|
||||
<title>Hooks Reference</title>
|
||||
&lj.customize.hooks.ref;
|
||||
</section>
|
||||
</chapter>
|
||||
18
livejournal/doc/raw/lj.book/customize/images.xml
Executable file
18
livejournal/doc/raw/lj.book/customize/images.xml
Executable file
@@ -0,0 +1,18 @@
|
||||
<chapter id="lj.customize.images">
|
||||
<!-- (FIXME - detail the use of imageconf.pl) -->
|
||||
<title>Using your own images and icons</title>
|
||||
<section id="lj.customize.images.imageconf">
|
||||
<title>Using <filename>imageconf.pl</filename></title>
|
||||
<para>
|
||||
LiveJournal uses a standard set of icons for specific pages that are distributed through the <filename role="dir">/img</filename> directory, and handles the configuration for these images in the file: <filename>cgi-bin/imageconf.pl</filename>.
|
||||
Each image is configured as an associative array in perl, setup with attributes for each file.
|
||||
(FIXME - this needs a lot of work.)
|
||||
</para>
|
||||
<para>
|
||||
<literal>cgi-bin/imageconf.pl</literal> is provided. Don't
|
||||
change that. But go ahead and add a new file,
|
||||
<literal>imageconf-local.txt</literal> beside it in the same
|
||||
format, which <literal>imageconf.pl</literal> will find and use.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
40
livejournal/doc/raw/lj.book/customize/index.xml
Executable file
40
livejournal/doc/raw/lj.book/customize/index.xml
Executable file
@@ -0,0 +1,40 @@
|
||||
<part id="lj.customize.index">
|
||||
<title>Customizing Your Installation</title>
|
||||
<partintro>
|
||||
<para>
|
||||
Unless you're helping on the LiveJournal development team,
|
||||
you're probably running the LiveJournal Server for your own
|
||||
purposes and will want to customize its appearance, behavior,
|
||||
limits, and other settings to suit your needs. The next couple
|
||||
of chapters have been written with that aim in mind.
|
||||
</para>
|
||||
<para>
|
||||
More importantly, however, the following sections tell you how
|
||||
to customize the installation in the supported way. Although
|
||||
you're welcome to just hack random parts up until it's working
|
||||
how you want it too, you'll run into trouble later when you try
|
||||
to stay in sync with the latest LiveJournal code.
|
||||
</para>
|
||||
<para>
|
||||
By following these instructions, your life will be much easier,
|
||||
as all our tools assume you are doing things this way. If you
|
||||
end up not being able to change something, post in the
|
||||
lj_everywhere community on LiveJournal.com and ask for help.
|
||||
We'll either tell you the right way to do it, or add hooks/options
|
||||
such that you can.
|
||||
</para>
|
||||
</partintro>
|
||||
&lj.customize.local_cvs;
|
||||
&lj.customize.images;
|
||||
&lj.customize.text;
|
||||
&lj.customize.limits;
|
||||
&lj.customize.hooks;
|
||||
&lj.customize.layout;
|
||||
&lj.customize.tasks;
|
||||
</part>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode:sgml
|
||||
sgml-parent-document: ("../index.xml" "book" "part")
|
||||
End:
|
||||
-->
|
||||
206
livejournal/doc/raw/lj.book/customize/layout.xml
Executable file
206
livejournal/doc/raw/lj.book/customize/layout.xml
Executable file
@@ -0,0 +1,206 @@
|
||||
<chapter id="lj.customize.layout">
|
||||
<title><abbrev>BML</abbrev> Schemes</title>
|
||||
<subtitle>Changing your site's layout</subtitle>
|
||||
<para>
|
||||
<abbrev>BML</abbrev> is the language used to serve pages to users that they don't manage
|
||||
themselves. To get an idea of what <abbrev>BML</abbrev>is, the following is a quote from the
|
||||
<abbrev>BML</abbrev> manual:
|
||||
<blockquote>
|
||||
<attribution><citetitle pubwork="book">The Better Markup Language</citetitle></attribution>
|
||||
<simpara>
|
||||
<abbrev>BML</abbrev> is a server-side markup language that lets you define your own
|
||||
<abbrev>BML</abbrev> blocks and use them as templates within your <abbrev>BML</abbrev>
|
||||
pages. Your templates don't even have to be static. Because <abbrev>BML</abbrev> pages are
|
||||
converted to <abbrev>HTML</abbrev> on the server when users request them, this also enables
|
||||
you to embed live code within your <abbrev>BML</abbrev> pages, just like a
|
||||
<abbrev>CGI</abbrev> script.
|
||||
</simpara>
|
||||
</blockquote>
|
||||
</para><para>
|
||||
With LiveJournal, we used <abbrev>BML</abbrev> because it makes it easier for us to write the
|
||||
layouts that comprise LiveJournal, without requiring frequent changes or rewrites on our part
|
||||
to come up with a customized look and feel. In the next section you will read how to make the
|
||||
necessary additions to the LiveJournal schemes to tailor your LiveJournal installation to your
|
||||
exact needs.
|
||||
</para>
|
||||
<para>For more information on <abbrev>BML</abbrev>, please refer to <xref linkend="bml.index" />.</para>
|
||||
<section id="lj.customize.layout.new">
|
||||
<title>Writing a <abbrev>BML</abbrev> Scheme</title>
|
||||
<para>
|
||||
<abbrev>BML</abbrev> is essentially a simple macro language. Macros are called
|
||||
<wordasword>templates</wordasword> in <abbrev>BML</abbrev>. Templates are defined in
|
||||
<wordasword>lookup</wordasword> files and are <wordasword>invoked</wordasword> in
|
||||
<abbrev>BML</abbrev> files. Templates accept parameters and are divided into several types
|
||||
according to how parameters are transmitted and how the definition of the template is able to make
|
||||
use of them. Definitions of templates are essentially chunks of <abbrev>HTML</abbrev> with
|
||||
potentially more recursive <abbrev>BML</abbrev> template invocations inside them.
|
||||
</para><para>
|
||||
For LiveJournal, the most common templates are defined in the file
|
||||
<filename><envar>$LJHOME</envar>/cgi-bin/bml/scheme/global.look</filename>; all other
|
||||
<wordasword>schemes</wordasword> either replace all of the templates, or inherit whichever
|
||||
is not replaced.
|
||||
</para><para>
|
||||
To write your own scheme, all you have to do is write your own <abbrev>BML</abbrev>
|
||||
lookup file that use the same templates as <filename><envar>$LJHOME</envar>/cgi-bin/bml/global.look</filename>.
|
||||
Then, implementing a new scheme becomes pretty painless:
|
||||
<procedure><title>Creating a new <abbrev>BML</abbrev> scheme: <replaceable>foo</replaceable>:</title>
|
||||
<step><simpara>
|
||||
Create a new file under <filename><envar>$LJHOME</envar>/cgi-bin/bml/scheme</filename>, labelled
|
||||
after the scheme name (<replaceable>foo</replaceable>). For example:
|
||||
<filename><envar>$LJHOME</envar>/cgi-bin/bml/scheme/<replaceable>foo</replaceable>.look</filename>.
|
||||
This file should contain all of the <abbrev>BML</abbrev> directives you've written for your unique layout.
|
||||
The first line in this file should be <programlisting>_parent=>global.look</programlisting>.
|
||||
</simpara></step>
|
||||
<step><para>
|
||||
If you don't have a local <abbrev>BML</abbrev> configuration file (<filename>_config-local.bml</filename>)
|
||||
in your <filename><envar>$LJHOME</envar>/htdocs/</filename> directory, you should create one now.
|
||||
The contents of that file should look like:
|
||||
<example>
|
||||
<title>Sample <filename>_config-local.bml</filename></title>
|
||||
<programlisting>DefaultScheme <replaceable>foo</replaceable></programlisting>
|
||||
</example>
|
||||
</para></step>
|
||||
<step><simpara>
|
||||
Manually restart the apache process.
|
||||
</simpara></step>
|
||||
</procedure>
|
||||
</para><para>
|
||||
After you've written your scheme, consider adding it to the array in <xref linkend="ljconfig.schemes" />, so that
|
||||
your users can use their preferred scheme.
|
||||
</para>
|
||||
</section>
|
||||
<section id="lj.customize.layout.ref">
|
||||
<title><abbrev>BML</abbrev> Template Reference</title>
|
||||
<para>For reference, here are the most commonly used BML templates in the LiveJournal repository:</para>
|
||||
<itemizedlist>
|
||||
<title>Pre-configured</title>
|
||||
<para>The following are BML templates that are set from configuration options in <filename><envar>$LJHOME</envar>/cgi-bin/ljconfig.pl</filename>.
|
||||
All templates here are defined as <quote>S</quote> (static).</para>
|
||||
<listitem><link linkend="ljconfig.domain">DOMAIN</link></listitem>
|
||||
<listitem><link linkend="ljconfig.imgprefix">IMGPREFIX</link></listitem>
|
||||
<listitem><link linkend="ljconfig.statprefix">STATPREFIX</link></listitem>
|
||||
<listitem><link linkend="ljconfig.siteroot">SITEROOT</link></listitem>
|
||||
<listitem><link linkend="ljconfig.sitename">SITENAME</link></listitem>
|
||||
<listitem><link linkend="ljconfig.admin_email">ADMIN_EMAIL</link></listitem>
|
||||
<listitem><link linkend="ljconfig.support_email">SUPPORT_EMAIL</link></listitem>
|
||||
</itemizedlist>
|
||||
<para>The following BML templates are defined in <filename><envar>$LJHOME</envar>/cgi-bin/bml/scheme/global.look</filename>
|
||||
and are available in every scheme.</para>
|
||||
<variablelist>
|
||||
<title>Global</title>
|
||||
<varlistentry>
|
||||
<term>SECURITYPRIVATE</term>
|
||||
<listitem><simpara>HTML image sourcing from <filename>/img/icon_private.gif</filename></simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>SECURITYPROTECTED</term>
|
||||
<listitem><simpara>HTML image sourcing from <filename>/img/icon_protected.gif</filename></simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>LJUSER</term>
|
||||
<listitem><simpara>Given a username, it creates a properly formated LiveJournal username reference</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>LJCOMM</term>
|
||||
<listitem><simpara>Given a community username, it creates a properly formatted LiveJournal community username reference</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>LJUSERF</term>
|
||||
<listitem><simpara>Same as LJUSER, except that the link to the userinfo page includes the additional user information</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>HELP</term>
|
||||
<listitem><simpara>Given a URL, this provides a small link with the caption <quote>help</quote></simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>INERR</term>
|
||||
<listitem><simpara>Displays an error message in an easily identifiable manner (bold red text)</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>NEEDLOGIN</term>
|
||||
<listitem><simpara>A small blurb that's included on pages where the user is not logged in and is required to be</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>BADINPUT</term>
|
||||
<listitem><simpara>An error message that displays when there is an encoding problem with the user's browser</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>REQUIREPOST</term>
|
||||
<listitem><simpara>An error message explaining that certain user actions require POSTing information through an HTML form, rather than manually GETting the page</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>LOAD_PAGE_INFO</term>
|
||||
<listitem><simpara>Initializes and populates a perl array that is used to create a sidebar of links along a page layout</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>H1</term>
|
||||
<listitem><simpara>Top level header on a page</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>H2</term>
|
||||
<listitem><simpara>Sub level header on a page</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>P</term>
|
||||
<listitem><simpara>Generic HTML paragraph wrapper</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>STANDOUT</term>
|
||||
<listitem><simpara>Given a block of text, this template tries grab the user's attention by using different text and background colors</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>BADCONTENT</term>
|
||||
<listitem><simpara>An error message that displays when a problem (that the user can fix) has occurred during a request</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>DE</term>
|
||||
<listitem><simpara>A template that de-emphasizes text</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>EMCOLOR</term><term>EMCOLORLITE</term><term>HOTCOLOR</term>
|
||||
<listitem><simpara>Various emphasis colors</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>SCREENEDBARCOLOR</term>
|
||||
<listitem><simpara>A color that is used to highlight screened comments in comment threads</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>CHOICE</term>
|
||||
<listitem><simpara>Given 3 arguments (a URL, a title, and an explanatory blurb), this template fashions an item to be used in a CHOICES list</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>CHOICES</term>
|
||||
<listitem><simpara>Given 2 arguments, this template tries to construct a side by side list of options and appropriate links</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>PAGE</term>
|
||||
<listitem><simpara>This template is the BML template that governs the look of the entire scheme, and takes 4 arguments:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>title</term>
|
||||
<listitem><simpara>The page title</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>head</term>
|
||||
<listitem><simpara>Page-specific elements that belong in a HTML head</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>bodyopts</term>
|
||||
<listitem><simpara>Additional attributes for the HTML body element</simpara></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>body</term>
|
||||
<listitem><simpara>The main content of the page</simpara></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</simpara></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
</chapter>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode:sgml
|
||||
sgml-parent-document: ("index.xml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
6
livejournal/doc/raw/lj.book/customize/limits.xml
Executable file
6
livejournal/doc/raw/lj.book/customize/limits.xml
Executable file
@@ -0,0 +1,6 @@
|
||||
<chapter id="lj.customize.limits">
|
||||
<title>Setting your own Limits</title>
|
||||
<para>
|
||||
(FIXME - discuss the necessity of setting good connection/throttle settings)
|
||||
</para>
|
||||
</chapter>
|
||||
82
livejournal/doc/raw/lj.book/customize/local_cvs.xml
Executable file
82
livejournal/doc/raw/lj.book/customize/local_cvs.xml
Executable file
@@ -0,0 +1,82 @@
|
||||
<chapter id="lj.customize.local_cvs">
|
||||
<title>Using your own <abbrev>CVS</abbrev> directory</title>
|
||||
<para>
|
||||
CVS is a version control system for source code. We don't care
|
||||
whether or not you actually use it to control your site-local
|
||||
modifications. However, even if you don't, it's still important
|
||||
you put your modifications under a directory in <filename><envar>$LJHOME</envar>/cvs</filename>.
|
||||
</para>
|
||||
<para>
|
||||
At this point, <link linkend='lj.install.install_files'>you already have</link> a directory named
|
||||
<filename>cvs</filename> underneath your <envar><link linkend='lj.install.ljhome'>$LJHOME</link></envar>
|
||||
directory. Further, that directory already has under it a directory called <filename>livejournal</filename>,
|
||||
which holds the <quote>general</quote> files.
|
||||
</para>
|
||||
<para>
|
||||
What you want to do now is make a directory that holds the
|
||||
<quote>local</quote> files. The LiveJournal tools look for your
|
||||
files in a directory beside <filename>livejournal</filename> named
|
||||
<filename>local</filename>, but <filename>local</filename> can
|
||||
actually be a symlink to your real directory.
|
||||
<footnote>
|
||||
<para>LiveJournal.com uses the directory name
|
||||
<filename>ljcom</filename> for its site-local modifications, so
|
||||
the <filename>livejournal</filename> directory is entirely free
|
||||
of LiveJournal.com-specific code. If you're helping with
|
||||
LiveJournal.com development, you'll want to symlink ljcom to
|
||||
local.</para>
|
||||
</footnote>
|
||||
</para>
|
||||
|
||||
<section id='lj.customize.local_cvs.cvsreport'>
|
||||
<title><application>cvsreport.pl</application>: Adding & Overlaying</title>
|
||||
<para>
|
||||
In <filename><envar>$LJHOME</envar>/bin</filename> there's a tool named
|
||||
<application>cvsreport.pl</application> which manages (among other
|
||||
things) merging together the general files and your site-local
|
||||
files into the live area under <envar>$LJHOME</envar>.
|
||||
</para>
|
||||
<para>
|
||||
The command you'll need most of the time is:
|
||||
|
||||
<screen><prompt>$</prompt> <userinput>cvsreport.pl -c -s</userinput></screen>
|
||||
|
||||
<parameter>-c</parameter> is short for <parameter>--cvsonly</parameter>
|
||||
(only copies from the <filename>cvs</filename> directory back to the live area, not
|
||||
vice-versa) and <parameter>-s</parameter> is short for <parameter>--sync</parameter>
|
||||
(which means actually do the copying, don't just print out what it would've done,
|
||||
which is the default without <parameter>-s</parameter>).
|
||||
</para>
|
||||
<para>
|
||||
So, say you want to override the provided
|
||||
<filename>htdocs/index.bml</filename> file. Create the
|
||||
<filename>htdocs</filename> under
|
||||
<filename>$LJHOME/cvs/local</filename> and put a
|
||||
<filename>index.bml</filename> file in it, then run
|
||||
<application>cvsreport.pl</application> <parameter>-c -s</parameter> and you're set.
|
||||
</para>
|
||||
<para>
|
||||
More commonly, you'll be adding new files, rather than replacing
|
||||
provided ones. In general, you should never really need to
|
||||
replace files, since you should already be able to change all
|
||||
the text, images, and layout of any given page. Replacing a
|
||||
file would mean duplicating functionality, and that's bad.
|
||||
</para>
|
||||
<para>
|
||||
One popular strategy with the general code libraries is to look
|
||||
for a similarly named file with <filename>-local</filename> in it
|
||||
and load that also. That way you inherit all the functionality
|
||||
that's provided, and change only what you want. When general
|
||||
changes, you don't have to update right away... you can change
|
||||
things later if you want, or keep the newly added stuff as it
|
||||
was given to you.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
Local Variables:
|
||||
mode:sgml
|
||||
sgml-parent-document: ("index.xml" "part" "chapter")
|
||||
End:
|
||||
-->
|
||||
12
livejournal/doc/raw/lj.book/customize/tasks.xml
Executable file
12
livejournal/doc/raw/lj.book/customize/tasks.xml
Executable file
@@ -0,0 +1,12 @@
|
||||
<chapter id="lj.customize.tasks">
|
||||
<title>Running your own Maintanence Tasks</title>
|
||||
<para>
|
||||
(FIXME - describe the different tasks from ljmaint.pl, etc... note: build.pl should auto-extract the taskinfo.txt text and put it in here somewhere?)
|
||||
</para>
|
||||
<para>
|
||||
<literal>bin/maint/taskinfo.txt</literal> is provided. Don't
|
||||
change that. But go ahead and add a new file,
|
||||
<literal>taskinfo-local.txt</literal> beside it in the same
|
||||
format, which <literal>ljmaint.pl</literal> will find and use.
|
||||
</para>
|
||||
</chapter>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user