summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-22 14:34:21 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-22 14:34:21 -0400
commiteecd611f678febabe1d62d5cf9b0bc152caf7596 (patch)
tree72c75722a2ceb82ba6418187ad90353dc4121542 /lib
parent41f013578024a1ce558bde4030a0171e2895ed09 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php4
-rw-r--r--lib/util.php7
2 files changed, 11 insertions, 0 deletions
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) {