Ok, a ver si esto va mejor. En frontend/source/be/tools.php
Arriba de
} else {
$rater ='';
$rater.='<div class="ratingblock">';
Añade
} else if ($static == "ajax_ie") {
$rater ='';
$rater.='<div class="ratingblock">';
$rater.='<div id="ajaxratemasuga">';
$rater.=' <ul id="unit_ul'.$id.'" class="unit-rating" style="width:'.$rating_unitwidth*$units.'px;">';
$rater.=' <li class="current-rating" style="width:'.$rating_width.'px;"><span id="salida_ie"></span></li>';
$rater.=' <li class="current-rating" style="width:'.$rating_width.'px;">'._HWDVIDS_INFO_M_CURR.$rating2.'/'.$units.'</li>';
for ($ncount = 1; $ncount <= $units; $ncount++) { // loop from 1 to the number of units
if(!$voted) { // if the user hasn't yet voted, draw the voting stars
$rater.='<li><a href="javascript:ajax_ie('.$ncount.')" title="'.$ncount.' out of '.$units.'" class="r'.$ncount.'-unit rater" rel="nofollow">'.$ncount.'</a></li>';
}
}
$ncount=0; // resets the count
$rater.=' </ul>';
$rater.=' <p';
if($voted){ $rater.=' class="voted"'; }
$rater.='>'._HWDVIDS_INFO_RATED.'<strong> '.$rating1.'</strong> ('.$count.' '.$tense.' '._HWDVIDS_INFO_M_CAST.')';
$rater.=' </p>';
$rater.='</div>';
$rater.='</div>';
return $rater;
Y en frontend/source/view.php
if ( $ajaxratemeth == 2 ) {
$mainframe->addCustomHeadTag('<link rel="stylesheet" type="text/css" href="'.$mosConfig_live_site.'/components/com_hwdvideoshare/ajaxsuite/masuga/css/rating.css" />');
echo "<script type=\"text/javascript\">";
echo "document.write('<div id=\"hwdvid_sb\"><img src=\"".$mosConfig_live_site."/components/com_hwdvideoshare/images/processing.gif\" alt=\""._HWDVIDS_ALERT_LOADRATE."\"/> "._HWDVIDS_ALERT_LOADRATE."</div><br />');";
echo "</script>";
?>
<script language='javascript' type='text/javascript'>
new Starbox('hwdvid_sb', <?php echo $rating ?>, { overlay: 'big.png', buttons: 10, rerate: false, indicator: '#{average} rating from #{total} votes', total: <?php echo $row->rating_number_votes ?>, onRate: function(element, info) {
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("<?php echo _HWDVIDS_AJAX_BBROKE; ?>");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
document.getElementById('ajaxresponse').style.border = "1px solid #171d25";
document.getElementById('ajaxresponse').style.width = "90%";
document.getElementById('ajaxresponse').style.overflow = "hidden";
document.getElementById('ajaxresponse').style.padding = "3px";
document.getElementById('ajaxresponse').style.margin = "3px 0 3px 0";
document.getElementById('ajaxresponse').innerHTML = ajaxRequest.responseText;
}
}
ajaxRequest.open("GET", "<?php echo $mosConfig_live_site."/index2.php?option=com_hwdvideoshare&task=ajaxrate&no_html=1&rating=" ?>" + info.rated + "<?php echo "&video_id=".$row->id ?>", true);
ajaxRequest.send(null);
var indicator = element.down('.indicator');
indicator.update('You rated ' + info.rated);
window.setTimeout(function() { indicator.update('<?php echo _HWDVIDS_AJAX_THANKVOTE; ?>') }, 2000);
new Effect.Highlight(indicator);
}});
</script>
<noscript><?php echo hwdvids_HWD_tools::rating_bar($row->id,'5',FALSE, $row); ?></noscript>
<?php
}
Por
if ( $ajaxratemeth == 2 ) {
$mainframe->addCustomHeadTag('<link rel="stylesheet" type="text/css" href="'.$mosConfig_live_site.'/components/com_hwdvideoshare/ajaxsuite/masuga/css/rating.css" />');
if (ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) { ?>
<script language='javascript' type='text/javascript'>
function ajax_ie(voto) {
var ajaxRequest; // The variable that makes Ajax possible!
try{
ajaxRequest = new XMLHttpRequest();
} catch (e){
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("<?php echo _HWDVIDS_AJAX_BBROKE; ?>");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
document.getElementById('salida_ie').innerHTML = ajaxRequest.responseText;
}
}
ajaxRequest.open("GET", "<?php echo $mosConfig_live_site."/index2.php?option=com_hwdvideoshare&task=ajaxrate&no_html=1&rating=" ?>" + voto + "<?php echo "&video_id=".$row->id ?>", true);
ajaxRequest.send(null);
}
</script>
<?php echo hwdvids_HWD_tools::rating_bar($row->id,'5',"ajax_ie", $row);
}
else {
echo "<script type=\"text/javascript\">";
echo "document.write('<div id=\"hwdvid_sb\"><img src=\"".$mosConfig_live_site."/components/com_hwdvideoshare/images/processing.gif\" alt=\""._HWDVIDS_ALERT_LOADRATE."\"/> "._HWDVIDS_ALERT_LOADRATE."</div><br />');";
echo "</script>";
?>
<script language='javascript' type='text/javascript'>
new Starbox('hwdvid_sb', <?php echo $rating ?>, { overlay: 'big.png', buttons: 10, rerate: false, indicator: '#{average} rating from #{total} votes', total: <?php echo $row->rating_number_votes ?>, onRate: function(element, info) {
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("<?php echo _HWDVIDS_AJAX_BBROKE; ?>");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
document.getElementById('ajaxresponse').style.border = "1px solid #171d25";
document.getElementById('ajaxresponse').style.width = "90%";
document.getElementById('ajaxresponse').style.overflow = "hidden";
document.getElementById('ajaxresponse').style.padding = "3px";
document.getElementById('ajaxresponse').style.margin = "3px 0 3px 0";
document.getElementById('ajaxresponse').innerHTML = ajaxRequest.responseText;
}
}
ajaxRequest.open("GET", "<?php echo $mosConfig_live_site."/index2.php?option=com_hwdvideoshare&task=ajaxrate&no_html=1&rating=" ?>" + info.rated + "<?php echo "&video_id=".$row->id ?>", true);
ajaxRequest.send(null);
var indicator = element.down('.indicator');
indicator.update('You rated ' + info.rated);
window.setTimeout(function() { indicator.update('<?php echo _HWDVIDS_AJAX_THANKVOTE; ?>') }, 2000);
new Effect.Highlight(indicator);
}});
</script>
<noscript><?php echo hwdvids_HWD_tools::rating_bar($row->id,'5',FALSE, $row); ?></noscript>
<?php }
}
Y define las variables:
_HWDVIDS_INFO_M_CURR
_HWDVIDS_INFO_RATED
_HWDVIDS_INFO_M_CAST
En el archivo de idioma, que no sé dónde estará. Fíjate en el inglés para que veas qué significan.
Saludos!