function tumblr_recent(url) { if(typeof url == 'undefined') { url = 'https://bateworld.com/tumblr_feed_a3658vb2/cached-tumblr_whatshot.html';} noclause=jQuery('#tumblr_video').html(); if(noclause=="no") { jQuery('#tumblr_video').html(' '); jQuery('#tumblr_video').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{}, async: true, cache: false, success: function(data) { //called when successful // whtumblr = ''; // whtumblr=whtumblr + '
Bateworld on tumblr
'; // whtumblr=whtumblr + '
'; // whtumblr=whtumblr + data; // whtumblr=whtumblr + '
'; jQuery('#tumblr_video').html(data); }, error: function(resp, textStatus, errorThrown){ //alert(errorThrown); } }); } } function hotvideos(url) { if(typeof url == 'undefined') { url = '/js/whatshot/get_member_videos.php';} noclause=jQuery('#wh_video').html(); if(noclause=="no") { jQuery('#wh_video').html(' '); jQuery('#wh_video').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{uid:userid,ubl:userblocklist}, cache: false, async: true, success: function(data) { //called when successful var whvid = ''; whvid=whvid + '
Videos
'; whvid=whvid + '
'; whvid=whvid+'
'; whvid=whvid+ '

'+data.vtitle+'

'; //whvid = whvid + '
'; whvid=whvid + '
'+data.vun+'
'; whvid=whvid+'
'; jQuery('#wh_video').html(whvid); // dostars(data.vsr); }, error: function(resp, textStatus, errorThrown){ //alert(resp); } }); } } function hotimages(url) { if(typeof url == 'undefined') { url = '/js/whatshot/get_member_images.php';} noclause=jQuery('#wh_image').html(); if(noclause=="no") { jQuery('#wh_image').html(' '); jQuery('#wh_image').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{uid:userid,ubl:userblocklist}, cache: true, async: true, success: function(data) { //called when successful whimg=''; whimg=whimg + '
Photos
'; whimg=whimg + '
'; whimg= whimg + '
'; whimg = whimg + '

'+data.atitle+'

'; whimg = whimg + '
'+data.pun+'
'; whimg = whimg + '
'; //whimg = whimg + '
Comments: '+data.pc+'
'; jQuery('#wh_image').html(whimg); }, error: function(resp, textStatus, errorThrown){ //alert(resp); } }); } } function hotblogs(url) { if(typeof url == 'undefined') { url = '/js/whatshot/get_member_blogs.php';} noclause=jQuery('#wh_blog').html(); if(noclause=="no") { jQuery('#wh_blog').html(' '); jQuery('#wh_blog').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{uid:userid,ubl:userblocklist}, cache: true, async: true, success: function(data) { bsdesc=data.bdesc; bsdesc='

'+bsdesc+'

'; buimg=data.uimg; whblog=''; whblog=whblog + '
Blogs
'; whblog=whblog + '
'; whblog=whblog + '
'; whblog = whblog + '

'+data.btitle+'

'; // whblog = whblog + '

'+bsdesc+'

'; whblog = whblog + '
'+data.uname+'
'; whblog = whblog + '
'; //whblog = whblog + '
Views: '+data.bviews+'Comments: '+data.bcom+'
'; jQuery('#wh_blog').html(whblog); }, error: function(resp, textStatus, errorThrown){ //alert(errorThrown); } }); } } function hotpolls(url) { if(typeof url == 'undefined') { url = '/js/whatshot/get_member_polls.php';} noclause=jQuery('#wh_poll').html(); if(noclause=="no") { jQuery('#wh_poll').html(' '); jQuery('#wh_poll').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{uid:userid,ubl:userblocklist}, cache: true, async: true, success: function(data) { ptitle='

'+data.ptitle+'

'; pdesc='

'+data.pdesc+'

'; whpoll=ptitle+pdesc; percentage = Math.round((data.ma / data.tv) * 100); whpoll = whpoll + '
Most Popular Answer: '+data.maq+' '+percentage+'% - Votes '+data.ma+'
'; whpoll=''; whpoll=whpoll + '
Polls
'; whpoll=whpoll + '
'; whpoll=whpoll + '

'+data.ptitle+'

' whpoll=whpoll+ '

'+data.pdesc+'

'; whpoll=whpoll + '
Top Answer ('+percentage+'%)
'; whpoll = whpoll + '
'+data.maq+'
'; whpoll=whpoll + '
'; jQuery('#wh_poll').html(whpoll); }, error: function(resp, textStatus, errorThrown){ //alert(resp); } }); } } function hotgroups(url) { if(typeof url == 'undefined') { url = '/js/whatshot/get_member_groups.php';} noclause=jQuery('#wh_group').html(); if(noclause=="no") { jQuery('#wh_group').html(' '); jQuery('#wh_group').css('display', 'none'); } else { jQuery.ajax({ url: url, type: 'GET', data:{}, async: true, cache: true, success: function(data) { gtitle='

'+data.gtitle+'

'; gdesc='
'; whgroup=gtitle+gdesc+'

'+data.gdesc+'

'; whgroup = ''; whgroup = whgroup + '
Groups
'; whgroup = whgroup + '
'; whgroup = whgroup + '
'; whgroup = whgroup + '

'+data.gtitle+'

'; whgroup = whgroup + '

'+data.gdesc+'

'; whgroup = whgroup + '
'; jQuery('#wh_group').html(whgroup); }, error: function(resp, textStatus, errorThrown){ //alert(resp); } }); } } jQuery.fn.stars = function(rating) { return jQuery(this).each(function() { // Get the value var val = parseFloat(rating); //val = Math.round(val * 4) / 4; /* To round to nearest quarter */ //val = Math.round(val * 2) / 2; /* To round to nearest half */ // Make sure that the value is in 0 - 5 range, multiply to get width var size = Math.max(0, (Math.min(5, val))) * 16; // Create stars holder var $span = jQuery('').width(size); // Replace the numerical value with stars jQuery(this).html($span); }); } function dostars(val) { jQuery('span.stars').stars(val); }