aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-21 22:10:08 -0700
committerfriendica <info@friendica.com>2013-08-21 22:10:08 -0700
commit925b046794b77345c1321a3c74e4561d5c10ec95 (patch)
tree607a59b59d7f60f2e6b615b5454758f76254cdf2 /boot.php
parent6cea04eb440c2bb08bcb81ae13749c08d09b755c (diff)
downloadvolse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.tar.gz
volse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.tar.bz2
volse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.zip
premium/restricted channel connections implemented, configure at yoursite/channel/nickname - this basically redirects "follow" requests to a premium channel's sell page if it has one configured. You can still click through and create a connection request (introduction), but this provides a means for the channel owner to state their terms. If you don't abide by the terms, you will likely be blocked or the channel deleted. This facility is extensible in a number of ways.
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/boot.php b/boot.php
index 3327fdbb2..c8a8fbc7e 100755
--- a/boot.php
+++ b/boot.php
@@ -1623,13 +1623,20 @@ function profile_sidebar($profile, $block = 0, $show_connect = true) {
require_once('include/Contact.php');
+ if($show_connect) {
- $connect_url = (($show_connect) ? rconnect_url($profile['uid'],get_observer_hash()) : '');
-
- $connect = (($connect_url) ? t('Connect') : '');
+ // This will return an empty string if we're already connected.
+
+ $connect_url = rconnect_url($profile['uid'],get_observer_hash());
+ $connect = (($connect_url) ? t('Connect') : '');
+ if($connect_url)
+ $connect_url = sprintf($connect_url,urlencode($profile['channel_address'] . '@' . $a->get_hostname()));
- if($connect_url)
- $connect_url = $connect_url . '/follow?f=1&url=' . urlencode($profile['channel_address'] . '@' . $a->get_hostname());
+ // premium channel - over-ride
+
+ if($profile['channel_pageflags'] & PAGE_PREMIUM)
+ $connect_url = z_root() . '/connect/' . $profile['channel_address'];
+ }
// show edit profile to yourself
if($is_owner) {