Hi, i've the following packages/modules installed:
Drupal 6.10
Shadowbox 6.x-2.1
jQuery Update 1.2.6
jQuery Update 6.x-1.1

--- Status Report
Drupal 6.10
Access to update.php Protected
Configuration file Protected
Cron maintenance tasks Last run 5 hours 30 min ago
You can run cron manually.
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
Module and theme update status Up to date
MySQL database 5.0.67
PHP 5.2.42-servage8
PHP memory limit 32M
PHP register globals Disabled
Shadowbox Installed correctly
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache
jQuery Update 1.2.6
---

I followed instructions and everything should be as intended, but the problem is that only images links open in shadowbox. In the page http://loungetraining.com/?q=node/1 you can test what i mean, i have the following links configured as above:

Diástese Abdominal
Fumar Mata...
Teste Imagem
Google
Google Maps

And only the image works...

Can someone help me out?

Thanks in advance,

Joao Moreira

Comments

psynaptic’s picture

I was having a problem the other day which I have yet to find a fix for..

Basically, I had a view with 2 shadowbox links. One pointing to an absolute URL (external site) and the other to a relative local page. The absolute worked but the relative didn't. Changing the relative to absolute didn't fix it.

I wonder if there has been a bug introduced in a recent version.

goodandsimple’s picture

But i don't think it's the same issue/bug, i chabged one of the links to an absolute path and the problem persists. Have you been at the site and tried yourself each one of the links? I suggest you do that...

Is it possible to be a problem of permissions?

psynaptic’s picture

I'm seeking an answer to this just like you. I don't have time to get into it right now.

psynaptic’s picture

Ok, this seems to be caused by the recent addition of the feature whereby only the required files are loaded based on the settings under Supported media in the UI. I have set all those to on and it works now. Can you confirm?

throk’s picture

Yeah, checking everything worked for me.

I was having issues with loading Youtube videos such as the following.

<a href="http://www.youtube.com/v/Y0dEmhCdmB8&ap=%2526fmt%3D22" rel="shadowbox;width=854;height=504">Watch the video.</a>

By the way &ap=%2526fmt%3D22 at the end of the URL is a hack to embed HD Youtube video.

goodandsimple’s picture

Indeed, it works... thanks psynatic.

psynaptic’s picture

It works but we need to find the fix.

goodandsimple’s picture

If you tell me how i'll help you...

psynaptic’s picture

I think it has something to do with the settings in JS that shadowbox reads. Look in the source code of the page when shadowbox is enabled. You will see settings in javascript like this:

<script type="text/javascript">Drupal.extend({ settings: { "shadowbox": { "flv_player": "/sites/all/modules/shadowbox/shadowbox/flvplayer.swf", "animation": 1, "animation_fade": 1, "animation_sequence": "wh", "modal": 0, "overlay_color": "000", "overlay_opacity": "0.85", "flash_background": "000000", "autoplay_movies": 1, "show_movie_controls": 1, "slideshow_delay": "0", "resize_duration": "0.35", "fade_duration": "0.35", "display_nav": 1, "continuous_galleries": 0, "display_counter": 1, "counter_type": "default", "counter_limit": "10", "viewport_padding": 20, "handle_oversize": "resize", "handle_unsupported": "link", "initial_height": 320, "initial_width": "320", "enable_keys": 1, "extensions_img": [ "png", "jpg", "jpeg", "gif", "bmp" ], "extensions_swf": [ "swf" ], "extensions_flv": [ "flv" ], "extensions_qt": [ "dv", "mov", "moov", "movie", "mp4" ], "extensions_wmp": [ "asf", "wm", "wmv" ], "extensions_qtwmp": [ "avi", "mpg", "mpeg" ], "extensions_iframe": [ "asp", "aspx", "cgi", "cfm", "htm", "html", "pdf", "pl", "php", "php3", "php4", "php5", "phtml", "rb", "rhtml", "shtml", "txt", "vbs" ], "auto_enable_all_images": 0 }, "simplemenu": { "basePath": "/", "effect": "none", "effectSpeed": "fast", "element": "body", "hideDelay": "500", "placement": "prepend" }, "basePath": "/" } });</script>

extensions_swf, extensions_flv, extensions_qt.. I think these are the issue. Try turning off swf and looking at this code. Maybe we need to set this to something rather than it being not present or empty. Check shadowbox.js and see if that can be modified to account for when this is missing/empty.

psynaptic’s picture

Status: Active » Postponed
yoda-fr’s picture

I don't know if it is good but it seems to work.
in shadowbox.js:

ext: {
img: ['png', 'jpg', 'jpeg', 'gif', 'bmp'],
swf: ['swf'],
flv: ['flv'],
qt: ['dv', 'mov', 'moov', 'movie', 'mp4'],
wmp: ['asf', 'wm', 'wmv'],
qtwmp: ['avi', 'mpg', 'mpeg'],
iframe: ['','asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php',
'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml',
'txt', 'vbs']
}
just add '' in iframe extensions

Is ther a better solution?
thanks

Ryan Palmer’s picture

Status: Postponed » Active

I am also having difficulty displaying swf content in a shadowbox. When I click on the link, the shadowbox should appear, but instead nothing happens to the page.

<a href="/path/to/my.swf" rel="shadowbox;height=140px;width=120px" title="The title of the SWF"><img src="/path/to/swf/screenshot.jpg"/></a>

Also tried with "px" (which seemed to work well with images):

<a href="/path/to/my.swf" rel="shadowbox;height=140px;width=120px" title="The title of the SWF"><img src="/path/to/swf/screenshot.jpg"/></a>

psynaptic’s picture

Status: Active » Needs review

I can't reproduce this. It was probably fixed with a recently update. Can you guys try the deve version and report back if it's working now?

Try this as a test:

<a href="http://google.com/" rel="shadowbox">Google</a>
tmsimont’s picture

I'm having a similar issue.

I've checked all file types in the Shadowbox admin UI, and although Images on the page work fine, wmv's fail.

I have the administrative settings set to fire for wmv, but the "rel="shadowbox;(+parameters)" does not appear on my wmv links.

I've checked the header, and all script is there.

To test, I copied the source into a test.html in my site's root, and manually put 'rel="shadowbox"' in the link to the wmv, loaded the page, and it worked.

I see in that in modules/shadowbox/shadowbox_auto.js that images are manually called and the shadowbox tag is added:

  if (settings.auto_enable_all_images == 1) {
    var images = 'a[href$=jpg][rel=""], a[href$=png][rel=""], a[href$=gif][rel=""], a[href$=jpeg][rel=""], a[href$=bmp][rel=""], a[href$=JPG][rel=""], a[href$=PNG][rel=""], a[href$=GIF][rel=""], a[href$=JPEG][rel=""], a[href$=BMP][rel=""]';
    $(images).each(function() {
      if (settings.auto_gallery == 1) {
        $(this).attr('rel', 'shadowbox[gallery]');
      }
      else {
        $(this).attr('rel', 'shadowbox');
      };
    });
  };

but why does this not handle wmv's?

Where is the "rel=shadowbox;(+parameters)" added to wmv links?

I manually added this code to my own script.js file:

		//force shadowbox on wmv!
		var vids = 'a[href$=wmv][rel=""]';
		$(vids).each(function() {
			$(this).attr('rel', 'shadowbox');
		});

but this does not supply the size parameters for the rel tag, which doesn't do me a lot of good...

Also..

After using the file upload module to get my wmv online, if i link directly to it, all I see is "waiting for video" on a black background and no video. very annoying

-- could this be related?

A little background on some previously resolved issues:

I had to manually copy and paste the swfobject.js from http://code.google.com/p/swfobject/ because my install of shadowbox 3.0rc1 did not include the shadowbox/libraries directory. (i cannot link directly to google because my site currently does not allow HTTP requests)

I had to also fix shadowbox.js to get include the "/" between "shadowbox" and "libraries" in the call to this script.

Thanks!

tmsimont’s picture

Title: Can't open iframes or other type of content beside images... » Wow i got it!!

Ok, so after wasting an entire day trying to get it online, i found my issue:

Because I'm using a custom template, I left out the following code on the bottom of the page:

...

<?php print $closure; ?>

</body>
</html>

the " print $closure; " statement adds javascript essential to various drupal modules, including shadowbox.

I don't know if this will fix everyone's problems, but it took care of mine!

Ryan Palmer’s picture

Title: Wow i got it!! » Can't open iframes or other type of content beside images

Please keep the title related to the issue.

crbassett’s picture

I'm using the latest version of this module and the latest distribution of Shadowbox JS. I can bring up images and the test Google link mentioned earlier in this thread. However, a Vimeo video does not work. I used the same code used on the Shadowbox JS official website, also using the same code as another Drupal site of mine that still works with the Vimeo video.

I'm going to just revert to whatever version I have that is working on the other site and see if that fixes it.

crbassett’s picture

I reverted back to Shadowbox 6.x-3.0 and it works again with Vimeo videos. I tried 3.5 and 3.4 and both failed. I also had *all* the media types activated in the module settings. Still no luck. At least it's working with the older version now.

psynaptic’s picture

Did you try dev?

crbassett’s picture

I believe I did, but I was in a rush since I had to get the functionality back. I can't remember clearly. I was doing a lot earlier today. I'll take some time later and test it with the DEV version and report back with what I experience. I hope it will help you. I'm not good with code, so I'll do by best.

psynaptic’s picture

Status: Needs review » Fixed

New release was created.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.