diff --git a/wp-content/themes/score/lib/inc/fetch-video-data.php b/wp-content/themes/score/lib/inc/fetch-video-data.php index 5b7fb7c..5a8b6f8 100644 --- a/wp-content/themes/score/lib/inc/fetch-video-data.php +++ b/wp-content/themes/score/lib/inc/fetch-video-data.php @@ -104,8 +104,11 @@ function gp_ajax_video_data() { $salida .= '' . $video['permalink']. ''; $salida .= '' . $video['extlink']. ''; $salida .= ''; - if (($theme_show_new_label) && ($video['unreadedid'])) { - $salida .= '' . mar_read_unread_links('', '', false) . ''; + + if ($video['unreaded']) { + $salida .= ''; + $salida .= mar_read_unread_links('', '', false); + $salida .= ''; } $salida .= ''; $salida .= $video['from_to_text']; diff --git a/wp-content/themes/score/lib/scripts/asong2u.js b/wp-content/themes/score/lib/scripts/asong2u.js index fc33514..a4b8b79 100644 --- a/wp-content/themes/score/lib/scripts/asong2u.js +++ b/wp-content/themes/score/lib/scripts/asong2u.js @@ -166,7 +166,8 @@ function updateInfo() { ); jQuery('#dedicationTitle').html(new_title); shrinkTitle(); - jQuery('#dedicationTitle a').jTypeWriter(); + jQuery('#dedicationTitle a').jTypeWriter(); + jQuery('#dedicationComments_container').slideUp( 'fast', @@ -187,14 +188,30 @@ function updateInfo() { } ); jQuery('#dedicationComments_container').slideDown(); - - if(jQuery('#postdata-mark-read-' + id).length > 0) { - jQuery('#postdata-mark-read-' + id + ' .mar_mark_as_read').click(); - jQuery('#postdata-mark-read-' + id).remove(); + + if(jQuery('#postdata-mark-read-' + id).length > 0) { + markAsRead(id); + jQuery('#postdata-mark-read-' + id).remove(); + } } } +function markAsRead(id) { + var post_id = id; + var data = { + action: 'mark_post_as_read', + post_read: post_id + }; + jQuery.post(mark_as_read_js.ajaxurl, data, function(response) { + if(mark_as_read_js.show_alerts == '1') { + alert(read_message); + } + jQuery('#header .navmenu .profile .sign').text(jQuery('#header .navmenu .profile .sign').text()-1); + }); + return false; +} + function shrinkTitle() { var textH1 = document.getElementById("dedicationTitle"); diff --git a/wp-content/themes/score/lib/scripts/asong2u.min.js b/wp-content/themes/score/lib/scripts/asong2u.min.js index 1b85857..8ce20fe 100644 --- a/wp-content/themes/score/lib/scripts/asong2u.min.js +++ b/wp-content/themes/score/lib/scripts/asong2u.min.js @@ -9,7 +9,8 @@ var aIndex=-1,oUrl=""; function updateInfo(){var a=jQuery.fn.videoGallery.getMediaID(),a=jQuery(jQuery("#playlist li").get(a)).attr("id").replace("playlist-element-","");if(aIndex!=a&&0<=a){aIndex=a;""==oUrl&&(oUrl=jQuery("#dedicate_this_song_button").attr("href"));var b=jQuery("#postdata-id-"+a).text(),e=jQuery("#postdata-title-"+a).html(),c=jQuery("#postdata-from-to-"+a).html(),f=jQuery("#postdata-artist-"+a).html(),g=jQuery("#postdata-song-"+a).html(),h=jQuery("#postdata-link-"+a).html(),d=jQuery("#postdata-extlink-"+a).html(), b=oUrl+"id/"+b;jQuery("#dedicate_this_song_button").attr("href",b);jQuery("#fsbbtn a").attr("href","https://www.facebook.com/sharer.php?u="+d);jQuery("#twtbtn a").attr("href","http://twitter.com/intent/tweet?source=sharethiscom&url="+d);jQuery("#gpsbtn a").attr("href","https://plusone.google.com/_/+1/confirm?url="+d);jQuery("#mysbtn a").attr("href",'javascript:void(window.open("http://www.myspace.com/Modules/PostTo/Pages/?u='+d+'"+encodeURIComponent(document.location.toString()),"ptm","height=450,width=550").focus())'); jQuery("#dedication-data-panel").hide("fast");jQuery("#dedication-data-panel").slideUp("fast",function(){jQuery("#dedication-data-panel").html(c);jQuery("#dedicationTitle-data-panel").html(c)});jQuery("#dedication-data-panel").slideDown();jQuery("#dedicationFooter_container").slideUp("fast",function(){jQuery("#dedicationArtits").html(f);jQuery("#dedicationSong").html(g)});jQuery("#dedicationFooter_container").slideDown("fast",function(){});jQuery("#dedicationTitle").html(e);shrinkTitle();jQuery("#dedicationTitle a").jTypeWriter(); -jQuery("#dedicationComments_container").slideUp("fast",function(){jQuery("#dedicationComments_container").load(h+" #comments","",function(){init_comments();jQuery("#dedicationComments_container").on("submit","#commentform",function(){prepare_new_comment_home();return!1})})});jQuery("#dedicationComments_container").slideDown();0b.offsetWidth;)size=parseInt(a.style.fontSize.replace("px","")),size-=1,a.style.fontSize=size+"px";a.style.fontSize-=NaN} jQuery(window).ready(function(){0