]> git.mxchange.org Git - friendica.git/commitdiff
social tag - add UI
authorFriendika <info@friendika.com>
Mon, 24 Oct 2011 22:47:17 +0000 (15:47 -0700)
committerFriendika <info@friendika.com>
Mon, 24 Oct 2011 22:47:17 +0000 (15:47 -0700)
boot.php
include/conversation.php
include/text.php
mod/like.php
mod/tagger.php
view/jot-header.tpl
view/theme/duepuntozero/style.css
view/theme/duepuntozero/wall_item.tpl
view/wall_item.tpl

index 86b219dc2b038c346384ae0b0bcf17ecbbde21c6..143d850a9a79512f0992dd15e8d4329df943950d 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -8,7 +8,7 @@ require_once("include/pgettext.php");
 require_once('include/nav.php');
 
 define ( 'FRIENDIKA_PLATFORM',     'Free Friendika');
-define ( 'FRIENDIKA_VERSION',      '2.3.1143' );
+define ( 'FRIENDIKA_VERSION',      '2.3.1144' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1098      );
 
index 29fa779024825373cd548887274da7f189ea7326..dec70c1a958f4d723bdb3b6ea72a876d890eec9c 100644 (file)
@@ -466,6 +466,8 @@ function conversation(&$a, $items, $mode, $update) {
                                                'classdo' => (($item['starred']) ? "hidden" : ""),
                                                'classundo' => (($item['starred']) ? "" : "hidden"),
                                                'starred' =>  t('starred'),
+                                               'tagger' => t("add tag"),
+                                               'classtagger' => "",
                                        );
                                }
 
@@ -747,6 +749,7 @@ function status_editor($a,$x, $notes_cid = 0) {
                        '$linkurl' => t('Please enter a link URL:'),
                        '$vidurl' => t("Please enter a video link/URL:"),
                        '$audurl' => t("Please enter an audio link/URL:"),
+                       '$term' => t('Tag term:'),
                        '$whereareu' => t('Where are you right now?'),
                        '$title' => t('Enter a title for this item') 
                ));
index ca8dc5ac3b474569b793a97e555cec979ae0378c..ba6c2531fbeb380734a9de600ad6e800d04a35ae 100644 (file)
@@ -751,7 +751,9 @@ function prepare_body($item,$attach = false) {
 
        $s = prepare_text($item['body']);
 
-       call_hooks('prepare_body', $s);
+       $prep_arr = array('item' => $item, 'html' => $s);
+       call_hooks('prepare_body', $prep_arr);
+       $s = $prep_arr['html'];
 
        if(! $attach)
                return $s;
@@ -784,8 +786,10 @@ function prepare_body($item,$attach = false) {
                }
                $s .= '<div class="clear"></div></div>';
        }
-       call_hooks('prepare_body_final', $s);
-       return $s;
+
+       $prep_arr = array('item' => $item, 'html' => $s);
+       call_hooks('prepare_body_final', $prep_arr);
+       return $prep_arr['html'];
 }}
 
 
index 5c3dd323ec2d49eadeaa9b7dcabbf3d6fb4353ae..6b97fafb561e291ef9dd95406f663d77880ab926 100644 (file)
@@ -197,5 +197,6 @@ EOT;
 
        proc_run('php',"include/notifier.php","like","$post_id");
 
-       return; // NOTREACHED
+       killme();
+//     return; // NOTREACHED
 }
\ No newline at end of file
index dd4b8ffea1d9783c10838eaeeaeeb655e4286d97..4127aaadde4f4c6a7fabc783191de19c34a48574 100644 (file)
@@ -22,7 +22,6 @@ function tagger_content(&$a) {
 
 
        $r = q("SELECT * FROM `item` WHERE `id` = '%s' LIMIT 1",
-               dbesc($item_id),
                dbesc($item_id)
        );
 
@@ -43,8 +42,8 @@ function tagger_content(&$a) {
                $blocktags = $r[0]['blocktags'];
        }
 
-//     if(local_user() != $owner_uid)
-//             return;
+       if(local_user() != $owner_uid)
+               return;
 
        if(remote_user()) {
                $r = q("select * from contact where id = %d AND `uid` = %d limit 1",
@@ -189,6 +188,8 @@ EOT;
 
        proc_run('php',"include/notifier.php","tag","$post_id");
 
+       killme();
+
        return; // NOTREACHED
 
 
index 22bd0aa5b22650bfcd76be3108bc4c4bda044a12..b0671240723900266d52f6e4ef36ee141dfd9a26 100644 (file)
@@ -214,6 +214,19 @@ function initEditor(cb){
                }
        }
 
+       function itemTag(id) {
+               $('#like-rotator-' + id).show();
+               reply = prompt("$term");
+               if(reply && reply.length) {
+                       reply.replace('#','');
+                       if(reply.length) {
+                               $.get('tagger/' + id + '?term=' + reply, function(data) {
+                                       $('#like-rotator-' + id).hide();
+                               });
+                       }
+               }
+       }
+
        function jotClearLocation() {
                $('#jot-coord').val('');
                $('#profile-nolocation-wrapper').hide();
index 6f452cebcce41ac3f562b742a1163c3d88377c7d..378e0da1e97be99e4e214b023c628897f0ff92ec 100644 (file)
@@ -958,6 +958,11 @@ input#dfrn-url {
        margin-left: 10px;
        float: left;    
 }
+.tag-item {
+       margin-left: 10px;
+       float: left;    
+}
+
 
 .wall-item-links-wrapper {
        float: left;
index d264d39994756f34dfa502104852eef33add893e..3a4a497293630706a1de9dd359d440a6b4af1819 100644 (file)
@@ -49,6 +49,7 @@
                         
                        {{ if $star }}
                        <a href="#" id="starred-$id" onclick="dostar($id); return false;" class="star-item icon $isstarred" title="$star.toggle"></a>
+                       <a href="#" id="tagger-$id" onclick="itemTag($id); return false;" class="tag-item icon tagged" title="$star.tagger"></a>
                        {{ endif }}
                        
                        <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$id" >
index cec5e54048df6f293725bac48d97b7ec756e2f68..ef822750a5e1eb9336fad741204f89b1aa7d1b5a 100644 (file)
@@ -40,6 +40,7 @@
                        {{ if $star }}
                                <a href="#" id="star-$id" onclick="dostar($id); return false;"  class="$star.classdo"  title="$star.do">$star.do</a>
                                <a href="#" id="unstar-$id" onclick="dostar($id); return false;"  class="$star.classundo"  title="$star.undo">$star.undo</a>
+                               <a href="#" id="tagger-$id" onclick="itemTag($id); return false;" class="$star.classtagger" title="$star.tagger">$star.tagger</a>
                        {{ endif }}
                        
                        {{ if $vote }}