]> git.mxchange.org Git - friendica.git/commitdiff
bizzy
authorMike Macgirvin <mike@macgirvin.com>
Tue, 6 Jul 2010 12:07:28 +0000 (05:07 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Tue, 6 Jul 2010 12:07:28 +0000 (05:07 -0700)
mod/contacts.php
mod/dfrn_request.php
mod/item.php
view/contact_edit.tpl [new file with mode: 0644]
view/contact_selectors.php
view/contact_template.tpl
view/jot-header.tpl
view/jot.tpl
view/style.css
wip/atom-ext [new file with mode: 0644]

index fb4e6cf6bdbf45a9d15b5b3079e5417fb0e7cac6..e1b6c4919b686ee7c34a88dd96c586218d4e02a7 100644 (file)
@@ -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 ";
index 7675ee766ad23319f37e5e6cdcc7865319d3e895..b6ae4346d2447499e0840257906178c65f058890 100644 (file)
@@ -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'])
                        );
index dbf9d25a897a29be34888c12754337a04eeda7fb..f667d4fc45bc332d4b0bc9a420279d036abfaebe 100644 (file)
@@ -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 (file)
index 0000000..a786e47
--- /dev/null
@@ -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>
index 186a50e7af4da7b1ca46506e60ba6475445a2960..a7d3d0f5b79b42fe87533e037fd92ad7ed859d4e 100644 (file)
@@ -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)) {
index bfa901734b085570a7c4c90f59100ef457a198b6..7481bdc70bcddc39da51808050d019af7cdc4ee3 100644 (file)
@@ -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
index 72cc672ffc720fd03700a5767916d048b2470f34..23e798ecd7a4612afdd097247fe3c9b4aad7058f 100644 (file)
@@ -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 : "",
index 8be7865b68034fd0ea298ebc4abf4ea8c1920518..b6599feec90ef639b6350d628f06534da22e78e0 100644 (file)
@@ -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" >
index f12e5f7895b5e5d0239c9b402291c885c5597ae5..7114f439448268b251d09fff35dddd0ad6777aa8 100644 (file)
@@ -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 (file)
index 0000000..e7a88d4
--- /dev/null
@@ -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>