From bdfd0aa917d75f68ff20d900e691f626df13da79 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Fri, 16 Aug 2013 02:30:55 +0200 Subject: Fix Load mobile theme --- boot.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 61f9f5da5..41704ff08 100755 --- a/boot.php +++ b/boot.php @@ -1557,8 +1557,9 @@ function profile_load(&$a, $nickname, $profile = '') { $a->page['title'] = $a->profile['channel_name'] . " - " . $a->profile['channel_address'] . "@" . $a->get_hostname(); - + $a->profile['channel_mobile_theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); $_SESSION['theme'] = $a->profile['channel_theme']; + $_SESSION['mobile-theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); /** * load/reload current theme info -- cgit v1.2.3 From 40204ad6e369807bbef8291ef7de75f027d26046 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Fri, 16 Aug 2013 02:38:30 +0200 Subject: Do it like normal themes --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 41704ff08..e26dc6fdd 100755 --- a/boot.php +++ b/boot.php @@ -1559,7 +1559,7 @@ function profile_load(&$a, $nickname, $profile = '') { $a->profile['channel_mobile_theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); $_SESSION['theme'] = $a->profile['channel_theme']; - $_SESSION['mobile-theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); + $_SESSION['mobile-theme'] = $a->profile['channel_mobile_theme']; /** * load/reload current theme info -- cgit v1.2.3 From a8dd7280b33008d5100b6d8020640673abf5a78a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Aug 2013 22:52:19 -0700 Subject: get rid of more variables with dashes in the names - use underscore *except* in CSS. These were probably already here, but if you see any - please keep them out of PHP and MySQL where they sometimes get interpreted as a subtraction operation and are a bugger to find. --- boot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index e26dc6fdd..f7d507d22 100755 --- a/boot.php +++ b/boot.php @@ -1559,7 +1559,7 @@ function profile_load(&$a, $nickname, $profile = '') { $a->profile['channel_mobile_theme'] = get_pconfig(local_user(),'system', 'mobile_theme'); $_SESSION['theme'] = $a->profile['channel_theme']; - $_SESSION['mobile-theme'] = $a->profile['channel_mobile_theme']; + $_SESSION['mobile_theme'] = $a->profile['channel_mobile_theme']; /** * load/reload current theme info @@ -1964,8 +1964,8 @@ function current_theme(){ $is_mobile = $a->is_mobile || $a->is_tablet; if($is_mobile) { - $system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : ''); - $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme); + $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); + $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); if($theme_name === '---') { // user has selected to have the mobile theme be the same as the normal one -- cgit v1.2.3 From 5c0220df0942db7aded0540c8c408bfbaadf6c16 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Mon, 19 Aug 2013 01:08:15 +0200 Subject: More steps for mobile theme toggling + dash elimination --- boot.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index f7d507d22..7b2d72f3c 100755 --- a/boot.php +++ b/boot.php @@ -1964,13 +1964,19 @@ function current_theme(){ $is_mobile = $a->is_mobile || $a->is_tablet; if($is_mobile) { - $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); - $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); - - if($theme_name === '---') { - // user has selected to have the mobile theme be the same as the normal one - $system_theme = ''; - $theme_name = ''; + if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { + $system_theme = ''; + $theme_name = ''; + } + else { + $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); + $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile_theme')) ? $_SESSION['mobile_theme'] : $system_theme); + + if($theme_name === '---') { + // user has selected to have the mobile theme be the same as the normal one + $system_theme = ''; + $theme_name = ''; + } } } else { @@ -2345,7 +2351,7 @@ function construct_page(&$a) { } if($a->is_mobile || $a->is_tablet) { - if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) { + if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { $link = $a->get_baseurl() . '/toggle_mobile?f=&address=' . curPageURL(); } else { -- cgit v1.2.3 From cd5fdbcb48a2e05198bb9daaf0753e8218ea4285 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Aug 2013 21:19:39 -0700 Subject: email attachments (and fix email photos) --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 7b2d72f3c..10f951b6a 100755 --- a/boot.php +++ b/boot.php @@ -43,7 +43,7 @@ require_once('include/taxonomy.php'); define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1059 ); +define ( 'DB_UPDATE_VERSION', 1060 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); -- cgit v1.2.3 From 5d35d2110065dec9f984ad9028a5e8798f1faa37 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Aug 2013 20:39:00 -0700 Subject: network-wide poll voting structure --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 10f951b6a..cf3d17050 100755 --- a/boot.php +++ b/boot.php @@ -43,7 +43,7 @@ require_once('include/taxonomy.php'); define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1060 ); +define ( 'DB_UPDATE_VERSION', 1061 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); -- cgit v1.2.3 From d8ef1417fb2ff8d736e4392c118c51c63dc66b1d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Aug 2013 01:33:20 -0700 Subject: poll stuff --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index cf3d17050..2323e302c 100755 --- a/boot.php +++ b/boot.php @@ -43,7 +43,7 @@ require_once('include/taxonomy.php'); define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1061 ); +define ( 'DB_UPDATE_VERSION', 1063 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); -- cgit v1.2.3 From a944a879b1e6ebd8b3d278b86ea4404ba5b7aa81 Mon Sep 17 00:00:00 2001 From: Christian Vogeley Date: Wed, 21 Aug 2013 22:12:22 +0200 Subject: show chosen desktop theme when SESSION['show_mobile'] is false --- boot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 7b2d72f3c..dd008558d 100755 --- a/boot.php +++ b/boot.php @@ -1965,8 +1965,8 @@ function current_theme(){ if($is_mobile) { if(isset($_SESSION['show_mobile']) && !$_SESSION['show_mobile']) { - $system_theme = ''; - $theme_name = ''; + $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : ''); + $theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme); } else { $system_theme = ((isset($a->config['system']['mobile_theme'])) ? $a->config['system']['mobile_theme'] : ''); -- cgit v1.2.3 From 2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Aug 2013 17:15:56 -0700 Subject: basic structure for premium channel implementation --- boot.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 2323e302c..eeddf8162 100755 --- a/boot.php +++ b/boot.php @@ -43,7 +43,7 @@ require_once('include/taxonomy.php'); define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1063 ); +define ( 'DB_UPDATE_VERSION', 1064 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -190,13 +190,10 @@ define ( 'PAGE_HIDDEN', 0x0001 ); define ( 'PAGE_AUTOCONNECT', 0x0002 ); define ( 'PAGE_APPLICATION', 0x0004 ); define ( 'PAGE_DIRECTORY_CHANNEL', 0x0008 ); // system channel used for directory synchronisation +define ( 'PAGE_PREMIUM', 0x0010 ); define ( 'PAGE_REMOVED', 0x8000 ); -//define ( 'PAGE_FREELOVE', 3 ); -//define ( 'PAGE_BLOG', 4 ); -//define ( 'PAGE_PRVGROUP', 5 ); - /** * Photo types -- cgit v1.2.3 From 6cea04eb440c2bb08bcb81ae13749c08d09b755c Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Aug 2013 20:05:55 -0700 Subject: progress on generic sellpage - is not yet linked from existing connect buttons and editing has not been completed --- boot.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 0afc976ae..3327fdbb2 100755 --- a/boot.php +++ b/boot.php @@ -1572,11 +1572,11 @@ function profile_load(&$a, $nickname, $profile = '') { return; } -function profile_create_sidebar(&$a) { +function profile_create_sidebar(&$a,$connect = true) { $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); - $a->set_widget('profile',profile_sidebar($a->profile, $block)); + $a->set_widget('profile',profile_sidebar($a->profile, $block, $connect)); return; } @@ -1598,7 +1598,7 @@ function profile_create_sidebar(&$a) { -function profile_sidebar($profile, $block = 0) { +function profile_sidebar($profile, $block = 0, $show_connect = true) { $a = get_app(); @@ -1623,11 +1623,13 @@ function profile_sidebar($profile, $block = 0) { require_once('include/Contact.php'); - $connect_url = rconnect_url($profile['uid'],get_observer_hash()); + + $connect_url = (($show_connect) ? rconnect_url($profile['uid'],get_observer_hash()) : ''); + $connect = (($connect_url) ? t('Connect') : ''); if($connect_url) - $connect_url = $connect_url . '/follow?f=1&url=' . $profile['channel_address'] . '@' . $a->get_hostname(); + $connect_url = $connect_url . '/follow?f=1&url=' . urlencode($profile['channel_address'] . '@' . $a->get_hostname()); // show edit profile to yourself if($is_owner) { -- cgit v1.2.3 From 925b046794b77345c1321a3c74e4561d5c10ec95 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 21 Aug 2013 22:10:08 -0700 Subject: 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. --- boot.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'boot.php') 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) { -- cgit v1.2.3