My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 478: Youtube Via Process Handler Not Working
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  May 2010


 
Reported by james1...@live.co.uk, May 22, 2010
I am trying to put a "Youtube Via Process Handler" on my site, If i put the
<a href="http://www.youtube.com/watch?v=lddUnv1R5y0"
class="nyroModal">Youtube Via Process Handler</a>
on the page when clicked the box will open fine but the video is not
centred. But when I add the javascript code the link just acts as normal
and I am taken to the youtube page.
May 22, 2010
#1 james1...@live.co.uk
Even just this snippt would make the page redierect
$(function() {
  $.nyroModalSettings({
  });
});
whereas this wouldnt 
$(function() {
});
May 22, 2010
Project Member #2 nyro...@gmail.com
Are you sure you included nyroModal JavaScript files?
Could you provide a test page to see the problem?
May 22, 2010
#3 james1...@live.co.uk
Now I changed how I was sourceing the js file and that seemed to help but now the
video is not centered - here is a link http://www.petsbath.com/booster-bath.html
May 24, 2010
#4 james1...@live.co.uk
Any Ideas?
May 25, 2010
Project Member #5 nyro...@gmail.com
For some reason, you're jQuery setup might be in strict mode, which means you can't
use the regular $ object as jQuery.

To solve you're problem, use this code:
jQuery(function() {
  jQuery.nyroModalSettings({
    processHandler: function(settings) {
      var from = settings.from;
      if (from && from.href && from.href.indexOf('http://www.youtube.com/watch?v=')
== 0) {
        jQuery.nyroModalSettings({
          type: 'swf',
          height: 355,
          width: 425,
          url: from.href.replace(new RegExp("watch\\?v=", "i"), 'v/')
        });
      }
    }
  });
});


And it will works.
Status: Fixed
May 25, 2010
#6 james1...@live.co.uk
Thank You Very Much :D

Powered by Google Project Hosting