From eecd611f678febabe1d62d5cf9b0bc152caf7596 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 22 May 2008 14:34:21 -0400 Subject: tags and XRDS Starting the process of remote subscriptions. First, add the capacity to mint tags. May in the future want to allow some kind of UUID or URL for unique URIs. New config options for tag authority and date, and a function for minting tags. Store URIs in the DB. If the admin changes his/her tag config, this shouldn't change the URIs in the DB. Unless they really want to make that happen. Generate an XRDS document with the appropriate URLs for microblogging. Also, redefined some stuff in openmicroblogging.txt. And moved the file. darcs-hash:20080522183421-84dde-fe46f32e4050f2c4b6c850334103007ed7feabf7.gz --- lib/common.php | 4 ++++ lib/util.php | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'lib') diff --git a/lib/common.php b/lib/common.php index 50d0110e2..9328d33e9 100644 --- a/lib/common.php +++ b/lib/common.php @@ -39,6 +39,10 @@ $config = array('name' => 'Just another Laconica microblog', 'server' => 'localhost', 'path' => '/'), + 'tag' => + array('authority' => 'INVALID TAG', + 'date' => 'PUT A DATE HERE', + 'prefix' => ''), 'license' => array('url' => 'http://creativecommons.org/license/by/3.0/', 'title' => 'Creative Commons Attribution 3.0', diff --git a/lib/util.php b/lib/util.php index 3be29651c..83c0964f5 100644 --- a/lib/util.php +++ b/lib/util.php @@ -432,6 +432,13 @@ function common_notice_form() { common_element_end('form'); } +function common_mint_tag($extra) { + global $config; + return + 'tag:'.$config['tag']['authority'].','. + $config['tag']['date'].':'$config['tag']['prefix'].$extra; +} + // XXX: set up gettext function _t($str) { -- cgit v1.2.3-54-g00ecf