Ocena wątku:
- 0 głosów - średnia: 0
- 1
- 2
- 3
- 4
- 5
[JS] fancyBoX problem z umieszczeniem w PHP
|
Liczba postów: 4
Liczba wątków: 1
Dołączył: 11-06-2013
Reputacja:
0
Witam
Próbowałem już na różne sposoby wgrywać FanczBox niestety nie udaje mi się to obrazek poprostu się otwiera w nowym pliku.
Foldery wgrałem do public html w postaci: lib i source i wszystko co w nich było,
plik gallery.php tez mam w public html. Dodawałem wszystko według instrukcji i niestety nie wychodzi.
link=fancybox http://fancyapps.com/fancybox/#license
Oto mój plik z przed moich modyfikacji: będę wdzięczny jeżeli mi ktoś to doda. Obrazki maja się wyswietlać w <!-- Post -->
Kod: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="true" name="mssmarttagspreventparsing" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Biblioteka ZSHT</title>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<!-- IE fixes -->
<!--[if lte IE 6]>
<style type="text/css">
#ccnt {_height:1200px;}
.post {padding:0 0 25px;}
</style>
<![endif]-->
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
</head>
<body>
<!-- Header -->
<div id="hdr">
<!-- Search form -->
<!-- Logo -->
<div id="logo">
<a href="#"></a>
</div>
<!-- Main Menu -->
<div id="menu">
<a class="menu_grap" href="index.php">Home</a>
<a class="menu_freeb" href="books.php">Księgozbiór</a>
<a class="menu_frm" href="#">Konkursy</a>
<a class="menu_fnt" href="#">Wystawy</a>
</div>
</div>
<!-- Main Container -->
<div id="cnt">
<!-- Left Column -->
<div id="lcnt">
<!-- Left Column Section Links -->
<div class="lslink">
<a class="tutorial" href="regulamin.php">Regulaminy</a>
<a class="showcases" href="catalogs.php">Katalogi</a>
<a class="inspiration" href="#">Rozmaitości</a>
<a class="brushes" href="contact.php">Kontakt</a>
<a class="photoshop" href="news/index.php">Zaloguj</a>
</div>
<!-- Friends -->
<h3 class="sidetit_l">Linki</h3>
<a class="friends" href="http://zsht.pl">ZSHT</a>
</div>
<!-- Main - Center Column -->
<div id="ccnt">
<!-- Post -->
<div class="post">
<!-- Post Title - Permalink -->
Tutaj chcę obrazki
</div>
<!-- Pagination -->
<!-- Center Column bottom Borders -->
<div id="dummy"></div>
</div>
<!-- Right Column -->
<div id="rcnt">
<!-- Additional Sections Links -->
<h3 class="bib"><center>Biblioteka Czynna:</center></h3>
<img src="images/godziny.png" alt="Godziny otwarcia" />
<!-- Calendar -->
<p style="line-height: 1cm; "> </p>
<script type="text/javascript" src="http://404bajery.pl/kalendarz/kal.php?tlo=FFFFFF&czcionka=333333&nag=FF9900&dni=FFFFFF&dzis=FF8C00&szer=160"></script>
</div>
<br style="clear:both;"/>
</div>
<!-- Footer -->
<div id="foo">
<div id="foot_menu">
<div id="f_menu">
<a class="f_grap" href="index.php">Home</a>
<a class="f_freeb" href="books.php">Księgozbiór</a>
<a class="f_frm" href="#">Konkursy</a>
<a class="f_fnt" href="#">Wystawy</a>
</div>
<span class="f_left">© 2013 ZSHT. All rights reserved.</span>
<a class="f_rght" href="" title="Silentkiller">Code&Design SilentKiller & Frixu</a>
</div>
</div>
</body>
</html>
Z góry dziękuję i pozdrawiam.
Liczba postów: 2,411
Liczba wątków: 14
Dołączył: 10-08-2009
Reputacja:
132
Daj linka do strony bo tutaj w kodzie nic nie masz.
Liczba postów: 125
Liczba wątków: 8
Dołączył: 12-12-2012
Reputacja:
8
W tym kodzie nie wygląda jakbyś załączył wszystko według instrukcji bo brakuje plików *.css i *.js rzeczonego fancybox'a
Liczba postów: 4
Liczba wątków: 1
Dołączył: 11-06-2013
Reputacja:
0
Poprawiony kod lecz dalej nie działa.. daje linka do tej strony: http://80.53.82.107/~biblioteka/gallery2.php
Kod: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="true" name="mssmarttagspreventparsing" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Biblioteka ZSHT</title>
<link rel="stylesheet" href="css/jquery.fancybox.css" type="text/css" media="screen" />
<!-- IE fixes -->
<!--[if lte IE 6]>
<style type="text/css">
#ccnt {_height:1200px;}
.post {padding:0 0 25px;}
</style>
<![endif]-->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.4"></script>
<script type="text/javascript">
$(document).ready(function() {
/* This is basic - uses default settings */
$("a#single_image").fancybox();
/* Using custom settings */
$("a#inline").fancybox({
'hideOnContentClick': true
});
/* Apply fancybox to multiple items */
$("a.group").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
});
</script>
</head>
<body>
<!-- Header -->
<div id="hdr">
<!-- Search form -->
<!-- Logo -->
<div id="logo">
<a href="#"></a>
</div>
<!-- Main Menu -->
<div id="menu">
<a class="menu_grap" href="index.php">Home</a>
<a class="menu_freeb" href="books.php">Księgozbiór</a>
<a class="menu_frm" href="#">Konkursy</a>
<a class="menu_fnt" href="#">Wystawy</a>
</div>
</div>
<!-- Main Container -->
<div id="cnt">
<!-- Left Column -->
<div id="lcnt">
<!-- Left Column Section Links -->
<div class="lslink">
<a class="tutorial" href="regulamin.php">Regulaminy</a>
<a class="showcases" href="catalogs.php">Katalogi</a>
<a class="inspiration" href="#">Rozmaitości</a>
<a class="brushes" href="contact.php">Kontakt</a>
<a class="photoshop" href="news/index.php">Zaloguj</a>
</div>
<!-- Friends -->
<h3 class="sidetit_l">Linki</h3>
<a class="friends" href="http://zsht.pl">ZSHT</a>
</div>
<!-- Main - Center Column -->
<div id="ccnt">
<!-- Post -->
<div class="post">
<!-- Post Title - Permalink -->
<a id="single_image" href="fancybox/demo/1_b.jpg"><img src="fancybox/demo/1_s.jpg" alt=""/></a>
</div>
<!-- Pagination -->
<!-- Center Column bottom Borders -->
<div id="dummy"></div>
</div>
<!-- Right Column -->
<div id="rcnt">
<!-- Additional Sections Links -->
<h3 class="bib"><center>Biblioteka Czynna:</center></h3>
<img src="images/godziny.png" alt="Godziny otwarcia" />
<!-- Calendar -->
<p style="line-height: 1cm; "> </p>
<script type="text/javascript" src="http://404bajery.pl/kalendarz/kal.php?tlo=FFFFFF&czcionka=333333&nag=FF9900&dni=FFFFFF&dzis=FF8C00&szer=160"></script>
</div>
<br style="clear:both;"/>
</div>
<!-- Footer -->
<div id="foo">
<div id="foot_menu">
<div id="f_menu">
<a class="f_grap" href="index.php">Home</a>
<a class="f_freeb" href="books.php">Księgozbiór</a>
<a class="f_frm" href="#">Konkursy</a>
<a class="f_fnt" href="#">Wystawy</a>
</div>
<span class="f_left">© 2013 ZSHT. All rights reserved.</span>
<a class="f_rght" href="" title="Silentkiller">Code&Design SilentKiller & Frixu</a>
</div>
</div>
</body>
</html>
Liczba postów: 125
Liczba wątków: 8
Dołączył: 12-12-2012
Reputacja:
8
12-06-2013, 18:37
(Ten post był ostatnio modyfikowany: 12-06-2013, 18:39 przez atp.)
Wyrzuć slash'a z początku ścieżki do fancybox'a bo wygląda na to że on tutaj coś psuje (po kliknięciu w kodzie zwraca błąd 404) albo wrzuć ścieżkę bezwzględną do skryptu -> http://80.53.82.107/~biblioteka/fancybox/source/jquery.fancybox.pack.js?v=2.1.4
Liczba postów: 4
Liczba wątków: 1
Dołączył: 11-06-2013
Reputacja:
0
12-06-2013, 20:52
(Ten post był ostatnio modyfikowany: 12-06-2013, 20:52 przez SilentKiller.)
Skrypt jakoś ruszył lecz:
-nie działa przewijanie w żaden sposób(myszka, klawiatura, przyciski)
-brak przycisków (wszystkich, jest goła ramka tylko)
Dodałem styl strony do do css w fancybox/source to żadne obrazki strony nie działają...wiec skopiowalem styl fancyboxa do css/ lecz teraz tak jakby brakuje tego stylu fanceboxa (jak wyżej).
Kod: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="true" name="mssmarttagspreventparsing" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Biblioteka ZSHT</title>
<link rel="stylesheet" href="css/jquery.fancybox.css?v=2.1.4" type="text/css" media="screen" />
<!-- IE fixes -->
<!--[if lte IE 6]>
<style type="text/css">
#ccnt {_height:1200px;}
.post {padding:0 0 25px;}
</style>
<![endif]-->
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- Add fancyBox -->
<script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.4"></script>
<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>
<link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<script type="text/javascript">
$(document).ready(function() {
/* This is basic - uses default settings */
$("a#single_image").fancybox();
/* Using custom settings */
$("a#inline").fancybox({
'hideOnContentClick': true
});
/* Apply fancybox to multiple items */
$("a.group").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
});
</script>
</head>
<body>
<!-- Header -->
<div id="hdr">
<!-- Search form -->
<!-- Logo -->
<div id="logo">
<a href="#"></a>
</div>
<!-- Main Menu -->
<div id="menu">
<a class="menu_grap" href="index.php">Home</a>
<a class="menu_freeb" href="books.php">Księgozbiór</a>
<a class="menu_frm" href="#">Konkursy</a>
<a class="menu_fnt" href="#">Wystawy</a>
</div>
</div>
<!-- Main Container -->
<div id="cnt">
<!-- Left Column -->
<div id="lcnt">
<!-- Left Column Section Links -->
<div class="lslink">
<a class="tutorial" href="regulamin.php">Regulaminy</a>
<a class="showcases" href="catalogs.php">Katalogi</a>
<a class="inspiration" href="#">Rozmaitości</a>
<a class="brushes" href="contact.php">Kontakt</a>
<a class="photoshop" href="news/index.php">Zaloguj</a>
</div>
<!-- Friends -->
<h3 class="sidetit_l">Linki</h3>
<a class="friends" href="http://zsht.pl">ZSHT</a>
</div>
<!-- Main - Center Column -->
<div id="ccnt">
<!-- Post -->
<div class="post">
<!-- Post Title - Permalink -->
<a id="single_image" href="fancybox/demo/1_b.jpg"><img src="fancybox/demo/1_s.jpg" alt=""/></a>
<a id="single_image" href="fancybox/demo/2_b.jpg"><img src="fancybox/demo/2_s.jpg" alt=""/></a>
</div>
<!-- Pagination -->
<!-- Center Column bottom Borders -->
<div id="dummy"></div>
</div>
<!-- Right Column -->
<div id="rcnt">
<!-- Additional Sections Links -->
<h3 class="bib"><center>Biblioteka Czynna:</center></h3>
<img src="images/godziny.png" alt="Godziny otwarcia" />
<!-- Calendar -->
<p style="line-height: 1cm; "> </p>
<script type="text/javascript" src="http://404bajery.pl/kalendarz/kal.php?tlo=FFFFFF&czcionka=333333&nag=FF9900&dni=FFFFFF&dzis=FF8C00&szer=160"></script>
</div>
<br style="clear:both;"/>
</div>
<!-- Footer -->
<div id="foo">
<div id="foot_menu">
<div id="f_menu">
<a class="f_grap" href="index.php">Home</a>
<a class="f_freeb" href="books.php">Księgozbiór</a>
<a class="f_frm" href="#">Konkursy</a>
<a class="f_fnt" href="#">Wystawy</a>
</div>
<span class="f_left">© 2013 ZSHT. All rights reserved.</span>
<a class="f_rght" href="" title="Silentkiller">Code&Design SilentKiller & Frixu</a>
</div>
</div>
</body>
</html>
Liczba postów: 4
Liczba wątków: 1
Dołączył: 11-06-2013
Reputacja:
0
Jakoś udało mi się już zajść bardzo daleko... teraz mam pytanie dlaczego zmieniło mi scieżki do obrazów strony? Musiałem wrzucić folder images do fancybox, bo wszędzie dodało (samo) w css ten folder....
Kod: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="true" name="mssmarttagspreventparsing" />
<meta http-equiv="imagetoolbar" content="no" />
<title>Biblioteka ZSHT</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<!-- IE fixes -->
<!--[if lte IE 6]>
<style type="text/css">
#ccnt {_height:1200px;}
.post {padding:0 0 25px;}
</style>
<![endif]-->
<!-- Add jQuery library -->
<script type="text/javascript" src="fancybox/lib/jquery-1.9.0.min.js"></script>
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="fancybox/source/jquery.fancybox.js?v=2.1.4"></script>
<link rel="stylesheet" type="text/css" href="fancybox/source/jquery.fancybox.css?v=2.1.4" media="screen" />
<!-- Add Button helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<!-- Add Thumbnail helper (this is optional) -->
<link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" />
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
<!-- Add Media helper (this is optional) -->
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>
<script type="text/javascript">
$(document).ready(function() {
/*
* Simple image gallery. Uses default settings
*/
$('.fancybox').fancybox();
/*
* Different effects
*/
// Change title type, overlay closing speed
$(".fancybox-effects-a").fancybox({
helpers: {
title : {
type : 'outside'
},
overlay : {
speedOut : 0
}
}
});
// Disable opening and closing animations, change title type
$(".fancybox-effects-b").fancybox({
openEffect : 'none',
closeEffect : 'none',
helpers : {
title : {
type : 'over'
}
}
});
// Set custom style, close if clicked, change title type and overlay color
$(".fancybox-effects-c").fancybox({
wrapCSS : 'fancybox-custom',
closeClick : true,
openEffect : 'none',
helpers : {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(238,238,238,0.85)'
}
}
}
});
// Remove padding, set opening and closing animations, close if clicked and disable overlay
$(".fancybox-effects-d").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
helpers : {
overlay : null
}
});
/*
* Button helper. Disable animations, hide close button, change title type and content
*/
$('.fancybox-buttons').fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
/*
* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
*/
$('.fancybox-thumbs').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : true,
arrows : true,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
/*
* Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
*/
$('.fancybox-media')
.attr('rel', 'media-gallery')
.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
arrows : false,
helpers : {
media : {},
buttons : {}
}
});
/*
* Open manually
*/
$("#fancybox-manual-a").click(function() {
$.fancybox.open('1_b.jpg');
});
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'iframe.html',
type : 'iframe',
padding : 5
});
});
$("#fancybox-manual-c").click(function() {
$.fancybox.open([
{
href : '1_b.jpg',
title : 'My title'
}, {
href : '2_b.jpg',
title : '2nd title'
}, {
href : '3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});
});
</script>
</head>
<body>
<!-- Header -->
<div id="hdr">
<!-- Search form -->
<!-- Logo -->
<div id="logo">
<a href="#"></a>
</div>
<!-- Main Menu -->
<div id="menu">
<a class="menu_grap" href="index.php">Home</a>
<a class="menu_freeb" href="books.php">Księgozbiór</a>
<a class="menu_frm" href="#">Konkursy</a>
<a class="menu_fnt" href="#">Wystawy</a>
</div>
</div>
<!-- Main Container -->
<div id="cnt">
<!-- Left Column -->
<div id="lcnt">
<!-- Left Column Section Links -->
<div class="lslink">
<a class="tutorial" href="regulamin.php">Regulaminy</a>
<a class="showcases" href="catalogs.php">Katalogi</a>
<a class="inspiration" href="#">Rozmaitości</a>
<a class="brushes" href="contact.php">Kontakt</a>
<a class="photoshop" href="news/index.php">Zaloguj</a>
</div>
<!-- Friends -->
<h3 class="sidetit_l">Linki</h3>
<a class="friends" href="http://zsht.pl">ZSHT</a>
</div>
<!-- Main - Center Column -->
<div id="ccnt">
<!-- Post -->
<div class="post">
<!-- Post Title - Permalink -->
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="fancybox/demo/4_b.jpg"><img src="fancybox/demo/4_s.jpg" alt="" /></a>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="fancybox/demo/5_b.jpg"><img src="fancybox/demo/5_s.jpg" alt="" /></a>
<a class="fancybox" href="fancybox/demo/1_b.jpg"><img src="fancybox/demo/1_s.jpg" alt=""/></a>
<a class="fancybox" href="fancybox/demo/2_b.jpg"><img src="fancybox/demo/2_s.jpg" alt=""/></a>
</div>
<!-- Pagination -->
<!-- Center Column bottom Borders -->
<div id="dummy"></div>
</div>
<!-- Right Column -->
<div id="rcnt">
<!-- Additional Sections Links -->
<h3 class="bib"><center>Biblioteka Czynna:</center></h3>
<img src="images/godziny.png" alt="Godziny otwarcia" />
<!-- Calendar -->
<p style="line-height: 1cm; "> </p>
<script type="text/javascript" src="http://404bajery.pl/kalendarz/kal.php?tlo=FFFFFF&czcionka=333333&nag=FF9900&dni=FFFFFF&dzis=FF8C00&szer=160"></script>
</div>
<br style="clear:both;"/>
</div>
<!-- Footer -->
<div id="foo">
<div id="foot_menu">
<div id="f_menu">
<a class="f_grap" href="index.php">Home</a>
<a class="f_freeb" href="books.php">Księgozbiór</a>
<a class="f_frm" href="#">Konkursy</a>
<a class="f_fnt" href="#">Wystawy</a>
</div>
<span class="f_left">© 2013 ZSHT. All rights reserved.</span>
<a class="f_rght" href="" title="Silentkiller">Code&Design SilentKiller & Frixu</a>
</div>
</div>
</body>
</html>
|
Użytkownicy przeglądający ten wątek: 1 gości
|
|
Sponsorzy i przyjaciele
|
|
|