Bienvenido, Invitado
Nombre de Usuario Contraseña: Recordarme

Sistema de puntuación de videos no me funciona con IE
(1 viendo) (1) Invitado
  • Página:
  • 1
  • 2

TEMA: Sistema de puntuación de videos no me funciona con IE

Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11886

Me acabo de dar cuenta que el sistema de puntuación de mi galería de videos no se ve en IE, la página me da error, y se queda como cargando.
Es la típica puntuación de estrellas, supongo que usará ajax, no se. La cosa es que con Firefox, va de perlas, pero con el IE no se carga, se queda diciendo "Loading rating system" y no es posible ni votar, ni ver la puntuación de los demás.

¿Tiene esto algun arreglo?

Os dejo la dirección a un video de la galería para que veais lo que os digo, teneis que probar con los dos navegadores.

Galeria de video con error en IE
  • thalcave
  • DESCONECTADO
  • Experto
  • Temas: 224
  • Karma: 4
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11888

Hola,

Pues he puesto el depurador de IE8 y la verdad es que no tengo ni idea de porque es, lo mejor sería mirar si hay una versión nueva del componente, a ver si se arregla. Los archivos .js que utiliza son muy complejos, no sé por dónde meter mano, pero si puedes hacer este cambio, que hará que funcione, aunque sea sin javascript:

En el componente/frontend/source/view.php

Cambia
				<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>

Por
				<?php if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) { ?>
 
<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); if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) { ?></noscript><?php } ?>


Saludos!
  • JoniJnm
  • CONECTADO
  • Administrador
  • Temas: 4167
  • Karma: 144
Última Edición: hace 2 años, 8 meses Por JoniJnm.
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11890

Me serviria y estaria encantado con esta solución, pero el código que me has dato debe contener algún error, te comento los errores, que me da con una imagen de como queda en IE, puesto que en firefox no hay variación.

[img=http://img44.imageshack.us/img44/4605/sistemadevotacin.jpg]


Como puede verse el sistema ajax sigue quedando arriba de las estrellas "loading rating system"

El sistema de votación funciona, el problema es que despues de pulsar el voto te lanza a otra página, con una sola linea que dice que has votado o lo que corresponda, y hay que pulsar para volver atrás.

Aparecen tres lineas de código bajo las estrellas.

He estado revisando el código que has puesto el cual añade al principio y al final:

<?php if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) { ?>
 
if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) { ?></noscript><?php } ?>
 


Telo pongo por si detectas algún error.

Aver si puedes ayudarme para que lo deje medio funcionando en IE.
  • thalcave
  • DESCONECTADO
  • Experto
  • Temas: 224
  • Karma: 4
Última Edición: hace 2 años, 8 meses Por thalcave.
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11891

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."\"/>&nbsp;"._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."\"/>&nbsp;"._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!
  • JoniJnm
  • CONECTADO
  • Administrador
  • Temas: 4167
  • Karma: 144
Última Edición: hace 2 años, 8 meses Por JoniJnm.
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11908

Gracias jonni. He hecho tus cambios más algunos más que he tenido que añadir.

El resultado final es aceptable, lo malo es que ahora cuando se vota o cualquier otra advertencia, ya sea un reporte añadir a favoritos, etc, te manda a otra página para indicartelo, antes lo hacia en la misma pantalla con ajax.

Galerias de video funcional en IE

Bueno que he esta investigando el error y he encontrado el origen, ahora se que no me habia dado cuenta antes, porque antes si que funcionaba, estos son los errores que provocan que no funcione el ajax para la votacion en este componente de video:

Mensaje: El objeto no acepta esta propiedad o método
Línea: 363
Carácter: 1645
Código: 0
URI: www.accumalaga.es/mambots/system/yoo_effects/yoo_effects.js.php?mt=1&lb=1&re=1&sl=1


Mensaje: El objeto no acepta esta propiedad o método
Línea: 153
Carácter: 107
Código: 0
URI: www.accumalaga.es/mambots/system/yoo_effects/yoo_effects.js.php?mt=1&lb=1&re=1&sl=1


Mensaje: El objeto no acepta esta propiedad o método
Línea: 359
Carácter: 490
Código: 0
URI: www.accumalaga.es/mambots/system/yoo_effects/yoo_effects.js.php?mt=1&lb=1&re=1&sl=1


El causante de todo es un plugin: yoo_effects.js.php, lo estaba probando para ver como funcionaba. Si lo despublico, el ajax va en IE y en firefox perfectamente.

¿Se puede hacer algo?

Actualmente la página de los videos aparece con el mensaje de error en la página aunque todo funcione.

Había pensado, se podría hacer algo para que este plugin no carge en las páginas del componente de video?¿?¿? Eso le permitiria funcionar en el resto de la web, y desaparecia el error.

Es solo una idea, no se si se puede hacer.
  • thalcave
  • DESCONECTADO
  • Experto
  • Temas: 224
  • Karma: 4
Última Edición: hace 2 años, 8 meses Por thalcave.
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11909

yoo_effects.js.php es de tu plantilla? Pásame el plugin o dime desde donde puedo descargarlo para que vea cómo va. Miraré si se puede hacer lo que dices: que al ir a la url de ajax no se cargue

Saludos!
  • JoniJnm
  • CONECTADO
  • Administrador
  • Temas: 4167
  • Karma: 144
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11910

Hola.

Acabo de medio arreglarlo.

He probado otro plugin para el componente de video consistente en otro sistema de carga de los votos, lo he provado y despues de algunos cambios parece funcionar en ambos navegadores. Sigo de pruebas. Ahora mismo esta funcionando.

Lo único que no puedo cambiar, por que no lo encuentro es que al votar sale esto:


Puntuación4.7(3 votes cast), si re renueva la página vuele a poner de forma correcta:

Puntuación 4.7 (3 Votos )

(esto es gracias a definir las variables como me indicaste)

P.D. El error de la página no consigo eliminarlo
  • thalcave
  • DESCONECTADO
  • Experto
  • Temas: 224
  • Karma: 4
Última Edición: hace 2 años, 8 meses Por thalcave.
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11911

Ya tengo corregido todo, solo me queda el error de la página, pero parece que todo funciona bien, el tiempo dira si hay algún error más.

Gracias por todo.

Por cierto acabo de descubrir que con el notepad++ se puede buscar texto en carpetas de archivos a las vez. No veas el trabajo que me hubiera quitado, jeje.
  • thalcave
  • DESCONECTADO
  • Experto
  • Temas: 224
  • Karma: 4
El tema ha sido cerrado.

Re: Sistema de puntuación de videos no me funciona con IE hace 2 años, 8 meses #11912

Hostia, es verdad que se puede buscar con Notepad++ xD Yo usaba vgrep y prgrep, pero ahora ya con np hago todo

Qué error es ese que dices? Para arreglarlo has quitado el ajax?
  • JoniJnm
  • CONECTADO
  • Administrador
  • Temas: 4167
  • Karma: 144
El tema ha sido cerrado.
  • Página:
  • 1
  • 2
Página generada en: 0.66 segundos