From 004193e849520319d4cf582b2b2dfc277068be66 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 12 Dec 2010 13:59:16 -0800 Subject: [PATCH 1/4] display request issue --- mod/dfrn_request.php | 1 + mod/display.php | 1 + 2 files changed, 2 insertions(+) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index ce422aa9f..60106661c 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -6,6 +6,7 @@ function dfrn_request_init(&$a) { if($a->argc > 1) $which = $a->argv[1]; + require_once('mod/profile.php'); profile_init($a,$which); return; diff --git a/mod/display.php b/mod/display.php index 1049b28a0..369161619 100644 --- a/mod/display.php +++ b/mod/display.php @@ -5,6 +5,7 @@ function display_content(&$a) { $o = '
' . "\r\n"; + require_once('mod/profile.php'); profile_init($a); $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); From 0e39f60c041f8d614f8eb3c12c901b92ac08222f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 12 Dec 2010 14:33:04 -0800 Subject: [PATCH 2/4] replace quick fix with correct fix --- mod/dfrn_request.php | 3 +-- mod/display.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 60106661c..e1370dfd8 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -6,8 +6,7 @@ function dfrn_request_init(&$a) { if($a->argc > 1) $which = $a->argv[1]; - require_once('mod/profile.php'); - profile_init($a,$which); + profile_load($a,$which); return; }} diff --git a/mod/display.php b/mod/display.php index 369161619..990d0b431 100644 --- a/mod/display.php +++ b/mod/display.php @@ -5,8 +5,8 @@ function display_content(&$a) { $o = '
' . "\r\n"; - require_once('mod/profile.php'); - profile_init($a); + $nick = (($a->argc > 1) ? $a->argv[1] : ''); + profile_load($a,$nick); $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); From 1cffecd1bed6856dd40eddd8b0e6cd870d287762 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 12 Dec 2010 17:40:23 -0800 Subject: [PATCH 3/4] footer is serving no useful purpose. --- include/nav.php | 5 ++--- index.php | 5 ++++- mod/home.php | 10 ++++++---- view/theme/default/style.css | 33 +++++++++++++++++---------------- 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/include/nav.php b/include/nav.php index dd2655e84..77cffc3ab 100644 --- a/include/nav.php +++ b/include/nav.php @@ -1,8 +1,5 @@ page,'nav')) - $a->page['nav'] = ''; - $a->page['nav'] .= '' ; if(local_user()) { @@ -56,7 +53,9 @@ $banner = get_config('system','banner'); + if($banner === false) $banner .= 'logoFriendika'; + $a->page['nav'] .= ''; diff --git a/index.php b/index.php index f2c43a8b3..e91603a30 100644 --- a/index.php +++ b/index.php @@ -120,6 +120,9 @@ else * "module"_afterpost * "module"_content - the string return of this function contains our page body * + * Modules which emit other serialisations besides HTML (XML,JSON, etc.) should do + * so within the module init and/or post functions and then invoke killme() to terminate + * further processing. */ if(strlen($a->module)) { @@ -193,7 +196,7 @@ $a->page['content'] .= '
'; */ if($a->module != 'install') - require_once("nav.php"); + require_once('nav.php'); /** * diff --git a/mod/home.php b/mod/home.php index b8f16158e..59cc31d3b 100644 --- a/mod/home.php +++ b/mod/home.php @@ -14,12 +14,14 @@ if(! function_exists('home_content')) { function home_content(&$a) { $o = ''; - if(! (x($a->page,'footer'))) - $a->page['footer'] = ''; - $a->page['footer'] .= "
Powered by friendika
"; +/* + * if(! (x($a->page,'footer'))) + * $a->page['footer'] = ''; + * $a->page['footer'] .= "
Powered by friendika
"; + */ $o .= '

Welcome' . ((x($a->config,'sitename')) ? " to {$a->config['sitename']}" : "" ) . '

'; if(file_exists('home.html')) - $o .= file_get_contents('home.html'); + $o .= file_get_contents('home.html'); $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1); return $o; diff --git a/view/theme/default/style.css b/view/theme/default/style.css index c5f535527..f20341dd6 100644 --- a/view/theme/default/style.css +++ b/view/theme/default/style.css @@ -178,10 +178,13 @@ img.photo { font-weight: bold; margin-left: 280px; } -#page-footer { - height: 20px; -/* border-bottom: 3px dashed #15607B; */ -} + +/* + * #page-footer { + * height: 20px; + * + * } + */ .heart { color: #FF0000; @@ -224,18 +227,16 @@ nav { background: #15607B; } -footer { - /*position: absolute;*/ - left: 0px; - /*right: 0px;*/ - bottom: 0px; - /*margin: 20px 20px 20px 20px;*/ - - position: fixed; - background-color: #0CBEFE; - width: 100%; - padding: 2px 3%; -} +/* + * footer { + * left: 0px; + * bottom: 0px; + * position: fixed; + * background-color: #0CBEFE; + * width: 100%; + * padding: 2px 3%; + * } + */ .fn { font-size: 1.4em; From 57eb0576b018902d020bbf17e5b38a4ed7c440fd Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 12 Dec 2010 18:43:32 -0800 Subject: [PATCH 4/4] make both content and people search POSTable --- mod/directory.php | 13 ++++++++++++- mod/search.php | 11 ++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/mod/directory.php b/mod/directory.php index 703c08ce1..e9bbf47ab 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -3,11 +3,22 @@ function directory_init(&$a) { $a->set_pager_itemspage(60); } + +function directory_post(&$a) { + if(x($_POST,'search')) + $a->data['search'] = $_POST['search']; +} + + + function directory_content(&$a) { $o = ''; $o .= ''; - $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); + if(x($a->data,'search')) + $search = notags(trim($a->data['search'])); + else + $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); $tpl = load_view_file('view/directory_header.tpl'); diff --git a/mod/search.php b/mod/search.php index 78a4a3d53..7605e9ae2 100644 --- a/mod/search.php +++ b/mod/search.php @@ -1,13 +1,22 @@ data['search'] = $_POST['search']; +} + + function search_content(&$a) { $o = '' . "\r\n"; $o .= '

' . t('Search') . '

'; - $search = ((x($_GET,'search')) ? rawurldecode($_GET['search']) : ''); + if(x($a->data,'search')) + $search = notags(trim($a->data['search'])); + else + $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); $o .= search($search);