diff --git a/languages/de/rateit_backend.php b/languages/de/rateit_backend.php index ff89c77..dcbc135 100644 --- a/languages/de/rateit_backend.php +++ b/languages/de/rateit_backend.php @@ -67,6 +67,7 @@ $GLOBALS['TL_LANG']['tl_rateit_type_options']['faq'] = 'FAQ'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['ce'] = 'Inhaltselement'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['module'] = 'Modul'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['galpic'] = 'Galerie-Bild'; +$GLOBALS['TL_LANG']['tl_rateit_type_options']['news4ward'] = 'Beitrag'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['rating desc'] = 'Bewertung'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['title'] = 'Titel'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['typ'] = 'Typ'; diff --git a/languages/en/rateit_backend.php b/languages/en/rateit_backend.php index 454e702..d145f5a 100644 --- a/languages/en/rateit_backend.php +++ b/languages/en/rateit_backend.php @@ -67,6 +67,7 @@ $GLOBALS['TL_LANG']['tl_rateit_type_options']['faq'] = 'FAQ'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['ce'] = 'Content element'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['module'] = 'Module'; $GLOBALS['TL_LANG']['tl_rateit_type_options']['galpic'] = 'Gallery picture'; +$GLOBALS['TL_LANG']['tl_rateit_type_options']['news4ward'] = 'Blog entry'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['rating desc'] = 'Rating'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['title'] = 'Title'; $GLOBALS['TL_LANG']['tl_rateit_order_options']['typ'] = 'Type'; diff --git a/public/css/backend.css b/public/css/backend.css index 8007bea..9f91572 100644 --- a/public/css/backend.css +++ b/public/css/backend.css @@ -90,6 +90,7 @@ .mod_rateit table.rating td.type-faq { background-color:#ffe0aa; } .mod_rateit table.rating td.type-article { background-color:#ffcce0; } .mod_rateit table.rating td.type-galpic { background-color:#ffe066; } +.mod_rateit table.rating td.type-news4ward { background-color:#ffe011; } .mod_rateit table.rating td.active-1, .mod_rateit table.rating td.type-page { background-color:#e0ffe0; } .mod_rateit table.rating td. diff --git a/public/js/rateit-uncompressed.js b/public/js/rateit-uncompressed.js index de1f51d..8f20353 100644 --- a/public/js/rateit-uncompressed.js +++ b/public/js/rateit-uncompressed.js @@ -212,7 +212,7 @@ function doRateIt() { getStarPercent: function(id) { /* Format = anyStringHere--_(scale); * Example: RateItRatings-5-3_5 //Primary key id = 5, 3/5 stars. */ - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); if (stars != null) { var score = stars[3].toFloat(); var scale = stars[4].toFloat(); @@ -236,17 +236,17 @@ function doRateIt() { }, getRatableId: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? stars[1] : ''; }, getRatableType: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? stars[2] : ''; }, getRatableMaxValue: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? stars[4].toInt() : 0; }, @@ -451,7 +451,7 @@ function doRateIt() { getStarPercent: function(id) { /* Format = anyStringHere--_(scale); * Example: RateItRatings-5-3_5 //Primary key id = 5, 3/5 stars. */ - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); if (stars != null) { var score = parseFloat(stars[3]); var scale = parseFloat(stars[4]); @@ -475,17 +475,17 @@ function doRateIt() { }, getRatableId: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? stars[1] : ''; }, getRatableType: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? stars[2] : ''; }, getRatableMaxValue: function(id) { - var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/); + var stars = id.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/); return stars != null ? parseInt(stars[4]) : 0; }, diff --git a/public/js/rateit.js b/public/js/rateit.js index 8d5e930..6486824 100644 --- a/public/js/rateit.js +++ b/public/js/rateit.js @@ -1 +1 @@ -var RateItRating;function doRateIt(){if(window.MooTools){var b=new Class({Implements:Options,options:{step:0.1,readonly:false,resetable:false},initialize:function(c){this.setOptions(c);$$(".rateItRating").each(function(d){this.initMe(d)}.bind(this))},initMe:function(c){if(!Browser.ie||Browser.version>6){c.id=c.getAttribute("id");c.rateable=c.getAttribute("rel")=="not-rateable"?false:true;c.wrapper=c.getElement(".wrapper");c.textEl=c.getElement(".ratingText");c.selected=c.wrapper.getElement(".rateItRating-selected");c.hover=c.wrapper.getElement(".rateItRating-hover");c.widthFx=new Fx.Tween(c.selected,{property:"width",link:"chain"});var d=this.getBackgroundImage(c.wrapper);this.options.starwidth=d.width;this.options.starheight=d.height/3;if(this.options.starwidth===undefined||this.options.starwidth<16){this.options.starwidth=16}if(this.options.starheight===undefined||this.options.starheight<16){this.options.starheight=16}this.setBackgroundPosition(c.selected,-1*this.options.starheight);this.setBackgroundPosition(c.hover,-1*2*this.options.starheight);c.starPercent=this.getStarPercent(c.id);c.ratableId=this.getRatableId(c.id);c.ratableType=this.getRatableType(c.id);this.options.max=this.getRatableMaxValue(c.id);c.selected.setStyle("height",this.options.starheight);c.hover.setStyle("height",this.options.starheight);c.wrapper.setStyle("width",this.options.starwidth*this.options.max);c.wrapper.setStyle("height",this.options.starheight);this.fillVote(c.starPercent,c);c.currentFill=this.getFillPercent(c.starPercent);if(c.rateable){c.mouseCrap=function(k){var j=k.event.layerX;if(!j){j=k.event.offsetX}var i=this.getVotePercent(j);var f=Math.ceil((i/100)*this.options.max);var g=f*this.options.starwidth;if(c.hover.getStyle("width").toInt()!=g){c.selected.setStyle("display","none");c.hover.setStyle("width",Math.min(g,this.options.starwidth*this.options.max));c.hover.setStyle("display","block")}var h=f/this.options.max*100;this.fillVote(h,c)}.bind(this);c.wrapper.addEvent("mouseenter",function(f){c.wrapper.addEvent("mousemove",c.mouseCrap)});c.wrapper.addEvent("mouseleave",function(f){c.removeEvent("mousemove");c.hover.setStyle("width",0);c.hover.setStyle("display","none");c.selected.setStyle("display","block");c.widthFx.start(c.currentFill)});c.wrapper.addEvent("click",function(j){c.currentFill=c.newFill;c.wrapper.removeEvents();c.textEl.oldTxt=c.textEl.get("text");c.textEl.set("html","          ");c.textEl.addClass("loading");if(typeof($(".mbrateItRating"))!="undefined"&&c.id.indexOf("mb")==0){var h=c.id;h=h.replace("mb","");if(typeof(arrRatings)=="object"){for(var f=0;f100){c.newFill=this.getFillPercent(100)}c.selected.setStyle("width",c.newFill)},getStarPercent:function(g){var c=g.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);if(c!=null){var f=c[3].toFloat();var e=c[4].toFloat();var d=(f/e)*100;return d}else{return 0}},getFillPercent:function(c){return(c/100)*(this.options.starwidth*this.options.max)},getVotePercent:function(d){var c=this.options.starwidth*this.options.max;var e=(d/c*100).round(2);return e},getRatableId:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?c[1]:""},getRatableType:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?c[2]:""},getRatableMaxValue:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?c[4].toInt():0},setBackgroundPosition:function(c,d){c.setStyle("background-position","0% "+d+"px")},getBackgroundImagePath:function(c){return c.getStyle("background-image")},getBackgroundImage:function(d){var f=/url\s*\(["']?(.*)["']?\)/i;var e=document.createElement("img");var c=this.getBackgroundImagePath(d);c=c.match(f)[1];c=c.replace('"',"");e.src=c;return e}});window.addEvent("domready",function(c){RateItRating=new b({url:"SimpleAjax.php"})})}else{if(window.jQuery){(function(){b={options:{step:0.1,readonly:false,resetable:false},initialize:function(d){if(typeof d=="object"&&typeof d.url!="undefined"){this.options.url=d.url}var c=this;jQuery(".rateItRating").each(function(f,e){c.initMe(e)});return this},initMe:function(d){var c=this;if(!Browser.Engine.trident4){var e=jQuery(d);e.data("id",e.attr("id"));e.data("rateable",e.attr("rel")=="not-rateable"?false:true);e.data("wrapper",e.find(".wrapper"));e.data("textEl",e.find(".ratingText"));e.data("selected",e.find(".rateItRating-selected"));e.data("hover",e.find(".rateItRating-hover"));var f=c.getBackgroundImage(e.data("wrapper"));c.options.starwidth=f.width;c.options.starheight=f.height/3;if(c.options.starwidth===undefined||c.options.starwidth<16){c.options.starwidth=16}if(c.options.starheight===undefined||c.options.starheight<16){c.options.starheight=16}c.setBackgroundPosition(e.data("selected"),-1*c.options.starheight);c.setBackgroundPosition(e.data("hover"),-1*2*c.options.starheight);e.data("starPercent",c.getStarPercent(e.data("id")));e.data("ratableId",c.getRatableId(e.data("id")));e.data("ratableType",c.getRatableType(e.data("id")));c.options.max=c.getRatableMaxValue(e.data("id"));e.data("selected").css("height",c.options.starheight);e.data("hover").css("height",c.options.starheight);e.data("wrapper").css("width",c.options.starwidth*c.options.max);e.data("wrapper").css("height",c.options.starheight);c.fillVote(e.data("starPercent"),e);e.data("currentFill",c.getFillPercent(e.data("starPercent")));if(e.data("rateable")){e.data("wrapper").mouseenter(function(g){e.data("selected").hide(500,"easeInOutQuad");e.data("hover").show();e.data("wrapper").mousemove({el:e,self:c},c.mouseCrap)});e.data("wrapper").mouseleave(function(g){e.data("wrapper").unbind("mousemove");e.data("hover").hide();e.data("selected").show();e.data("selected").animate({width:e.data("currentFill")},500)});e.data("wrapper").click(function(j){e.data("currentFill",e.data("newFill"));e.data("wrapper").unbind();e.data("oldTxt",e.data("textEl").text());e.data("textEl").html("          ");e.data("textEl").addClass("loading");if(typeof(jQuery(".mbrateItRating"))!="undefined"&&e.data("id").indexOf("mb")==0){var i=e.data("id");i=i.replace("mb","");if(typeof(arrRatings)=="object"){for(var g=0;g100){c.data("newFill",this.getFillPercent(100))}c.data("selected").css("width",c.data("newFill"))},mouseCrap:function(h){var f=h.data.el;var e=h.data.self;var j=h.originalEvent.layerX;if(!j){j=h.originalEvent.offsetX}var i=e.getVotePercent(j);var c=Math.ceil((i/100)*e.options.max);var d=c*e.options.starwidth;if(parseInt(f.data("hover").css("width"))!=d){f.data("selected").css("display","none");f.data("hover").css("width",Math.min(d,e.options.starwidth*e.options.max));f.data("hover").css("display","block")}var g=c/e.options.max*100;e.fillVote(g,f)},getStarPercent:function(g){var c=g.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);if(c!=null){var f=parseFloat(c[3]);var e=parseFloat(c[4]);var d=(f/e)*100;return d}else{return 0}},getFillPercent:function(c){return(c/100)*(this.options.starwidth*this.options.max)},getVotePercent:function(d){var c=this.options.starwidth*this.options.max;var e=(d/c*100).toFixed(2);return e},getRatableId:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?c[1]:""},getRatableType:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?c[2]:""},getRatableMaxValue:function(d){var c=d.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic)-(\d*\.?\d+)_(\d*\.?\d+)$/);return c!=null?parseInt(c[4]):0},setBackgroundPosition:function(c,d){c.css("background-position","0% "+d+"px")},getBackgroundImagePath:function(c){return c.css("background-image")},getBackgroundImage:function(d){var f=/url\s*\(["']?(.*)["']?\)/i;var e=document.createElement("img");var c=this.getBackgroundImagePath(d);c=c.match(f)[1];c=c.replace('"',"");e.src=c;return e},updateText:function(d,f){error=f.split("ERROR:")[1];d.data("textEl").removeClass("loading");if(error){this.RateItRating.showError(d,error);return false}d.data("textEl").text(f);if(typeof(jQuery(".mbrateItRating"))!="undefined"&&d.data("id").indexOf("mb")==0){var e=d.attr("id");e=e.replace("mb","");if(typeof(arrRatings)=="object"){for(var c=0;c6){e.id=e.getAttribute("id");e.rateable=e.getAttribute("rel")=="not-rateable"?false:true;e.wrapper=e.getElement(".wrapper");e.textEl=e.getElement(".ratingText");e.selected=e.wrapper.getElement(".rateItRating-selected");e.hover=e.wrapper.getElement(".rateItRating-hover");e.widthFx=new Fx.Tween(e.selected,{property:"width",link:"chain"});var t=this.getBackgroundImage(e.wrapper);this.options.starwidth=t.width;this.options.starheight=t.height/3;if(this.options.starwidth===undefined||this.options.starwidth<16){this.options.starwidth=16}if(this.options.starheight===undefined||this.options.starheight<16){this.options.starheight=16}this.setBackgroundPosition(e.selected,-1*this.options.starheight);this.setBackgroundPosition(e.hover,-1*2*this.options.starheight);e.starPercent=this.getStarPercent(e.id);e.ratableId=this.getRatableId(e.id);e.ratableType=this.getRatableType(e.id);this.options.max=this.getRatableMaxValue(e.id);e.selected.setStyle("height",this.options.starheight);e.hover.setStyle("height",this.options.starheight);e.wrapper.setStyle("width",this.options.starwidth*this.options.max);e.wrapper.setStyle("height",this.options.starheight);this.fillVote(e.starPercent,e);e.currentFill=this.getFillPercent(e.starPercent);if(e.rateable){e.mouseCrap=function(t){var n=t.event.layerX;if(!n){n=t.event.offsetX}var r=this.getVotePercent(n);var i=Math.ceil(r/100*this.options.max);var s=i*this.options.starwidth;if(e.hover.getStyle("width").toInt()!=s){e.selected.setStyle("display","none");e.hover.setStyle("width",Math.min(s,this.options.starwidth*this.options.max));e.hover.setStyle("display","block")}var o=i/this.options.max*100;this.fillVote(o,e)}.bind(this);e.wrapper.addEvent("mouseenter",function(t){e.wrapper.addEvent("mousemove",e.mouseCrap)});e.wrapper.addEvent("mouseleave",function(t){e.removeEvent("mousemove");e.hover.setStyle("width",0);e.hover.setStyle("display","none");e.selected.setStyle("display","block");e.widthFx.start(e.currentFill)});e.wrapper.addEvent("click",function(t){e.currentFill=e.newFill;e.wrapper.removeEvents();e.textEl.oldTxt=e.textEl.get("text");e.textEl.set("html","          ");e.textEl.addClass("loading");if(typeof $(".mbrateItRating")!="undefined"&&e.id.indexOf("mb")==0){var n=e.id;n=n.replace("mb","");if(typeof arrRatings=="object"){for(var r=0;r100){t.newFill=this.getFillPercent(100)}t.selected.setStyle("width",t.newFill)},getStarPercent:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);if(t!=null){var n=t[3].toFloat();var r=t[4].toFloat();var i=n/r*100;return i}else{return 0}},getFillPercent:function(e){return e/100*this.options.starwidth*this.options.max},getVotePercent:function(e){var t=this.options.starwidth*this.options.max;var n=(e/t*100).round(2);return n},getRatableId:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?t[1]:""},getRatableType:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?t[2]:""},getRatableMaxValue:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?t[4].toInt():0},setBackgroundPosition:function(e,t){e.setStyle("background-position","0% "+t+"px")},getBackgroundImagePath:function(e){return e.getStyle("background-image")},getBackgroundImage:function(e){var t=/url\s*\(["']?(.*)["']?\)/i;var n=document.createElement("img");var r=this.getBackgroundImagePath(e);r=r.match(t)[1];r=r.replace('"',"");n.src=r;return n}});window.addEvent("domready",function(t){RateItRating=new e({url:"SimpleAjax.php"})})}else if(window.jQuery){(function(){e={options:{step:.1,readonly:false,resetable:false},initialize:function(e){if(typeof e=="object"&&typeof e["url"]!="undefined")this.options.url=e["url"];var t=this;jQuery(".rateItRating").each(function(e,n){t.initMe(n)});return this},initMe:function(e){var n=this;if(!Browser.Engine.trident4){var r=jQuery(e);r.data("id",r.attr("id"));r.data("rateable",r.attr("rel")=="not-rateable"?false:true);r.data("wrapper",r.find(".wrapper"));r.data("textEl",r.find(".ratingText"));r.data("selected",r.find(".rateItRating-selected"));r.data("hover",r.find(".rateItRating-hover"));var i=n.getBackgroundImage(r.data("wrapper"));n.options.starwidth=i.width;n.options.starheight=i.height/3;if(n.options.starwidth===undefined||n.options.starwidth<16){n.options.starwidth=16}if(n.options.starheight===undefined||n.options.starheight<16){n.options.starheight=16}n.setBackgroundPosition(r.data("selected"),-1*n.options.starheight);n.setBackgroundPosition(r.data("hover"),-1*2*n.options.starheight);r.data("starPercent",n.getStarPercent(r.data("id")));r.data("ratableId",n.getRatableId(r.data("id")));r.data("ratableType",n.getRatableType(r.data("id")));n.options.max=n.getRatableMaxValue(r.data("id"));r.data("selected").css("height",n.options.starheight);r.data("hover").css("height",n.options.starheight);r.data("wrapper").css("width",n.options.starwidth*n.options.max);r.data("wrapper").css("height",n.options.starheight);n.fillVote(r.data("starPercent"),r);r.data("currentFill",n.getFillPercent(r.data("starPercent")));if(r.data("rateable")){r.data("wrapper").mouseenter(function(e){r.data("selected").hide(500,"easeInOutQuad");r.data("hover").show();r.data("wrapper").mousemove({el:r,self:n},n.mouseCrap)});r.data("wrapper").mouseleave(function(e){r.data("wrapper").unbind("mousemove");r.data("hover").hide();r.data("selected").show();r.data("selected").animate({width:r.data("currentFill")},500)});r.data("wrapper").click(function(e){r.data("currentFill",r.data("newFill"));r.data("wrapper").unbind();r.data("oldTxt",r.data("textEl").text());r.data("textEl").html("          ");r.data("textEl").addClass("loading");if(typeof jQuery(".mbrateItRating")!="undefined"&&r.data("id").indexOf("mb")==0){var i=r.data("id");i=i.replace("mb","");if(typeof arrRatings=="object"){for(var s=0;s100){t.data("newFill",this.getFillPercent(100))}t.data("selected").css("width",t.data("newFill"))},mouseCrap:function(e){var t=e.data["el"];var n=e.data["self"];var r=e.originalEvent.layerX;if(!r){r=e.originalEvent.offsetX}var i=n.getVotePercent(r);var s=Math.ceil(i/100*n.options.max);var o=s*n.options.starwidth;if(parseInt(t.data("hover").css("width"))!=o){t.data("selected").css("display","none");t.data("hover").css("width",Math.min(o,n.options.starwidth*n.options.max));t.data("hover").css("display","block")}var u=s/n.options.max*100;n.fillVote(u,t)},getStarPercent:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);if(t!=null){var n=parseFloat(t[3]);var r=parseFloat(t[4]);var i=n/r*100;return i}else{return 0}},getFillPercent:function(e){return e/100*this.options.starwidth*this.options.max},getVotePercent:function(e){var t=this.options.starwidth*this.options.max;var n=(e/t*100).toFixed(2);return n},getRatableId:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?t[1]:""},getRatableType:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?t[2]:""},getRatableMaxValue:function(e){var t=e.match(/(\d*\|?\d*)-(page|article|ce|module|news|faq|galpic|news4ward)-(\d*\.?\d+)_(\d*\.?\d+)$/);return t!=null?parseInt(t[4]):0},setBackgroundPosition:function(e,t){e.css("background-position","0% "+t+"px")},getBackgroundImagePath:function(e){return e.css("background-image")},getBackgroundImage:function(e){var t=/url\s*\(["']?(.*)["']?\)/i;var n=document.createElement("img");var r=this.getBackgroundImagePath(e);r=r.match(t)[1];r=r.replace('"',"");n.src=r;return n},updateText:function(e,n){error=n.split("ERROR:")[1];e.data("textEl").removeClass("loading");if(error){this.RateItRating.showError(e,error);return false}e.data("textEl").text(n);if(typeof jQuery(".mbrateItRating")!="undefined"&&e.data("id").indexOf("mb")==0){var r=e.attr("id");r=r.replace("mb","");if(typeof arrRatings=="object"){for(var i=0;i rateit_rating_after): ?> -
-
- showBefore) : ?> -
description; ?>
- -
-
-
-
- showAfter) : ?> -
description; ?>
- -
- itemreviewed; ?> - - actRating; ?> - maxRating; ?> - - votes; ?> +
+ showBefore) : ?> +
description; ?>
+ +
+
+
+
+ showAfter) : ?> +
description; ?>
+