|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions <?Related_Entries?> |
<?Related_Entries?> |
Hello!
I found this script: http://ges.moy.su/forum/55-249-1 The script does not find the image to my games. http://etig10.ucoz.com/stuff/1-1-0-30 Can you help me? |
but the script is :
Code <script type="text/javascript"> $('#uRelated li.uRelatedEntry a').each(function(){ var c=$(this),cont=c.parent(),url=this.href,noimg='http://studiorr.ucoz.ru/img/no-imgs/_nopic.gif'; $.get(url,{},function(d){ var b=$(d).find('.eMessage img:eq(0)')||$(d).find('.eTitle img:eq(0)')||false,src=null; if(b){ for(var i=0;i<b.length;i++){ if(!/ucoz.net/i.test(b[i].src)){ src=b[i].src; cont.prepend($('<img/>').attr('src',src).addClass('uRelatedEntry'));break; }; }; if(src==null){cont.prepend($('<img/>').attr('src',noimg).addClass('uRelatedEntry'))} }; }); }); </script> Is it possible to look for game logo instead of the image? thank you |
blizar10, Yes but you have to add one game logo.
Code var b=$(d).find('.eMessage img:eq(0)')||$(d).find('.eTitle img:eq(0)')||false,src=null; Change that to the place where you have your logo Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them. Post edited by VZ - Saturday, 2016-02-27, 7:08 PM
|
Try that...
Code <script type="text/javascript"> $('#uRelated li.uRelatedEntry a').each(function(){ var c=$(this),cont=c.parent(),url=this.href,noimg='http://studiorr.ucoz.ru/img/no-imgs/_nopic.gif'; $.get(url,{},function(d){ var b=$(d).find('.eBlock tbody tr td img:eq(0)')||false,src=null; if(b){ for(var i=0;i<b.length;i++){ if(!/ucoz.net/i.test(b[i].src)){ src=b[i].src; cont.prepend($('<img/>').attr('src',src).addClass('uRelatedEntry'));break; }; }; if(src==null){cont.prepend($('<img/>').attr('src',noimg).addClass('uRelatedEntry'))} }; }); }); </script> Hit that "Thanks" button. :)
In life there's ALWAYS limits but do not plan above them. Post edited by VZ - Sunday, 2016-02-28, 8:39 PM
|
| |||
| |||