aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-21 17:15:56 -0700
committerfriendica <info@friendica.com>2013-08-21 17:15:56 -0700
commit2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a (patch)
treeaef39fd3b1a1c4cf51561b8a2e67cf5b253e4842 /mod
parentd8ef1417fb2ff8d736e4392c118c51c63dc66b1d (diff)
downloadvolse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.tar.gz
volse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.tar.bz2
volse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.zip
basic structure for premium channel implementation
Diffstat (limited to 'mod')
-rw-r--r--mod/connect.php3
-rw-r--r--mod/zfinger.php12
2 files changed, 15 insertions, 0 deletions
diff --git a/mod/connect.php b/mod/connect.php
new file mode 100644
index 000000000..21d461c19
--- /dev/null
+++ b/mod/connect.php
@@ -0,0 +1,3 @@
+<?php /** @file */
+
+// Placeholder for channel sell pages
diff --git a/mod/zfinger.php b/mod/zfinger.php
index cf61233ad..d5b750537 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -71,6 +71,8 @@ function zfinger_init(&$a) {
$id = $e['channel_id'];
+ $special_channel = (($e['channel_pageflags'] & PAGE_PREMIUM) ? true : false);
+
$searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true);
if($e['xchan_flags'] & XCHAN_FLAGS_HIDDEN)
$searchable = false;
@@ -134,6 +136,16 @@ function zfinger_init(&$a) {
$ret['searchable'] = $searchable;
+ // premium or other channel desiring some contact with potential followers before connecting.
+ // This is a template - %s will be replaced with the follow_url we discover for the return channel.
+
+ if($special_channel)
+ $ret['connect_url'] = z_root() . '/connect/' . $e['channel_address'] . '?f=&follow=%s';
+
+ // This is a template for our follow url, %s will be replaced with a webbie
+
+ $ret['follow_url'] = z_root() . '/follow?f=&url=%s';
+
$permissions = get_all_perms($e['channel_id'],(($ztarget && $zsig)
? base64url_encode(hash('whirlpool',$ztarget . $zsig,true))
: '' ),false);