From d7a9db10881b8d9de1b5f7e2a2dfae3df396fb45 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 16:56:06 -0700 Subject: important bits we need to allow php executable content. These must be explicitly allowed - but only if the account has ACCOUNT_ROLE_ALLOWCODE and *only* for web pages and profile fields. This content cannot be transmitted to other sites. --- boot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 4868046c6..1fd0d2172 100755 --- a/boot.php +++ b/boot.php @@ -434,8 +434,8 @@ define ( 'ACCOUNT_PENDING', 0x0010 ); * Account roles */ -define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 ); - +define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 ); +define ( 'ACCOUNT_ROLE_ALLOWCODE', 0x0001 ); /** * Item visibility -- cgit v1.2.3 From 6191cfef2adaa52019940cc448e28e2ad1a7ae6d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 11 Aug 2013 19:04:07 -0700 Subject: check these in so I can go back and find out why the stylsheet is horked --- boot.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 1fd0d2172..02162bb6a 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', 1058 ); +define ( 'DB_UPDATE_VERSION', 1059 ); define ( 'EOL', '
' . "\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -288,6 +288,10 @@ define ( 'ATTACH_FLAG_OS', 0x0002); +define ( 'MENU_ITEM_ZID', 0x0001); + + + /** * Maximum number of "people who like (or don't like) this" that we will list by name */ -- cgit v1.2.3 From 04f8de184e8c925e38335eb18c102985ce421f95 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 12 Aug 2013 17:42:52 -0700 Subject: block content-type (called ITEM_BUILDBLOCK to avoid confusion with content that is blocked) --- boot.php | 1 + 1 file changed, 1 insertion(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 02162bb6a..6d5ca337b 100755 --- a/boot.php +++ b/boot.php @@ -454,6 +454,7 @@ define ( 'ITEM_DELETED', 0x0010); define ( 'ITEM_UNPUBLISHED', 0x0020); define ( 'ITEM_WEBPAGE', 0x0040); // is a static web page, not a conversational item define ( 'ITEM_DELAYED_PUBLISH', 0x0080); +define ( 'ITEM_BUILDBLOCK', 0x0100); // Named thusly to make sure nobody confuses this with ITEM_BLOCKED /** * Item Flags -- cgit v1.2.3 From b9a8b73392afc6e460073ac6305da24623de5b49 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 02:06:05 -0700 Subject: untested patch for issue #58 - will require theming if it works --- boot.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 6d5ca337b..b59b7024c 100755 --- a/boot.php +++ b/boot.php @@ -1623,20 +1623,13 @@ function profile_sidebar($profile, $block = 0) { call_hooks('profile_sidebar_enter', $profile); - // don't show connect link to yourself - $connect = (($profile['uid'] != local_user()) ? t('Connect') : False); + require_once('include/Contact.php'); - // don't show connect link to authenticated visitors either - - if(remote_user() && count($_SESSION['remote'])) { - foreach($_SESSION['remote'] as $visitor) { - if($visitor['uid'] == $profile['uid']) { - $connect = false; - break; - } - } - } + $connect_url = rconnect_url($profile['uid'],get_observer_xchan()); + $connect = (($connect_url) ? t('Connect') : ''); + if($connect_url) + $connect_url = $connect_url . '/follow?f=1&url=' . $profile['channel_address'] . '@' . $a->get_hostname(); // show edit profile to yourself if($is_owner) { @@ -1702,6 +1695,7 @@ function profile_sidebar($profile, $block = 0) { $o .= replace_macros($tpl, array( '$profile' => $profile, '$connect' => $connect, + '$connect_url' => $connect_url, '$location' => $location, '$gender' => $gender, '$pdesc' => $pdesc, -- cgit v1.2.3 From d6c6a2b144ad1c619cef70310bad7e0cdc920e77 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 02:29:10 -0700 Subject: debugging issue #58 - seems to work but needs (more) theming --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index b59b7024c..d7f2b437a 100755 --- a/boot.php +++ b/boot.php @@ -1625,7 +1625,7 @@ function profile_sidebar($profile, $block = 0) { require_once('include/Contact.php'); - $connect_url = rconnect_url($profile['uid'],get_observer_xchan()); + $connect_url = rconnect_url($profile['uid'],get_observer_hash()); $connect = (($connect_url) ? t('Connect') : ''); if($connect_url) -- cgit v1.2.3 From 9508967c7350e69bf3321aaa63f5527a3e8096f4 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 20:57:03 -0700 Subject: menu management is now functional with the exception of acl's (and of course a way to display the menus you create, and probably a bit more input sanity checking) --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index d7f2b437a..2b2c58488 100755 --- a/boot.php +++ b/boot.php @@ -289,7 +289,7 @@ define ( 'ATTACH_FLAG_OS', 0x0002); define ( 'MENU_ITEM_ZID', 0x0001); - +define ( 'MENU_ITEM_NEWWIN', 0x0002); /** -- cgit v1.2.3 From 4888ab4d0f91e2a0e13887bb27aa29dad538ec29 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 13 Aug 2013 22:14:01 -0700 Subject: primitive cms functionality - provide a custom menu below your profile vcard --- boot.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'boot.php') diff --git a/boot.php b/boot.php index 2b2c58488..61f9f5da5 100755 --- a/boot.php +++ b/boot.php @@ -1690,6 +1690,15 @@ function profile_sidebar($profile, $block = 0) { $contact_block = contact_block(); } + $channel_menu = false; + $menu = get_pconfig($profile['uid'],'system','channel_menu'); + if($menu) { + require_once('include/menu.php'); + $m = menu_fetch($menu,$profile['uid'],$observer['xchan_hash']); + if($m) + $channel_menu = menu_render($m); + } + $tpl = get_markup_template('profile_vcard.tpl'); $o .= replace_macros($tpl, array( @@ -1701,6 +1710,7 @@ function profile_sidebar($profile, $block = 0) { '$pdesc' => $pdesc, '$marital' => $marital, '$homepage' => $homepage, + '$chanmenu' => $channel_menu, '$contact_block' => $contact_block, )); -- cgit v1.2.3