From 893ba371a90a8f304e4e1707d40cbcc3295a43b2 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Dec 2012 16:48:17 -0800 Subject: [PATCH 1/8] set_baseurl issue, more cleanup --- boot.php | 4 ++-- images/red.png | Bin 4032 -> 4909 bytes include/zot.php | 2 +- mod/ping.php | 17 ++++------------- version.inc | 2 +- view/tpl/profile_photo.tpl | 13 ++++++++----- 6 files changed, 16 insertions(+), 22 deletions(-) diff --git a/boot.php b/boot.php index 0736502b0..653a0ed59 100644 --- a/boot.php +++ b/boot.php @@ -638,7 +638,7 @@ if(! class_exists('App')) { $scheme = 'http'; } } - + $this->baseurl = $scheme . "://" . $this->hostname . ((isset($this->path) && strlen($this->path)) ? '/' . $this->path : '' ); return $this->baseurl; } @@ -647,7 +647,7 @@ if(! class_exists('App')) { if(is_array($this->config) && array_key_exists('system',$this->config) && array_key_exists('baseurl',$this->config['system']) && strlen($this->config['system']['baseurl'])) { - $url = $a->config['system']['baseurl']; + $url = $this->config['system']['baseurl']; } $parsed = @parse_url($url); diff --git a/images/red.png b/images/red.png index 803fd00f861e46e4a37c4a05c7e9be2cded9bb13..1d0a2950e871f955a766e8d93cf36978a49b4231 100644 GIT binary patch delta 2222 zcmV;f2vPUIAFU>^myNVa8=b6$A9abb8{a_2;pHU zkBSNc3K1lUAp)a7V5rZ4!-%M;{h%nFj{V?FXX^NBr=5jaS00ti@)-o+( z1TjJguRs!OkVgpQN$%sEy>~y{b8iBuAGBv?&D^X`a}Um) zg8;0#v3O`+cJ|AGaJb9~hY{NWA^DP@2;Q3o#!p7OE?z7~q9?khv90~LOTXOHA*;uY z4d;Y{n*)wL#}0pmK*Sj33EE%`Ao^z{VZc~P0xb)19AjKpjO!Bj)Y_)5jtAtWK?CLv z3Wq-wTd;#+jMiW@MjJ3X9p@)Ksl3HPEJ4HqOYnMn05~0uO?FI2$8VzNyRm~IV}}xQ zLH#hj;KqOmf&s0;QkdLPw7fa01XLMv{OFW2#t8Jf%oL zk&_T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version.inc b/version.inc index bdbdd882b..94a1bafa8 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-12-18.173 +2012-12-19.174 diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index 04ee8f916..282e890c8 100644 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -4,20 +4,23 @@
- - -
- - +
+ + + +
+ From cad8fa6b3584ecf4599a569b2f19d9f7e395c7f7 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Dec 2012 16:58:25 -0800 Subject: [PATCH 2/8] get notification backend working again --- mod/ping.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/ping.php b/mod/ping.php index 9b29eacf7..b135ac6e3 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -158,7 +158,7 @@ function ping_init(&$a) { $t1 = dba_timer(); $r = q("SELECT id, item_restrict, item_flags FROM item - WHERE item_restrict = %d and ( item_flags & %d ) and uid = %d", + WHERE (item_restrict = %d) and ( item_flags & %d ) and uid = %d", intval(ITEM_VISIBLE), intval(ITEM_UNSEEN), intval(local_user()) From 2f48c31082179d8ff29952e8fe983c99ab0ff5f3 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Dec 2012 16:59:45 -0800 Subject: [PATCH 3/8] add mod_profile_photo.css --- view/css/mod_profile_photo.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 view/css/mod_profile_photo.css diff --git a/view/css/mod_profile_photo.css b/view/css/mod_profile_photo.css new file mode 100644 index 000000000..5540b5fae --- /dev/null +++ b/view/css/mod_profile_photo.css @@ -0,0 +1,12 @@ +.form-label { + margin-bottom: 15px; + float: left; + width: 150px; +} +.form-input { + margin-bottom: 15px; +} + +#profile-photo-submit-wrapper { + clear: both; +} \ No newline at end of file From ad20e1f617c7e26585153b587eb9a85fc958794b Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Dec 2012 19:51:52 -0800 Subject: [PATCH 4/8] directory page still needs a lot of work, look up locally if local master or standalone, need to put some basic profile info in discovery page and direct to local directory master --- boot.php | 13 +- include/dir_fns.php | 6 + include/directory.php | 4 +- mod/directory.php | 233 ++++++++++++++++++---------------- view/tpl/directory_header.tpl | 24 ++-- view/tpl/direntry.tpl | 11 ++ 6 files changed, 159 insertions(+), 132 deletions(-) create mode 100644 include/dir_fns.php create mode 100644 view/tpl/direntry.tpl diff --git a/boot.php b/boot.php index 653a0ed59..8b80ea2f0 100644 --- a/boot.php +++ b/boot.php @@ -143,12 +143,13 @@ define ( 'UPDATE_FAILED', 1); * */ -define ( 'PAGE_NORMAL', 0 ); -define ( 'PAGE_SOAPBOX', 1 ); -define ( 'PAGE_COMMUNITY', 2 ); -define ( 'PAGE_FREELOVE', 3 ); -define ( 'PAGE_BLOG', 4 ); -define ( 'PAGE_PRVGROUP', 5 ); +define ( 'PAGE_NORMAL', 0x0000 ); +define ( 'PAGE_HIDDEN', 0x0001 ); +define ( 'PAGE_AUTOCONNECT', 0x0002 ); + +//define ( 'PAGE_FREELOVE', 3 ); +//define ( 'PAGE_BLOG', 4 ); +//define ( 'PAGE_PRVGROUP', 5 ); /** * Network and protocol family types diff --git a/include/dir_fns.php b/include/dir_fns.php new file mode 100644 index 000000000..683ed9e5b --- /dev/null +++ b/include/dir_fns.php @@ -0,0 +1,6 @@ +set_pager_itemspage(60); - if(local_user()) { - require_once('include/contact_widgets.php'); - - $a->page['aside'] .= findpeople_widget(); - - } } function directory_aside(&$a) { @@ -35,144 +32,158 @@ function directory_content(&$a) { else $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); + $tpl = get_markup_template('directory_header.tpl'); - $globaldir = ''; - $gdirpath = dirname(get_config('system','directory_submit_url')); - if(strlen($gdirpath)) { - $globaldir = ''; + + $dirmode = get_config('system','directory_mode'); + if($dirmode === false) + $dirmode = DIRECTORY_MODE_NORMAL; + + if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) { + $localdir = true; + return; } - $admin = ''; - - $o .= replace_macros($tpl, array( - '$search' => $search, - '$globaldir' => $globaldir, - '$desc' => t('Find on this site'), - '$admin' => $admin, - '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : ""), - '$sitedir' => t('Site Directory'), - '$submit' => t('Find') - )); - - if($search) - $search = dbesc($search); - $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country_name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); - - $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " ); +// FIXME +$localdir = true; - $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is_default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra "); - if(count($r)) - $a->set_pager_total($r[0]['total']); + if(! $localdir) { + $directory = find_upstream_directory($dirmode); - $order = " ORDER BY `name` ASC "; + if($directory) { + $url = $directory['url']; + } + else { + $url = DIRECTORY_FALLBACK_MASTER . '/post'; + } + } - $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is_default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", - intval($a->pager['start']), - intval($a->pager['itemspage']) - ); - if(count($r)) { - if(in_array('small', $a->argv)) + if($localdir) { + if($search) + $search = dbesc($search); + $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, channel.channel_address, `pdesc`, `locality`,`region`,`country_name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`pub_keywords`,`prv_keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : ""); + + + $r = q("SELECT COUNT(channel_id) AS `total` FROM channel left join profile on channel.channel_id = profile.uid WHERE `is_default` = 1 and not ( channel_pageflags & %d ) $sql_extra ", + intval(PAGE_HIDDEN) + ); + if($r) + $a->set_pager_total($r[0]['total']); + + $order = " ORDER BY `name` ASC "; + + + $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, channel_name, channel_address, channel_hash, channel_timezone, channel_pageflags FROM `profile` LEFT JOIN channel ON channel_id = `profile`.`uid` WHERE `is_default` = 1 and not ( channel_pageflags & %d ) $sql_extra $order LIMIT %d , %d ", + intval(PAGE_HIDDEN), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); + if($r) { + + $entries = array(); + $photo = 'thumb'; - else - $photo = 'photo'; - foreach($r as $rr) { + foreach($r as $rr) { - - $profile_link = $a->get_baseurl() . '/channel/' . $rr['nickname']; + $profile_link = chanlink_hash($rr['channel_hash']); - $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '
' : ''); + $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '
' : ''); - $details = ''; - if(strlen($rr['locality'])) - $details .= $rr['locality']; - if(strlen($rr['region'])) { + $details = ''; if(strlen($rr['locality'])) - $details .= ', '; - $details .= $rr['region']; - } - if(strlen($rr['country_name'])) { - if(strlen($details)) - $details .= ', '; - $details .= $rr['country_name']; - } - if(strlen($rr['dob'])) { - if(($years = age($rr['dob'],$rr['timezone'],'')) != 0) - $details .= '
' . t('Age: ') . $years ; - } - if(strlen($rr['gender'])) - $details .= '
' . t('Gender: ') . $rr['gender']; + $details .= $rr['locality']; + if(strlen($rr['region'])) { + if(strlen($rr['locality'])) + $details .= ', '; + $details .= $rr['region']; + } + if(strlen($rr['country_name'])) { + if(strlen($details)) + $details .= ', '; + $details .= $rr['country_name']; + } + if(strlen($rr['dob'])) { + if(($years = age($rr['dob'],$rr['timezone'],'')) != 0) + $details .= '
' . t('Age: ') . $years ; + } + if(strlen($rr['gender'])) + $details .= '
' . t('Gender: ') . $rr['gender']; - if($rr['page-flags'] == PAGE_NORMAL) - $page_type = "Personal Profile"; - if($rr['page-flags'] == PAGE_SOAPBOX) - $page_type = "Fan Page"; - if($rr['page-flags'] == PAGE_COMMUNITY) - $page_type = "Community Forum"; - if($rr['page-flags'] == PAGE_FREELOVE) - $page_type = "Open Forum"; - if($rr['page-flags'] == PAGE_PRVGROUP) - $page_type = "Private Group"; + $page_type = ''; - $profile = $rr; + $profile = $rr; - if((x($profile,'address') == 1) - || (x($profile,'locality') == 1) - || (x($profile,'region') == 1) - || (x($profile,'postal_code') == 1) - || (x($profile,'country_name') == 1)) - $location = t('Location:'); + if((x($profile,'address') == 1) + || (x($profile,'locality') == 1) + || (x($profile,'region') == 1) + || (x($profile,'postal_code') == 1) + || (x($profile,'country_name') == 1)) + $location = t('Location:'); - $gender = ((x($profile,'gender') == 1) ? t('Gender:') : False); + $gender = ((x($profile,'gender') == 1) ? t('Gender:') : False); - $marital = ((x($profile,'marital') == 1) ? t('Status:') : False); + $marital = ((x($profile,'marital') == 1) ? t('Status:') : False); + + $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False); - $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False); - - $about = ((x($profile,'about') == 1) ? t('About:') : False); + $about = ((x($profile,'about') == 1) ? t('About:') : False); - $tpl = get_markup_template('directory_item.tpl'); - $entry = replace_macros($tpl,array( - '$id' => $rr['id'], - '$profile-link' => $profile_link, - '$photo' => $a->get_cached_avatar_image($rr[$photo]), - '$alt-text' => $rr['name'], - '$name' => $rr['name'], - '$details' => $pdesc . $details, - '$page-type' => $page_type, - '$profile' => $profile, - '$location' => template_escape($location), - '$gender' => $gender, - '$pdesc' => $pdesc, - '$marital' => $marital, - '$homepage' => $homepage, - '$about' => $about, + $entry = array( + 'id' => $rr['id'], + 'profile_link' => $profile_link, + 'photo' => $rr[$photo], + 'alttext' => $rr['channel_name'], + 'name' => $rr['channel_name'], + 'details' => $pdesc . $details, + 'profile' => $profile, + 'location' => $location, + 'gender' => $gender, + 'pdesc' => $pdesc, + 'marital' => $marital, + 'homepage' => $homepage, + 'about' => $about, + + ); + + $arr = array('contact' => $rr, 'entry' => $entry); + + call_hooks('directory_item', $arr); + + unset($profile); + unset($location); + + $entries[] = $entry; + + } + + logger('entries: ' . print_r($entries,true)); + + $o .= replace_macros($tpl, array( + '$search' => $search, + '$desc' => t('Find'), + '$finddsc' => t('Finding:'), + '$safetxt' => htmlspecialchars($search,ENT_QUOTES,'UTF-8'), + '$entries' => $entries, + '$dirlbl' => t('Directory'), + '$submit' => t('Find') )); - $arr = array('contact' => $rr, 'entry' => $entry); - call_hooks('directory_item', $arr); - - unset($profile); - unset($location); - - $o .= $entry; + $o .= paginate($a); } - $o .= "
\r\n"; - $o .= paginate($a); + else + info( t("No entries (some entries may be hidden).") . EOL); } - else - info( t("No entries \x28some entries may be hidden\x29.") . EOL); return $o; } diff --git a/view/tpl/directory_header.tpl b/view/tpl/directory_header.tpl index 1f03540f2..e1def851b 100644 --- a/view/tpl/directory_header.tpl +++ b/view/tpl/directory_header.tpl @@ -1,16 +1,16 @@ -

$sitedir

+

$dirlbl

-$globaldir -$admin +{{ if $search }} +

$finddsc $safetxt

+{{ endif }} -$finding +{{for $entries as $entry}} -
-
-$desc - - -
-
-
+{{ inc direntry.tpl }}{{ endinc }} + +{{ endfor }} + + + +
diff --git a/view/tpl/direntry.tpl b/view/tpl/direntry.tpl new file mode 100644 index 000000000..e860da41c --- /dev/null +++ b/view/tpl/direntry.tpl @@ -0,0 +1,11 @@ + +
+
+
+ $entry.alttext +
+
+ +
$entry.name
+
$entry.details
+
From d7c23be8c9312e002e4a5e0b68ab669f1aadcf55 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Dec 2012 22:45:49 -0800 Subject: [PATCH 5/8] some changes for directory services --- boot.php | 2 +- install/database.sql | 16 ++++++++++++++-- install/update.php | 27 ++++++++++++++++++++++++++- mod/zfinger.php | 4 ++++ 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 8b80ea2f0..2bff1b799 100644 --- a/boot.php +++ b/boot.php @@ -17,7 +17,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica Red'); define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); define ( 'ZOT_REVISION', 1 ); -define ( 'DB_UPDATE_VERSION', 1003 ); +define ( 'DB_UPDATE_VERSION', 1005 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/install/database.sql b/install/database.sql index edb2bc2c4..4030eb7ea 100644 --- a/install/database.sql +++ b/install/database.sql @@ -208,7 +208,6 @@ CREATE TABLE IF NOT EXISTS `config` ( UNIQUE KEY `access` (`cat`,`k`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `event` ( `id` int(11) NOT NULL AUTO_INCREMENT, `aid` int(10) unsigned NOT NULL DEFAULT '0', @@ -761,6 +760,17 @@ CREATE TABLE IF NOT EXISTS `session` ( KEY `expire` (`expire`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `site` ( + `site_url` char(255) NOT NULL, + `site_flags` int(11) NOT NULL DEFAULT '0', + `site_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `site_directory` char(255) NOT NULL DEFAULT '', + PRIMARY KEY (`site_url`), + KEY `site_flags` (`site_flags`), + KEY `site_update` (`site_update`), + KEY `site_directory` (`site_directory`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `spam` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, @@ -834,6 +844,7 @@ CREATE TABLE IF NOT EXISTS `xchan` ( `xchan_url` char(255) NOT NULL DEFAULT '', `xchan_name` char(255) NOT NULL DEFAULT '', `xchan_network` char(255) NOT NULL DEFAULT '', + `xchan_flags` int(10) unsigned NOT NULL DEFAULT '0', `xchan_photo_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `xchan_name_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`xchan_hash`), @@ -841,5 +852,6 @@ CREATE TABLE IF NOT EXISTS `xchan` ( KEY `xchan_addr` (`xchan_addr`), KEY `xchan_name` (`xchan_name`), KEY `xchan_network` (`xchan_network`), - KEY `xchan_url` (`xchan_url`) + KEY `xchan_url` (`xchan_url`), + KEY `xchan_flags` (`xchan_flags`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/install/update.php b/install/update.php index ad21d9b45..48cb15c03 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ Date: Wed, 19 Dec 2012 23:09:28 -0800 Subject: [PATCH 6/8] update README - it isn't completely horked anymore. Some stuff works. Some doesn't. --- README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 6be485eab..a930d0910 100644 --- a/README +++ b/README @@ -3,8 +3,9 @@ Friendica RED Interaction Engine Red is a new concept in electronic communications which is based on our earlier work with Friendica and our pioneering developments in decentralised, federated social networking. -Red is prototype code and does not currently function. This message will be changed when it approaches stability. +Red is prototype code and has limited functionality at the present time. This message will be changed when it approaches stability. -At its heart, Red is a decentralised collection of location agnostic info streams (e.g. "channels") which are attached to permission controlled web resources, and which have the ability to discover each other and interact. +At its heart, Red is a decentralised collection of location agnostic info streams (e.g. "channels") which are attached to permission controlled web resources, and which have the ability to discover each other and interact. You could call it a type of social network, but that would be degrading. This is a different concept in online communications, starting where social networks leave off and extending those somewhat primitive types of interactions in new ways - particularly when it comes to privacy. + Social networking emulation is one form that these streams can take, but they can take many other forms - limited only by your imagination. From f6dc0fe26fc7fec63b956255623f6c1bc068f755 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 20 Dec 2012 00:27:01 -0800 Subject: [PATCH 7/8] directory discovery --- mod/zfinger.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mod/zfinger.php b/mod/zfinger.php index f00819522..a8dc5c5c8 100644 --- a/mod/zfinger.php +++ b/mod/zfinger.php @@ -123,6 +123,20 @@ function zfinger_init(&$a) { } } + $ret['site'] = array(); + $ret['site']['url'] = z_root(); + $dirmode = get_config('system','directory_mode'); + if(($dirmode === false) || ($dirmode == DIRECTORY_MODE_NORMAL)) + $ret['site']['directory_mode'] = 'normal'; + if($dirmode == DIRECTORY_MODE_MASTER) + $ret['site']['directory_mode'] = 'master'; + elseif($dirmode == DIRECTORY_MODE_SECONDARY) + $ret['site']['directory_mode'] = 'secondary'; + elseif($dirmode == DIRECTORY_MODE_STANDALONE) + $ret['site']['directory_mode'] = 'standalone'; + if($dirmode != DIRECTORY_MODE_NORMAL) + $ret['site']['directory_url'] = z_root() . '/dir'; + json_return_and_die($ret); } \ No newline at end of file From e091d30ca4d057e810864b1ba2351b9c050ad548 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 20 Dec 2012 00:33:53 -0800 Subject: [PATCH 8/8] wrong constant --- include/directory.php | 2 +- mod/zfinger.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/directory.php b/include/directory.php index 0378e2003..105686ca7 100644 --- a/include/directory.php +++ b/include/directory.php @@ -1,4 +1,4 @@ -