From 1ea69ae275245f65ee0bb8f959744f0896913a0c Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 6 Jul 2010 05:07:28 -0700 Subject: [PATCH] bizzy --- mod/contacts.php | 39 ++++++++++++++++++++++++++++++++- mod/dfrn_request.php | 2 +- mod/item.php | 2 +- view/contact_edit.tpl | 34 ++++++++++++++++++++++++++++ view/contact_selectors.php | 6 ++--- view/contact_template.tpl | 30 +++++++++++++++---------- view/jot-header.tpl | 3 ++- view/jot.tpl | 2 +- view/style.css | 42 ++++++++++++++++++++++++++++++++--- wip/atom-ext | 45 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 182 insertions(+), 23 deletions(-) create mode 100644 view/contact_edit.tpl create mode 100644 wip/atom-ext diff --git a/mod/contacts.php b/mod/contacts.php index fb4e6cf6bd..e1b6c4919b 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -80,7 +80,44 @@ function contacts_content(&$a) { return; } - if(($a->argc2 == 2) && ($a->argv[1] == 'all')) + + + + if(($a->argc == 2) && intval($a->argv[1])) { + + $contact_id = intval($a->argv[1]); + $r = q("SELECT * FROM `contact` WHERE `uid` = %d and `id` = %d LIMIT 1", + $_SESSION['uid'], + intval($contact_id) + ); + if(! count($r)) { + notice("Contact not found."); + return; + } + + require_once('view/contact_selectors.php'); + + $tpl = file_get_contents("view/contact_edit.tpl"); + + $o .= replace_macros($tpl,array( + '$profile_select' => contact_profile_assign($r[0]['profile-id']), + '$contact_id' => $r[0]['id'], + '$blocked' => $r[0]['blocked'], + '$rating' => $r[0]['rating'], + '$reason' => $r[0]['reason'], + // '$groups' => group_selector(), + '$photo' => $r[0]['photo'], + '$name' => $r[0]['name'], + '$dir_icon' => $dir_icon, + '$alt_text' => $alt_text + + )); + + return $o; + + } + + if(($a->argc == 2) && ($a->argv[1] == 'all')) $sql_extra = ''; else $sql_extra = " AND `blocked` = 0 "; diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 7675ee766a..b6ae4346d2 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -187,7 +187,7 @@ function dfrn_request_post(&$a) { if(is_array($contact_record)) { // There is a contact record but no issued-id, so this // is a reciprocal introduction from a known contact - $r = q("UPDATE `contact` SET `issued-id` = '%s', `ret-blocked` = 1 WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d LIMIT 1", dbesc($issued_id), intval($contact_record['id']) ); diff --git a/mod/item.php b/mod/item.php index dbf9d25a89..f667d4fc45 100644 --- a/mod/item.php +++ b/mod/item.php @@ -58,7 +58,7 @@ function item_post(&$a) { intval($post_id)); } } - goaway($a->get_baseurl() . "/profile/$uid"); + goaway($a->get_baseurl() . "/profile/$profile_uid"); diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl new file mode 100644 index 0000000000..a786e47b74 --- /dev/null +++ b/view/contact_edit.tpl @@ -0,0 +1,34 @@ + + +
+
+ $alt_text +
+ $name +
+
+
+
$name
+ +
+ +
+ + + +
+
+
+$profile_select + +$groups + +$rating + +$reason + + diff --git a/view/contact_selectors.php b/view/contact_selectors.php index 186a50e7af..a7d3d0f5b7 100644 --- a/view/contact_selectors.php +++ b/view/contact_selectors.php @@ -1,12 +1,12 @@ "; + $o .= " - +
diff --git a/view/style.css b/view/style.css index f12e5f7895..7114f43944 100644 --- a/view/style.css +++ b/view/style.css @@ -340,15 +340,49 @@ input#dfrn-url { float: left; } - +#contacts-main { + margin-bottom: 20px; +} +.contact-entry-photo-wrapper { + float: left; +} +.contact-entry-direction-icon { + margin-top: 24px; + float: left; +} .contact-entry-photo img { border: none; } - +.contact-entry-photo-end { + clear: both; +} +.contact-entry-edit-links { + float: left; + margin-top: 10px; +} +.contact-entry-name { + float: left; +} +.contact-entry-nav-wrapper { + float: left; + margin-left: 10px; +} +.contact-entry-nav-end { + clear: both; +} +.contact-entry-break { + clear: both; +} .contact-entry-edit-links img { border: none; margin-right: 15px; } +.contact-entry-photo { + float: left; +} +.contact-entry-end { + clear: both; +} .wall-item-photo-wrapper { margin-top: 20px; @@ -399,9 +433,11 @@ input#dfrn-url { #profile-listing-new-link-wrapper { margin-bottom: 30px; } +.profile-listing-photo-wrapper { + float: left; +} .profile-listing-edit-buttons-wrapper { -/* float: left;*/ clear: both; } .profile-listing-photo-edit-link { diff --git a/wip/atom-ext b/wip/atom-ext new file mode 100644 index 0000000000..e7a88d4e3d --- /dev/null +++ b/wip/atom-ext @@ -0,0 +1,45 @@ + + ... + + James M Snell + + + + + Jane Doe + + + + ... + + + + + + + http://www.example.org/pictures + My Picture Gallery + 2005-07-15T12:00:00Z + + James M Snell + + + http://www.example.org/entries/1 + Trip to San Francisco + + 2005-07-15T12:00:00Z + A picture of my hotel room in San Francisco + + + + http://www.example.org/entries/2 + My new car + + 2005-07-15T12:00:00Z + A picture of my new car + + +