New snippet Fancy-Box

Olli

hi albatros,

sorry i did not read all topics completly. thanks for pointing me to your solution :-)

all the best

albatros

أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

Olli

hey there,

is there an approach to get the fancy box snippet not to insert all css / javascript below the <body> tag since this seems not to be valid code anymore?

thanks

albatros

Hi,

did you try my suggestion of the posting before?

Best regards

Uwe
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

noname8

Downloaded this fancy box and it's working nicely.

Minor bad thing is that with Opera it opens the image to under the screen if page is longer than screen.
(Seem's like it's always 30% of body height or similiar, so if body is 3000px long, picture goes too down..)

albatros

#28
Hi,

sorry! I really forgot that.

At the End of line 145 in jquery.fancybox.js  I changed from "- 40;" to "/ 3;"  so it's now
var itemTop        = viewportPos[3] + Math.round((viewportPos[1] - itemSize[1]) / 2) / 3;

After that, it also worked in Opera.

hth

albatros
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

sky writer

Hi albatros,

Your video page works for me.

But I tried the changes that you stated in the thread and I still get the video (or images) opening way down at the bottom of the page.  I notice in that same thread that you had this same issue.  Do you remember what was causing this for you?

This is driving me a little mad.

albatros

#26
Hi sky writer,

I tried the quoted code here http://www.willingen-ferienhaus.de/pages/testseite.php and it works in FF, Opera, IE8 and IE7. It's the same code, only another video (one of my favorites  :-D). I will let it stay here temporarily.

The changes I made, you can read in a former posting https://forum.WebsiteBaker.org/index.php/topic,11327.msg68099.html#msg68099 of the same thread.

hth

albatros

Edit: the video doesn't work in IE6 (don't know why in this moment), but the images do.
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

sky writer

Thank you.  Those examples look great, and work perfectly in my browsers.  So I am left to wonder, how you set your fancybox up?

I downloaded the fancybox module from AMASP http://www.websitebakers.com/pages/modules/various/fancy-box.php

Installed the module through WB Add-ons.

I then followed Vyni's (miss you Vyni!) instructions:
-----------------------------------------------
Example how to use to display a YouTube-video:

The first section of the page must be type CODE - in this section write

Code:
use_fancy_box();
and save.

In a wysiwyg-section add a link.
Add the corresponding class to the link.
Code:
<a class="video_fb" href="#testube">See this video</a>
save.

Add a further section - type CODE2, set it to html and insert the following code
Code:
<div style="display: none;" id="testube" />
<object height="355" width="425" />
<param name="movie" value="http://www.youtube.com/v/nnpv3FhIVXk" />
<param name="wmode" value="transparent" />
<embed height="355" width="425" src="http://www.youtube.com/v/nnpv3FhIVXk" type="application/x-shockwave-flash" wmode="transparent" />
</embed></object>
</div>
and save. Finished.
-----------------------

Like I said, I did have this module/snippet working a while ago.  But now it doesn't work.

Can you explain any differences in the way you implemented the module?  Did you make any other manual entries?

Many Thanks!

albatros

Hi,

yes I have. E.g. here http://www.willingen-ferienhaus.de/topics/wintersport-in-willingen-3.php and here http://www.willingen-ferienhaus.com/ you can see it in action, but only with images, not with a video.

Regards

Uwe
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

sky writer

Does anyone have FancyBox working in a WebsiteBaker website?  I had it working a while back, but now when I tried it opens the video frame way down the page, without the lightbox effect.

I have tried un-installing and re-installing, but it won't work anymore.

AgentLu

Hello, I have a question for the fancybox - I am new to javascripting and I am trying to figure out the fancybox. If I want to use more than one Custom defined image set, how do I do that? Can anybody help me please?

I am bugging like this >  :-o

doxynder

hab die include so abgeändert (<script---/></script -> <script></script)
<?php
$debug 
false;
if (
true == $debug ) {
    
ini_set('display_errors'1);
    
error_reporting(E_ALL);
}
if (!
function_exists("use_fancy_box") ) {
    function 
use_fancy_box() {
    
?>

   <script type="text/javascript" src="<?php echo WB_URL?>/modules/fancy_box/box/jquery.js"></script>
   <script type="text/javascript" src="<?php echo WB_URL?>/modules/fancy_box/box/jquery.fancybox.js"></script>
   <script type="text/javascript" src="<?php echo WB_URL?>/modules/fancy_box/box/jquery.pngFix.js"></script>
    <link rel="stylesheet" href="<?php echo WB_URL?>/modules/fancy_box/box/fancy_css.php?wbp=<?php echo WB_URL?>" type="text/css" media="screen">
   <SCRIPT type=text/javascript>
   $(document).ready(function() { $("a.fb").fancybox();
   $("a.page_fb").fancybox({ 'hideOnContentClick': false,
                           'zoomSpeedIn':0,
                               'zoomSpeedOut':300 });
   $("a.pic_fb").fancybox({ 'hideOnContentClick': true });
   $("a.pic1_fb").fancybox({ 'hideOnContentClick': true,
                           'overlayShow': true });    
   $("a.video_fb").fancybox({ 'overlayShow': true,
                              'frameWidth': 600,
                              'frameHeight': 400 });
   $("div#use_fb a").fancybox();
   });
   </script>
   <?php
    
}
}
?>

in chrome funkts jetzt auch

doxynder

Hi Luckyluke!
I have the same problem! Maybe you have a solution ? I´ve tried to put the code into head-no chance but i have to say that i´m not sure if i have done it in the right way.
This site http://www.rvb.bplaced.net/pages/fancy.php works fine in chrome altough there are error messages in the javascript console. Code is in body!

best regaard
peter

Luckyluke

Quote from: vyni on October 11, 2008, 03:26:31 PM
Great - it works in chrome!

I think there are some troubles in the new version of Chrome. I've got this
$(document).ready(function() { $("a.fb").fancybox(); $("a.page_fb").
fancybox({ 'hideOnContentClick': false, 'zoomSpeedIn':0, 'zoomSpeedOut':300 });
$("a.pic_fb").fancybox({ 'hideOnContentClick': true });
$("a.pic1_fb").fancybox({ 'hideOnContentClick': true, 'overlayShow': true });
$("a.video_fb").fancybox({ 'overlayShow': true, 'frameWidth': 425, 'frameHeight': 355 });
$("div#use_fb a").fancybox(); });


Strange...

Grtz,
Luc


mr-fan

#18
hi all,

i've a short question for the fancy box...

are there any minimum requires on the webserver to run it...

for my projekt it runs on XAMP... it runs on vynis server....with my template!

but it doesn't run under my webserver (different templates, anynews is correct configuered?)

are theire any serverside settings what can dissable the fb???

regards martin

edit here is the link to the example video from the threat : http://start.mr-vilsbiburg.de/pages/fb-test.php

vyni

Hi Albatros,

For the issue in opera: I really don´t have a clue. But there are a lot more browsers out there....
And if there is something in the "owners-page", than I guess, it is something with the Javascript itself. Or just a failure from opera. Who know´s?

:lol: I´m thinking of a script which identifies the browser and in case it isn´t FF or IE there must be a big red line saying:
It´s time to use a decent browser!

And the difference between code and code2:, or why I prefer to use code2 and use code rarely:

code2 has the option to set the mode, if html, javascript, php or just internal comment. So You have always clear which code You are using. Also it is a superb way to give some help and explanation to unexperienced users. If You want to comment a section or just write down the different parameters which could be set, this is perfect.
And this module I use very often - unchanged - full sized. But when You need a section code for only one line, for anynews or fancy_box or whatever, I was fed up of the space-wasting textarea. So I modified the output of this code-module. Now I´m happy with the look and feel of the backend, use it when I need only one line and prefer code2 for all other needings.

regards from Himberg

albatros

Quote from: albatros on October 11, 2008, 04:41:51 PM
Hi Vyni,

one question. I tested fancybox successfully with "Code". You prefer "Code2". What is the reason?

Thanks in advance!

Uwe

Edit: and a second qustion. I had a closer look at fancybox in Opera and the effect was different from IE and FF3. The popups are opening in a different position, much closer to the bottom.  :?
My changes or the js or opera?

Edit01: I tried the examples at http://fancy.klade.lv/ in Opera and none of them is working in Opera.  :oops:
Edit2: WHAT is that? The are working, but they are opening much, much deeper, much closer to the bottom of the (long) page. So you only can see them, when you are scrolling down. Mysterios!
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

albatros

#15
Hi Vyni,

one question. I tested fancybox successfully with "Code". You prefer "Code2". What is the reason?

Thanks in advance!

Uwe

Edit: and a second qustion. I had a closer look at fancybox in Opera and the effect was different from IE and FF3. The popups are opening in a different position, much closer to the bottom.  :?
My changes or the js or opera?

Edit01: I tried the examples at http://fancy.klade.lv/ in Opera and none of them is working in Opera.  :oops:
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

albatros

Quote from: vyni on October 11, 2008, 03:15:14 PM
But remember: If You call it directly from the template - You will get troubles with one or annother modul! Maybe Lightbox, maybe Imageflow, maybe annother?

Just forgotten,

the general solution for that is the use of a frontend.css, as matthias tould you in the german thread about fancy-box.

Regards

Uwe (going to eat now)

أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

albatros

I use Lightbox2 on the second page of the site "aufteilung..." and there seem to be no problems.
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

vyni


albatros

أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية

vyni

#10
Great,

have You tested it in google-chrome?

It isn´t working for me right now.
Do You have an url where to see ??

But remember: If You call it directly from the template - You will get troubles with one or annother modul! Maybe Lightbox, maybe Imageflow, maybe annother?

regards from Himberg

albatros

Hi all,

and again, a blind man talking about colors.  :-D

I love the fancy-box, but I also whant to get valid pages. here is, how it works for me:

I took this
<link rel="stylesheet" href="<?php echo WB_URL?>/modules/fancy_box/box/fancy_css.php?wbp=<?php 

echo WB_URL?>
" type="text/css" media="screen" />

from the include.php of the modul to the index.php of my template.

And then I changed the syntax in the inlude.php here and there a little bit
<?php
$debug 
false;
if (
true == $debug ) {
    
ini_set('display_errors'1);
    
error_reporting(E_ALL);
}
if (!
function_exists("use_fancy_box") ) {
    function 
use_fancy_box() {
    
?>

   <script language="JavaScript" type="text/javascript" src="<?php echo WB_URL; ?

>/
modules/fancy_box/box/jquery.js"></script>
    <script language="
JavaScript" type="text/javascript" src="<?php echo WB_URL; ?

>/
modules/fancy_box/box/jquery.fancybox.js"></script>
    <script language="
JavaScript" type="text/javascript" src="<?php echo WB_URL; ?

>/
modules/fancy_box/box/jquery.pngFix.js"></script>
     
    <script language="
JavaScript" type="text/javascript">
    $(document).ready(function() { $("
a.fb").fancybox();
    $("
a.page_fb").fancybox({ 'hideOnContentClick': false,
                            'zoomSpeedIn':0,
                               'zoomSpeedOut':300 });
    $("
a.pic_fb").fancybox({ 'hideOnContentClick': true });
    $("
a.pic1_fb").fancybox({ 'hideOnContentClick': true,
                            'overlayShow': true });    
    $("
a.video_fb").fancybox({ 'overlayShow': true,
                               'frameWidth': 425,
                               'frameHeight': 355 });
    $("
div#use_fb a").fancybox();
    
});
    </
script>
    <?
php
    
}
}
?>


The result is "This document was successfully checked as XHTML 1.0 Transitional!"  :-D
أنا لست إرهابيا. ليس لدى أي ورشة عمل القنبلة في الطابق السفلي. ليس لدى أي مرض الجمرة الخبيثة أيضا. أريد شراء لا مادة الريسين. أنا سوف ابدأ السفر إلى الولايات المتحدة الأمريكية