Showing labels on a the slideshow


#1

Hello everyone,

I have this code which displays posts on a slideshow with title and images using Cycle2. I want to display labels under the title for each post on the slideshow, but I don’t know how to retrieve them using JSON:

function showgalleryposts(t) {
  var e = t.feed.openSearch$totalResults.$t,
    n = new Array;
  document.write("<ul>");
  for (var r = 0; e > r; ++r) n[r] = r;
  for (1 == random_posts && n.sort(function() {
      return .5 - Math.random()
    }), numposts_gal > e && (numposts_gal = e), r = 0; numposts_gal > r; ++r) {
    for (var i = t.feed.entry[n[r]], o = i.title.$t, l = 0; l < i.link.length; l++)
      if ("alternate" == i.link[l].rel) {
        posturl_gal = i.link[l].href;
        break
      }
    if ("content" in i) var u = i.content.$t;
    if (s = u, a = s.indexOf("<img"), b = s.indexOf('src="', a), c = s.indexOf('"', b + 5), d = s.substr(b + 5, c - b - 5), -1 != a && -1 != b && -1 != c && "" != d) var m = d;
    else var m = "";
    document.write('<li style="background: url(' + m + ') 50% 50% no-repeat;"><div id="slide-container"><span class="slide-desc"><span class="slide-content"><div class="slide-center"><a href="' + posturl_gal + '"><h2 style="margin:10px 0 0;">'), document.write(o + "</h2></a>");
    var g = /<\S[^>]*>/g;
    if (u = u.replace(g, ""), 1 == showpostsummary_gal)
      if (u.length < numchars_gal) document.write(u), document.write("</span>");
      else {
        u = u.substring(0, numchars_gal);
        var p = u.lastIndexOf(" ");
        u = u.substring(0, p), document.write('<div class="slider-sum"></div>'), document.write("</div></span></span>")
      }
    document.write('</div>'), document.write("</li>")
  }
  document.write("</ul>")
}
var showpostthumbnails_gal = !0,
  showpostsummary_gal = !0,
  random_posts = !1,
  numchars_gal = 20,
  numposts_gal = 20;

Any help is highly appreciated. Thanks in advance.