summaryrefslogtreecommitdiff
path: root/socialfy-your-domain
diff options
context:
space:
mode:
authorIan Denhardt <ian@zenhack.net>2010-08-09 15:53:21 -0400
committerIan Denhardt <ian@zenhack.net>2010-08-09 15:53:21 -0400
commit50b12e5820e88682c27a75974143dc61159b327c (patch)
treec2986ed06d5ef2dfed3a314da6fccb76986348f9 /socialfy-your-domain
parente0da39380024c3d4e7eb9a3ae0c5808ca7dcfb74 (diff)
parent66051a4799d64288ba7a606e470b1cb663dca244 (diff)
Merge branch 'master' of gitorious.org:+socialites/statusnet/gnu-social
Diffstat (limited to 'socialfy-your-domain')
-rw-r--r--socialfy-your-domain/README.txt57
-rw-r--r--socialfy-your-domain/dot-well-known/host-meta1
-rw-r--r--socialfy-your-domain/xrd/example@example.com14
-rw-r--r--socialfy-your-domain/xrd/index.php41
4 files changed, 113 insertions, 0 deletions
diff --git a/socialfy-your-domain/README.txt b/socialfy-your-domain/README.txt
new file mode 100644
index 000000000..ead4380f2
--- /dev/null
+++ b/socialfy-your-domain/README.txt
@@ -0,0 +1,57 @@
+Initial simple way to Webfinger enable your domain -- needs PHP.
+================================================================
+
+Step 1
+======
+
+First, put the folders 'xrd' and 'dot-well-known' on your website, so
+they load at:
+
+ http://yourname.com/xrd/
+
+ and
+
+ http://yourname.com/.well-known/
+
+ (Remember the . at the beginning of this one)
+
+Step 2
+======
+
+Next, edit xrd/index.php and enter a secret in this line:
+
+$s = "";
+
+This can be anything you like...
+
+$s = "johnny-five";
+
+or
+
+$s = "12345";
+
+It really doesn't matter too much.
+
+Step 3
+======
+
+For each user on your site, and this might only be you...
+
+Make a copy of the example@example.com.xml file so that it's called...
+
+ yoursecretusername@domain.com.xml
+
+ So, if your secret is 'johnny5' and your name is ben and your
+ domain is titanictoycorp.biz, your file should be called
+ johnny5ben@titanictoycorp.biz.xml
+
+Finally, edit the file to point at your account on your social
+site. If you are the only user, then you probably don't need to worry
+about user/1 as this will be you. For multi user sites, the user ID is
+on the profile page.
+
+Finally
+=======
+
+Using this method, though fiddly, you can now be @user@domain without
+the need for any prefixes for subdomains, etc.
diff --git a/socialfy-your-domain/dot-well-known/host-meta b/socialfy-your-domain/dot-well-known/host-meta
new file mode 100644
index 000000000..e44591a4e
--- /dev/null
+++ b/socialfy-your-domain/dot-well-known/host-meta
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" xmlns:hm="http://host-meta.net/xrd/1.0"><hm:Host>example.com</hm:Host><Link rel="lrdd" template="http://example.com/xrd?uri={uri}"><Title>Resource Descriptor</Title></Link></XRD> \ No newline at end of file
diff --git a/socialfy-your-domain/xrd/example@example.com b/socialfy-your-domain/xrd/example@example.com
new file mode 100644
index 000000000..06987525b
--- /dev/null
+++ b/socialfy-your-domain/xrd/example@example.com
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
+ <Subject>acct:example@example.com</Subject>
+ <Alias>acct:example@social.example.com</Alias>
+ <Alias>http://social.example.com/user/1</Alias>
+ <Link rel="http://webfinger.net/rel/profile-page" type="text/html" href="http://social.example.com/user/1"/>
+ <Link rel="http://schemas.google.com/g/2010#updates-from" type="application/atom+xml" href="http://social.example.com/api/statuses/user_timeline/1.atom"/>
+ <Link rel="http://microformats.org/profile/hcard" type="text/html" href="http://social.example.com/hcard"/>
+ <Link rel="http://gmpg.org/xfn/11" type="text/html" href="http://social.example.com/user/1"/>
+ <Link rel="describedby" type="application/rdf+xml" href="http://social.example.com/foaf"/>
+ <Link rel="http://salmon-protocol.org/ns/salmon-replies" href="http://social.example.com/main/salmon/user/1"/>
+ <Link rel="http://salmon-protocol.org/ns/salmon-mention" href="http://social.example.com/main/salmon/user/1"/>
+ <Link rel="http://ostatus.org/schema/1.0/subscribe" template="http://social.example.com/main/ostatussub?profile={uri}"/>
+</XRD>
diff --git a/socialfy-your-domain/xrd/index.php b/socialfy-your-domain/xrd/index.php
new file mode 100644
index 000000000..25f1d8bf3
--- /dev/null
+++ b/socialfy-your-domain/xrd/index.php
@@ -0,0 +1,41 @@
+<?php
+
+/*
+ * GNU social
+ * Copyright (C) 2010, Free Software Foundation, Inc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+$s = "";
+
+/* this should be a secret */
+
+$u = $_GET['uri'];
+
+$u = substr($u, 5);
+
+$f = $s . $u . ".xml";
+
+if (file_exists($f)) {
+ $fh = fopen($f, 'r');
+ $c = fread($fh, filesize($f));
+ fclose($fh);
+ header('Content-type: text/xml');
+ echo $c;
+}
+
+
+?> \ No newline at end of file