by motley
3 replies
Hello all,

There is a discussion in one tread with a script developer who says that it's difficult to do what a few customers and I ask.

His script embeds videos and has a filtering feature. If a video is filtered (should not to appear on the page) the script shows an image with "Disallowed" text on it. We suggest to not show this image instead of filtered video, but skip this video and check the next one. Developer (seller) says it's too difficult.

I'm not a coder but it seems to me it isn't so difficult. Here is a peace of code below with my notes in blue:
-------------
if ( is_filtered == 0 ) { <-- IF VIDEO ISN'N FILTERED THE FUNCTION DOES NEXT CODE:
if ( nr == 1 )
{ //imname.src = "http://img.youtube.com/vi/"+id+"/"+nr+".jpg"; imname.src = "http://i.ytimg.com/vi/"+id+"/"+nr+".jpg"; }
else { //imname.src = "http://img.youtube.com/vi/"+id+"/"+nr+".jpg"; imname.src = "http://i"+nr+".ytimg.com/vi/"+id+"/"+nr+".jpg"; } nr++; if(nr > 3) nr = 1; THUMB_PREVIEW_TIMER = setTimeout("mousOverImage(false,'"+id+"',"+nr+", '"+bSize+"', '"+bColor+"', "+is_filtered+");",600); }
else { <-- IF ELSE (FILTERED) THE FUNCTION SHOWS "DISALLOWED" THUMBNAIL:
imname.src = "/images/disallowed_thumbnail.gif"; }
-------------
Isn't it easy to modify the last lines to not show "Disallowed" image, but skip this video and go to check the next one? I'd like you to confirm that it's possible and not difficult.

Thanks
#advise #function #php
  • Profile picture of the author Don Art
    if i understand your question try:

    imname.src = "/images/disallowed_thumbnail.gif";

    to:

    // imname.src = "/images/disallowed_thumbnail.gif";

    you are just commenting out the line that displays the disallowed img

    in any case yes it seems easy
    {{ DiscussionBoard.errors[5533287].message }}
  • Profile picture of the author frenchsquared
    I do not see why it would be hard. However your code is not showing how the video is called. You would need to make it If is filtered play it, if not filtered get the next video.

    so.. it will be as hard as it is to pull the video.
    {{ DiscussionBoard.errors[5533577].message }}
  • Profile picture of the author motley
    Thank you guys, I'm sorry. I found one more file with "Disallowed" image. May be that file manage video thumbnails on pages.
    {{ DiscussionBoard.errors[5533790].message }}

Trending Topics