]> git.mxchange.org Git - friendica.git/commitdiff
fix like/dislike refresh on photos/display items
authorFriendika <info@friendika.com>
Wed, 3 Nov 2010 05:21:49 +0000 (22:21 -0700)
committerFriendika <info@friendika.com>
Wed, 3 Nov 2010 05:21:49 +0000 (22:21 -0700)
images/3ring150.jpg [deleted file]
images/friendika.gif [deleted file]
images/friendika.ico [deleted file]
images/friendika.jpg [new file with mode: 0644]
images/friendika48.gif [new file with mode: 0644]
images/friendika48.ico [new file with mode: 0644]
include/main.js
mod/display.php
mod/home.php
mod/photos.php

diff --git a/images/3ring150.jpg b/images/3ring150.jpg
deleted file mode 100644 (file)
index a5bbc1b..0000000
Binary files a/images/3ring150.jpg and /dev/null differ
diff --git a/images/friendika.gif b/images/friendika.gif
deleted file mode 100644 (file)
index d386466..0000000
Binary files a/images/friendika.gif and /dev/null differ
diff --git a/images/friendika.ico b/images/friendika.ico
deleted file mode 100644 (file)
index 8428d28..0000000
Binary files a/images/friendika.ico and /dev/null differ
diff --git a/images/friendika.jpg b/images/friendika.jpg
new file mode 100644 (file)
index 0000000..a5bbc1b
Binary files /dev/null and b/images/friendika.jpg differ
diff --git a/images/friendika48.gif b/images/friendika48.gif
new file mode 100644 (file)
index 0000000..d386466
Binary files /dev/null and b/images/friendika48.gif differ
diff --git a/images/friendika48.ico b/images/friendika48.ico
new file mode 100644 (file)
index 0000000..8428d28
Binary files /dev/null and b/images/friendika48.ico differ
index f0cb8571b9ba16c69e64438e8877cf7483caac75..1b5553161c5ad4a958c37a3d3795cf9f7b84266c 100644 (file)
@@ -16,7 +16,7 @@
       document.getElementById(theID).style.display = "none" 
   }
 
-
+       
        var src = null;
        var prev = null;
        var livetime = null;
@@ -24,6 +24,7 @@
        var stopped = false;
        var timer = null;
        var pr = 0;
+       var liking = 0;
 
        $(document).ready(function() {
                $.ajaxSetup({cache: false});
 
                if($('#live-network').length) { src = 'network'; liveUpdate(); }
                if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
+               if($('#live-display').length) { 
+                       if(liking) {
+                               liking = 0;
+                               window.location.href=window.location.href 
+                       }
+               }
+               if($('#live-photos').length)  { 
+                       if(liking) {
+                               liking = 0;
+                               window.location.href=window.location.href 
+                       }
+               }
 
                if(! stopped) {
                        $.get("ping",function(data) {
                $.get('like/' + ident.toString() + '?verb=' + verb );
                if(timer) clearTimeout(timer);
                timer = setTimeout(NavUpdate,3000);
+               liking = 1;
        }
 
        function getPosition(e) {
index 2e35cd6acc5f2fc4c15015f468068424aba72913..b451d693009bb1e4e41ad165fc5ed570854b0a88 100644 (file)
@@ -3,6 +3,8 @@
 
 function display_content(&$a) {
 
+       $o = '<div id="live-display"></div>' . "\r\n";
+
        require_once('mod/profile.php');
        profile_init($a);
 
@@ -100,6 +102,7 @@ function display_content(&$a) {
        );
 
 
+
        $cmnt_tpl = load_view_file('view/comment_item.tpl');
        $like_tpl = load_view_file('view/like.tpl');
        $tpl = load_view_file('view/wall_item.tpl');
@@ -112,6 +115,13 @@ function display_content(&$a) {
 
        if(count($r)) {
 
+               if((local_user()) && (local_user() == $a->profile['uid'])) {
+                       q("UPDATE `item` SET `unseen` = 0 
+                               WHERE `parent` = %d AND `unseen` = 1",
+                               intval($r[0]['parent'])
+                       );
+               }
+
                foreach($r as $item) {
                        like_puller($a,$item,$alike,'like');
                        like_puller($a,$item,$dlike,'dislike');
index 9239f1d1735cda650fab95d600903cb5e095c671..13b6d56c4a797f6417a69546ee9b44f0d5614c1c 100644 (file)
@@ -16,7 +16,7 @@ function home_content(&$a) {
        $o = '';
        if(! (x($a->page,'footer')))
                $a->page['footer'] = '';
-       $a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://friendika.com\" name=\"mistpark\" >friendika</a></div>";
+       $a->page['footer'] .= "<div class=\"powered\" >Powered by <a href=\"http://friendika.com\" title=\"friendika\" >friendika</a></div>";
        $o .= '<h1>Welcome' . ((x($a->config,'sitename')) ? " to {$a->config['sitename']}" : "" ) . '</h1>';
        if(file_exists('home.html'))
                $o .= file_get_contents('home.html');
index 63300ebee0f148a41621ebbfcca95a7cd4d4e658..8d2805fdef2dc9eaa307d829b3feead912a4567e 100644 (file)
@@ -665,6 +665,7 @@ function photos_content(&$a) {
                require_once('security.php');
                require_once('bbcode.php');
 
+               $o = '<div id="live-display"></div>' . "\r\n";
                // fetch image, item containing image, then comments
 
                $ph = q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s'