aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/contacts.php39
-rw-r--r--mod/dfrn_request.php2
-rw-r--r--mod/item.php2
-rw-r--r--view/contact_edit.tpl34
-rw-r--r--view/contact_selectors.php6
-rw-r--r--view/contact_template.tpl30
-rw-r--r--view/jot-header.tpl3
-rw-r--r--view/jot.tpl2
-rw-r--r--view/style.css42
-rw-r--r--wip/atom-ext45
10 files changed, 182 insertions, 23 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index fb4e6cf6b..e1b6c4919 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 7675ee766..b6ae4346d 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 dbf9d25a8..f667d4fc4 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 000000000..a786e47b7
--- /dev/null
+++ b/view/contact_edit.tpl
@@ -0,0 +1,34 @@
+
+
+<div id="contact-edit-wrapper" >
+ <div class="contact-edit-photo-wrapper" >
+ <img id="contact-edit-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" />
+ <div id="contact-edit-photo" >
+ <a href="$url" title="Visit $name's profile" /><img src="$photo" alt="$name" /></a>
+ </div>
+ <div id="contact-edit-photo-end" ></div>
+ </div>
+ <div id="contact-edit-nav-wrapper"
+ <div id="contact-edit-name" >$name</div>
+
+ <div id="contact-edit-break"></div>
+
+<form action="contacts" method="post" >
+<input type="hidden" name="contact_id" value="$contact_id">
+
+ <div id="contact-edit-links" >
+ <a href="contacts/$id/block" id="contact-edit-block-link" ><img src="images/b_block.gif" alt="Block contact" title="Block contact"/></a>
+ <a href="contacts/$id/drop" id="contact-edit-drop-link"><img src="images/b_drop.gif" alt="Delete contact" title="Delete contact"/></a>
+ </div>
+ <div id="contact-edit-nav-end"></div>
+ </div>
+ <div class="contact-dit-end" ></div>
+$profile_select
+
+$groups
+
+$rating
+
+$reason
+</form>
+</div>
diff --git a/view/contact_selectors.php b/view/contact_selectors.php
index 186a50e7a..a7d3d0f5b 100644
--- a/view/contact_selectors.php
+++ b/view/contact_selectors.php
@@ -1,12 +1,12 @@
<?php
-function select_contact_profile($current) {
+function contact_profile_assign($current) {
$o = '';
- $o .= "<select id=\"contact_profile_selector\" name=\"profile_id\" />";
+ $o .= "<select id=\"contact_profile_selector\" name=\"profile_assign\" />";
- $r = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
+ $r = q("SELECT `profile-name` FROM `profile` WHERE `uid` = %d",
intval($_SESSION['uid']));
if(count($r)) {
diff --git a/view/contact_template.tpl b/view/contact_template.tpl
index bfa901734..7481bdc70 100644
--- a/view/contact_template.tpl
+++ b/view/contact_template.tpl
@@ -1,17 +1,23 @@
<div class="contact-entry-wrapper" id="contact-entry-wrapper-$id" >
-<img class="contact-entry-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" />
-<div class="contact-entry-photo" id="contact-entry-photo-$id" >
- <a href="$url" title="Visit $name's profile" /><img src="$thumb" alt="$name" ></a>
-</div>
-<div class="contact-entry-name" id="contact-entry-name-$id" >$name</div>
-</div>
-<div class="contact-entry-edit-links" >
-<a href="contacts/$id/edit" class="contact-entry-edit-link" ><img src="images/b_edit.gif" alt="Edit contact" title="Edit contact" /></a>
-<a href="contacts/$id/block" class="contact-edit-block-link" ><img src="images/b_block.gif" alt="Block contact" title="Block contact"/></a>
-<a href="contacts/$id/drop" class="contact-entry-block-link"><img src="images/b_drop.gif" alt="Delete contact" title="Delete contact"/></a>
-</div>
-<div class="contact-entry-end" ></div>
+ <div class="contact-entry-photo-wrapper" >
+ <img class="contact-entry-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" />
+ <div class="contact-entry-photo" id="contact-entry-photo-$id" >
+ <a href="$url" title="Visit $name's profile" /><img src="$thumb" alt="$name" /></a>
+ </div>
+ <div class="contact-entry-photo-end" ></div>
+ </div>
+ <div class="contact-entry-nav-wrapper"
+ <div class="contact-entry-name" id="contact-entry-name-$id" >$name</div>
+ <div class="contact-entry-break"></div>
+
+ <div class="contact-entry-edit-links" >
+ <a href="contacts/$id" class="contact-entry-edit-link" ><img src="images/b_edit.gif" alt="Edit contact" title="Edit contact" /></a>
+ </div>
+ <div class="contact-entry-nav-end"></div>
+ </div>
+ <div class="contact-entry-end" ></div>
+</div>
<hr /> \ No newline at end of file
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index 72cc672ff..23e798ecd 100644
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -5,7 +5,8 @@
tinyMCE.init({
theme : "advanced",
- mode : "textareas",
+ mode : "specific_textareas",
+ editor_selector: "profile-jot-text",
plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
theme_advanced_buttons2 : "",
diff --git a/view/jot.tpl b/view/jot.tpl
index 8be7865b6..b6599feec 100644
--- a/view/jot.tpl
+++ b/view/jot.tpl
@@ -7,7 +7,7 @@ What's on your mind?
<input type="hidden" name="type" value="jot" />
<input type="hidden" name="profile_uid" value="$profile_uid" />
-<textarea rows="5" cols="64" id="profile-jot-text" name="body" ></textarea>
+<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea>
</div>
<div id="profile-jot-submit-wrapper" >
diff --git a/view/style.css b/view/style.css
index f12e5f789..7114f4394 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 000000000..e7a88d4e3
--- /dev/null
+++ b/wip/atom-ext
@@ -0,0 +1,45 @@
+<feed xmlns="http://www.w3.org/2005/Atom"
+ xmlns:foaf="http://xmlns.com/foaf/0.1"
+ xml:base="http://www.example.org">
+ ...
+ <author>
+ <name>James M Snell</name>
+ <foaf:homepage rdf:resource="/blog" />
+ <foaf:img rdf:resource="/mypic.png" />
+ </author>
+ <contributor>
+ <name>Jane Doe</name>
+ <foaf:homepage rdf:resource="/janesblog" />
+ <foaf:image rdf:resource="/janespic.png" />
+ </contributor>
+ ...
+</feed>
+
+
+
+
+<feed xmlns="http://www.w3.org/2005/Atom"
+ xml:base="http://www.example.org/">
+ <id>http://www.example.org/pictures</id>
+ <title>My Picture Gallery</title>
+ <updated>2005-07-15T12:00:00Z</updated>
+ <author>
+ <name>James M Snell</name>
+ </author>
+ <entry>
+ <id>http://www.example.org/entries/1</id>
+ <title>Trip to San Francisco</title>
+ <link href="/entries/1" />
+ <updated>2005-07-15T12:00:00Z</updated>
+ <summary>A picture of my hotel room in San Francisco</summary>
+ <content type="image/png" src="/mypng1.png" />
+ </entry>
+ <entry>
+ <id>http://www.example.org/entries/2</id>
+ <title>My new car</title>
+ <link href="/entries/2" />
+ <updated>2005-07-15T12:00:00Z</updated>
+ <summary>A picture of my new car</summary>
+ <content type="image/png" src="/mypng2.png" />
+ </entry>
+</feed>